By the time someone noticed, it had already been cloned, shipped, and stored in places it was never meant to be. One small oversight, and now the question wasn’t how to keep the system running—it was whether anyone could trust it again.
API tokens are not passwords you can hope no one finds. They are direct routes into your systems, and every second they exist beyond necessity is a second of exposure. Control over their lifecycle matters as much as encryption or authentication. Without strict handling rules and clear retention policies, an API token becomes a loaded risk.
Data control starts with ownership. You decide who has an API token, what it can access, and how long it can live. Fine-grained scopes, expiration timers, and automated revocation are not “nice to haves.” They are the baseline. Every key you generate should have a reason to exist, and that reason should expire the moment its function is done.
Retention is policy, not habit. Keeping API tokens around for convenience leads to silent sprawl—tokens hidden in developer machines, backups, CI/CD variables, old staging servers. If there is no automated cleanup, you are choosing to run infrastructure with unknown, uncontrolled access embedded in it. The safest token is short-lived, stored centrally, and destroyed without hesitation.