{"action":"created","comment":{"url":"https://api.github.com/repos/saltstack/salt/pulls/comments/202692281","pull_request_review_id":137435897,"id":202692281,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjY5MjI4MQ==","diff_hunk":"@@ -73,7 +78,7 @@ def generate_token(minion_id, signature, impersonated_by_master=False):\n         payload = {\n                     'policies': _get_policies(minion_id, config),\n                     'num_uses': 1,\n-                    'metadata': audit_data\n+                    'meta': audit_data","path":"salt/runners/vault.py","position":19,"original_position":19,"commit_id":"74be546c6fbf40efeca3c05c68c32696dfc40a9b","original_commit_id":"74be546c6fbf40efeca3c05c68c32696dfc40a9b","user":{"login":"rallytime","id":6547906,"node_id":"MDQ6VXNlcjY1NDc5MDY=","avatar_url":"https://avatars2.githubusercontent.com/u/6547906?v=4","gravatar_id":"","url":"https://api.github.com/users/rallytime","html_url":"https://github.com/rallytime","followers_url":"https://api.github.com/users/rallytime/followers","following_url":"https://api.github.com/users/rallytime/following{/other_user}","gists_url":"https://api.github.com/users/rallytime/gists{/gist_id}","starred_url":"https://api.github.com/users/rallytime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rallytime/subscriptions","organizations_url":"https://api.github.com/users/rallytime/orgs","repos_url":"https://api.github.com/users/rallytime/repos","events_url":"https://api.github.com/users/rallytime/events{/privacy}","received_events_url":"https://api.github.com/users/rallytime/received_events","type":"User","site_admin":false},"body":"Can you explain why this key is changing? I didn't see a mention of this in your PR explanation. (Though I certainly could have missed it.)","created_at":"2018-07-16T13:59:17Z","updated_at":"2018-07-16T13:59:58Z","html_url":"https://github.com/saltstack/salt/pull/48586#discussion_r202692281","pull_request_url":"https://api.github.com/repos/saltstack/salt/pulls/48586","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/saltstack/salt/pulls/comments/202692281"},"html":{"href":"https://github.com/saltstack/salt/pull/48586#discussion_r202692281"},"pull_request":{"href":"https://api.github.com/repos/saltstack/salt/pulls/48586"}}},"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/48586","id":201403897,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxNDAzODk3","html_url":"https://github.com/saltstack/salt/pull/48586","diff_url":"https://github.com/saltstack/salt/pull/48586.diff","patch_url":"https://github.com/saltstack/salt/pull/48586.patch","issue_url":"https://api.github.com/repos/saltstack/salt/issues/48586","number":48586,"state":"open","locked":false,"title":"added named roles feature for module.vault","user":{"login":"astorath","id":6577390,"node_id":"MDQ6VXNlcjY1NzczOTA=","avatar_url":"https://avatars1.githubusercontent.com/u/6577390?v=4","gravatar_id":"","url":"https://api.github.com/users/astorath","html_url":"https://github.com/astorath","followers_url":"https://api.github.com/users/astorath/followers","following_url":"https://api.github.com/users/astorath/following{/other_user}","gists_url":"https://api.github.com/users/astorath/gists{/gist_id}","starred_url":"https://api.github.com/users/astorath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astorath/subscriptions","organizations_url":"https://api.github.com/users/astorath/orgs","repos_url":"https://api.github.com/users/astorath/repos","events_url":"https://api.github.com/users/astorath/events{/privacy}","received_events_url":"https://api.github.com/users/astorath/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\nAdded an option to define named role for creation of vault tokens. This is the preferred way to control access permissions and available policies of secondary minion tokens: https://www.vaultproject.io/api/auth/token/index.html#create-token\r\n\r\n### What issues does this PR fix or reference?\r\n\r\n### Previous Behavior\r\nChild token can have any policies main token have (this is only controlled by vault security mechanisms). Child token can have an option to create other tokens (as parent token does), leading to security risks.\r\nSalt master token must have all the access policies minions have.\r\n\r\n### New Behavior\r\nUser can define specific token named role for minion created tokens and explicitly define its behavior and access policies. Example: https://www.nomadproject.io/docs/vault-integration/index.html#vault-token-role-configuration\r\n\r\n### Tests written?\r\nNo\r\n\r\n### Commits signed with GPG?\r\nNo\r\n","created_at":"2018-07-13T21:25:10Z","updated_at":"2018-07-16T13:59:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a28d07517fed47237b036c8323745fee5e45b79e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/saltstack/salt/pulls/48586/commits","review_comments_url":"https://api.github.com/repos/saltstack/salt/pulls/48586/comments","review_comment_url":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/48586/comments","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/74be546c6fbf40efeca3c05c68c32696dfc40a9b","head":{"label":"astorath:add-vault-token-role","ref":"add-vault-token-role","sha":"74be546c6fbf40efeca3c05c68c32696dfc40a9b","user":{"login":"astorath","id":6577390,"node_id":"MDQ6VXNlcjY1NzczOTA=","avatar_url":"https://avatars1.githubusercontent.com/u/6577390?v=4","gravatar_id":"","url":"https://api.github.com/users/astorath","html_url":"https://github.com/astorath","followers_url":"https://api.github.com/users/astorath/followers","following_url":"https://api.github.com/users/astorath/following{/other_user}","gists_url":"https://api.github.com/users/astorath/gists{/gist_id}","starred_url":"https://api.github.com/users/astorath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astorath/subscriptions","organizations_url":"https://api.github.com/users/astorath/orgs","repos_url":"https://api.github.com/users/astorath/repos","events_url":"https://api.github.com/users/astorath/events{/privacy}","received_events_url":"https://api.github.com/users/astorath/received_events","type":"User","site_admin":false},"repo":{"id":140890466,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA4OTA0NjY=","name":"salt","full_name":"astorath/salt","owner":{"login":"astorath","id":6577390,"node_id":"MDQ6VXNlcjY1NzczOTA=","avatar_url":"https://avatars1.githubusercontent.com/u/6577390?v=4","gravatar_id":"","url":"https://api.github.com/users/astorath","html_url":"https://github.com/astorath","followers_url":"https://api.github.com/users/astorath/followers","following_url":"https://api.github.com/users/astorath/following{/other_user}","gists_url":"https://api.github.com/users/astorath/gists{/gist_id}","starred_url":"https://api.github.com/users/astorath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astorath/subscriptions","organizations_url":"https://api.github.com/users/astorath/orgs","repos_url":"https://api.github.com/users/astorath/repos","events_url":"https://api.github.com/users/astorath/events{/privacy}","received_events_url":"https://api.github.com/users/astorath/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/astorath/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/astorath/salt","forks_url":"https://api.github.com/repos/astorath/salt/forks","keys_url":"https://api.github.com/repos/astorath/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astorath/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astorath/salt/teams","hooks_url":"https://api.github.com/repos/astorath/salt/hooks","issue_events_url":"https://api.github.com/repos/astorath/salt/issues/events{/number}","events_url":"https://api.github.com/repos/astorath/salt/events","assignees_url":"https://api.github.com/repos/astorath/salt/assignees{/user}","branches_url":"https://api.github.com/repos/astorath/salt/branches{/branch}","tags_url":"https://api.github.com/repos/astorath/salt/tags","blobs_url":"https://api.github.com/repos/astorath/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astorath/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astorath/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/astorath/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astorath/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/astorath/salt/languages","stargazers_url":"https://api.github.com/repos/astorath/salt/stargazers","contributors_url":"https://api.github.com/repos/astorath/salt/contributors","subscribers_url":"https://api.github.com/repos/astorath/salt/subscribers","subscription_url":"https://api.github.com/repos/astorath/salt/subscription","commits_url":"https://api.github.com/repos/astorath/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/astorath/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/astorath/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/astorath/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/astorath/salt/contents/{+path}","compare_url":"https://api.github.com/repos/astorath/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astorath/salt/merges","archive_url":"https://api.github.com/repos/astorath/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astorath/salt/downloads","issues_url":"https://api.github.com/repos/astorath/salt/issues{/number}","pulls_url":"https://api.github.com/repos/astorath/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/astorath/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/astorath/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astorath/salt/labels{/name}","releases_url":"https://api.github.com/repos/astorath/salt/releases{/id}","deployments_url":"https://api.github.com/repos/astorath/salt/deployments","created_at":"2018-07-13T20:31:14Z","updated_at":"2018-07-13T20:31:31Z","pushed_at":"2018-07-13T21:14:12Z","git_url":"git://github.com/astorath/salt.git","ssh_url":"git@github.com:astorath/salt.git","clone_url":"https://github.com/astorath/salt.git","svn_url":"https://github.com/astorath/salt","homepage":"https://repo.saltstack.com/","size":407013,"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,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"saltstack:develop","ref":"develop","sha":"f0fc854ed40d763067c1ffaef2bba2192882a620","user":{"login":"saltstack","id":1147473,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNDc0NzM=","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,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkwMjQ4","name":"salt","full_name":"saltstack/salt","owner":{"login":"saltstack","id":1147473,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNDc0NzM=","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-07-16T13:08:26Z","pushed_at":"2018-07-16T13:40:54Z","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":407424,"stargazers_count":9036,"watchers_count":9036,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4219,"mirror_url":null,"archived":false,"open_issues_count":2999,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4219,"open_issues":2999,"watchers":9036,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/saltstack/salt/pulls/48586"},"html":{"href":"https://github.com/saltstack/salt/pull/48586"},"issue":{"href":"https://api.github.com/repos/saltstack/salt/issues/48586"},"comments":{"href":"https://api.github.com/repos/saltstack/salt/issues/48586/comments"},"review_comments":{"href":"https://api.github.com/repos/saltstack/salt/pulls/48586/comments"},"review_comment":{"href":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/saltstack/salt/pulls/48586/commits"},"statuses":{"href":"https://api.github.com/repos/saltstack/salt/statuses/74be546c6fbf40efeca3c05c68c32696dfc40a9b"}},"author_association":"NONE"}}
{"actor":{"display_login":"rallytime"}}