{"action":"created","comment":{"url":"https://api.github.com/repos/Asymmetrik/yadda/pulls/comments/146911387","pull_request_review_id":71925143,"id":146911387,"diff_hunk":"@@ -47,6 +49,48 @@ function getCredentialTableDetails(options){\n }\n \n /**\n+ * @description Get the correct kmsKey for creating a Credstash store\n+ * @param {string} options.DeploymentCenter.secret.kmsKeyAlias - Alias for a KMS Key\n+ * @param {string} options.DeploymentCenter.secret.kmsKeyId - KMS Key Id\n+ * @return {object} options\n+ */\n+function getKMSKeyId(options = {}){\n+\t// if we have no options, secrets are not enabled, just return\n+\tif (!options.DeploymentCenter.secret)\n+\t\treturn options;\n+\n+\tvar secretConfig = options.DeploymentCenter.secret;\n+\n+\t// if we have a kmsKeyId, use that and return\n+\tif (secretConfig.kmsKeyId) {\n+\t\tsecretConfig.kmsKey = secretConfig.kmsKeyId;\n+\t\treturn options;\n+\t}\n+\n+\t// If we have the alias, go look up the id since this is what\n+\t// we need to create a credstash store\n+\tvar params = {};\n+\treturn Q.ninvoke(kms, 'listAliases', params)","path":"lib/secret-tasks.js","position":57,"original_position":57,"commit_id":"b4ae440e04df18a53cf55f45fc92d72b32e4b1d1","original_commit_id":"b4ae440e04df18a53cf55f45fc92d72b32e4b1d1","user":{"login":"Robert-W","id":1177959,"avatar_url":"https://avatars0.githubusercontent.com/u/1177959?v=4","gravatar_id":"","url":"https://api.github.com/users/Robert-W","html_url":"https://github.com/Robert-W","followers_url":"https://api.github.com/users/Robert-W/followers","following_url":"https://api.github.com/users/Robert-W/following{/other_user}","gists_url":"https://api.github.com/users/Robert-W/gists{/gist_id}","starred_url":"https://api.github.com/users/Robert-W/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Robert-W/subscriptions","organizations_url":"https://api.github.com/users/Robert-W/orgs","repos_url":"https://api.github.com/users/Robert-W/repos","events_url":"https://api.github.com/users/Robert-W/events{/privacy}","received_events_url":"https://api.github.com/users/Robert-W/received_events","type":"User","site_admin":false},"body":"Ahh yes I did not see that, I saw it took keyId and did not realize that could be the alias. I'll make that change","created_at":"2017-10-25T16:21:33Z","updated_at":"2017-10-25T16:21:34Z","html_url":"https://github.com/Asymmetrik/yadda/pull/18#discussion_r146911387","pull_request_url":"https://api.github.com/repos/Asymmetrik/yadda/pulls/18","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Asymmetrik/yadda/pulls/comments/146911387"},"html":{"href":"https://github.com/Asymmetrik/yadda/pull/18#discussion_r146911387"},"pull_request":{"href":"https://api.github.com/repos/Asymmetrik/yadda/pulls/18"}},"in_reply_to_id":146876356},"pull_request":{"url":"https://api.github.com/repos/Asymmetrik/yadda/pulls/18","id":148511007,"html_url":"https://github.com/Asymmetrik/yadda/pull/18","diff_url":"https://github.com/Asymmetrik/yadda/pull/18.diff","patch_url":"https://github.com/Asymmetrik/yadda/pull/18.patch","issue_url":"https://api.github.com/repos/Asymmetrik/yadda/issues/18","number":18,"state":"open","locked":false,"title":"Fixed issue with secrets using the alias as the kmsKey","user":{"login":"Robert-W","id":1177959,"avatar_url":"https://avatars0.githubusercontent.com/u/1177959?v=4","gravatar_id":"","url":"https://api.github.com/users/Robert-W","html_url":"https://github.com/Robert-W","followers_url":"https://api.github.com/users/Robert-W/followers","following_url":"https://api.github.com/users/Robert-W/following{/other_user}","gists_url":"https://api.github.com/users/Robert-W/gists{/gist_id}","starred_url":"https://api.github.com/users/Robert-W/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Robert-W/subscriptions","organizations_url":"https://api.github.com/users/Robert-W/orgs","repos_url":"https://api.github.com/users/Robert-W/repos","events_url":"https://api.github.com/users/Robert-W/events{/privacy}","received_events_url":"https://api.github.com/users/Robert-W/received_events","type":"User","site_admin":false},"body":"Currently when interacting with secrets via `yadda secret`, you'll get `invalidKeyId` errors. This is because in your Manifest.js, you specify a deployment center like below.\r\n\r\n```javascript\r\nDeploymentCenter:{\r\n  secret: {\r\n    kmsKeyAlias: '...'\r\n  }\r\n}\r\n```\r\n\r\nThis kmsKeyAlias is being passed to Credstash as the kmsKey argument and when that tries to create an `aws.KMS` instance, it will fail. \r\n\r\nThis update allows you to specify a `kmsKeyId` property or a `kmsKeyAlias` property. If you use the id, it is set as the kmsKey.  If you use the alias, it will look up all the aliases and find the matching one and set the target id for your alias as the kmsKey.  That key is then passed into Credstash which creates a valid secretStore.\r\n\r\nIf you do not specify either a `kmsKeyId` or a `kmsKeyAlias` the linter will throw an error and you won't be able to proceed until you remove the `secret` configuration or add the required properties.\r\n","created_at":"2017-10-24T20:57:00Z","updated_at":"2017-10-25T16:21:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a7e5b747fc07be1b7afd1009c17cd5959914291","assignee":{"login":"Robert-W","id":1177959,"avatar_url":"https://avatars0.githubusercontent.com/u/1177959?v=4","gravatar_id":"","url":"https://api.github.com/users/Robert-W","html_url":"https://github.com/Robert-W","followers_url":"https://api.github.com/users/Robert-W/followers","following_url":"https://api.github.com/users/Robert-W/following{/other_user}","gists_url":"https://api.github.com/users/Robert-W/gists{/gist_id}","starred_url":"https://api.github.com/users/Robert-W/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Robert-W/subscriptions","organizations_url":"https://api.github.com/users/Robert-W/orgs","repos_url":"https://api.github.com/users/Robert-W/repos","events_url":"https://api.github.com/users/Robert-W/events{/privacy}","received_events_url":"https://api.github.com/users/Robert-W/received_events","type":"User","site_admin":false},"assignees":[{"login":"Robert-W","id":1177959,"avatar_url":"https://avatars0.githubusercontent.com/u/1177959?v=4","gravatar_id":"","url":"https://api.github.com/users/Robert-W","html_url":"https://github.com/Robert-W","followers_url":"https://api.github.com/users/Robert-W/followers","following_url":"https://api.github.com/users/Robert-W/following{/other_user}","gists_url":"https://api.github.com/users/Robert-W/gists{/gist_id}","starred_url":"https://api.github.com/users/Robert-W/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Robert-W/subscriptions","organizations_url":"https://api.github.com/users/Robert-W/orgs","repos_url":"https://api.github.com/users/Robert-W/repos","events_url":"https://api.github.com/users/Robert-W/events{/privacy}","received_events_url":"https://api.github.com/users/Robert-W/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"jonterrylee","id":12969956,"avatar_url":"https://avatars1.githubusercontent.com/u/12969956?v=4","gravatar_id":"","url":"https://api.github.com/users/jonterrylee","html_url":"https://github.com/jonterrylee","followers_url":"https://api.github.com/users/jonterrylee/followers","following_url":"https://api.github.com/users/jonterrylee/following{/other_user}","gists_url":"https://api.github.com/users/jonterrylee/gists{/gist_id}","starred_url":"https://api.github.com/users/jonterrylee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonterrylee/subscriptions","organizations_url":"https://api.github.com/users/jonterrylee/orgs","repos_url":"https://api.github.com/users/jonterrylee/repos","events_url":"https://api.github.com/users/jonterrylee/events{/privacy}","received_events_url":"https://api.github.com/users/jonterrylee/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Asymmetrik/yadda/pulls/18/commits","review_comments_url":"https://api.github.com/repos/Asymmetrik/yadda/pulls/18/comments","review_comment_url":"https://api.github.com/repos/Asymmetrik/yadda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Asymmetrik/yadda/issues/18/comments","statuses_url":"https://api.github.com/repos/Asymmetrik/yadda/statuses/b4ae440e04df18a53cf55f45fc92d72b32e4b1d1","head":{"label":"Asymmetrik:feature/kmsKeyLookup","ref":"feature/kmsKeyLookup","sha":"b4ae440e04df18a53cf55f45fc92d72b32e4b1d1","user":{"login":"Asymmetrik","id":491054,"avatar_url":"https://avatars3.githubusercontent.com/u/491054?v=4","gravatar_id":"","url":"https://api.github.com/users/Asymmetrik","html_url":"https://github.com/Asymmetrik","followers_url":"https://api.github.com/users/Asymmetrik/followers","following_url":"https://api.github.com/users/Asymmetrik/following{/other_user}","gists_url":"https://api.github.com/users/Asymmetrik/gists{/gist_id}","starred_url":"https://api.github.com/users/Asymmetrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Asymmetrik/subscriptions","organizations_url":"https://api.github.com/users/Asymmetrik/orgs","repos_url":"https://api.github.com/users/Asymmetrik/repos","events_url":"https://api.github.com/users/Asymmetrik/events{/privacy}","received_events_url":"https://api.github.com/users/Asymmetrik/received_events","type":"Organization","site_admin":false},"repo":{"id":75434038,"name":"yadda","full_name":"Asymmetrik/yadda","owner":{"login":"Asymmetrik","id":491054,"avatar_url":"https://avatars3.githubusercontent.com/u/491054?v=4","gravatar_id":"","url":"https://api.github.com/users/Asymmetrik","html_url":"https://github.com/Asymmetrik","followers_url":"https://api.github.com/users/Asymmetrik/followers","following_url":"https://api.github.com/users/Asymmetrik/following{/other_user}","gists_url":"https://api.github.com/users/Asymmetrik/gists{/gist_id}","starred_url":"https://api.github.com/users/Asymmetrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Asymmetrik/subscriptions","organizations_url":"https://api.github.com/users/Asymmetrik/orgs","repos_url":"https://api.github.com/users/Asymmetrik/repos","events_url":"https://api.github.com/users/Asymmetrik/events{/privacy}","received_events_url":"https://api.github.com/users/Asymmetrik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Asymmetrik/yadda","description":"Yet Another Docker Deployment Application","fork":false,"url":"https://api.github.com/repos/Asymmetrik/yadda","forks_url":"https://api.github.com/repos/Asymmetrik/yadda/forks","keys_url":"https://api.github.com/repos/Asymmetrik/yadda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Asymmetrik/yadda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Asymmetrik/yadda/teams","hooks_url":"https://api.github.com/repos/Asymmetrik/yadda/hooks","issue_events_url":"https://api.github.com/repos/Asymmetrik/yadda/issues/events{/number}","events_url":"https://api.github.com/repos/Asymmetrik/yadda/events","assignees_url":"https://api.github.com/repos/Asymmetrik/yadda/assignees{/user}","branches_url":"https://api.github.com/repos/Asymmetrik/yadda/branches{/branch}","tags_url":"https://api.github.com/repos/Asymmetrik/yadda/tags","blobs_url":"https://api.github.com/repos/Asymmetrik/yadda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Asymmetrik/yadda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Asymmetrik/yadda/git/refs{/sha}","trees_url":"https://api.github.com/repos/Asymmetrik/yadda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Asymmetrik/yadda/statuses/{sha}","languages_url":"https://api.github.com/repos/Asymmetrik/yadda/languages","stargazers_url":"https://api.github.com/repos/Asymmetrik/yadda/stargazers","contributors_url":"https://api.github.com/repos/Asymmetrik/yadda/contributors","subscribers_url":"https://api.github.com/repos/Asymmetrik/yadda/subscribers","subscription_url":"https://api.github.com/repos/Asymmetrik/yadda/subscription","commits_url":"https://api.github.com/repos/Asymmetrik/yadda/commits{/sha}","git_commits_url":"https://api.github.com/repos/Asymmetrik/yadda/git/commits{/sha}","comments_url":"https://api.github.com/repos/Asymmetrik/yadda/comments{/number}","issue_comment_url":"https://api.github.com/repos/Asymmetrik/yadda/issues/comments{/number}","contents_url":"https://api.github.com/repos/Asymmetrik/yadda/contents/{+path}","compare_url":"https://api.github.com/repos/Asymmetrik/yadda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Asymmetrik/yadda/merges","archive_url":"https://api.github.com/repos/Asymmetrik/yadda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Asymmetrik/yadda/downloads","issues_url":"https://api.github.com/repos/Asymmetrik/yadda/issues{/number}","pulls_url":"https://api.github.com/repos/Asymmetrik/yadda/pulls{/number}","milestones_url":"https://api.github.com/repos/Asymmetrik/yadda/milestones{/number}","notifications_url":"https://api.github.com/repos/Asymmetrik/yadda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Asymmetrik/yadda/labels{/name}","releases_url":"https://api.github.com/repos/Asymmetrik/yadda/releases{/id}","deployments_url":"https://api.github.com/repos/Asymmetrik/yadda/deployments","created_at":"2016-12-02T21:55:22Z","updated_at":"2017-08-23T14:56:22Z","pushed_at":"2017-10-24T20:57:00Z","git_url":"git://github.com/Asymmetrik/yadda.git","ssh_url":"git@github.com:Asymmetrik/yadda.git","clone_url":"https://github.com/Asymmetrik/yadda.git","svn_url":"https://github.com/Asymmetrik/yadda","homepage":null,"size":52,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":5,"default_branch":"master"}},"base":{"label":"Asymmetrik:master","ref":"master","sha":"277f98bdb80e30a9b6d905028c704cbe4d310186","user":{"login":"Asymmetrik","id":491054,"avatar_url":"https://avatars3.githubusercontent.com/u/491054?v=4","gravatar_id":"","url":"https://api.github.com/users/Asymmetrik","html_url":"https://github.com/Asymmetrik","followers_url":"https://api.github.com/users/Asymmetrik/followers","following_url":"https://api.github.com/users/Asymmetrik/following{/other_user}","gists_url":"https://api.github.com/users/Asymmetrik/gists{/gist_id}","starred_url":"https://api.github.com/users/Asymmetrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Asymmetrik/subscriptions","organizations_url":"https://api.github.com/users/Asymmetrik/orgs","repos_url":"https://api.github.com/users/Asymmetrik/repos","events_url":"https://api.github.com/users/Asymmetrik/events{/privacy}","received_events_url":"https://api.github.com/users/Asymmetrik/received_events","type":"Organization","site_admin":false},"repo":{"id":75434038,"name":"yadda","full_name":"Asymmetrik/yadda","owner":{"login":"Asymmetrik","id":491054,"avatar_url":"https://avatars3.githubusercontent.com/u/491054?v=4","gravatar_id":"","url":"https://api.github.com/users/Asymmetrik","html_url":"https://github.com/Asymmetrik","followers_url":"https://api.github.com/users/Asymmetrik/followers","following_url":"https://api.github.com/users/Asymmetrik/following{/other_user}","gists_url":"https://api.github.com/users/Asymmetrik/gists{/gist_id}","starred_url":"https://api.github.com/users/Asymmetrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Asymmetrik/subscriptions","organizations_url":"https://api.github.com/users/Asymmetrik/orgs","repos_url":"https://api.github.com/users/Asymmetrik/repos","events_url":"https://api.github.com/users/Asymmetrik/events{/privacy}","received_events_url":"https://api.github.com/users/Asymmetrik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Asymmetrik/yadda","description":"Yet Another Docker Deployment Application","fork":false,"url":"https://api.github.com/repos/Asymmetrik/yadda","forks_url":"https://api.github.com/repos/Asymmetrik/yadda/forks","keys_url":"https://api.github.com/repos/Asymmetrik/yadda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Asymmetrik/yadda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Asymmetrik/yadda/teams","hooks_url":"https://api.github.com/repos/Asymmetrik/yadda/hooks","issue_events_url":"https://api.github.com/repos/Asymmetrik/yadda/issues/events{/number}","events_url":"https://api.github.com/repos/Asymmetrik/yadda/events","assignees_url":"https://api.github.com/repos/Asymmetrik/yadda/assignees{/user}","branches_url":"https://api.github.com/repos/Asymmetrik/yadda/branches{/branch}","tags_url":"https://api.github.com/repos/Asymmetrik/yadda/tags","blobs_url":"https://api.github.com/repos/Asymmetrik/yadda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Asymmetrik/yadda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Asymmetrik/yadda/git/refs{/sha}","trees_url":"https://api.github.com/repos/Asymmetrik/yadda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Asymmetrik/yadda/statuses/{sha}","languages_url":"https://api.github.com/repos/Asymmetrik/yadda/languages","stargazers_url":"https://api.github.com/repos/Asymmetrik/yadda/stargazers","contributors_url":"https://api.github.com/repos/Asymmetrik/yadda/contributors","subscribers_url":"https://api.github.com/repos/Asymmetrik/yadda/subscribers","subscription_url":"https://api.github.com/repos/Asymmetrik/yadda/subscription","commits_url":"https://api.github.com/repos/Asymmetrik/yadda/commits{/sha}","git_commits_url":"https://api.github.com/repos/Asymmetrik/yadda/git/commits{/sha}","comments_url":"https://api.github.com/repos/Asymmetrik/yadda/comments{/number}","issue_comment_url":"https://api.github.com/repos/Asymmetrik/yadda/issues/comments{/number}","contents_url":"https://api.github.com/repos/Asymmetrik/yadda/contents/{+path}","compare_url":"https://api.github.com/repos/Asymmetrik/yadda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Asymmetrik/yadda/merges","archive_url":"https://api.github.com/repos/Asymmetrik/yadda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Asymmetrik/yadda/downloads","issues_url":"https://api.github.com/repos/Asymmetrik/yadda/issues{/number}","pulls_url":"https://api.github.com/repos/Asymmetrik/yadda/pulls{/number}","milestones_url":"https://api.github.com/repos/Asymmetrik/yadda/milestones{/number}","notifications_url":"https://api.github.com/repos/Asymmetrik/yadda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Asymmetrik/yadda/labels{/name}","releases_url":"https://api.github.com/repos/Asymmetrik/yadda/releases{/id}","deployments_url":"https://api.github.com/repos/Asymmetrik/yadda/deployments","created_at":"2016-12-02T21:55:22Z","updated_at":"2017-08-23T14:56:22Z","pushed_at":"2017-10-24T20:57:00Z","git_url":"git://github.com/Asymmetrik/yadda.git","ssh_url":"git@github.com:Asymmetrik/yadda.git","clone_url":"https://github.com/Asymmetrik/yadda.git","svn_url":"https://github.com/Asymmetrik/yadda","homepage":null,"size":52,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Asymmetrik/yadda/pulls/18"},"html":{"href":"https://github.com/Asymmetrik/yadda/pull/18"},"issue":{"href":"https://api.github.com/repos/Asymmetrik/yadda/issues/18"},"comments":{"href":"https://api.github.com/repos/Asymmetrik/yadda/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/Asymmetrik/yadda/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/Asymmetrik/yadda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Asymmetrik/yadda/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/Asymmetrik/yadda/statuses/b4ae440e04df18a53cf55f45fc92d72b32e4b1d1"}},"author_association":"NONE"}}
{"actor":{"display_login":"Robert-W"}}