You should check out Daniel Somerfield's talk at OWASP, "Turtles All the Way Down: Storing Secrets in the Cloud and the Data Center" https://youtu.be/OUSvv2maMYI
Ask HN: In a microservice architecture, how do you handle managing secrets?
31–40 of 60 posts
Re: Ask HN: In a microservice architecture, how do you handle managing secrets?
#32The initial trust problem boils down to trusting the API that controls the provisioning of your infrastructure. Failing that, you have to ask a human to manually authorize new nodes to retrieve secrets (that's how puppet approves new agent certs).
Re: Ask HN: In a microservice architecture, how do you handle managing secrets?
#33A simple solution if you are in AWS is S3 with instance profiles for access.
On the subject, I typically store a file containing env variable export statements on S3. When the box is provisioned, the file is downloaded to it. Since the box has role-based access, there is no point in downloading and deleting the file: any process on the box can download it again from S3 at any time. Basically, I trust that the EC2 instance will remain secure. Then the file is source'd in any context where my application code will run.
For applications outside of AWS, I just keep a local non-version-controlled copy of the secrets, and then upload them to the server when I provision it.
Re: Ask HN: In a microservice architecture, how do you handle managing secrets?
#34It also depends on how secret it needs to be. For most of our secrets (those used for configuration) we use Consul.
Do you take advantage of Consul's ACL system them for limiting access to secrets? Also, do you have any form of auditing then when using consul? Thanks for your input!
Re: Ask HN: In a microservice architecture, how do you handle managing secrets?
#35We use Kubernetes, which includes its own secrets API: http://kubernetes.io/v1.1/docs/user-guide/secrets.html I can't remember which issue this was on, but it seemed like there was some discussion on their GitHub project about making pluggable secrets backends (HashiCorp's Vault was mentioned). Kubernetes' secrets API is still very basic, but I think the fundamental concept is very sound and has a great foundation to…
Our service is built on top of docker deployed on CoreOS with fleet and etcd. Most of our secrets & runtime configuration was stored in etcd, which was our attempt to store the config in the environment (http://12factor.net/config).
With Kubernetes, life is much simpler. Gone are the silly fleet configuration files, and the bootstrap scripts I used to configure etcd. Moreover, Kubernetes' secrets volume means I can have my configuration and secrets easily plugged in.
There are definitely other great solutions out there, but I'm sold on Kubernetes.
Re: Ask HN: In a microservice architecture, how do you handle managing secrets?
#36Re: Ask HN: In a microservice architecture, how do you handle managing secrets?
#37It also depends on how secret it needs to be. For most of our secrets (those used for configuration) we use Consul.
You're putting a lot of faith in a very complex and not- well- tested codebase if you rely on Consul ACLs to protect secrets.
Re: Ask HN: In a microservice architecture, how do you handle managing secrets?
#38[0]: https://github.com/TechnologyAdvice/Cryptex [1]: http://technologyadvice.github.io/lock-up-your-customer-acco...
Re: Ask HN: In a microservice architecture, how do you handle managing secrets?
#39Re: Ask HN: In a microservice architecture, how do you handle managing secrets?
#40The project is brand new and we'd love to hear your feedback: https://github.com/asteris-llc/vaultfs