Ask HN: How does your company manage its encryption keys?
488 pointsWe just had an interesting data loss at work, that was due to data being encrypted at rest. We somehow managed to delete the encryption keys (still figuring out how), which became an obvious problem once our main database instance was rebooted.
Luckily we were able to restore the data, but now I (we) really want to learn what a proper setup would look like.
If you have any clear overview reading on the topic I'd be very interested to to know about it.
In particular I'm wondering: how do you back up your encryption keys, or even put them in escrow somewhere? Assuming we don't rotate the keys constantly I would love to just save them in somewhing like a passsword manager that's secured with 2FA/FIDO.
Would love to hear your thoughts!
Comments (238) 101 threads
Show all comments
Showing thread 1 of 101
If they're dev-keys, I think this is pretty common.
Since it's of interest to HN, I am working on educating our very small team on how keys should be protected and used. I am the youngest developer by about 15 years. It's a very rural company and it often feels like all learning and passion for development stalled around 2005. It's a company that gave me a chance to grow into a development role with no previous experience so I feel indebted to try my best to keep the lights on.
I don't judge too harshly- anyone who has black and white principles on these matters has never worked in any other industry most likely... all you can do is your best to steer the ship and convey the downsides.
I think it's important too because it helps us understand how much friction people will tolerate.
In many cases, even a small amount of friction will cause people to stop functioning completely; I recently tried setting up vault and it was a nightmare, I understand why people avoid picking it up.
That doesn't mean we should not try; we have to become the advocates, arbiters and helpers for those systems.
Good luck, you're not alone.
Continue this thread — 3 replies
There are multiple automated systems that scan public repos for credentials. 5 minutes later you are mining bitcoins for them.
> When you push to a public repository, GitHub scans the content of the commits for secrets. If you switch a private repository to public, GitHub scans the entire repository for secrets.
> When secret scanning detects a set of credentials, we notify the service provider who issued the secret. The service provider validates the credential and then decides whether they should revoke the secret, issue a new secret, or reach out to you directly, which will depend on the associated risks to you or the service provider.
https://help.github.com/en/github/administering-a-repository...
Not particularly germane to the discussion, but really disappointed in how SendGrid handled things. I notified them immediately, rotated all API tokens, and tey could not turn it off, so the spammer sent messages for days and eventually my SG account got suspended.
IP Rules are super helpful in this case, still need to rotate when exposed but can limit the exposure.
Continue this thread — 2 replies
I wish you the energy to keep trying to change this, don't let it get to you too much, I know this stuff can be frustrating as hell.
The company solved this by giving me a root username and password that worked on every single important database in the company, at least every customer database.
I had to beg them to create a somewhat restricted account.
The same company was however deeply sceptical to all kinds of remote work. The security equivalent of penny wise pound foolish I guess :-]
Continue this thread — 2 replies
If they slack off, at least they do it in the office and not freely at home (imagine the possibilities!)
Continue this thread — 3 replies
To keep the charade up I sent one of every 20 requests to them to do for me.
But we aren't allowed internet access on our workstations because "security"
in the last startup I worked, all jwt tokens were created from a 10 letter long shared "secret" stored in json config files all over the place :p
even dev environments had same key lol
Continue this thread — 2 more replies