{"action":"opened","number":29909,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/29909","id":132042574,"html_url":"https://github.com/rails/rails/pull/29909","diff_url":"https://github.com/rails/rails/pull/29909.diff","patch_url":"https://github.com/rails/rails/pull/29909.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/29909","number":29909,"state":"open","locked":false,"title":"[WIP] Add support for multiple encrypted secret files.","user":{"login":"morgoth","id":10766,"avatar_url":"https://avatars2.githubusercontent.com/u/10766?v=4","gravatar_id":"","url":"https://api.github.com/users/morgoth","html_url":"https://github.com/morgoth","followers_url":"https://api.github.com/users/morgoth/followers","following_url":"https://api.github.com/users/morgoth/following{/other_user}","gists_url":"https://api.github.com/users/morgoth/gists{/gist_id}","starred_url":"https://api.github.com/users/morgoth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgoth/subscriptions","organizations_url":"https://api.github.com/users/morgoth/orgs","repos_url":"https://api.github.com/users/morgoth/repos","events_url":"https://api.github.com/users/morgoth/events{/privacy}","received_events_url":"https://api.github.com/users/morgoth/received_events","type":"User","site_admin":false},"body":"One can add encrypted secrets with custom file, by:\r\n`config.read_encrypted_secrets = \"config/secrets-staging.yml.enc\"`\r\n\r\nAdditionaly one can setup, edit and show specific secrets by providing\r\npath to the file, ie:\r\n```\r\nbin/rails secrets:setup config/secrets-staging.yml.enc\r\nbin/rails secrets:edit config/secrets-staging.yml.enc\r\nbin/rails secrets:show config/secrets-staging.yml.enc\r\n```\r\nIf no argument is provided then default `config/secrets.yml.enc` is in use.\r\n\r\nTo encrypt/decrypt if no `RAILS_MASTER_KEY` is set, then corresponding key file\r\nwill be searched: `config/secrets-staging.yml.enc` -> `config/secrets-staging.yml.key`\r\n\r\n---\r\n\r\nOpen question:\r\nJuggling with full path to the file in rails generator doesn't look nice, alternative could be:\r\n* `bin/rails secrets:setup --name=staging` which will generate `config/secrets-staging.yml.enc`\r\n* `bin/rails secrets:setup --name=secrets-staging` which will generate `config/secrets-staging.yml.enc`\r\n* `bin/rails secrets:setup --environment=staging` which will generate `config/secrets-staging.yml.enc`\r\n\r\nThe last one depends on the environment which is a little limiting if one have staging server running in production env but just with different environment variables as it could not distinguish the secrets files.\r\n\r\n---\r\nTODO:\r\n* Update documentation/guides\r\n* Add changelog\r\n* Polish implementation\r\n* Maybe add more tests if needed\r\n\r\n---\r\nI would like to gather your feedback before polishing it.\r\n\r\n@kaspth as you're the main architect of this feature\r\n@ce07c3 as you were also planning to implement it\r\n","created_at":"2017-07-24T12:51:48Z","updated_at":"2017-07-24T12:51:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars3.githubusercontent.com/u/47848?v=4","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/29909/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/29909/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/29909/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/e1e214faf2ff3486abd3684225ea260edcc12e60","head":{"label":"freeletics:enhance-encrypted-secrets","ref":"enhance-encrypted-secrets","sha":"e1e214faf2ff3486abd3684225ea260edcc12e60","user":{"login":"freeletics","id":5038262,"avatar_url":"https://avatars1.githubusercontent.com/u/5038262?v=4","gravatar_id":"","url":"https://api.github.com/users/freeletics","html_url":"https://github.com/freeletics","followers_url":"https://api.github.com/users/freeletics/followers","following_url":"https://api.github.com/users/freeletics/following{/other_user}","gists_url":"https://api.github.com/users/freeletics/gists{/gist_id}","starred_url":"https://api.github.com/users/freeletics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeletics/subscriptions","organizations_url":"https://api.github.com/users/freeletics/orgs","repos_url":"https://api.github.com/users/freeletics/repos","events_url":"https://api.github.com/users/freeletics/events{/privacy}","received_events_url":"https://api.github.com/users/freeletics/received_events","type":"Organization","site_admin":false},"repo":{"id":97945336,"name":"rails","full_name":"freeletics/rails","owner":{"login":"freeletics","id":5038262,"avatar_url":"https://avatars1.githubusercontent.com/u/5038262?v=4","gravatar_id":"","url":"https://api.github.com/users/freeletics","html_url":"https://github.com/freeletics","followers_url":"https://api.github.com/users/freeletics/followers","following_url":"https://api.github.com/users/freeletics/following{/other_user}","gists_url":"https://api.github.com/users/freeletics/gists{/gist_id}","starred_url":"https://api.github.com/users/freeletics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeletics/subscriptions","organizations_url":"https://api.github.com/users/freeletics/orgs","repos_url":"https://api.github.com/users/freeletics/repos","events_url":"https://api.github.com/users/freeletics/events{/privacy}","received_events_url":"https://api.github.com/users/freeletics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freeletics/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/freeletics/rails","forks_url":"https://api.github.com/repos/freeletics/rails/forks","keys_url":"https://api.github.com/repos/freeletics/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freeletics/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freeletics/rails/teams","hooks_url":"https://api.github.com/repos/freeletics/rails/hooks","issue_events_url":"https://api.github.com/repos/freeletics/rails/issues/events{/number}","events_url":"https://api.github.com/repos/freeletics/rails/events","assignees_url":"https://api.github.com/repos/freeletics/rails/assignees{/user}","branches_url":"https://api.github.com/repos/freeletics/rails/branches{/branch}","tags_url":"https://api.github.com/repos/freeletics/rails/tags","blobs_url":"https://api.github.com/repos/freeletics/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freeletics/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freeletics/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/freeletics/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freeletics/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/freeletics/rails/languages","stargazers_url":"https://api.github.com/repos/freeletics/rails/stargazers","contributors_url":"https://api.github.com/repos/freeletics/rails/contributors","subscribers_url":"https://api.github.com/repos/freeletics/rails/subscribers","subscription_url":"https://api.github.com/repos/freeletics/rails/subscription","commits_url":"https://api.github.com/repos/freeletics/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/freeletics/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/freeletics/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/freeletics/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/freeletics/rails/contents/{+path}","compare_url":"https://api.github.com/repos/freeletics/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freeletics/rails/merges","archive_url":"https://api.github.com/repos/freeletics/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freeletics/rails/downloads","issues_url":"https://api.github.com/repos/freeletics/rails/issues{/number}","pulls_url":"https://api.github.com/repos/freeletics/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/freeletics/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/freeletics/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freeletics/rails/labels{/name}","releases_url":"https://api.github.com/repos/freeletics/rails/releases{/id}","deployments_url":"https://api.github.com/repos/freeletics/rails/deployments","created_at":"2017-07-21T12:27:13Z","updated_at":"2017-07-21T12:27:57Z","pushed_at":"2017-07-24T12:30:39Z","git_url":"git://github.com/freeletics/rails.git","ssh_url":"git@github.com:freeletics/rails.git","clone_url":"https://github.com/freeletics/rails.git","svn_url":"https://github.com/freeletics/rails","homepage":"http://rubyonrails.org","size":151455,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"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":"rails:master","ref":"master","sha":"0449d8b6bc02f4c0a416a7c40550e3b8b988d113","user":{"login":"rails","id":4223,"avatar_url":"https://avatars1.githubusercontent.com/u/4223?v=4","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars1.githubusercontent.com/u/4223?v=4","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","deployments_url":"https://api.github.com/repos/rails/rails/deployments","created_at":"2008-04-11T02:19:47Z","updated_at":"2017-07-24T12:48:44Z","pushed_at":"2017-07-24T12:48:10Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":151772,"stargazers_count":36421,"watchers_count":36421,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14873,"mirror_url":null,"open_issues_count":1188,"forks":14873,"open_issues":1188,"watchers":36421,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/29909"},"html":{"href":"https://github.com/rails/rails/pull/29909"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/29909"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/29909/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/29909/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/29909/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/e1e214faf2ff3486abd3684225ea260edcc12e60"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":1,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":190,"deletions":122,"changed_files":7}}
{"actor":{"display_login":"morgoth"}}