Plan the Rotation of a Credential Shared by Several Services Without an Outage
Help me plan the rotation of a credential (API key, database password, signing key, service account token, or certificate) that is used by more than one service, without an outage and without leaving the old credential valid longer than necessary. Inputs I will provide: - What the credential is, what system issues it, and whether that system supports two valid credentials at once - Every consumer I know of: services, jobs, scripts, CI pipelines, local developer setups, and third parties - How each consumer reads the credential (secrets manager, environment variable, config file, baked into an image) and how it picks up a change (restart, redeploy, periodic reload) - Why we are rotating: scheduled rotation, suspected exposure, or confirmed leak Produce: 1. A consumer inventory table with columns: consumer, how it reads the secret, how it reloads, owner, and confidence that this consumer is real and complete. Then list ways to find consumers I have missed (issuer-side access logs keyed by credential, grepping repos and CI config, audit logs in the secrets manager). 2. A rotation sequence. If the issuer supports overlapping credentials: create new, distribute, verify each consumer is using the new one, then revoke old. If it does not, design the narrowest possible cutover window and say what will fail during it. 3. For each step, the verification signal that it worked (e.g. issuer logs show zero uses of the old key for N hours), and the rollback action if it did not. 4. The point of no return, stated explicitly, and what must be true before passing it. 5. How the urgency changes the plan: if this is a confirmed leak, which steps to compress or skip, and what extra work is needed (reviewing access logs for misuse during the exposure window). 6. Follow-ups that make the next rotation easier, such as moving consumers to a reload-on-change mechanism or removing copies of the secret that should not exist. Do not assume a consumer reloads automatically unless I said so. Mark every assumption you make so I can confirm it before we start.
Sign in to upvote this prompt.