What you will learn
- Use a secrets manager
- Rotate credentials
- Detect leaked secrets
New to this? Start here
The basics, in plain English
Secrets are sensitive pieces of information like passwords, API keys, and certificates that must stay hidden. Secrets management is the practice of storing and handing out these secrets safely, instead of pasting them into code where anyone could find them.
- Secret
- Sensitive data like a password, token, or key that must be kept private.
- Hardcoding
- Typing a secret directly into your code, which is unsafe and should be avoided.
- Secrets manager
- A secure vault that stores secrets and hands them out only to those allowed.
- Rotation
- Regularly changing secrets so an old leaked one stops working.
- Encryption
- Scrambling data so only someone with the key can read it.
- Access control
- Rules deciding exactly who or what can read each secret.
01
No secrets in git
Use Vault or cloud secret managers, inject at runtime, and rotate. Scan repos with gitleaks to catch accidental commits.
Finished this topic?
Mark it done to earn 100 XP and keep your streak alive.