Introduction
Non-human identities — service accounts, API keys, OAuth tokens, machine-to-machine credentials, IAM roles, certificates, and now AI agents — outnumber human identities in a typical enterprise by a factor of 30 to 80. Yet identity-management spending, governance attention, and audit coverage remain overwhelmingly focused on the human workforce. In 2026, that imbalance is the single largest unaddressed risk surface in most enterprise security programmes.
This guide gives CISOs and identity architects a concrete framework for understanding, inventorying, governing, and responding to Non-Human Identity (NHI) risk. We cover the taxonomy, the discovery problem, the lifecycle management gap, the detection signals, and the architectural shift required to bring NHI under the same accountability standard as workforce IAM.
Background: How NHI Became the Biggest Identity Surface
Three forces compounded over the past decade.
Microservices decomposition. A 2014-era monolith ran as one process with one set of credentials. Decomposing it into 200 microservices created 200 service identities, each needing credentials to call its dependencies. Per-service credentials are the right architecture, but they multiply the identity count.
Cloud migration. Every IaaS workload needs an IAM role to access cloud resources. Every PaaS service has its own service principal. Every cross-account interaction needs a federated identity. AWS, Azure, and GCP all explicitly recommend per-workload identities. The recommendation is correct; the operational consequence is identity sprawl.
SaaS integration. The modern enterprise runs on 150-400 SaaS applications, each integrated to others via OAuth tokens, API keys, or webhook signing secrets. Salesforce-to-Slack, GitHub-to-Jira, Snowflake-to-Tableau — each integration mints credentials that persist invisibly long after the human who set them up has moved on.
By 2026, a mid-sized Indian SaaS company commonly has: 800 employee identities, 12,000-25,000 service accounts across cloud and on-prem, 6,000+ API keys, 1,500+ OAuth grants, and an exploding population of AI agent identities. The ratio is 30-50:1, and the AI-agent vector is widening it monthly.
Theory: The NHI Taxonomy
For governance purposes, NHIs decompose into seven distinct classes, each with different lifecycle and risk characteristics:
- Cloud IAM roles and policies — AWS IAM roles, Azure managed identities, GCP service accounts. Short-lived credentials minted from long-lived role definitions.
- Workload identities inside Kubernetes / service meshes — SPIFFE SVIDs, Istio mTLS identities, Pod service accounts.
- API keys — static long-lived secrets used by services to call other services. The most common, hardest-to-rotate, easiest-to-leak class.
- OAuth tokens and grants — user-delegated consents to third-party apps. Persist past the user’s tenure unless explicitly revoked.
- Certificates — X.509 certs used for mTLS, code signing, document signing, JWT verification. Long-lived; expiration causes outages.
- Database accounts and credentials — service-to-DB connection strings. Often the longest-lived credentials in the estate.
- AI agent identities — emerging class. An agent that calls MCP tools, browses the web, or executes shell commands needs an identity with scoped permissions and an audit trail.
Theory: The Lifecycle Gap
Workforce IAM has a mature lifecycle: HR system fires Joiner-Mover-Leaver events, identity governance tooling provisions and deprovisions access, periodic certifications attest to ongoing need. NHI has none of this in most organisations.
The typical NHI “lifecycle” looks like:
- An engineer needs to integrate System A with System B for a feature.
- They mint an API key or service account in a hurry.
- They paste it into a config file, a CI secret store, or a .env.
- The feature ships.
- The credential sits unrotated for 4 years.
- The engineer leaves the company; the credential outlives their access.
- Eventually, a leak, a breach, or an audit surfaces it.
This is not negligence; it is the absence of an institutional lifecycle. Building one is the central NHI security problem.
Technical Deep Dive: Discovery
You cannot govern what you cannot enumerate. NHI discovery sources, by location:
Cloud control planes. AWS IAM Access Analyzer enumerates roles and unused permissions. Azure has Microsoft Entra ID’s Workload Identities inventory. GCP has Service Account Insights. All three should be exported nightly to a central inventory.
Secret stores. HashiCorp Vault, AWS Secrets Manager, Azure Key Vault, GCP Secret Manager, Kubernetes Secrets — each stores credentials that should be enumerated, tagged with their owner and purpose, and tracked for last-use and last-rotation.
SaaS OAuth grants. Each major SaaS (M365, Google Workspace, GitHub, Slack, Salesforce, Atlassian, Snowflake) has an admin-side view of OAuth-granted apps. Vendors like Astrix, Oasis Security, Token Security, and Entro specialise in aggregating these views into a unified inventory.
Source code. Secrets-in-code scanning (Trufflehog, GitLeaks, Detect-secrets, GitHub Secret Scanning) surfaces leaked credentials that should have been in a vault.
Network traffic. Service-to-service calls authenticated with API keys or bearer tokens leave signature in proxy logs. Aggregating these flows produces a service-to-service identity map.
The output of this discovery pass is the NHI inventory: every identity, its issuer, its current credential, last rotation date, last use date, scope of access, and an assigned human owner.
Technical Deep Dive: The Ownership Problem
Every credential needs an accountable human owner. This is the hardest data-quality problem in NHI governance because:
- The original creator has often left the company.
- The original team has often been reorganised.
- Documentation, if it ever existed, is stale.
- “Owner = the team’s distribution list” gives no individual accountability.
Pragmatic approaches:
- Code-based ownership. Map the credential to the service that uses it; map the service to a CODEOWNERS file; assign the owner from that file.
- Naming convention. Enforce naming standards like
sa-{team}-{purpose}-{env}so that ownership is encoded in the name. - Forced rotation as an ownership flush. Schedule mandatory rotations; the team that scrambles to handle the rotation owns the credential. The ones that nobody claims can be deleted.
Technical Deep Dive: Rotation
The single highest-leverage NHI control is rotation. A credential rotated every 30 days is materially less dangerous if leaked than one rotated every 5 years.
Three rotation patterns, in order of operational maturity:
Manual scheduled rotation. Quarterly ticketing-driven exercise. Better than nothing; error-prone, friction-heavy.
Automated rotation with dual-secret. Vault and Secrets Manager support rotation policies. During rotation, both old and new secrets are valid for a grace window so consumers can refresh. Requires consumer code that re-reads the credential periodically.
Workload identity (no static credentials). Replace API keys with IAM roles, SPIFFE SVIDs, or OIDC-federated tokens. There is no long-lived secret to rotate. This is the target state; the gap from current state varies.
Technical Deep Dive: Detection Signals
NHI-aware detection looks for credentials behaving abnormally:
- Service account authenticating from a new IP range or country.
- API key used from a Tor exit node or commercial VPN.
- OAuth grant exercising a scope it has not used in 90 days.
- Service account logging in with a credential that is also being used by a different workload concurrently.
- Sudden surge in API call volume from a previously low-traffic credential.
- Credential used outside its declared business hours.
- AI agent invoking a tool combination (“read database” + “send email”) that suggests data exfiltration.
These rules belong in the SIEM with NHI-aware enrichment: every alert should carry the credential’s owner, last rotation, and declared purpose, so the analyst can triage in seconds.
Practical Implementation: AI Agent Identity
The fastest-growing NHI class is AI agents. An agent that calls MCP tools, browses the web, executes code, or queries databases needs to be a first-class identity with:
- A unique identifier separate from the developer who built it.
- Scoped permissions: this agent can call this tool, with these arguments, against this resource.
- A complete audit log of every tool invocation, including the prompt that triggered it.
- Rate limits and budgets to bound damage from prompt injection.
- A human owner accountable for the agent’s actions.
A reference architecture: the agent runs as a workload with a SPIFFE identity (spiffe://prod.ringsafe.in/ns/ai/sa/checkout-bot). The MCP server enforces authorisation policy: checkout-bot may call get_order and refund_order, but not delete_order. Every tool call is logged with the inducing prompt, the LLM’s reasoning trace, and the result.
Enterprise Use Cases
Indian SaaS vendors. The 340% rise in NHI compromise in our Q1 2026 sample is concentrated in SaaS vendors with rapid integration growth. Token vaulting and continuous OAuth grant review are the highest-ROI controls.
Financial services. SEBI CSCRF requires identity governance over service accounts. The right interpretation is to extend IGA tooling (SailPoint, Saviynt) to cover NHI, not run parallel governance.
Government and defence. Air-gapped environments still have NHIs and arguably worse hygiene because external rotation tooling does not reach them. Internal HSM-backed rotation is the architectural answer.
Common Pitfalls
- Treating NHI as “an IAM problem.” Workforce IAM tooling does not cover NHI well; you need NHI-specific platforms or build-out.
- Vault without lifecycle. Putting secrets in Vault is necessary but not sufficient; without rotation and ownership, you have just centralised the sprawl.
- OAuth grant amnesia. Apps you OAuth-connected in 2022 may have scopes you would never approve today. Quarterly grant review is the answer.
- Believing static API keys are acceptable. They are not. Migrate to short-lived workload identity wherever possible.
- Forgetting CI/CD. CI runners often have broad credentials; compromise of a CI runner compromises every credential it has handled.
Action Items
- Run the inventory pass: cloud roles, secrets vaults, SaaS OAuth grants, source-code-scanned secrets.
- Assign owners to the top 200 credentials by privilege.
- Set rotation policies on every static credential; start enforcement in 90 days.
- Pick three high-risk static-credential use cases and replace with workload identity.
- Add NHI-aware enrichment to your SIEM detection rules.
- Designate an NHI owner in the security team; this responsibility falls through the cracks otherwise.
NHI is the 2026 equivalent of where workforce IAM stood in 2010 — underspent, undermeasured, and disproportionately responsible for breach root causes. The CISOs that close this gap in the next 18 months materially shrink their attack surface.
Get a DPDP gap assessment
Free 30-minute call. We map your data flows against DPDP §8 obligations and tell you exactly which gaps to fix first. Auditor-defensible output.