Subscribe to the Non-Human & AI Identity Journal

When should organisations retire or rotate a non-human identity?

Organisations should retire or rotate an NHI when its owner changes, its purpose is no longer clear, its scope expands, or its credential has been exposed. They should also rotate on a fixed cadence for high-risk systems. If the credential cannot be tied to a current business need, removal is the safer default.

Why This Matters for Security Teams

Retirement and rotation are not housekeeping tasks for non-human identities. They are the control points that stop stale access from surviving ownership changes, project drift, and forgotten integrations. When an NHI outlives its business purpose, it becomes a standing path into systems, pipelines, and data stores. That risk is amplified because NHIs often outnumber people by 25x to 50x, and visibility is usually weak, as shown in the Ultimate Guide to NHIs.

Current guidance suggests treating retirement as the default when you cannot tie the identity to an active service, workload, or approved owner. Rotation matters when the secret may have leaked, when a credential has broad reach, or when the system is high risk enough that a fixed cadence is justified. The OWASP Non-Human Identity Top 10 highlights the security impact of unmanaged NHI sprawl, and the issue is often compounded by incomplete offboarding. In practice, many security teams encounter credential drift only after a service has already been repurposed, not through intentional lifecycle review.

How It Works in Practice

A practical rotation and retirement process starts with inventory, then classification, then action. First, identify the owner, workload, secret type, and any downstream dependencies. Then decide whether the NHI should be retained with a new credential, constrained further, or removed entirely. The NHI Lifecycle Management Guide is useful here because rotation only works when it is part of a broader lifecycle process, not a one-off event.

For rotation, use short-lived secrets where possible and align rotation to the actual exposure window. If a secret is embedded in CI/CD, code, or automation tooling, replacement must include deployment updates, validation, and revocation of the old secret. The Guide to the Secret Sprawl Challenge and the Guide to NHI Rotation Challenges both show why manual replacement fails when secrets are duplicated across pipelines, vaults, and environment files. OWASP also recommends tracking non-human credentials as first-class identities rather than treating them as incidental configuration.

  • Retire an NHI when ownership is unknown or the service has been decommissioned.
  • Rotate immediately after exposure, privilege expansion, or suspicious use.
  • Use JIT issuance and ephemeral secrets where the workload supports it.
  • Revoke the old credential only after confirming replacement and service continuity.

The best outcome is a controlled cutover, not a scramble. These controls tend to break down when identities are hard-coded into legacy batch jobs because the replacement path is operationally brittle.

Common Variations and Edge Cases

Tighter rotation often increases operational overhead, requiring organisations to balance reduced exposure against service stability. That tradeoff is real for legacy platforms, vendor-managed integrations, and long-running batch processes where secret replacement can break scheduled work. Current guidance suggests using shorter TTLs for high-risk workloads, but there is no universal standard for exact cadence across every environment.

Some NHIs should be retired quickly even if the technical asset still exists. If the business owner changes, the application is repurposed, or the scope expands beyond the original approval, the identity should be reviewed as a new risk. This is especially important for autonomous systems, where an OWASP Non-Human Identity Top 10 style control set is only effective when paired with clear ownership and continuous validation. In mature programs, some teams also reference the 52 NHI Breaches Analysis to justify stricter offboarding rules after repeated credential misuse patterns.

Where the standard answer breaks down is in shared service accounts, third-party integrations, and orphaned automation owned by multiple teams. In those environments, retirement can require staged deprecation, while rotation may need dual-running credentials to avoid outages. The safest rule remains simple: if there is no current business need, remove it; if the need remains but the exposure has changed, rotate it.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-03 Rotation and retirement decisions directly reduce exposed NHI credential risk.
NIST CSF 2.0 PR.AC-1 Access lifecycle control is central to removing stale non-human access.
NIST Zero Trust (SP 800-207) AC-4 Zero Trust requires continuous verification and minimal standing access for NHIs.

Use least privilege, short-lived access, and explicit revocation to eliminate standing NHI trust.