{"action":"created","comment":{"url":"https://api.github.com/repos/saltstack/salt/pulls/comments/177128773","pull_request_review_id":106948246,"id":177128773,"diff_hunk":"@@ -740,7 +740,17 @@ def post(self):\n \n         # Grab eauth config for the current backend for the current user\n         try:\n-            perms = self.application.opts['external_auth'][token['eauth']][token['name']]\n+            eauth = self.application.opts['external_auth'][token['eauth']]\n+            # Get sum of '*' perms, user-specific perms, and group-specific perms\n+            perms = eauth.get(token['name'], [])\n+            perms.extend(eauth.get('*', []))\n+\n+            if 'groups' in token and token['groups']:\n+                user_groups = set(token['groups'])\n+                eauth_groups = set([i.rstrip('%') for i in eauth.keys() if i.endswith('%')])\n+\n+                for group in user_groups & eauth_groups:\n+                    perms.extend(eauth['{0}%'.format(group)])","path":"salt/netapi/rest_tornado/saltnado.py","position":15,"original_position":15,"commit_id":"dbbf1994f808a81026f158e1efc8804b6248893f","original_commit_id":"dbbf1994f808a81026f158e1efc8804b6248893f","user":{"login":"DmitryKuzmenko","id":4807387,"avatar_url":"https://avatars0.githubusercontent.com/u/4807387?v=4","gravatar_id":"","url":"https://api.github.com/users/DmitryKuzmenko","html_url":"https://github.com/DmitryKuzmenko","followers_url":"https://api.github.com/users/DmitryKuzmenko/followers","following_url":"https://api.github.com/users/DmitryKuzmenko/following{/other_user}","gists_url":"https://api.github.com/users/DmitryKuzmenko/gists{/gist_id}","starred_url":"https://api.github.com/users/DmitryKuzmenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DmitryKuzmenko/subscriptions","organizations_url":"https://api.github.com/users/DmitryKuzmenko/orgs","repos_url":"https://api.github.com/users/DmitryKuzmenko/repos","events_url":"https://api.github.com/users/DmitryKuzmenko/events{/privacy}","received_events_url":"https://api.github.com/users/DmitryKuzmenko/received_events","type":"User","site_admin":false},"body":"I see a behavior change here. If not user name nor groups are in eauth list before we were getting `send_error(401)`. Now we're returning with empty perms list.\r\nIf this change is expected I'm OK. If not it's better to detect match with a flag keeping `send_error` if not name nor group match found.","created_at":"2018-03-26T15:16:12Z","updated_at":"2018-03-26T15:18:08Z","html_url":"https://github.com/saltstack/salt/pull/46692#discussion_r177128773","pull_request_url":"https://api.github.com/repos/saltstack/salt/pulls/46692","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/saltstack/salt/pulls/comments/177128773"},"html":{"href":"https://github.com/saltstack/salt/pull/46692#discussion_r177128773"},"pull_request":{"href":"https://api.github.com/repos/saltstack/salt/pulls/46692"}}},"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/46692","id":177153759,"html_url":"https://github.com/saltstack/salt/pull/46692","diff_url":"https://github.com/saltstack/salt/pull/46692.diff","patch_url":"https://github.com/saltstack/salt/pull/46692.patch","issue_url":"https://api.github.com/repos/saltstack/salt/issues/46692","number":46692,"state":"open","locked":false,"title":"saltnado bugfixes for ldap & syndics","user":{"login":"mattp-","id":44374,"avatar_url":"https://avatars1.githubusercontent.com/u/44374?v=4","gravatar_id":"","url":"https://api.github.com/users/mattp-","html_url":"https://github.com/mattp-","followers_url":"https://api.github.com/users/mattp-/followers","following_url":"https://api.github.com/users/mattp-/following{/other_user}","gists_url":"https://api.github.com/users/mattp-/gists{/gist_id}","starred_url":"https://api.github.com/users/mattp-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattp-/subscriptions","organizations_url":"https://api.github.com/users/mattp-/orgs","repos_url":"https://api.github.com/users/mattp-/repos","events_url":"https://api.github.com/users/mattp-/events{/privacy}","received_events_url":"https://api.github.com/users/mattp-/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\nfix syndic_wait handling in saltnado in syndic topologies:\r\n\r\n as is, yielding sleep before registering the event listener as actually causing saltnado to _miss_ the event entirely. instead of waiting before registering  instead we just add the syndic_wait to the futures base timeout. This issue only affected synchronous localclient calls\r\n\r\nalso included, a fix for ldap group based perms that mimics cherrypy compatibility.\r\n\r\n### New Behavior\r\n- saltnado now works with syndic topologies\r\n- saltnado now works with group perms with ldap\r\n\r\n### Tests written?\r\nYes\r\n\r\n### Commits signed with GPG?\r\n\r\nNo\r\n\r\nPlease review [Salt's Contributing Guide](https://docs.saltstack.com/en/latest/topics/development/contributing.html) for best practices.\r\n\r\nSee GitHub's [page on GPG signing](https://help.github.com/articles/signing-commits-using-gpg/) for more information about signing commits with GPG.\r\n","created_at":"2018-03-23T18:39:35Z","updated_at":"2018-03-26T15:18:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90f8995105ca3202e181daea0466cc42eb6ebd69","assignee":null,"assignees":[],"requested_reviewers":[{"login":"skizunov","id":11562452,"avatar_url":"https://avatars0.githubusercontent.com/u/11562452?v=4","gravatar_id":"","url":"https://api.github.com/users/skizunov","html_url":"https://github.com/skizunov","followers_url":"https://api.github.com/users/skizunov/followers","following_url":"https://api.github.com/users/skizunov/following{/other_user}","gists_url":"https://api.github.com/users/skizunov/gists{/gist_id}","starred_url":"https://api.github.com/users/skizunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skizunov/subscriptions","organizations_url":"https://api.github.com/users/skizunov/orgs","repos_url":"https://api.github.com/users/skizunov/repos","events_url":"https://api.github.com/users/skizunov/events{/privacy}","received_events_url":"https://api.github.com/users/skizunov/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/saltstack/salt/pulls/46692/commits","review_comments_url":"https://api.github.com/repos/saltstack/salt/pulls/46692/comments","review_comment_url":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/46692/comments","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/dbbf1994f808a81026f158e1efc8804b6248893f","head":{"label":"mattp-:develop","ref":"develop","sha":"dbbf1994f808a81026f158e1efc8804b6248893f","user":{"login":"mattp-","id":44374,"avatar_url":"https://avatars1.githubusercontent.com/u/44374?v=4","gravatar_id":"","url":"https://api.github.com/users/mattp-","html_url":"https://github.com/mattp-","followers_url":"https://api.github.com/users/mattp-/followers","following_url":"https://api.github.com/users/mattp-/following{/other_user}","gists_url":"https://api.github.com/users/mattp-/gists{/gist_id}","starred_url":"https://api.github.com/users/mattp-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattp-/subscriptions","organizations_url":"https://api.github.com/users/mattp-/orgs","repos_url":"https://api.github.com/users/mattp-/repos","events_url":"https://api.github.com/users/mattp-/events{/privacy}","received_events_url":"https://api.github.com/users/mattp-/received_events","type":"User","site_admin":false},"repo":{"id":122366277,"name":"salt","full_name":"mattp-/salt","owner":{"login":"mattp-","id":44374,"avatar_url":"https://avatars1.githubusercontent.com/u/44374?v=4","gravatar_id":"","url":"https://api.github.com/users/mattp-","html_url":"https://github.com/mattp-","followers_url":"https://api.github.com/users/mattp-/followers","following_url":"https://api.github.com/users/mattp-/following{/other_user}","gists_url":"https://api.github.com/users/mattp-/gists{/gist_id}","starred_url":"https://api.github.com/users/mattp-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattp-/subscriptions","organizations_url":"https://api.github.com/users/mattp-/orgs","repos_url":"https://api.github.com/users/mattp-/repos","events_url":"https://api.github.com/users/mattp-/events{/privacy}","received_events_url":"https://api.github.com/users/mattp-/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mattp-/salt","description":"Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here: ","fork":true,"url":"https://api.github.com/repos/mattp-/salt","forks_url":"https://api.github.com/repos/mattp-/salt/forks","keys_url":"https://api.github.com/repos/mattp-/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattp-/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattp-/salt/teams","hooks_url":"https://api.github.com/repos/mattp-/salt/hooks","issue_events_url":"https://api.github.com/repos/mattp-/salt/issues/events{/number}","events_url":"https://api.github.com/repos/mattp-/salt/events","assignees_url":"https://api.github.com/repos/mattp-/salt/assignees{/user}","branches_url":"https://api.github.com/repos/mattp-/salt/branches{/branch}","tags_url":"https://api.github.com/repos/mattp-/salt/tags","blobs_url":"https://api.github.com/repos/mattp-/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattp-/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattp-/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattp-/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattp-/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/mattp-/salt/languages","stargazers_url":"https://api.github.com/repos/mattp-/salt/stargazers","contributors_url":"https://api.github.com/repos/mattp-/salt/contributors","subscribers_url":"https://api.github.com/repos/mattp-/salt/subscribers","subscription_url":"https://api.github.com/repos/mattp-/salt/subscription","commits_url":"https://api.github.com/repos/mattp-/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattp-/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattp-/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattp-/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattp-/salt/contents/{+path}","compare_url":"https://api.github.com/repos/mattp-/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattp-/salt/merges","archive_url":"https://api.github.com/repos/mattp-/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattp-/salt/downloads","issues_url":"https://api.github.com/repos/mattp-/salt/issues{/number}","pulls_url":"https://api.github.com/repos/mattp-/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/mattp-/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/mattp-/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattp-/salt/labels{/name}","releases_url":"https://api.github.com/repos/mattp-/salt/releases{/id}","deployments_url":"https://api.github.com/repos/mattp-/salt/deployments","created_at":"2018-02-21T17:05:10Z","updated_at":"2018-03-23T18:37:22Z","pushed_at":"2018-03-26T13:36:11Z","git_url":"git://github.com/mattp-/salt.git","ssh_url":"git@github.com:mattp-/salt.git","clone_url":"https://github.com/mattp-/salt.git","svn_url":"https://github.com/mattp-/salt","homepage":"https://repo.saltstack.com/","size":212095,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"saltstack:develop","ref":"develop","sha":"7e5ac41ef6718b4f87fa18504b7b2ebdb5f7f362","user":{"login":"saltstack","id":1147473,"avatar_url":"https://avatars3.githubusercontent.com/u/1147473?v=4","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"repo":{"id":1390248,"name":"salt","full_name":"saltstack/salt","owner":{"login":"saltstack","id":1147473,"avatar_url":"https://avatars3.githubusercontent.com/u/1147473?v=4","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/saltstack/salt","description":"Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here: ","fork":false,"url":"https://api.github.com/repos/saltstack/salt","forks_url":"https://api.github.com/repos/saltstack/salt/forks","keys_url":"https://api.github.com/repos/saltstack/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saltstack/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saltstack/salt/teams","hooks_url":"https://api.github.com/repos/saltstack/salt/hooks","issue_events_url":"https://api.github.com/repos/saltstack/salt/issues/events{/number}","events_url":"https://api.github.com/repos/saltstack/salt/events","assignees_url":"https://api.github.com/repos/saltstack/salt/assignees{/user}","branches_url":"https://api.github.com/repos/saltstack/salt/branches{/branch}","tags_url":"https://api.github.com/repos/saltstack/salt/tags","blobs_url":"https://api.github.com/repos/saltstack/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saltstack/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saltstack/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/saltstack/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/saltstack/salt/languages","stargazers_url":"https://api.github.com/repos/saltstack/salt/stargazers","contributors_url":"https://api.github.com/repos/saltstack/salt/contributors","subscribers_url":"https://api.github.com/repos/saltstack/salt/subscribers","subscription_url":"https://api.github.com/repos/saltstack/salt/subscription","commits_url":"https://api.github.com/repos/saltstack/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/saltstack/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/saltstack/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/saltstack/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/saltstack/salt/contents/{+path}","compare_url":"https://api.github.com/repos/saltstack/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saltstack/salt/merges","archive_url":"https://api.github.com/repos/saltstack/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saltstack/salt/downloads","issues_url":"https://api.github.com/repos/saltstack/salt/issues{/number}","pulls_url":"https://api.github.com/repos/saltstack/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/saltstack/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/saltstack/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saltstack/salt/labels{/name}","releases_url":"https://api.github.com/repos/saltstack/salt/releases{/id}","deployments_url":"https://api.github.com/repos/saltstack/salt/deployments","created_at":"2011-02-20T20:16:56Z","updated_at":"2018-03-26T14:25:28Z","pushed_at":"2018-03-26T15:15:38Z","git_url":"git://github.com/saltstack/salt.git","ssh_url":"git@github.com:saltstack/salt.git","clone_url":"https://github.com/saltstack/salt.git","svn_url":"https://github.com/saltstack/salt","homepage":"https://repo.saltstack.com/","size":211581,"stargazers_count":8699,"watchers_count":8699,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4064,"mirror_url":null,"archived":false,"open_issues_count":3662,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":4064,"open_issues":3662,"watchers":8699,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/saltstack/salt/pulls/46692"},"html":{"href":"https://github.com/saltstack/salt/pull/46692"},"issue":{"href":"https://api.github.com/repos/saltstack/salt/issues/46692"},"comments":{"href":"https://api.github.com/repos/saltstack/salt/issues/46692/comments"},"review_comments":{"href":"https://api.github.com/repos/saltstack/salt/pulls/46692/comments"},"review_comment":{"href":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/saltstack/salt/pulls/46692/commits"},"statuses":{"href":"https://api.github.com/repos/saltstack/salt/statuses/dbbf1994f808a81026f158e1efc8804b6248893f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"DmitryKuzmenko"}}