Live data from Hacker News

Ask HN: Secure and simple way for secret/credential management in a startup?

news.ycombinator.com

11–20 of 34 posts

Re: Ask HN: Secure and simple way for secret/credential management in a startup?

#12
post #5

Hashicorp Vault. Checks all your boxes, I think. Or for something more lightweight (though it sounds like you're just about getting to the size where something more instrumented is worth it), you can have a git repo with secrets encrypted with individual keys. (git-secret and pass are two of the more popular ones here) > 8. Bonus: How to manage non-technical secrets, e.g. credentials for web shops to order supplies?…

Warning to anyone interested in Vault. Vault policies involve a learning curve. Maybe they have improved documentation and examples since I learned Vault management but I remember how complicated and time consuming it was.

Re: Ask HN: Secure and simple way for secret/credential management in a startup?

#13
A few suggestions:

1. Application / service to service secrets should be handled either by Vault or AWS Param Store. Both are good. AWS Param Store is easier but less feature rich. Ideally, your Vault instance would have the database engine which allows for automatic rotation and password management of databases like Postgres.

2. Developers should only have access to AWS through SSO using something like Okta. Okta has MFA through it's own authenticator app (not through SMS).

3. Password sharing should be handled with something like sops or if you need a more lightweight solution - Password Pusher. Sops works really well for hiding credentials within code that needs to be deployed. A team managed 1Password instance works well too.

4. Terraform should inherit a role that gives permissions to run against infrastructure. That role should be short lived and limited to running in a CI/CD environment (preferably on your own runner if that's possible).

5. You should have a separate AWS environment for running test projects. You can do this virtually (localstack) or physically through having a separate AWS account. I prefer the later since it's the real thing and implements all the APIs. Localstack can be decent though. If I had to setup an organization now, I would have a minimum of 3 AWS accounts. One for production infrastructure, one for staging environments and one for test environments. I would also add in AWS Budget Alerts and Cost Anomaly detection to prevent huge spend on it.

Re: Ask HN: Secure and simple way for secret/credential management in a startup?

#14

A few suggestions: 1. Application / service to service secrets should be handled either by Vault or AWS Param Store. Both are good. AWS Param Store is easier but less feature rich. Ideally, your Vault instance would have the database engine which allows for automatic rotation and password management of databases like Postgres. 2. Developers should only have access to AWS through SSO using something like Okta. Okta ha…

Excellent post. For #4 I recommend using GitHub Actions + AssumeRoleWithWebIdentity (oidc).

Re: Ask HN: Secure and simple way for secret/credential management in a startup?

#16

Haven't tried it out yet and not affiliated but Infisical (YC W23) is an "Open-source secrets manager for developers" that just launched on here: https://news.ycombinator.com/item?id=34955699

One of the creators of Infisical (https://infisical.com) here. We indeed satisfy most of these points. Happy to answer any questions here or feel free to join our Slack of you need any help: https://infisical.com/slack

Re: Ask HN: Secure and simple way for secret/credential management in a startup?

#17
All deploys are done from a VPS host machine secured behind a firewall and only accessible via passphrase-protected ssh keys.

All secrets are in a file on there. I make it a file of exports I source before launching the app. Backup the file in 1pw.

Secrets get deployed along with the app to a server also secured with ssh and a firewall/VPC.

Maybe doesn't scale to an org chart, but a scrappy startup of 3-5 with some contractors and it works well. This method allows you to literally have a single VPS prod host and a single VPS deploy box. That's $10 and super simple and completely cloud-agnostic.

Re: Ask HN: Secure and simple way for secret/credential management in a startup?

#18
Adding to existing suggestions.

- About 5, https://github.com/99designs/aws-vault is super handy to keep AWS credentials encrypted.

- Use full-disk encryption as a team policy.

- About 7, it is likely that this is solved by having preview environments so that developers don't need to manage infrastructure manually.

- About 8, 1password shared vault works nicely for us.

Re: Ask HN: Secure and simple way for secret/credential management in a startup?

#19
post #4

AWS Secrets Manager with strong a strong least-privilege, regularly-reviews IAM configuration has worked well for us

This is what we use and it works exactly as you would expect. The only downside is that it seems to get very expensive very quickly.
Post reply on HN