Secrets Management
Question
How should secrets be managed in DevOps?
Hint
Secrets must never be in source code or plain text.
Explanation
Secrets (passwords, API keys, certificates) must never be hardcoded or committed to Git. Use a secrets manager: HashiCorp Vault, AWS Secrets Manager, Azure Key Vault, Kubernetes Secrets, Doppler. Pattern: 1) Store secrets in the manager. 2) Application fetches at runtime. 3) Rotate regularly. 4) Audit access. In CI/CD, use encrypted secrets (GitHub Actions secrets). In Docker, use secrets (not env vars for sensitive data). In K8s, use Sealed Secrets or External Secrets Operator. Scan for leaked secrets with truffleHog, GitGuardian. Use .gitignore for local env files.
Related Resources
Related Lessons
- Secrets
Learn secrets.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.