{"action":"created","comment":{"url":"https://api.github.com/repos/rancher/rancher/pulls/comments/193503865","pull_request_review_id":126488499,"id":193503865,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzUwMzg2NQ==","diff_hunk":"@@ -0,0 +1,277 @@\n+package saml\n+\n+import (\n+\t\"bufio\"\n+\t\"crypto/rsa\"\n+\t\"crypto/tls\"\n+\t\"crypto/x509\"\n+\t\"encoding/json\"\n+\t\"encoding/pem\"\n+\t\"encoding/xml\"\n+\t\"fmt\"\n+\t\"io/ioutil\"\n+\t\"net/http\"\n+\t\"net/url\"\n+\t\"os\"\n+\t\"strings\"\n+\t\"time\"\n+\n+\t\"github.com/crewjam/saml\"\n+\t\"github.com/crewjam/saml/samlsp\"\n+\t\"github.com/gorilla/mux\"\n+\t\"github.com/rancher/types/apis/management.cattle.io/v3\"\n+\tlog \"github.com/sirupsen/logrus\"\n+)\n+\n+//SPClient implements a client for the saml library\n+type SPClient struct {\n+\tconfig *v3.SamlConfig\n+\tSamlSP *samlsp.Middleware","path":"pkg/auth/providers/saml/saml_client.go","position":29,"original_position":29,"commit_id":"5fe898b36d754d9bca7287a5100940c2635b0bf8","original_commit_id":"5fe898b36d754d9bca7287a5100940c2635b0bf8","user":{"login":"cjellick","id":2473240,"node_id":"MDQ6VXNlcjI0NzMyNDA=","avatar_url":"https://avatars1.githubusercontent.com/u/2473240?v=4","gravatar_id":"","url":"https://api.github.com/users/cjellick","html_url":"https://github.com/cjellick","followers_url":"https://api.github.com/users/cjellick/followers","following_url":"https://api.github.com/users/cjellick/following{/other_user}","gists_url":"https://api.github.com/users/cjellick/gists{/gist_id}","starred_url":"https://api.github.com/users/cjellick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjellick/subscriptions","organizations_url":"https://api.github.com/users/cjellick/orgs","repos_url":"https://api.github.com/users/cjellick/repos","events_url":"https://api.github.com/users/cjellick/events{/privacy}","received_events_url":"https://api.github.com/users/cjellick/received_events","type":"User","site_admin":false},"body":"this variable is not used. can we remove it?","created_at":"2018-06-06T17:58:15Z","updated_at":"2018-06-06T17:58:15Z","html_url":"https://github.com/rancher/rancher/pull/12320#discussion_r193503865","pull_request_url":"https://api.github.com/repos/rancher/rancher/pulls/12320","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/rancher/rancher/pulls/comments/193503865"},"html":{"href":"https://github.com/rancher/rancher/pull/12320#discussion_r193503865"},"pull_request":{"href":"https://api.github.com/repos/rancher/rancher/pulls/12320"}}},"pull_request":{"url":"https://api.github.com/repos/rancher/rancher/pulls/12320","id":177907194,"node_id":"MDExOlB1bGxSZXF1ZXN0MTc3OTA3MTk0","html_url":"https://github.com/rancher/rancher/pull/12320","diff_url":"https://github.com/rancher/rancher/pull/12320.diff","patch_url":"https://github.com/rancher/rancher/pull/12320.patch","issue_url":"https://api.github.com/repos/rancher/rancher/issues/12320","number":12320,"state":"open","locked":false,"title":"Saml provider","user":{"login":"mrajashree","id":10672776,"node_id":"MDQ6VXNlcjEwNjcyNzc2","avatar_url":"https://avatars2.githubusercontent.com/u/10672776?v=4","gravatar_id":"","url":"https://api.github.com/users/mrajashree","html_url":"https://github.com/mrajashree","followers_url":"https://api.github.com/users/mrajashree/followers","following_url":"https://api.github.com/users/mrajashree/following{/other_user}","gists_url":"https://api.github.com/users/mrajashree/gists{/gist_id}","starred_url":"https://api.github.com/users/mrajashree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrajashree/subscriptions","organizations_url":"https://api.github.com/users/mrajashree/orgs","repos_url":"https://api.github.com/users/mrajashree/repos","events_url":"https://api.github.com/users/mrajashree/events{/privacy}","received_events_url":"https://api.github.com/users/mrajashree/received_events","type":"User","site_admin":false},"body":"Changes introduced because of using updated saml library\r\n1. The 1.6 code would accept and pass private key and certificate in string format, and the saml library would convert it to key to use. Now it accepts rsa.PrivateKey format, so in the code we need to parse the string to get the rsa.PrivateKey ([starting here](https://github.com/rancher/rancher/pull/12320/files#diff-5a43c1b3c69ff7b6afe233e552d379d7R94))\r\n2. The saml lib would return assertion in form of request headers, instead now it returns them in request context.\r\n3. Some fields in the library, such as Metadata being renamed to EntityDescriptor along with some field changes in it\r\n\r\nhttps://github.com/rancher/rancher/issues/11169","created_at":"2018-03-28T01:27:51Z","updated_at":"2018-06-06T17:58:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2459c07493dac1672c40e9abdd04e1fad8be4975","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rancher/rancher/pulls/12320/commits","review_comments_url":"https://api.github.com/repos/rancher/rancher/pulls/12320/comments","review_comment_url":"https://api.github.com/repos/rancher/rancher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rancher/rancher/issues/12320/comments","statuses_url":"https://api.github.com/repos/rancher/rancher/statuses/5fe898b36d754d9bca7287a5100940c2635b0bf8","head":{"label":"mrajashree:samlProvider","ref":"samlProvider","sha":"5fe898b36d754d9bca7287a5100940c2635b0bf8","user":{"login":"mrajashree","id":10672776,"node_id":"MDQ6VXNlcjEwNjcyNzc2","avatar_url":"https://avatars2.githubusercontent.com/u/10672776?v=4","gravatar_id":"","url":"https://api.github.com/users/mrajashree","html_url":"https://github.com/mrajashree","followers_url":"https://api.github.com/users/mrajashree/followers","following_url":"https://api.github.com/users/mrajashree/following{/other_user}","gists_url":"https://api.github.com/users/mrajashree/gists{/gist_id}","starred_url":"https://api.github.com/users/mrajashree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrajashree/subscriptions","organizations_url":"https://api.github.com/users/mrajashree/orgs","repos_url":"https://api.github.com/users/mrajashree/repos","events_url":"https://api.github.com/users/mrajashree/events{/privacy}","received_events_url":"https://api.github.com/users/mrajashree/received_events","type":"User","site_admin":false},"repo":{"id":127054405,"node_id":"MDEwOlJlcG9zaXRvcnkxMjcwNTQ0MDU=","name":"rancher","full_name":"mrajashree/rancher","owner":{"login":"mrajashree","id":10672776,"node_id":"MDQ6VXNlcjEwNjcyNzc2","avatar_url":"https://avatars2.githubusercontent.com/u/10672776?v=4","gravatar_id":"","url":"https://api.github.com/users/mrajashree","html_url":"https://github.com/mrajashree","followers_url":"https://api.github.com/users/mrajashree/followers","following_url":"https://api.github.com/users/mrajashree/following{/other_user}","gists_url":"https://api.github.com/users/mrajashree/gists{/gist_id}","starred_url":"https://api.github.com/users/mrajashree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrajashree/subscriptions","organizations_url":"https://api.github.com/users/mrajashree/orgs","repos_url":"https://api.github.com/users/mrajashree/repos","events_url":"https://api.github.com/users/mrajashree/events{/privacy}","received_events_url":"https://api.github.com/users/mrajashree/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrajashree/rancher","description":"Complete container management platform","fork":true,"url":"https://api.github.com/repos/mrajashree/rancher","forks_url":"https://api.github.com/repos/mrajashree/rancher/forks","keys_url":"https://api.github.com/repos/mrajashree/rancher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrajashree/rancher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrajashree/rancher/teams","hooks_url":"https://api.github.com/repos/mrajashree/rancher/hooks","issue_events_url":"https://api.github.com/repos/mrajashree/rancher/issues/events{/number}","events_url":"https://api.github.com/repos/mrajashree/rancher/events","assignees_url":"https://api.github.com/repos/mrajashree/rancher/assignees{/user}","branches_url":"https://api.github.com/repos/mrajashree/rancher/branches{/branch}","tags_url":"https://api.github.com/repos/mrajashree/rancher/tags","blobs_url":"https://api.github.com/repos/mrajashree/rancher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrajashree/rancher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrajashree/rancher/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrajashree/rancher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrajashree/rancher/statuses/{sha}","languages_url":"https://api.github.com/repos/mrajashree/rancher/languages","stargazers_url":"https://api.github.com/repos/mrajashree/rancher/stargazers","contributors_url":"https://api.github.com/repos/mrajashree/rancher/contributors","subscribers_url":"https://api.github.com/repos/mrajashree/rancher/subscribers","subscription_url":"https://api.github.com/repos/mrajashree/rancher/subscription","commits_url":"https://api.github.com/repos/mrajashree/rancher/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrajashree/rancher/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrajashree/rancher/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrajashree/rancher/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrajashree/rancher/contents/{+path}","compare_url":"https://api.github.com/repos/mrajashree/rancher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrajashree/rancher/merges","archive_url":"https://api.github.com/repos/mrajashree/rancher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrajashree/rancher/downloads","issues_url":"https://api.github.com/repos/mrajashree/rancher/issues{/number}","pulls_url":"https://api.github.com/repos/mrajashree/rancher/pulls{/number}","milestones_url":"https://api.github.com/repos/mrajashree/rancher/milestones{/number}","notifications_url":"https://api.github.com/repos/mrajashree/rancher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrajashree/rancher/labels{/name}","releases_url":"https://api.github.com/repos/mrajashree/rancher/releases{/id}","deployments_url":"https://api.github.com/repos/mrajashree/rancher/deployments","created_at":"2018-03-27T22:47:13Z","updated_at":"2018-03-27T22:47:17Z","pushed_at":"2018-06-06T15:49:32Z","git_url":"git://github.com/mrajashree/rancher.git","ssh_url":"git@github.com:mrajashree/rancher.git","clone_url":"https://github.com/mrajashree/rancher.git","svn_url":"https://github.com/mrajashree/rancher","homepage":"http://rancher.com","size":34032,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rancher:master","ref":"master","sha":"4fc0ce4cd841bb66d1b329eb406163d6139edc94","user":{"login":"rancher","id":9343010,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkzNDMwMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/9343010?v=4","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"repo":{"id":26337322,"node_id":"MDEwOlJlcG9zaXRvcnkyNjMzNzMyMg==","name":"rancher","full_name":"rancher/rancher","owner":{"login":"rancher","id":9343010,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkzNDMwMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/9343010?v=4","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rancher/rancher","description":"Complete container management platform","fork":false,"url":"https://api.github.com/repos/rancher/rancher","forks_url":"https://api.github.com/repos/rancher/rancher/forks","keys_url":"https://api.github.com/repos/rancher/rancher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rancher/rancher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rancher/rancher/teams","hooks_url":"https://api.github.com/repos/rancher/rancher/hooks","issue_events_url":"https://api.github.com/repos/rancher/rancher/issues/events{/number}","events_url":"https://api.github.com/repos/rancher/rancher/events","assignees_url":"https://api.github.com/repos/rancher/rancher/assignees{/user}","branches_url":"https://api.github.com/repos/rancher/rancher/branches{/branch}","tags_url":"https://api.github.com/repos/rancher/rancher/tags","blobs_url":"https://api.github.com/repos/rancher/rancher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rancher/rancher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rancher/rancher/git/refs{/sha}","trees_url":"https://api.github.com/repos/rancher/rancher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rancher/rancher/statuses/{sha}","languages_url":"https://api.github.com/repos/rancher/rancher/languages","stargazers_url":"https://api.github.com/repos/rancher/rancher/stargazers","contributors_url":"https://api.github.com/repos/rancher/rancher/contributors","subscribers_url":"https://api.github.com/repos/rancher/rancher/subscribers","subscription_url":"https://api.github.com/repos/rancher/rancher/subscription","commits_url":"https://api.github.com/repos/rancher/rancher/commits{/sha}","git_commits_url":"https://api.github.com/repos/rancher/rancher/git/commits{/sha}","comments_url":"https://api.github.com/repos/rancher/rancher/comments{/number}","issue_comment_url":"https://api.github.com/repos/rancher/rancher/issues/comments{/number}","contents_url":"https://api.github.com/repos/rancher/rancher/contents/{+path}","compare_url":"https://api.github.com/repos/rancher/rancher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rancher/rancher/merges","archive_url":"https://api.github.com/repos/rancher/rancher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rancher/rancher/downloads","issues_url":"https://api.github.com/repos/rancher/rancher/issues{/number}","pulls_url":"https://api.github.com/repos/rancher/rancher/pulls{/number}","milestones_url":"https://api.github.com/repos/rancher/rancher/milestones{/number}","notifications_url":"https://api.github.com/repos/rancher/rancher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rancher/rancher/labels{/name}","releases_url":"https://api.github.com/repos/rancher/rancher/releases{/id}","deployments_url":"https://api.github.com/repos/rancher/rancher/deployments","created_at":"2014-11-07T20:49:31Z","updated_at":"2018-06-06T17:02:11Z","pushed_at":"2018-06-06T17:02:07Z","git_url":"git://github.com/rancher/rancher.git","ssh_url":"git@github.com:rancher/rancher.git","clone_url":"https://github.com/rancher/rancher.git","svn_url":"https://github.com/rancher/rancher","homepage":"http://rancher.com","size":33942,"stargazers_count":8683,"watchers_count":8683,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":871,"mirror_url":null,"archived":false,"open_issues_count":2155,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":871,"open_issues":2155,"watchers":8683,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rancher/rancher/pulls/12320"},"html":{"href":"https://github.com/rancher/rancher/pull/12320"},"issue":{"href":"https://api.github.com/repos/rancher/rancher/issues/12320"},"comments":{"href":"https://api.github.com/repos/rancher/rancher/issues/12320/comments"},"review_comments":{"href":"https://api.github.com/repos/rancher/rancher/pulls/12320/comments"},"review_comment":{"href":"https://api.github.com/repos/rancher/rancher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rancher/rancher/pulls/12320/commits"},"statuses":{"href":"https://api.github.com/repos/rancher/rancher/statuses/5fe898b36d754d9bca7287a5100940c2635b0bf8"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"cjellick"}}