{"action":"closed","number":222,"pull_request":{"url":"https://api.github.com/repos/spinnaker/gate/pulls/222","id":70220130,"html_url":"https://github.com/spinnaker/gate/pull/222","diff_url":"https://github.com/spinnaker/gate/pull/222.diff","patch_url":"https://github.com/spinnaker/gate/pull/222.patch","issue_url":"https://api.github.com/repos/spinnaker/gate/issues/222","number":222,"state":"closed","locked":false,"title":"Auth: added check to invalidate session if user groups change.","user":{"login":"jtk54","id":5456773,"avatar_url":"https://avatars.githubusercontent.com/u/5456773?v=3","gravatar_id":"","url":"https://api.github.com/users/jtk54","html_url":"https://github.com/jtk54","followers_url":"https://api.github.com/users/jtk54/followers","following_url":"https://api.github.com/users/jtk54/following{/other_user}","gists_url":"https://api.github.com/users/jtk54/gists{/gist_id}","starred_url":"https://api.github.com/users/jtk54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtk54/subscriptions","organizations_url":"https://api.github.com/users/jtk54/orgs","repos_url":"https://api.github.com/users/jtk54/repos","events_url":"https://api.github.com/users/jtk54/events{/privacy}","received_events_url":"https://api.github.com/users/jtk54/received_events","type":"User","site_admin":false},"body":"Added periodic check to invalidate session if user groups change. Invalidating the session will cause the user to re-auth and re-sync the groups, which is much safer and cleaner than updating the groups for a few reasons:\r\n\r\n* Updating groups could allow the user to have unnecessary permissions for approximately a session.\r\n* There is a different `Authentication` object for each of {OAuth2, x509, SAML}, updating which results in a lot of unnecessary duplicated code for something that is not incredibly secure.\r\n* Since we now prompt to re-auth from Deck if the session is expired, invalidating the session does not cause the UX to suffer.\r\n\r\nShould we reduce the period of when the re-auth checks happen in Deck? As it stands currently, a user might have up to 10 min of unsaved work with no session in Gate from this PR. If the period of the re-auth check were shorter, this would be mitigated significantly. Thoughts on this?\r\n\r\n@ttomsu @cberry PTAL.","created_at":"2016-05-16T16:13:23Z","updated_at":"2016-05-19T15:08:18Z","closed_at":"2016-05-19T15:08:18Z","merged_at":"2016-05-19T15:08:18Z","merge_commit_sha":"63d01e8f16a88e5145596527695a23fe18e1a5f3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spinnaker/gate/pulls/222/commits","review_comments_url":"https://api.github.com/repos/spinnaker/gate/pulls/222/comments","review_comment_url":"https://api.github.com/repos/spinnaker/gate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spinnaker/gate/issues/222/comments","statuses_url":"https://api.github.com/repos/spinnaker/gate/statuses/53cdf5d1f28281eddb1c01790dbb8ff0ec9fab5a","head":{"label":"jtk54:groups-sync","ref":"groups-sync","sha":"53cdf5d1f28281eddb1c01790dbb8ff0ec9fab5a","user":{"login":"jtk54","id":5456773,"avatar_url":"https://avatars.githubusercontent.com/u/5456773?v=3","gravatar_id":"","url":"https://api.github.com/users/jtk54","html_url":"https://github.com/jtk54","followers_url":"https://api.github.com/users/jtk54/followers","following_url":"https://api.github.com/users/jtk54/following{/other_user}","gists_url":"https://api.github.com/users/jtk54/gists{/gist_id}","starred_url":"https://api.github.com/users/jtk54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtk54/subscriptions","organizations_url":"https://api.github.com/users/jtk54/orgs","repos_url":"https://api.github.com/users/jtk54/repos","events_url":"https://api.github.com/users/jtk54/events{/privacy}","received_events_url":"https://api.github.com/users/jtk54/received_events","type":"User","site_admin":false},"repo":{"id":54126530,"name":"gate","full_name":"jtk54/gate","owner":{"login":"jtk54","id":5456773,"avatar_url":"https://avatars.githubusercontent.com/u/5456773?v=3","gravatar_id":"","url":"https://api.github.com/users/jtk54","html_url":"https://github.com/jtk54","followers_url":"https://api.github.com/users/jtk54/followers","following_url":"https://api.github.com/users/jtk54/following{/other_user}","gists_url":"https://api.github.com/users/jtk54/gists{/gist_id}","starred_url":"https://api.github.com/users/jtk54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtk54/subscriptions","organizations_url":"https://api.github.com/users/jtk54/orgs","repos_url":"https://api.github.com/users/jtk54/repos","events_url":"https://api.github.com/users/jtk54/events{/privacy}","received_events_url":"https://api.github.com/users/jtk54/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jtk54/gate","description":"Spinnaker API Gateway","fork":true,"url":"https://api.github.com/repos/jtk54/gate","forks_url":"https://api.github.com/repos/jtk54/gate/forks","keys_url":"https://api.github.com/repos/jtk54/gate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jtk54/gate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jtk54/gate/teams","hooks_url":"https://api.github.com/repos/jtk54/gate/hooks","issue_events_url":"https://api.github.com/repos/jtk54/gate/issues/events{/number}","events_url":"https://api.github.com/repos/jtk54/gate/events","assignees_url":"https://api.github.com/repos/jtk54/gate/assignees{/user}","branches_url":"https://api.github.com/repos/jtk54/gate/branches{/branch}","tags_url":"https://api.github.com/repos/jtk54/gate/tags","blobs_url":"https://api.github.com/repos/jtk54/gate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jtk54/gate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jtk54/gate/git/refs{/sha}","trees_url":"https://api.github.com/repos/jtk54/gate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jtk54/gate/statuses/{sha}","languages_url":"https://api.github.com/repos/jtk54/gate/languages","stargazers_url":"https://api.github.com/repos/jtk54/gate/stargazers","contributors_url":"https://api.github.com/repos/jtk54/gate/contributors","subscribers_url":"https://api.github.com/repos/jtk54/gate/subscribers","subscription_url":"https://api.github.com/repos/jtk54/gate/subscription","commits_url":"https://api.github.com/repos/jtk54/gate/commits{/sha}","git_commits_url":"https://api.github.com/repos/jtk54/gate/git/commits{/sha}","comments_url":"https://api.github.com/repos/jtk54/gate/comments{/number}","issue_comment_url":"https://api.github.com/repos/jtk54/gate/issues/comments{/number}","contents_url":"https://api.github.com/repos/jtk54/gate/contents/{+path}","compare_url":"https://api.github.com/repos/jtk54/gate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jtk54/gate/merges","archive_url":"https://api.github.com/repos/jtk54/gate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jtk54/gate/downloads","issues_url":"https://api.github.com/repos/jtk54/gate/issues{/number}","pulls_url":"https://api.github.com/repos/jtk54/gate/pulls{/number}","milestones_url":"https://api.github.com/repos/jtk54/gate/milestones{/number}","notifications_url":"https://api.github.com/repos/jtk54/gate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jtk54/gate/labels{/name}","releases_url":"https://api.github.com/repos/jtk54/gate/releases{/id}","deployments_url":"https://api.github.com/repos/jtk54/gate/deployments","created_at":"2016-03-17T14:54:02Z","updated_at":"2016-03-17T14:54:03Z","pushed_at":"2016-05-19T14:27:32Z","git_url":"git://github.com/jtk54/gate.git","ssh_url":"git@github.com:jtk54/gate.git","clone_url":"https://github.com/jtk54/gate.git","svn_url":"https://github.com/jtk54/gate","homepage":null,"size":1167,"stargazers_count":0,"watchers_count":0,"language":"Groovy","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":"spinnaker:google-oauth","ref":"google-oauth","sha":"1236955f42c2735d3bc1fe1500d802edf06806db","user":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"repo":{"id":22351349,"name":"gate","full_name":"spinnaker/gate","owner":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spinnaker/gate","description":"Spinnaker API Gateway","fork":false,"url":"https://api.github.com/repos/spinnaker/gate","forks_url":"https://api.github.com/repos/spinnaker/gate/forks","keys_url":"https://api.github.com/repos/spinnaker/gate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spinnaker/gate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spinnaker/gate/teams","hooks_url":"https://api.github.com/repos/spinnaker/gate/hooks","issue_events_url":"https://api.github.com/repos/spinnaker/gate/issues/events{/number}","events_url":"https://api.github.com/repos/spinnaker/gate/events","assignees_url":"https://api.github.com/repos/spinnaker/gate/assignees{/user}","branches_url":"https://api.github.com/repos/spinnaker/gate/branches{/branch}","tags_url":"https://api.github.com/repos/spinnaker/gate/tags","blobs_url":"https://api.github.com/repos/spinnaker/gate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spinnaker/gate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spinnaker/gate/git/refs{/sha}","trees_url":"https://api.github.com/repos/spinnaker/gate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spinnaker/gate/statuses/{sha}","languages_url":"https://api.github.com/repos/spinnaker/gate/languages","stargazers_url":"https://api.github.com/repos/spinnaker/gate/stargazers","contributors_url":"https://api.github.com/repos/spinnaker/gate/contributors","subscribers_url":"https://api.github.com/repos/spinnaker/gate/subscribers","subscription_url":"https://api.github.com/repos/spinnaker/gate/subscription","commits_url":"https://api.github.com/repos/spinnaker/gate/commits{/sha}","git_commits_url":"https://api.github.com/repos/spinnaker/gate/git/commits{/sha}","comments_url":"https://api.github.com/repos/spinnaker/gate/comments{/number}","issue_comment_url":"https://api.github.com/repos/spinnaker/gate/issues/comments{/number}","contents_url":"https://api.github.com/repos/spinnaker/gate/contents/{+path}","compare_url":"https://api.github.com/repos/spinnaker/gate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spinnaker/gate/merges","archive_url":"https://api.github.com/repos/spinnaker/gate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spinnaker/gate/downloads","issues_url":"https://api.github.com/repos/spinnaker/gate/issues{/number}","pulls_url":"https://api.github.com/repos/spinnaker/gate/pulls{/number}","milestones_url":"https://api.github.com/repos/spinnaker/gate/milestones{/number}","notifications_url":"https://api.github.com/repos/spinnaker/gate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spinnaker/gate/labels{/name}","releases_url":"https://api.github.com/repos/spinnaker/gate/releases{/id}","deployments_url":"https://api.github.com/repos/spinnaker/gate/deployments","created_at":"2014-07-28T17:27:56Z","updated_at":"2016-05-03T15:33:50Z","pushed_at":"2016-05-19T15:08:19Z","git_url":"git://github.com/spinnaker/gate.git","ssh_url":"git@github.com:spinnaker/gate.git","clone_url":"https://github.com/spinnaker/gate.git","svn_url":"https://github.com/spinnaker/gate","homepage":null,"size":1821,"stargazers_count":13,"watchers_count":13,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":16,"forks":37,"open_issues":16,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spinnaker/gate/pulls/222"},"html":{"href":"https://github.com/spinnaker/gate/pull/222"},"issue":{"href":"https://api.github.com/repos/spinnaker/gate/issues/222"},"comments":{"href":"https://api.github.com/repos/spinnaker/gate/issues/222/comments"},"review_comments":{"href":"https://api.github.com/repos/spinnaker/gate/pulls/222/comments"},"review_comment":{"href":"https://api.github.com/repos/spinnaker/gate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spinnaker/gate/pulls/222/commits"},"statuses":{"href":"https://api.github.com/repos/spinnaker/gate/statuses/53cdf5d1f28281eddb1c01790dbb8ff0ec9fab5a"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"ttomsu","id":13141550,"avatar_url":"https://avatars.githubusercontent.com/u/13141550?v=3","gravatar_id":"","url":"https://api.github.com/users/ttomsu","html_url":"https://github.com/ttomsu","followers_url":"https://api.github.com/users/ttomsu/followers","following_url":"https://api.github.com/users/ttomsu/following{/other_user}","gists_url":"https://api.github.com/users/ttomsu/gists{/gist_id}","starred_url":"https://api.github.com/users/ttomsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttomsu/subscriptions","organizations_url":"https://api.github.com/users/ttomsu/orgs","repos_url":"https://api.github.com/users/ttomsu/repos","events_url":"https://api.github.com/users/ttomsu/events{/privacy}","received_events_url":"https://api.github.com/users/ttomsu/received_events","type":"User","site_admin":false},"comments":1,"review_comments":26,"commits":2,"additions":143,"deletions":9,"changed_files":4}}