Secrets Management
The controlled lifecycle for creating, storing, distributing, using, rotating, auditing, and revoking credentials and cryptographic keys.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/secrets-management/
01What it means
Secrets management governs sensitive values that grant access or cryptographic capability, such as passwords, API keys, private keys, and database credentials. It combines protected storage with identity-based delivery, least privilege, short lifetimes, rotation, audit, and incident response.[1][2]
- 01InventoryOwner, consumer, privilege, environment
- 02Generate + storeSecure creation in protected system
- 03Authenticate + deliverLeast privilege to verified workload or person
- 04Rotate + revokeShort life, overlap, compromise response
- 05Audit + retireDetect leakage, test recovery, remove unused
Secrets should stay out of source control, logs, images, command output, and unnecessary environment exposure.
02Why it matters
Secrets copied into code, configuration, images, tickets, or logs spread silently and remain usable after exposure. Central lifecycle controls reduce distribution, make ownership visible, and allow rotation or revocation without rebuilding every system manually.
03When to use it
Manage every non-public credential and key through an approved lifecycle, including development and automation. Prefer short-lived dynamically issued credentials when platforms support them, while retaining protected break-glass procedures for critical recovery.
04How it works
- Inventory secrets, owners, consumers, privileges, environments, and rotation requirements.
- Generate secrets securely and store them in a dedicated protected system.
- Authenticate workloads or people before delivering only the secrets they need.
- Keep secrets out of source control, command output, logs, images, and unnecessary environment exposure.
- Rotate automatically with overlap and revoke quickly after compromise or ownership change.
- Audit access, detect leakage, test recovery, and remove unused secrets.
05A practical example
A deployment workload authenticates with platform identity and retrieves a short-lived database credential at runtime. The value never enters the repository or container image, and audit logs connect issuance to one workload.
06Where it breaks
A secret manager becomes critical infrastructure and does not protect a secret after an authorized compromised process receives it. Migration, bootstrapping, availability, caching, and emergency access require careful design.
Common mistakes
- Committing secrets and assuming removal from the latest revision erases history.
- Using one long-lived credential across people, services, and environments.
- Logging secrets through debug output, URLs, or failed command traces.
- Rotating a value without coordinating every consumer and fallback path.
07Sources
- Secrets Management Cheat SheetOWASP Foundation · Security practice guidanceSecrets Management Cheat Sheet
- SecretsKubernetes Documentation · Official technical documentationSecrets