Authentication
Rotating credentials
Rotation replaces the secret immediately; project ID stays the same.
Overview
Rotation issues a new gray_sk_… and immediately invalidates the previous secret. The project ID stays the same, so you only update the Bearer token in config.
Zero-downtime checklist
- Create or rotate the secret in Console (copy it once).
- Deploy the new value to every server, worker, and CI secret store.
- Smoke-test with
GET /v1/chainsusing the new secret. - Remove the old value from vaults—after rotation it returns
revoked_secretorunauthorized.
When to rotate
- Scheduled hygiene (e.g. quarterly)
- Employee with key access leaves
- Secret appeared in logs, screenshots, or a client bundle
- You decommission an environment
json
{
"error": {
"code": "revoked_secret",
"message": "Project secret has been revoked.",
"retryable": false
}
}See also Rotate a key and Rotate after a leak.