Subscribe to the Non-Human & AI Identity Journal

How should security teams handle agency access when contracts end?

Security teams should treat contract end as an identity event, not an administrative note. Access should be revoked across every tool the agency touched, ownership should transfer to a named internal admin, and the final state should be recorded for audit evidence. If a tool cannot be centrally governed, it still needs a documented deprovisioning step.

Why This Matters for Security Teams

Agency access is not the same as a normal employee offboarding event. Agencies often use service accounts, API keys, delegated OAuth grants, shared vault entries, and automation tokens that survive beyond the contract unless someone deliberately removes them. That makes contract end a governance trigger, not a procurement formality. Current guidance from the OWASP Non-Human Identity Top 10 aligns with Ultimate Guide to NHIs: revocation, ownership transfer, and secret hygiene must be treated as part of the identity lifecycle. The risk is not theoretical, because NHI exposure is often persistent after the business relationship ends, especially where access is spread across SaaS tools and CI/CD systems.

One NHIMG data point captures the scale of the problem: only 20% of organisations have formal processes for offboarding and revoking API keys, and even fewer have procedures for rotating them, according to the Ultimate Guide to NHIs. That gap is exactly why contract termination needs to be mapped to identity controls, not left to ad hoc ticket handling. In practice, many security teams discover lingering agency access only after an audit, a breach review, or a vendor dispute has already exposed the gap.

How It Works in Practice

The cleanest approach is to build a contract-end playbook that operates like a deprovisioning checklist for every NHI the agency touched. Start by inventorying the agency’s footprint: cloud roles, OAuth consents, secrets managers, CI/CD variables, backup systems, shared mailboxes, and any delegated admin rights. Then revoke access in dependency order so the same identity cannot re-establish itself through another tool. The OWASP Non-Human Identity Top 10 is useful here because it frames the problem as lifecycle control, not just password hygiene.

Security teams should also transfer ownership before final revocation closes the loop. A named internal admin needs to inherit each asset, secret, and integration so there is no “orphaned” operational dependency. Where possible, rotate secrets at the point of offboarding rather than waiting for a later maintenance window. That aligns with NHIMG research showing that secrets often remain valid long after organisations are told to act, as discussed in the Ultimate Guide to NHIs — Key Challenges and Risks. For higher-risk integrations, record the final state: who had access, what was revoked, when rotation occurred, and which system owns the residual risk.

  • Revoke every token, key, and delegated grant the agency used.
  • Rotate shared secrets after access removal, not before it.
  • Reassign ownership to an internal admin for each connected system.
  • Capture evidence from IAM, PAM, vaults, and ticketing for audit traceability.

This guidance tends to break down in decentralised SaaS estates where teams can create credentials outside central IAM because there is no single system of record.

Common Variations and Edge Cases

Tighter offboarding often increases operational overhead, requiring organisations to balance strong revocation with delivery speed. That tradeoff is manageable, but only if the offboarding model matches the way the agency was granted access in the first place. For example, a contractor that only used one platform account can be removed with a standard deprovisioning workflow, while a long-running agency with multiple automation hooks may need a staged shutdown, secret rotation, and post-exit monitoring period.

There is no universal standard for every edge case yet, but current guidance suggests three patterns. First, if the agency used centrally managed identities, revoke at the source of truth and verify downstream propagation. Second, if the agency operated via shared secrets in tools that lack governance, compensate with documented manual deprovisioning and evidence capture. Third, if the agency supported a critical business function, separate access removal from service continuity by handing credentials to an internal operator before termination completes. The 52 NHI Breaches Analysis is a useful reminder that weak identity lifecycle control is a recurring breach pattern, not an isolated process failure.

For teams building a more mature model, the Ultimate Guide to NHIs supports treating agency exit as part of broader Zero Trust and lifecycle governance. That means no lingering standing access, no undocumented fallback credentials, and no assumption that a contract end notice automatically removes technical reach. In mixed environments, the hardest cases are usually the ones where the agency embedded itself in low-visibility automation that no one formally owned.

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 Revocation and rotation are central to contract-end access removal.
NIST CSF 2.0 PR.AC-4 Least-privilege access must end when the contract ends.
NIST Zero Trust (SP 800-207) Zero Trust requires continuous access validation and no standing trust.

Treat contract end as a zero-trust termination event and re-check every downstream authorization.