Pcornel
Security

Secrets Management

Cheat sheet · https://pcornel.dk/topic.php?topic=5058

Back to the Topic

Answer

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.

Remember

  • Secrets in code or config files leak.
  • Short-lived secrets limit damage.
  • Every access to a secret should be logged.

First checks

  • Secret inventory — where secrets live
  • gitleaks detect --source . — leaked secrets in repo
  • vault status — secret store health

Verify in this order

app → authenticate to vault → fetch secret → use → rotate

Where it usually breaks

First mismatch in key/secret generation → storage/rotation → trust/certificate validation → protocol negotiation → cryptographic operation → peer/application verification; preserve identity/policy/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5058

Confirmation

Confirm action

Continue?