Agentic AI Module Added To NHI Training Course

Secrets Lifecycle

Secrets lifecycle is the management of credentials from issuance through rotation, revocation, and offboarding. It matters because a secret that is technically valid can still be operationally unsafe if its owner, purpose, or downstream access paths are no longer current.

Expanded Definition

Secrets lifecycle is the operational model for managing credentials as living assets: issuing them to the right NHI, binding them to a clear purpose, rotating them before risk accumulates, revoking them when scope changes, and retiring them at offboarding. In NHI security, the term is narrower than general secrets management because it focuses on the sequence of state changes, not just where a secret is stored. That distinction matters when an API key is still valid long after the service account, agent, or automation job that created it has changed ownership.

Industry usage is still evolving, and definitions vary across vendors. Some teams treat lifecycle as a vault function, while others include discovery, classification, policy enforcement, and evidence collection. NIST and OWASP both support the underlying principle of controlled credential issuance and revocation; for practical orientation, the OWASP Non-Human Identity Top 10 is a useful external reference point.

The most common misapplication is treating rotation as the whole lifecycle, which occurs when teams change the secret value but leave stale owners, broad scopes, and unused replicas in place.

Examples and Use Cases

Implementing secrets lifecycle rigorously often introduces operational friction, requiring organisations to weigh tighter control against deployment speed and automation convenience.

  • A CI/CD pipeline issues short-lived deployment credentials, rotates them on schedule, and revokes access immediately after a release branch is retired. This aligns with guidance in the NHI Lifecycle Management Guide.
  • An AI agent receives a scoped token for a single workflow, then loses that token automatically when its tool permissions change. That pattern reduces the blast radius described in the Top 10 NHI Issues.
  • A SaaS integration uses dynamic secrets instead of long-lived static API keys, so credential exposure window is measured in minutes, not quarters. This is especially relevant when comparing static and dynamic issuance models in the Ultimate Guide to NHIs — Static vs Dynamic Secrets.
  • A secrets inventory flags duplicates stored in code, tickets, and chat, then links them back to a single source of truth before rotation. That approach directly addresses secret sprawl described in the Guide to the Secret Sprawl Challenge.
  • A platform team uses OWASP Non-Human Identity Top 10 guidance to decide when a token should be deprecated, reissued, or replaced with a more appropriate workload identity.

In practice, lifecycle governance is most effective when every secret has an owner, an expiry, and a documented revocation path before it reaches production.

Why It Matters in NHI Security

Secrets lifecycle failures are rarely abstract. They become visible when access persists after the business reason for that access has ended, or when a credential leaks and there is no reliable way to determine whether it has already been retired. That is why lifecycle management is a core NHI control, not a back-office housekeeping task. It is also where guidance-vs-consensus matters: some teams define the lifecycle as issuance-to-revocation only, while others include discovery, escrow, and attestation. The operational need is the same either way, and the surrounding controls should still map to least privilege and zero standing access in a lifecycle process for managing NHIs.

NHIMG research shows that 91% of former employee tokens remain active after offboarding, which is a direct signal that revocation is often missing from real-world operations. The same problem appears in automation, where a secret may remain valid long after the pipeline, agent, or vendor integration has changed. In those cases, the issue is not just exposure but governance failure, because the organisation can no longer prove that a credential still belongs in service. This is also why CI/CD and repository controls matter, as shown in the CI/CD pipeline exploitation case study and the Reviewdog GitHub Action supply chain attack.

Organisations typically encounter the full cost of secrets lifecycle failure only after an offboarding event, leak, or compromise, at which point revocation, scoping, and replacement become operationally unavoidable to address.

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-02 Addresses improper secret handling, rotation, and revocation for non-human identities.
NIST CSF 2.0 PR.AA-1 Supports identity and credential management as a core protective control for access assurance.
NIST Zero Trust (SP 800-207) Section 3.1 Zero Trust relies on continuously validated credentials rather than perpetual trust in issued secrets.

Prefer short-lived credentials and continuous revalidation over standing secrets with indefinite validity.

Related resources from NHI Mgmt Group