Skip to content
$ lynuxpro
← All system designs

SENIOR · 13 MIN · DEVOPS · PLATFORM · SRE

Secrets management platform

Workload identity instead of passwords, a highly available Vault, KMS auto-unseal, short-lived dynamic credentials and full audit logs.

Peak load
200 reads/s, 5,000 logins in a restart
Availability target
99.99%
RTO: back up within
30 min
RPO: data you can lose
seconds (DR replica)

← Swipe sideways to see the whole diagram →

ServiceSecurityData storeInfrastructureasync / background

The question

"Design how 500 services and all CI pipelines get passwords, API keys and certificates without anyone storing secrets in Git or config files."

Requirements

  • No long-lived secrets in code, images or CI variables if it can be avoided.
  • Every secret access is authenticated, authorized and logged.
  • Rotate secrets without redeploying, and revoke them fast after a leak.
  • Highly available: if secrets are unavailable, apps can't start.

How it works

  1. A workload proves who it is without a password: a Kubernetes ServiceAccount token, a cloud IAM role, or a CI OIDC token.
  2. It logs in to the secrets service (HashiCorp Vault, or a cloud secret manager), which checks the identity and a policy ("the payments app may read secret/payments/*").
  3. Vault returns a short-lived secret. For databases it can create a dynamic user that expires after, say, one hour.
  4. Vault's storage is encrypted; its root key is protected by a cloud KMS or HSM (auto-unseal), so no human has to type unseal keys after a restart.
  5. Every request goes to an audit log shipped to the SIEM.
  6. For apps that only read files or environment variables, the External Secrets Operator syncs secrets into Kubernetes Secrets (encrypted at rest).

Key decisions

DecisionChoiceWhy
Authenticationworkload identity / OIDCno "secret zero" to protect
Secret lifetimeshort TTLs, dynamic credentialsa leaked credential expires on its own
Deliverysidecar/agent files or synced K8s Secretsapps don't need Vault code
HA3-5 node Raft cluster across zones, DR replicasecrets are on the startup path
Break-glasssealed emergency access with alertshumans can recover in a disaster, visibly

What breaks and how it heals

  • Vault unreachable: apps that already started keep working; cache leases and set TTLs long enough to ride out short outages.
  • A secret leaks: revoke the lease or rotate the static secret, find who accessed it in audit logs, and fix how it leaked.
  • Too many apps hitting Vault at startup: caching agents, and rate-limit friendly retries.

Load and capacity

ItemAssumptionResult
Workloads500 services × 10 pods5,000 pods
Cluster restartall 5,000 pods log in within 5 minutes~17 logins/s: easy for Vault
Steady readsleases renewed every 30 min plus app reads~200 requests/s
Dynamic DB users1-hour TTL, renewed while the pod livesthousands of short-lived users per day, cleaned up automatically

High availability and disaster recovery

TargetNumberHow it is met
Availability99.99% (apps can't start without secrets)5-node Raft cluster across 3 AZs: survives 2 nodes failing
Leader node fails~10 s pausea new leader is elected automatically; clients retry
Region failsRTO 30 min, RPO secondsa DR replica cluster in a second region (or Raft snapshots every hour to encrypted S3: RPO 1 hour)
Unseal after a full restartno humans neededauto-unseal with a multi-region cloud KMS key
Recovery keys5 holders, any 3 neededShamir key sharing, stored offline

What interviewers listen for

  • Identity-based access instead of shared passwords, and the "secret zero" problem.
  • Dynamic, short-lived credentials and rotation.
  • Availability and audit, plus what Kubernetes Secrets do and don't protect.