
Key Takeaways:
- Non-human identities (NHIs) now outnumber people by a wide margin. Service accounts, keys, tokens, workloads, and AI agents make up most of the identities operating in an enterprise, and many receive little oversight.
- NHIs come in distinct types, each with its own risk profile. Treating them as one category hides differences in how they’re created, credentialed, and retired.
- The most common exploits are mundane. Leaked secrets, excess privilege, and forgotten identities give attackers quiet paths into production.
- Agentic AI changes the problem. AI agents decide and act, so a correctly permissioned identity can still produce an unsafe outcome.
- Five practices form a workable program. Inventory, least privilege, secrets hygiene, behavioral detection, and lifecycle management bring NHIs under the same governance as employees.
Non-human identity security has become a board-level concern because most of the identities operating inside the enterprise no longer belong to people. Every integration, pipeline, workload, and AI agent needs credentials to do its job, and those credentials accumulate faster than any team can review them.
Identity and access management (IAM) programs were built around employees: onboarding, multi-factor authentication (MFA), periodic access reviews, and offboarding when someone leaves. Non-human identities (NHIs) don’t fit that model. They have no manager to answer for them. In fact, they often lack a named owner, and many authenticate silently with a key that was created years ago and never rotated.
This article explains what a non-human identity is, the basics about non-human identity security, the types of NHIs security teams need to account for, how attackers exploit them, and why agentic AI widens the exposure. It also covers the practices that bring order to the sprawl, written for security leaders and IAM owners who need a clear picture before the next agent, integration, or pipeline adds more identities to the pile.
What Is Non-Human Identity Security?
Non-human identity security is the practice of discovering, governing, and protecting the digital identities that software uses to authenticate and access resources. These identities represent applications, workloads, scripts, bots, and AI agents rather than people, and they rely on credentials such as passwords, certificates, tokens, and keys. The OWASP Non-Human Identities Top 10 frames them as the means by which software entities are authenticated and authorized, and notes that safeguards built for human users often don’t apply to them.
Scale is the reason this has become a priority. Estimates vary by study and environment, but they point the same way. A Cloud Security Alliance (CSA) survey of more than 800 professionals found that NHIs often outnumber human identities by a factor of 20 to 1. Research covering more than 27 million NHIs put the ratio at 144 to 1 in the environments it monitored, up from 92 to 1 a year earlier, with the NHI population growing 44% over that period.
Security teams feel that gap in practice. In the same CSA survey, nearly one in five organizations reported a security incident tied to NHIs, and only 15% said they were highly confident in their ability to secure them. Non-human identity security closes the gap by giving NHIs the discipline employees already receive: a known owner, appropriate privilege, monitored behavior, and a defined end of life.
Types of Non-Human Identities
NHIs don’t all get created the same way, and they don’t fail the same way. A clear taxonomy helps teams match each type to the right controls.
Type | What it is | Common credentials |
|---|---|---|
Service accounts | Accounts that let applications and backend systems communicate | Passwords, keys |
API keys and tokens | Credentials that let one application call another | Static keys, bearer tokens |
OAuth applications and integrations | Third-party apps granted delegated access to SaaS data | OAuth tokens and grants |
Cloud workload identities | Roles and managed identities assumed by cloud services and containers | Short-term tokens, role assumptions |
Certificates and secrets | Machine credentials that establish trust between systems | Certificates, secrets in vaults or config files |
Bots and automation | Robotic process automation (RPA) bots, scripts, and scheduled jobs | Stored credentials, service accounts |
Pipeline identities | Identities that build, test, and deploy code in continuous integration and continuous delivery (CI/CD) systems | Deployment keys, OpenID Connect tokens |
AI agents | Autonomous systems that plan and act using tools and data | Inherited user permissions, delegated tokens, API keys |
AI agents deserve separate attention because they behave differently from the rest of the list. A service account runs the same code path every time. An AI agent reasons about a goal, selects tools, and acts across systems, often with permissions inherited from the person who built or invoked it. Business users create many AI agents in low-code tools, which places them outside traditional IAM workflows and makes shadow AI part of the NHI inventory problem.
How AI Agents, Bots, and Service Accounts Create Identity Sprawl
Sprawl is rarely the result of one bad decision. Each identity is created for a sound reason, but the accumulation becomes unmanageable.
Across your organization, a developer creates a service account to connect a reporting tool, a team approves an OAuth integration to sync contacts, a pipeline receives deployment keys, and a business user builds an agent that reads a shared drive and emails summaries. Each request is reasonable and takes minutes, and none of them triggers the review an employee would.
Consider a developer who sets up a coding agent to triage failing builds and open fixes. The agent reaches the code repository, the CI/CD pipeline, and a cloud account through a shared pipeline service account with broad access, because narrowing it takes extra work. Six months later, the developer moves to another team. The agent keeps running, the service account keeps its access, and no review process knows either exists.
Sprawl compounds because creation is decentralized and retirement is nobody’s job. Cloud platforms, SaaS applications, and homegrown agent frameworks each issue their own identities, and each console shows only its own slice. The result is a growing population spread across cloud, SaaS, and on-premises environments with no single record of who owns what. The authors of one large analysis attribute the recent growth to agentic AI and automation-first development, the same forces that put identity creation in the hands of more teams.
Why Non-Human Identities Are Harder to Govern Than User Accounts
Governance works for employees because people are visible, finite, and accountable. NHIs commonly lack all three properties, which is why stretching human-centric IAM controls over them rarely holds.
They often have no owner
Every employee has a manager, a start date, and an end date. An NHI might have none of these. When its creator moves on, the identity stays active, and OWASP ranks that pattern, improper offboarding, first among NHI risks.
They can’t use the controls that protect people
MFA, impossible-travel alerts, and login-hours policies assume a person at a keyboard. An API key authenticates silently, a service account has no normal location, and an OAuth token is granted once and stays usable until it expires or is revoked. An attacker holding a valid credential looks like routine automation.
They’re long-lived and overprivileged
Static secrets that never expire are convenient for developers and valuable to attackers. One analysis of cloud environments found that AWS IAM roles used in the prior 30 days exercised only 55% of the permissions their policies granted, and that 53% of organizations give privileged access to more than 10% of their roles. Separate enterprise data found that nearly half of active NHIs were more than a year old and that 62% of AWS NHIs showed no activity in the prior 90 days.
They’re fragmented across platforms
Each cloud provider, SaaS application, and developer platform keeps its own identity records, so no single console shows the whole population. Your identity provider sees what’s in the directory. The key hardcoded in a repository or embedded in an agent’s configuration never appears there.
Key Risks: How Non-Human Identities Are Exploited
Attackers don’t need novel techniques to abuse NHIs. They rely on weaknesses that recur across the OWASP Non-Human Identities Top 10, which ranks risks by exploitability, prevalence, detectability, and impact. The CSA survey points in the same direction: its respondents most often traced NHI incidents to lack of credential rotation (45%), inadequate monitoring and logging (37%), and over-privileged identities (37%).
Leaked and hardcoded secrets
Keys committed to repositories, pasted into tickets, or stored in configuration files are among the easiest credentials to find. OWASP lists secret leakage and long-lived secrets among its top risks. A single exposed key can open direct access to production systems with no phishing required.
Overprivileged identities
An NHI with more access than its function requires turns one compromise into lateral movement. OWASP names overprivileged NHIs as a top risk, and the cloud data above shows how common the pattern is.
Forgotten and legacy identities
Microsoft’s own disclosure shows the stakes. In January 2024, Microsoft reported that Midnight Blizzard used a password spray to compromise a legacy, non-production test tenant account that didn’t have MFA enabled. The actor then compromised a legacy test OAuth application with elevated access to Microsoft’s corporate environment and used it to reach corporate email. OWASP cites that application as an example of an unmanaged NHI.
Credentials stored outside controlled systems
Okta’s 2023 support system incident shows how credentials escape controlled systems. Okta’s root cause analysis found that an employee signed in to a personal Google profile on a managed laptop, and saved a support system service account’s username and password there. Okta judged that compromising the personal account or device was the most likely route to exposure, and the attacker used the service account to access files in the customer support system between September 28 and October 17, 2023. The common thread across both cases is an identity that kept working exactly as configured, in the hands of someone it was never meant to serve.
How Agentic AI Expands the Non-Human Identity Attack Surface
Agentic AI adds a new population of NHIs, and it changes what an NHI can do once it exists.
Unlike a static machine identity, an AI agent can interpret context, choose tools, and act toward a goal, so its behavior can’t be predicted from its credentials alone. Existing tooling wasn’t designed for that: CSA’s global vice president of research observed that the IAM and privileged access tools most teams rely on aren’t tailored to the challenges NHIs present.
This is where identity controls reach their limit. Identity tells you who an agent is, and access tells you what it can touch. Neither tells you whether the agent’s last action was safe. The same agent with the same valid credentials can handle a routine support request in one session and, redirected by a hidden instruction in an uploaded file, exfiltrate other customers’ records in the next. In the IAM log, the two sessions look identical. That gap is why agentic identity has to be correlated with what an agent does, not just what it’s permitted to do.
Agents also create identity exposure as a side effect of their work. A coding agent may hardcode a static API key to finish a task, or find a secret in its own context and use it for an action nobody authorized. These shortcuts never show up in a directory. The agent is the new endpoint: it executes actions, makes decisions, and holds credentials that persist beyond a single request.
Securing agents therefore pairs identity governance with visibility into behavior. Posture controls such as AI Security Posture Management (AISPM) review an agent’s permissions and configuration before it goes live, while runtime controls evaluate what the agent actually does with the access it holds.
Non-Human Identity Security Best Practices
Five practices turn NHI governance from a one-time cleanup into a repeatable program. They’re listed in the order most teams can act on them.
1. Build a complete inventory across every environment
You can’t govern identities you can’t see. Start with discovery across cloud, SaaS, and on-premises systems, drawing on every source that issues or stores credentials: cloud IAM, identity providers, secrets managers, code repositories, CI/CD systems, SaaS admin consoles, and agent-building platforms. For each identity, record the owner, purpose, privilege level, systems it reaches, and the date of the last credential rotation. Identities with no owner become the first remediation queue.
Treat the inventory as a live system, not a spreadsheet. New agents and integrations appear daily, and an inventory that’s a quarter old is already missing some of them.
2. Enforce least privilege and short-lived credentials
Compare what each identity is permitted to do with what it actually does, then close the gap. Replace static keys with short-term credentials wherever the platform supports them; OWASP points to AWS roles and Azure managed identities as examples. Use just-in-time access for elevated privileges. Because not every excess permission is exploitable, prioritize with attack-path context: AI Exposure Management validates which agent paths are reachable end to end, so teams fix real risk first.
3. Remove hardcoded and long-lived secrets
Scan repositories, pipelines, collaboration tools, and agent configurations for exposed secrets, then move what remains into a managed vault with enforced rotation. Make expiration the default rather than the exception. Also prohibit people from using NHIs for manual work, which OWASP flags as its own risk because human activity becomes indistinguishable from automation.
4. Detect and respond to compromised or over-privileged identities
Detection starts with a behavioral baseline. A service account that normally reads one database and suddenly lists storage buckets, a token used from an unfamiliar network, or an agent calling tools outside its original task are all signals that identity logs alone may not surface. Detection after exfiltration is not security, so favor controls that can block a risky action before it completes. When an NHI looks compromised, sequence matters:
- Revoke or disable the credential.
- Rotate every secret the identity could reach.
- Review activity back to the earliest suspicious event.
- Trace the access paths the identity opened.
- Fix the root cause, such as removing a hardcoded key or narrowing a role.
For agents, response also means stopping execution mid-task, which requires runtime controls rather than log review alone.
5. Operationalize lifecycle management inside your IAM program
Bring NHIs into the processes IAM already runs, instead of building a parallel program. Map four stages: provision, review, rotate, and decommission. Require an accountable owner and a documented purpose at creation. Trigger ownership reassignment when an owner changes roles or leaves, the NHI equivalent of mover and leaver workflows. Include NHIs in recurring access certification, with expiry dates that force a decision. Add AI agents at the front of the process so the platform’s business users can’t create identities that skip review. Track a few metrics that show whether the program is working:
- Percentage of NHIs with a named owner
- Average credential age
- Identities with no activity in 90 days
- Secrets found in code or configuration
Securing Non-Human Identities From Build Time to Runtime
Zenity approaches NHI risk from the agent outward, so the business can keep building agents while security keeps control. Zenity’s platform discovers agents across SaaS, cloud, and endpoints, pulls in the identities each one assumes from providers such as Okta and Microsoft Entra ID, and flags risky NHIs, including static API keys coding agents use and that never appear in an identity provider. Findings map to the OWASP Non-Human Identities Top 10, and runtime controls evaluate what agents do with the access they hold.
Securing non-human identities means knowing every identity, limiting what it can reach, and watching what it does, from build time to runtime.
Want to see which identities your AI agents are using and what they’re doing with them? Get a demo to explore agentic identity security with Zenity.
FAQs About Non-Human Identity Security
What is a non-human identity?
A non-human identity is a digital identity that software uses to authenticate and access resources. Examples include service accounts, API keys, OAuth tokens, cloud roles, certificates, bots, and AI agents. Unlike employee accounts, they typically aren’t tied to a person.
How is non-human identity security different from traditional IAM?
Traditional IAM assumes a person who can be onboarded, prompted for MFA, and reviewed by a manager. NHIs have none of those properties, so they need automated discovery, ownership assignment, short-lived credentials, and behavioral monitoring instead.
What’s the difference between a machine identity and a non-human identity?
Machine identity usually refers to workloads, devices, and certificates. Non-human identity is the broader term and also covers service accounts, tokens, bots, and AI agents. Vendors use the terms differently, so confirm scope when comparing research or tools.
Are AI agents non-human identities?
Yes, but they behave differently from earlier NHIs. Agents hold credentials like any other NHI, and they also decide which tools to call and which data to touch. Governing them requires identity controls plus visibility into runtime behavior.
How often should NHI credentials be rotated?
Prefer short-lived credentials that expire automatically, which removes manual rotation for most workloads. Where static secrets remain, rotate on a defined schedule and immediately after suspected exposure or when an owner leaves.
Who should own non-human identity security?
Ownership is shared. IAM teams typically own lifecycle and policy, security operations owns detection and response, and the engineering or business team that created each identity owns its purpose and access. Every identity should have one named accountable owner.
Where should a team start?
Start with a discovery pass that records owner, privilege, and last rotation for every NHI you can find. Remediate identities with no owner and identities with broad access first, then build lifecycle and monitoring practices around the inventory.
All Academy PostsSecure Your Agents
We’d love to chat with you about how your team can secure and govern AI Agents everywhere.
Get a Demo

