🔐Secrets Management
Also known as Secret Management, Secrets Manager, Vault, Secrets
Keeping passwords and keys out of your code, in a safe place apps read from.
Think of it like
Think of it like a safe for your keys. You do not leave them taped to the front door.
Example
Lucy moves her database password out of config.js and into a vault. Her app reads it when it starts. The repo no longer holds it.
Why it matters
Leaked secrets are one of the commonest causes of breaches. Code gets shared; secrets must not travel with it.
Definition
Example code
console
$ export DATABASE_PASSWORD='s3cret'
$ node app.jsCommon mistake
Key takeaways
- 1Never in code. Not even once.
- 2Read at start-up. From the environment or a vault.
- 3Rotate. Change them on a schedule.