As asked
Design a secrets rotation system that automatically rotates database passwords, API keys, and TLS certificates for a platform with 50 microservices, each potentially running multiple instances. The rotation must be zero-downtime and auditable.
Sample answer outline
A strong answer uses HashiCorp Vault as the secrets source of truth with dynamic secrets for databases (Vault generates short-lived credentials per service on demand), a sidecar pattern to deliver secrets to pods without storing them in environment variables, a rotation orchestrator that coordinates dual-write windows for API keys (both old and new keys valid simultaneously), and certificate automation via Vault PKI or cert-manager with ACME. Audit events from Vault are streamed to the SIEM.
Expect these follow-ups
- How would you handle a service that stores its database password in a config file on disk rather than reading from Vault at runtime?