{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/62519600","id":62519600,"diff_hunk":"@@ -80,6 +94,11 @@ func (a *Authenticator) AuthenticatePassword(username, password string) (user.In\n \n \tresp, err := a.client.Do(req)\n \tif err != nil {\n+\t\tif _, ok := err.(*RedirectAttemptedError); !ok {\n+\t\t\t// If this was a redirect, treat it as a simple\n+\t\t\t// authentication failure, not an error","path":"pkg/auth/authenticator/password/basicauthpassword/basicauthpassword.go","position":34,"original_position":34,"commit_id":"3ce3580daa2c93ad580916cec2ce2475b269f6da","original_commit_id":"3ce3580daa2c93ad580916cec2ce2475b269f6da","user":{"login":"sgallagher","id":739555,"avatar_url":"https://avatars.githubusercontent.com/u/739555?v=3","gravatar_id":"","url":"https://api.github.com/users/sgallagher","html_url":"https://github.com/sgallagher","followers_url":"https://api.github.com/users/sgallagher/followers","following_url":"https://api.github.com/users/sgallagher/following{/other_user}","gists_url":"https://api.github.com/users/sgallagher/gists{/gist_id}","starred_url":"https://api.github.com/users/sgallagher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgallagher/subscriptions","organizations_url":"https://api.github.com/users/sgallagher/orgs","repos_url":"https://api.github.com/users/sgallagher/repos","events_url":"https://api.github.com/users/sgallagher/events{/privacy}","received_events_url":"https://api.github.com/users/sgallagher/received_events","type":"User","site_admin":false},"body":"The 500 error is returned by `tokencmd.RequestToken()` to the user. I'm not sure how exactly it behaves in the web UI yet.\r\n\r\nSo how do you want me to proceed here?","created_at":"2016-05-09T15:32:43Z","updated_at":"2016-05-09T15:32:43Z","html_url":"https://github.com/openshift/origin/pull/8434#discussion_r62519600","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/8434","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/62519600"},"html":{"href":"https://github.com/openshift/origin/pull/8434#discussion_r62519600"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/8434"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/8434","id":65841495,"html_url":"https://github.com/openshift/origin/pull/8434","diff_url":"https://github.com/openshift/origin/pull/8434.diff","patch_url":"https://github.com/openshift/origin/pull/8434.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/8434","number":8434,"state":"open","locked":false,"title":"[test] Basic Auth Identity Provider: Handle redirection safely","user":{"login":"sgallagher","id":739555,"avatar_url":"https://avatars.githubusercontent.com/u/739555?v=3","gravatar_id":"","url":"https://api.github.com/users/sgallagher","html_url":"https://github.com/sgallagher","followers_url":"https://api.github.com/users/sgallagher/followers","following_url":"https://api.github.com/users/sgallagher/following{/other_user}","gists_url":"https://api.github.com/users/sgallagher/gists{/gist_id}","starred_url":"https://api.github.com/users/sgallagher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgallagher/subscriptions","organizations_url":"https://api.github.com/users/sgallagher/orgs","repos_url":"https://api.github.com/users/sgallagher/repos","events_url":"https://api.github.com/users/sgallagher/events{/privacy}","received_events_url":"https://api.github.com/users/sgallagher/received_events","type":"User","site_admin":false},"body":"@liggitt \r\nRelated to https://github.com/openshift/origin/issues/4977\r\n\r\nThese patches add several new tests to the integration suite.\r\n\r\nThe first patch ensures that incorrect passwords are properly rejected and return a 401 from `RequestToken()`.\r\n\r\nThe second patch adds tests for when a remote Basic Auth server returns a redirect code 301, 302, 303 or 307.\r\n\r\nThe third patch fixes a bug in the Basic Auth provider where it was automatically following redirects. We don't want to do this because this may have been an attempt to redirect authentication to a malicious site. It's better to simply reject and let an administrator figure out what the correct behavior would be.","created_at":"2016-04-08T20:17:40Z","updated_at":"2016-05-09T15:32:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5a47749ad93ad34b3f54e800d821927e1dd765f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/8434/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/8434/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/8434/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/3ce3580daa2c93ad580916cec2ce2475b269f6da","head":{"label":"sgallagher:auth-logging-wip","ref":"auth-logging-wip","sha":"3ce3580daa2c93ad580916cec2ce2475b269f6da","user":{"login":"sgallagher","id":739555,"avatar_url":"https://avatars.githubusercontent.com/u/739555?v=3","gravatar_id":"","url":"https://api.github.com/users/sgallagher","html_url":"https://github.com/sgallagher","followers_url":"https://api.github.com/users/sgallagher/followers","following_url":"https://api.github.com/users/sgallagher/following{/other_user}","gists_url":"https://api.github.com/users/sgallagher/gists{/gist_id}","starred_url":"https://api.github.com/users/sgallagher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgallagher/subscriptions","organizations_url":"https://api.github.com/users/sgallagher/orgs","repos_url":"https://api.github.com/users/sgallagher/repos","events_url":"https://api.github.com/users/sgallagher/events{/privacy}","received_events_url":"https://api.github.com/users/sgallagher/received_events","type":"User","site_admin":false},"repo":{"id":50381938,"name":"origin","full_name":"sgallagher/origin","owner":{"login":"sgallagher","id":739555,"avatar_url":"https://avatars.githubusercontent.com/u/739555?v=3","gravatar_id":"","url":"https://api.github.com/users/sgallagher","html_url":"https://github.com/sgallagher","followers_url":"https://api.github.com/users/sgallagher/followers","following_url":"https://api.github.com/users/sgallagher/following{/other_user}","gists_url":"https://api.github.com/users/sgallagher/gists{/gist_id}","starred_url":"https://api.github.com/users/sgallagher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgallagher/subscriptions","organizations_url":"https://api.github.com/users/sgallagher/orgs","repos_url":"https://api.github.com/users/sgallagher/repos","events_url":"https://api.github.com/users/sgallagher/events{/privacy}","received_events_url":"https://api.github.com/users/sgallagher/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sgallagher/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/sgallagher/origin","forks_url":"https://api.github.com/repos/sgallagher/origin/forks","keys_url":"https://api.github.com/repos/sgallagher/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sgallagher/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sgallagher/origin/teams","hooks_url":"https://api.github.com/repos/sgallagher/origin/hooks","issue_events_url":"https://api.github.com/repos/sgallagher/origin/issues/events{/number}","events_url":"https://api.github.com/repos/sgallagher/origin/events","assignees_url":"https://api.github.com/repos/sgallagher/origin/assignees{/user}","branches_url":"https://api.github.com/repos/sgallagher/origin/branches{/branch}","tags_url":"https://api.github.com/repos/sgallagher/origin/tags","blobs_url":"https://api.github.com/repos/sgallagher/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sgallagher/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sgallagher/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/sgallagher/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sgallagher/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/sgallagher/origin/languages","stargazers_url":"https://api.github.com/repos/sgallagher/origin/stargazers","contributors_url":"https://api.github.com/repos/sgallagher/origin/contributors","subscribers_url":"https://api.github.com/repos/sgallagher/origin/subscribers","subscription_url":"https://api.github.com/repos/sgallagher/origin/subscription","commits_url":"https://api.github.com/repos/sgallagher/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/sgallagher/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/sgallagher/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/sgallagher/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/sgallagher/origin/contents/{+path}","compare_url":"https://api.github.com/repos/sgallagher/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sgallagher/origin/merges","archive_url":"https://api.github.com/repos/sgallagher/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sgallagher/origin/downloads","issues_url":"https://api.github.com/repos/sgallagher/origin/issues{/number}","pulls_url":"https://api.github.com/repos/sgallagher/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/sgallagher/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/sgallagher/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sgallagher/origin/labels{/name}","releases_url":"https://api.github.com/repos/sgallagher/origin/releases{/id}","deployments_url":"https://api.github.com/repos/sgallagher/origin/deployments","created_at":"2016-01-25T21:23:57Z","updated_at":"2016-01-25T21:24:03Z","pushed_at":"2016-04-26T19:12:46Z","git_url":"git://github.com/sgallagher/origin.git","ssh_url":"git@github.com:sgallagher/origin.git","clone_url":"https://github.com/sgallagher/origin.git","svn_url":"https://github.com/sgallagher/origin","homepage":"http://www.openshift.org","size":266817,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"561e4fa7cd56c2f23780da730dd2e7de6f451e80","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"OpenShift - Build, deploy, and manage cloud-native and legacy applications with Kubernetes and Docker","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/origin/deployments","created_at":"2014-07-30T20:04:05Z","updated_at":"2016-05-09T06:34:35Z","pushed_at":"2016-05-09T15:32:18Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":336708,"stargazers_count":1276,"watchers_count":1276,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":767,"mirror_url":null,"open_issues_count":985,"forks":767,"open_issues":985,"watchers":1276,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/8434"},"html":{"href":"https://github.com/openshift/origin/pull/8434"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/8434"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/8434/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/8434/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/8434/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/3ce3580daa2c93ad580916cec2ce2475b269f6da"}}}}