Glossary · Non-human identity

Credential rotation

Credential rotation is the practice of replacing a secret, such as an API key, access key, token, password or certificate, with a new one and retiring the old, either on a schedule or in response to exposure.

Rotation limits how long a stolen credential stays useful. Scheduled rotation replaces credentials at a fixed maximum age, so a leak nobody noticed eventually expires. Emergency rotation replaces a credential immediately after it is exposed, for example when secret scanning finds it in a repository. Both follow the same safe sequence: create the new credential at the provider, deliver it to everything that uses the old one, confirm the consumers work with it, and only then disable the old credential at the provider.

How it is used in practice

Teams that rotate well keep credentials in a secrets manager rather than in configuration files, so delivering the new value is a single update that consumers read. Policies set a maximum age per credential type, and reports flag credentials past it. Where possible, rotation is replaced altogether by short-lived credentials, such as workload identity tokens or cloud roles assumed per session, which expire on their own in minutes or hours.

Common pitfalls

  • Revoking before replacing. Disabling the old credential first breaks every consumer still using it.
  • Unknown consumers. Without knowing what depends on a credential, rotation becomes guesswork, which is why ownership comes first.
  • Rotating the copy, not the credential. Changing the value in a vault does nothing if the old key remains valid at the provider.
  • Treating rotation as cleanup. A leaked credential stays readable in git history after rotation; what rotation changes is whether it works.
  • No rollback. A rotation that fails halfway, with some consumers switched and some not, needs a recorded state to recover from.

How TrustIvan relates to it

TrustIvan supports rotation in three places, and is precise about what each does. In NHI Security, the credential_rotation_overdue policy flags credentials older than a configurable maximum (90 days by default). For credential material NHI Security holds, a rotation walks recorded stages, validates the new values with the connector's health check before switching, rolls back if the provider refuses them, and destroys only its own stored copy; you create and disable keys at the provider yourself. For a discovered credential, rotation happens where it was issued. For secrets found in code, TrustIvan records a rotation on the finding without closing it. And its own API keys carry a mandatory expiry of at most a year. See Credentials and rotation.

Related terms

On the platform: Credential security. All glossary terms

See TrustIvan on your own estate.

Book thirty minutes with an engineer and bring an image, a repository or a cloud account, or start free on the hosted service.