A credential rotation guide is incomplete if its success condition is “a new key exists.” Applications can continue using the old key long after that step. Readers need to identify the consumers, move them through the supported update process and understand what evidence justifies revoking the old credential.
Write planned rotation as a sequence of distinct states: replacement available, consumers updated, replacement use observed, old credential revoked and the expected rejection checked. The supported order depends on the provider and incident context. Do not present an overlap procedure as universal or promise that following a help article guarantees uninterrupted service.
This guide uses a fictional planned-maintenance example with three consumers and opaque labels Kold and Knew. There are no actual credentials, requests, configuration changes or revocations. A suspected compromise belongs to the organization’s incident process; its owner may require immediate revocation rather than waiting for a routine migration checklist.
Verify which rotation model the provider supports
GitHub’s private-key documentation for GitHub Apps describes support for multiple private keys, up to 25, and recommends multiple keys to enable rotation without downtime. It states that these private keys do not expire and require manual revocation. This is evidence about GitHub App private keys, not every API key or integration credential.
The same documentation describes verifying a key pair through its fingerprint, securing private keys and generating a replacement before deleting the last existing key. Do not confuse matching a fingerprint with proof that every application has started using that key. Identity confirmation and deployed-consumer adoption answer different questions.
Before writing another provider’s procedure, verify whether overlapping credentials are supported, how replacement takes effect and what revocation actually invalidates. Some products replace a secret in place; others have multiple active keys or additional token exchanges. Keep those mechanisms specific to the documented credential type.
Use a filled consumer cutover ledger
Our fictional integration allows two active credentials during planned rotation. Its declared consumer inventory is worker, scheduler and reporter. Each consumer’s replacement use must be observed before planned revocation becomes eligible. Those observations are assumed inputs to this teaching example, not actual deployment evidence.
| Stage | Worker / scheduler / reporter | Key state | Decision |
|---|---|---|---|
| Initial inventory | Kold / Kold / Kold | Kold active | No replacement evidence |
| Replacement issued | Kold / Kold / Kold | Kold and Knew active | Issuance alone changes no consumer |
| Partial update observed | Knew / Knew / Kold | Both active | Hold routine old-key revocation |
| All declared consumers observed | Knew / Knew / Knew | Both active | Eligible for authorized planned revocation |
| Old credential revoked | Knew / Knew / Knew | Kold revoked; Knew active | Check old rejection and continued new use |
| After cutover | New use continues under observed conditions | Old credential remains revoked | Previously issued tokens require separate analysis |
The fourth stage is an eligibility decision. It is not an automatic revocation action. A real owner must account for the actual inventory, scheduled jobs, environments and observation window. A quiet consumer can be missing from recent traffic without being safely migrated. An unverified inventory should stay unresolved rather than being called complete.
# Fictional labels only. No credentials, requests or provider operations.
required = {"worker", "scheduler", "reporter"}
first = {"worker": "Knew", "scheduler": "Knew", "reporter": "Kold"}
complete = dict(first, reporter="Knew")
def planned_revocation_ready(observed):
return set(observed) == required and all(
observed[name] == "Knew" for name in required)
assert not planned_revocation_ready(first)
assert planned_revocation_ready(complete)
assert not planned_revocation_ready({"worker": "Knew", "scheduler": "Knew"})
assert not planned_revocation_ready(dict(complete, unknown="Knew"))
print("Incomplete or mismatched inventories held; complete declared inventory eligible")The local program checks only the declared fictional inventory and observed labels. It has no provider connection and proves neither key validity nor actual consumer behavior. The missing-consumer and unexpected-consumer controls show why “all rows look new” is insufficient when the set of rows is wrong. Discovery of a new consumer requires reconciling the inventory before using this planned-cutover rule.
Separate configuration, observed use and revocation
Record which configuration revision was installed, how the relevant consumer adopted it and which authorized observation indicates replacement use. A successful configuration save is not necessarily a process reload or a successful authentication. Explain the actual product’s supported adoption behavior rather than asking readers to infer it from the settings screen.
After authorized revocation, verify its documented effect through the approved testing process. Removing a local file or deleting a deployment variable is not proof that the provider has revoked the credential. Conversely, keeping an old label in a historical audit record is not evidence that the underlying credential remains active.
Use the public example secret review before publishing logs or screenshots. Keep only non-secret identifiers needed to distinguish old and new records. The minimum-scope guide can help explain authorization boundaries where OAuth applies, but rotating a signing key and changing a token’s scopes remain different operations.
Explain what the guide has not invalidated
A private key may be used to obtain another credential. Do not assume that revoking the private key also terminates every previously issued token or session. Establish the actual token lifetime and supported revocation behavior from the provider documentation for that credential chain. If those effects have not been verified, mark them unresolved.
Similarly, restoring an older application configuration may reintroduce a reference to an unusable old credential. Document the supported recovery path without recommending that a revoked or compromised secret be revived. Use the save, apply and restart ledger to separate stored settings from the running process’s effective state.
Retain the inventory, approval, observed migration evidence and actual revocation record privately. Review the final article against partial adoption, missing consumer, unexpected consumer and token-lifetime cases. Release when readers can distinguish a newly created credential from a completed cutover, with every claim limited to the mechanism the product actually supports.
