Learn how to set up automated secret rotation in Infisical.
Secret rotation is a security best practice that involves systematically updating credentials and access tokens at regular intervals to minimize the risk of compromise. By proactively replacing existing secrets with new ones, organizations reduce the potential impact of credential theft or leakage.
Examples of rotated secrets include:
Secret Rotation systematically replaces secrets at regular intervals while ensuring zero downtime for your applications. This overlapping lifecycle approach maintains continuous availability while enhancing your security posture.
Each set of credentials transitions through three distinct states:
Active: The primary credentials that will be used for new connections
Inactive: These credentials are still valid but are no longer issued for new connections
Some rotation providers utilize a single credential set due to technical constraints. As a result, inactive credentials for these providers will immediately become invalid once rotated.
To avoid service interruptions, Infisical recommends manually rotating these credentials to prevent downtime.
Revoked: Permanently invalidated and deleted from the system
Using a 30-Day rotation interval as an example, here’s how the process unfolds:
Day 0
Credential set 1
is issued and set to ActiveDay 30
Credential set 2
is issued and set to ActiveCredential set 1
transitions to Inactive but remains validThis overlapping validity period ensures that at any point during the active period of a credential set, you are guaranteed that retrieved credentials will be valid for the specified rotation period.
Day 60
Credential set 3
is issued and set to ActiveCredential set 2
transitions to Inactive but remains validCredential set 1
is Revoked and securely deletedDay 90
Credential set 4
is issued and set to ActiveCredential set 3
transitions to Inactive but remains validCredential set 2
is Revoked and securely deletedWhy do certain rotations only use a single credential set?
Some credential providers have limitations that affect rotation patterns:
In either scenario, when service continuity is critical, Infisical recommends disabling auto-rotation and performing manual credential rotation during scheduled maintenance windows.