Use this when storing and controlling passwords, keys and tokens used by systems.
Secrets Management
Secrets management stores and controls passwords, API keys, tokens and private keys in a vault rather than code or config files, with access control, auditing, automatic rotation and short lifetimes.
1. Secrets management: store in vaults, inject at runtime, rotate, audit.
2. No secrets in code or images.
3. Least-privilege access.
4. Short-lived/dynamic secrets.
5. Detect leaks.
app → authenticate to vault → fetch secret → use → rotate
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Rotating a secret without knowing every consumer.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
Secrets are credentials that grant access — passwords, API keys, tokens, certificates and private keys.
Subtopic PasswordsPasswords as managed secrets should be long, random, unique per system and stored in a password manager or vault, never in scripts, configuration files or chat messages.
Subtopic API KeysAPI keys are secrets that identify and authorize an application calling an API.
Subtopic TokensTokens are issued credentials such as OAuth access tokens, personal access tokens or session tokens.
Subtopic Private KeysPrivate keys used for TLS, SSH and signing are secrets of the highest value.
Subtopic Secret StoresSecret stores are systems built to hold secrets securely — HashiCorp Vault, cloud secret managers, Kubernetes secrets with encryption, or password managers — with encryption, access control and audit.
Subtopic VaultA vault is a dedicated secrets management service, such as HashiCorp Vault, that encrypts secrets, issues dynamic short-lived credentials, enforces policies and logs every access.
Subtopic RotationSecret rotation replaces credentials regularly or after suspected exposure, ideally automatically, with applications fetching the new value from the vault so rotation does not cause outages.
Subtopic ExpirationSecret expiration gives credentials a limited lifetime, such as short-lived tokens or certificates that expire in days, so a leaked secret stops working quickly.
Subtopic Access ControlAccess control for secrets grants each application or person only the specific secrets they need, using identity-based policies in the vault, with every access logged.
Subtopic Secrets LeakageSecrets leakage happens when credentials end up in Git repositories, logs, container images, tickets or chat.
- Secrets in code or config files leak.
- Short-lived secrets limit damage.
- Every access to a secret should be logged.
- Secret inventory — where secrets live
gitleaks detect --source .— leaked secrets in repovault status— secret store health
ReferenceWhy it matters1 section · depth on demand
What it is
Secrets management is the practice and tooling for storing, distributing, rotating and auditing credentials (passwords, API keys, certificates, tokens). Goals: no secrets in code, least-privilege access, short lifetimes and a full audit trail.
ReferenceHow it works1 section · depth on demand
In depth
Secrets management is the discipline of storing, distributing, rotating and auditing the credentials that systems use: passwords, API keys, tokens, certificates and private keys. Most breaches involve stolen or leaked credentials, so how secrets are handled is one of the strongest levers on overall security.
The goal state:
| Principle | In practice |
|---|---|
| Central storage | Vault, cloud secret managers, PAM tools |
| No secrets in code or config files | References resolved at run time |
| Least privilege | Each workload reads only its own secrets |
| Short lifetime | Dynamic or regularly rotated secrets |
| Audit | Every access logged |
| Leak detection | Secret scanning in repositories and logs |
The topics in this group cover the secret types, stores, rotation, expiry, access control and how to detect and respond to leaks.
ReferenceImportant terms & boundaries1 section · depth on demand
Tools
| Tool | Notes |
|---|---|
| HashiCorp Vault / OpenBao | Dynamic secrets, PKI |
| Cloud secret managers | Native IAM |
| SOPS / Sealed Secrets | Encrypted secrets in Git |
| gitleaks, trufflehog | Find leaked secrets |
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Secrets Management. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.