Secrets have a lifecycle. Yours only have a birth.
API keys, tokens, certificates, service-account passwords. Many teams are good at creating them and much weaker at everything after that. No rotation, no ownership, no death. On the four phases of a secret’s life, why ‘the key we don’t dare rotate’ is a red flag, and the road to a practice that doesn’t hurt.
Three questions about one key
Do a small exercise: find your system’s most important API key or service-account password, and ask three questions.
How old is it? Who owns it? And, the revealing one: would you dare replace it today?
Far too often the answers are: older than several people’s tenures, nobody quite, and an uncomfortable no. The secret was born once, by someone, for something, and has since simply been there. No rotation, no owner, no plan for its death.
That isn’t management. That’s archaeology with access rights.
I have been there. We had a key nobody had a full picture of, and nobody wanted to touch it, because it worked. Then someone noticed it would expire in three days. The application behind it turned out to be half broken, everything that should have been done (modernize, patch, fix) had to be done in a day, and the logging was too poor to tell us whether any of it worked. The key was not the problem. It merely put a date on a problem that was already there.
Four phases, and where yours stops
A secret with a real life moves through all four:
Birth: created with the narrowest possible scope, stored in a vault from the first second, with a documented owner and purpose. Never “one key with access to everything, so we don’t have to make more.”
Life: fetched from the vault when needed, never copied into codebases, config files or chat threads, where it stays. Log which key or version is used, by which system and when, never the value itself. A vault lookup shows that someone retrieved the key; it does not show every later call made with a cached copy. Usage data also needs to come from the service accepting the key, where it supports that.
Rotation: replaced on a schedule that fits the key’s risk and the provider’s support, preferably automatically. The swap limits how long a stolen key can work and is also a readiness drill: the day a key leaks, you have practiced replacing it.
Death: revoked when the purpose ends, the integration is shut down, the consultant leaves, the service is replaced. Actively, not by forgetting.
The figures show how long even known leaks can live: GitGuardian found that nearly 70 percent of the leaked secrets it had confirmed valid in 2022 still worked in January 2025, and more than 64 percent still worked in January 2026. The old access had not been revoked; the figures do not tell us whether anyone had created a replacement. A long-lived key can acquire more copies and more users while the record of them gets worse.
The key nobody dares to rotate
The uncomfortable no from the opening question tells you where a plan is needed:
What makes the swap unsafe? Perhaps nobody knows every consumer, the provider permits only one active key, or an important job is hard to test. Make the obstacle visible. If the key leaks before you have a plan, you have to handle the unwanted access and the risk of downtime at the same time.
Let the key you are most worried about be the first one you make a rotation plan for. During a planned swap, without suspected leakage, two active keys can give you time to move consumers one at a time, if the provider supports it. Test that each consumer works with the new key before revoking the old one. OWASP describes several rotation strategies, rather than one recipe for every case.
Map the jobs that run weekly or monthly too. Run them in a controlled way with the new key, or observe through their actual schedules; a few quiet days in the log do not prove the old key is unused. Without overlap support, you need a coordinated change and a plan to restore service if it fails.
Boring is a perfectly good outcome for a planned rotation.
Suspected leakage has a different deadline: revoke the exposed key promptly and handle the incident. Do not wait for a quiet observation period while someone else can use it.
The road there, without a heroic cleanup sprint
Like every improvement that actually happens (in Norwegian): in the day-to-day, not in one big push.
New secrets are born correctly starting today: vault, owner, purpose, narrowest scope. Take existing ones by risk, one planned improvement at a time. Prefer workload identity and short-lived tokens where the platform supports them. A token that expires after an hour limits the lifetime of that particular access. You still need to manage permissions and whatever can issue new tokens, including a long-lived credential if the solution uses one. And every exit and every retired integration gets a standing item: which secrets die with this?
Before the calendar decides
Take the key from the opening question. If you do not dare replace it, write down what stands in the way and agree how to try the swap while you can still choose the timing. Three days is a poor window for finding out who uses a key.