{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/27794","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/27794/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/27794/comments","events_url":"https://api.github.com/repos/docker/docker/issues/27794/events","html_url":"https://github.com/docker/docker/pull/27794","id":185466662,"number":27794,"title":"Secret Management","user":{"login":"ehazlett","id":260642,"avatar_url":"https://avatars.githubusercontent.com/u/260642?v=3","gravatar_id":"","url":"https://api.github.com/users/ehazlett","html_url":"https://github.com/ehazlett","followers_url":"https://api.github.com/users/ehazlett/followers","following_url":"https://api.github.com/users/ehazlett/following{/other_user}","gists_url":"https://api.github.com/users/ehazlett/gists{/gist_id}","starred_url":"https://api.github.com/users/ehazlett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehazlett/subscriptions","organizations_url":"https://api.github.com/users/ehazlett/orgs","repos_url":"https://api.github.com/users/ehazlett/repos","events_url":"https://api.github.com/users/ehazlett/events{/privacy}","received_events_url":"https://api.github.com/users/ehazlett/received_events","type":"User","site_admin":false},"labels":[{"id":308856530,"url":"https://api.github.com/repos/docker/docker/labels/docs/revisit","name":"docs/revisit","color":"000000","default":false},{"id":237472255,"url":"https://api.github.com/repos/docker/docker/labels/impact/api","name":"impact/api","color":"bfe5bf","default":false},{"id":237472270,"url":"https://api.github.com/repos/docker/docker/labels/impact/changelog","name":"impact/changelog","color":"bfe5bf","default":false},{"id":237472313,"url":"https://api.github.com/repos/docker/docker/labels/impact/cli","name":"impact/cli","color":"bfe5bf","default":false},{"id":450032382,"url":"https://api.github.com/repos/docker/docker/labels/impact/documentation","name":"impact/documentation","color":"bfe5bf","default":false},{"id":175375598,"url":"https://api.github.com/repos/docker/docker/labels/status/4-merge","name":"status/4-merge","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":{"login":"vdemeester","id":6508,"avatar_url":"https://avatars.githubusercontent.com/u/6508?v=3","gravatar_id":"","url":"https://api.github.com/users/vdemeester","html_url":"https://github.com/vdemeester","followers_url":"https://api.github.com/users/vdemeester/followers","following_url":"https://api.github.com/users/vdemeester/following{/other_user}","gists_url":"https://api.github.com/users/vdemeester/gists{/gist_id}","starred_url":"https://api.github.com/users/vdemeester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdemeester/subscriptions","organizations_url":"https://api.github.com/users/vdemeester/orgs","repos_url":"https://api.github.com/users/vdemeester/repos","events_url":"https://api.github.com/users/vdemeester/events{/privacy}","received_events_url":"https://api.github.com/users/vdemeester/received_events","type":"User","site_admin":false},"assignees":[{"login":"vdemeester","id":6508,"avatar_url":"https://avatars.githubusercontent.com/u/6508?v=3","gravatar_id":"","url":"https://api.github.com/users/vdemeester","html_url":"https://github.com/vdemeester","followers_url":"https://api.github.com/users/vdemeester/followers","following_url":"https://api.github.com/users/vdemeester/following{/other_user}","gists_url":"https://api.github.com/users/vdemeester/gists{/gist_id}","starred_url":"https://api.github.com/users/vdemeester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdemeester/subscriptions","organizations_url":"https://api.github.com/users/vdemeester/orgs","repos_url":"https://api.github.com/users/vdemeester/repos","events_url":"https://api.github.com/users/vdemeester/events{/privacy}","received_events_url":"https://api.github.com/users/vdemeester/received_events","type":"User","site_admin":false},{"login":"crosbymichael","id":749551,"avatar_url":"https://avatars.githubusercontent.com/u/749551?v=3","gravatar_id":"","url":"https://api.github.com/users/crosbymichael","html_url":"https://github.com/crosbymichael","followers_url":"https://api.github.com/users/crosbymichael/followers","following_url":"https://api.github.com/users/crosbymichael/following{/other_user}","gists_url":"https://api.github.com/users/crosbymichael/gists{/gist_id}","starred_url":"https://api.github.com/users/crosbymichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crosbymichael/subscriptions","organizations_url":"https://api.github.com/users/crosbymichael/orgs","repos_url":"https://api.github.com/users/crosbymichael/repos","events_url":"https://api.github.com/users/crosbymichael/events{/privacy}","received_events_url":"https://api.github.com/users/crosbymichael/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/56","html_url":"https://github.com/docker/docker/milestones/1.13.0","labels_url":"https://api.github.com/repos/docker/docker/milestones/56/labels","id":1839404,"number":56,"title":"1.13.0","description":"","creator":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"open_issues":85,"closed_issues":767,"state":"open","created_at":"2016-06-20T22:51:25Z","updated_at":"2016-11-12T01:41:10Z","due_on":null,"closed_at":null},"comments":54,"created_at":"2016-10-26T18:01:54Z","updated_at":"2016-11-12T12:36:00Z","closed_at":"2016-11-09T21:26:53Z","pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/27794","html_url":"https://github.com/docker/docker/pull/27794","diff_url":"https://github.com/docker/docker/pull/27794.diff","patch_url":"https://github.com/docker/docker/pull/27794.patch"},"body":"This adds support for the new Secret API in Swarmkit (https://github.com/docker/swarmkit/pull/1567).  This adds commands (`create`, `inspect`, `ls`, `rm`) for managing secrets in a Swarm cluster.  This is currently for Swarm mode only as the backing store is Swarm and as such is only for Linux.  This is the foundation for future secret support in Docker with potential improvements such as Windows support, different backing stores, etc.\r\n\r\nThis takes the ideas and collective recommendations from #13490 to set the groundwork.  It exposes a file system based interface for secret access.  The engine creates a tmpfs and mounts it in container (`/run/secrets`).  A file is created for each secret that is assigned to the service.  For example, if a secret named \"ssh-dev\" with a target of \"id_rsa\" is assigned to the service, a file with the secret contents will be created at `/run/secrets/id_rsa`.\r\n\r\nTODO:\r\n- [x] ~~Service update support to add / rm secrets from a service~~\r\n- [x] ~~User facing docs~~\r\n- [x] ~~More tests~~\r\n- [x] ~~Depends on [https://github.com/docker/swarmkit/pull/1697](https://github.com/docker/swarmkit/pull/1697)~~\r\n\r\nExamples (these will be turned into user docs):\r\n\r\nCreate a Secret:\r\n\r\n```\r\n$> cat test_key | docker secret create ssh-dev\r\nqluh2o4xbvtu8rhvz0hueyeou\r\n```\r\n\r\nCreate a Service with a Secret\r\n\r\n```\r\n$> docker service create --name nginx --secret ssh-dev nginx\r\nt9kwy2v04l7zl3hl9dlvt5vq0\r\n```\r\n\r\nWe can then check the created container for the secret:\r\n\r\n```\r\n$> docker exec -ti 06 mount | grep tmpfs\r\n...\r\ntmpfs on /run/secrets type tmpfs (ro,relatime)\r\n\r\n$> docker exec -ti 06 cat /run/secrets/id_rsa\r\n-----BEGIN RSA PRIVATE KEY-----\r\nMIIEpAIBAAKCAQEA2Xz+yHs5pDgeCyv7ul10MkSYcAu79sRBh/VNGXBPMW1QbBcJ\r\n...\r\n```\r\n\r\nCreate with full options\r\n```\r\n$> docker service create --name nginx --secret source=ssh-dev,target=id_rsa,uid=1000,gid=1000,mode=0400 nginx\r\nt9kwy2v04l7zl3hl9dlvt5vq0\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/260119718","html_url":"https://github.com/docker/docker/pull/27794#issuecomment-260119718","issue_url":"https://api.github.com/repos/docker/docker/issues/27794","id":260119718,"user":{"login":"jefflill","id":4908431,"avatar_url":"https://avatars.githubusercontent.com/u/4908431?v=3","gravatar_id":"","url":"https://api.github.com/users/jefflill","html_url":"https://github.com/jefflill","followers_url":"https://api.github.com/users/jefflill/followers","following_url":"https://api.github.com/users/jefflill/following{/other_user}","gists_url":"https://api.github.com/users/jefflill/gists{/gist_id}","starred_url":"https://api.github.com/users/jefflill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jefflill/subscriptions","organizations_url":"https://api.github.com/users/jefflill/orgs","repos_url":"https://api.github.com/users/jefflill/repos","events_url":"https://api.github.com/users/jefflill/events{/privacy}","received_events_url":"https://api.github.com/users/jefflill/received_events","type":"User","site_admin":false},"created_at":"2016-11-12T12:36:00Z","updated_at":"2016-11-12T12:36:00Z","body":"> --mount type=tmpfs works for you?\r\n> #28150\r\n\r\nThat looks like it'll do the trick.  You guys are amazing.  I'll install the latest dev binary and check it out."}}
{"actor":{"display_login":"jefflill"}}