Introduction
Secret rotation is a process that involves updating secret credentials periodically to minimize the risk of their compromise. Rotating secrets helps prevent unauthorized access to systems and sensitive data by ensuring that old credentials are replaced with new ones regularly. Rotated secrets may include, but are not limited to:- API keys for external services;
- Database credentials for various platforms.
Rotation Process
The practice of rotating secrets is a systematic and interval-based operation, carried out in four fundamental phases.1. Creation
The system initiates the rotation process by either making an API call to an external service or generating a new secret value internally. Upon successful creation, the system will temporarily have three versions of the secret:- Current active secret: The one currently in use.
- Future active secret (pending): The newly created secret, awaiting validation.
- Previous active secret: The old secret, soon to be retired.