key rotation

Replacing a password or key with a new one on a schedule or after a suspected leak, and re-encrypting what it protected.

In more detail

Rotation limits how long a stolen key stays useful, and is mandatory after a suspected leak. Plan it before you need it: who rotates, how often, and what must be re-encrypted or updated afterwards.

Examples

ansible-vault rekey re-encrypts Vault files with a new password; separate vault IDs let one environment rotate without touching the others.
In the course lab, "roll the database credential" revoked a credential the replicas still used and became a failed deployment.
In Terraform: Any secret that appears in a Terraform state snapshot, plan file or log that the wrong people could read should be rotated. Access control and ephemeral values reduce exposure, but rotation is what limits the damage.

Related terms

Taught in

References

Certification courses