2 ms·
As do almost every microservice out there, by storing credentials in environment variables, an exploit that manages to read container's memory is enough. I kee
by pjmlp 6mo ago
As do almost every microservice out there, by storing credentials in environment variables, an exploit that manages to read container's memory is enough.
I keep looking for frameworks that do it the right way, holding critical data encrypted all time, but it isn't a thing most people worry about.
- kenniskrag 6mo agoWhat's the threat model. Where do you store the decryption key? E.g. if my app needs a db connection I can ask a vault service but I need creds for that. The vault service can rotate the creds very fast but is it addition security.
- pjmlp 6mo agoThe treat model is that your container gets owned. The password should only exist in the process memory for the few lines of code to open that database connection, and then wiped after you got the handle. Ideally, homomorphic encryption should be used instead. https://en.wikipedia.org/wiki/Homomorphic_encryption https://en.wikipedia.org/wiki/Homomorphic_encryption
- zbentley 6mo ago> What's the threat model Malicious code can read some/all memory in your container, but not necessarily execute. Plenty of such vulns exist. > Where do you store the decryption key? Not in memory. Either nowhere after use, on the filesystem, or otherwise accessible on-demand by performing IO.