Skip to content

Rotate secrets safely

Alquimia Platform separates secrets from agent specs. Secrets are referenced by name and resolved at runtime from a secret store. This design makes rotation a routine operational task instead of a deployment event.

Common secrets that need rotation include:

  • LLM provider API keys.
  • Database and cache credentials.
  • Object-store access keys.
  • Channel provider tokens.
  • Webhook signing keys.
  • Kafka CloudEvent signing keys.
StrategyWhen to use
Dynamic credentialsUse Vault database secrets engines for PostgreSQL, Redis, or other supported backends. Credentials are short-lived and renewed automatically.
Manual rotationUpdate static secrets in Vault or your cluster secret store, then restart affected services.
Automated rotationUse your secret-management tooling to rotate keys on a schedule and update the store the runtime reads from.
  1. Identify all agents and tools that reference the secret by name.

  2. Update the secret value in the secret store. Keep the same reference name so existing specs continue to work.

  3. Verify that new inference runs can resolve the secret and that providers accept the new value.

  4. Revoke or delete the old secret value at the provider once you confirm the new one is active.

  5. Review the secret audit metrics for any unexpected fetch spikes during the rotation window.

Dynamic credentials are managed by Vault. The runtime leases a credential, renews it while in use, and revokes it when no longer needed. You do not need a manual rotation procedure; instead, ensure the Vault role TTLs meet your compliance requirements and that the database user can be dropped cleanly when the lease expires.

  • Rotate during low-traffic windows when possible.
  • Monitor error rates and secret-fetch metrics during and after rotation.
  • Maintain a rollback plan, such as keeping the previous secret valid at the provider for a short overlap.
  • Document which secrets are dynamic and which are static so operators know the correct procedure.