What a policy holds
A policy never stores a value. Values are never logged and never returned by any rotation endpoint.
Status
Each policy reports a status computed from the next due date:ok, due_soon (inside APP_SECRET_ROTATION_DUE_SOON_DAYS), overdue, or unknown. Overdue policies and rotations that need attention appear in the attention center.
What a rotation does
- Checks the secret exists and is not locked. A locked secret is never rotated; unlock it first.
- Stores the old value as
<KEY>_PREVIOUSwhen a grace window is set. - Records progress, writes the new value, and writes an audit entry.
- Restarts the app through the normal health-gated cutover. A stopped app is not started, it picks the value up when it next starts.
<KEY>_PREVIOUS is deleted and that is audited too.
When a rotation half succeeds
If the new value is stored but the restart fails, the policy moves torestart_failed and shows in the attention center as an incident. The control plane retries only the restart on every pass and never generates a second value. You can also press Rotate now (or run apps secrets rotation rotate) to retry it immediately. If the value could not be written at all, nothing was changed and the policy moves to failed with a plain reason. A failed policy is not retried automatically: fix the cause, then rotate by hand.
Dashboard
Open an app’s Environment page and use the Rotation section. It lists each secret with its policy, status and next due date, and Rotate now asks for confirmation before replacing the value and restarting the app.CLI
due lists policies across every app and needs the root ability.
API
Limits
- Only per-app secrets are covered. Shared variables at project, organization and environment level are not rotated by policy.
- Database role passwords keep their own rotation path. A policy does not rotate them, because nothing would receive the new password.
- Generated values are random hex strings. A secret that must follow a specific format should not be auto-rotated.
- Apps that read
<KEY>_PREVIOUSget a grace window. Apps that do not simply move to the new value at the restart.