Non-Human Identity Security: Fix Machine Identity Sprawl
Non-human identity security means giving every service account, API key, automation token, and AI agent the same ownership, limited permissions, and retirement process that human accounts already get. Machine identities now outnumber people by a wide margin, and most of them carry access that attackers can reuse without ever touching a password.
By Abdullah Shafique, AI Engineer
Service accounts run nightly jobs. API keys connect one SaaS app to another. OAuth tokens let integrations read calendars, files, and customer records. Certificates prove a workload is what it claims to be. None of these belong to a person, yet each one can open a door. Security teams call them non-human identities, or NHIs, and they have become the largest identity population in most companies.
What is a non-human identity?
A non-human identity is any credential or account that lets software, a workload, or an automated agent act on its own, without a person signing in. Common examples include service accounts, API keys, OAuth application tokens, automation credentials in CI/CD pipelines, and certificates used by servers and devices. The identity itself is the account or credential; the secret attached to it, such as a key or token, is what an attacker steals.
Human identities get onboarding, manager approval, and an offboarding checklist when someone leaves. Machine identities often get none of that. A developer creates a key to unblock a project, the project ships, and the key stays valid for years. Ownership drifts when teams change, and nobody can say with confidence what breaks if the credential is rotated. That gap is where risk accumulates.
Why do machine identities now outnumber humans?
Machine identities outnumber humans because cloud services, automation, and AI agents each create identities faster than any hiring plan creates people. CyberArk's 2025 Identity Security Landscape, based on a survey of 2,600 cybersecurity decision makers at organizations with at least 500 employees, found 82 machine identities for every human identity. The same study found that 42% of machine identities hold privileged or sensitive access, while 88% of respondents said their organization defines a privileged user as a human only. CyberArk 2025 Identity Security Landscape
Entro Security's 2025 State of Non-Human Identities and Secrets in Cybersecurity reached a similar picture from a different angle. Its researchers found an average of 92 non-human identities for each human identity, and reported that 97% of NHIs carry excessive privileges. Entro Security 2025 State of Non-Human Identities
AI agents add a new layer to the same problem. An agent that reads email, updates tickets, or posts ledger entries needs credentials to do that work, and it acts faster than a person reviewing each step. CyberArk's 2025 study found that 68% of organizations lack identity security controls for AI, and 47% cannot secure shadow AI usage. The identity count is still climbing, and the controls have not kept pace.
Which non-human identity risks matter most?
The risks that matter most are orphaned identities, leaked secrets, excessive privilege, and credentials that never expire. OWASP published its Non-Human Identities Top 10 in 2025, ranking improper offboarding first, followed by secret leakage, vulnerable third-party NHI, insecure authentication, and overprivileged NHI. The list also covers insecure cloud deployment configurations, long-lived secrets, weak environment isolation, NHI reuse, and human use of NHI credentials. OWASP Non-Human Identities Top 10
Entro's 2025 findings show how those risks play out in practice. The report found that 44% of tokens are exposed in the wild, sent or stored in places such as Teams messages, Jira tickets, Confluence pages, and code commits. It also found that 91% of former employee tokens remain active, and 71% of non-human identities are not rotated within recommended time frames. A leaked token that nobody rotates is an open door with no expiry date.
Breaches follow the same pattern. CyberArk's 2025 study found that 87% of respondents said their organization had experienced at least two successful identity-centric breaches in the past 12 months, and 70% said identity silos are a root cause of cybersecurity risk. When machine identities live in separate tools with separate owners, no one sees the full picture.
"The race to embed AI into environments has inadvertently created a new set of identity security risks centered around the access of unmanaged and unsecured machine identities, and the privileged access of AI agents will represent an entirely new threat vector." Clarence Hinton, Chief Strategy Officer at CyberArk
How do human and machine identity controls compare?
Human identity controls are familiar: hire, approve, review, and remove. Machine identity controls need the same four steps, applied to accounts that have no manager and no leaving date. The table below sets the two side by side.
| Control | Human identities | Non-human identities |
|---|---|---|
| Owner | Named employee and manager | Named team and service owner |
| Approval | Joiner and role-change process | Ticket tied to the workload or integration |
| Review | Quarterly access review | Scheduled review of permissions and last use |
| Removal | Leaver process disables the account | Retirement trigger when the workload or integration ends |
| Credential life | Password rotation and MFA | Short-lived credentials and automated rotation |
How can a team secure non-human identities?
A team secures non-human identities by discovering them, assigning owners, cutting excess privilege, and shortening credential life, in that order. Discovery comes first because a team cannot protect identities it has not found. Inventory every service account, API key, OAuth grant, and certificate across cloud accounts, SaaS apps, and CI/CD pipelines, and record the owner and purpose of each one. Anything without an owner gets flagged for review, not left in place by default.
Next, apply least privilege in practice. Entro's 2025 finding that 97% of NHIs carry excessive privileges suggests most identities can lose access without breaking anything, but cuts need testing. Reduce permissions in stages, watch for failures, and keep a rollback plan for each change. Replace standing privilege with just-in-time access where the platform supports it, so elevated rights exist only for the duration of a task.
Then fix credential life. Short-lived credentials issued by a workload identity system beat static keys that sit in code for years. For credentials that must be static, set a rotation schedule, automate it where possible, and scan repositories, tickets, and chat tools for leaked secrets on a regular cycle. Rotation alone is not enough if the identity stays overprivileged, so pair the two fixes.
Finally, build retirement into the workflow. Tie NHI removal to the events that already end work: an application decommission, an integration cancellation, a vendor contract ending, or an employee departure that owned a token. CyberArk's 2025 study found that 61% of organizations lack identity security controls for cloud infrastructure and workloads, so this step often needs new tooling rather than a policy memo. Related reading on this blog covers SSPM: Fix SaaS Misconfigurations Before Attackers Do and MCP Server Security, both of which deal with misconfigured SaaS access and AI agent integrations that create machine identities.
Frequently asked questions
What counts as a non-human identity? Any account or credential used by software rather than a person, including service accounts, API keys, OAuth tokens, automation credentials, and certificates.
How many machine identities does a typical company have? CyberArk's 2025 study found 82 machine identities for every human identity, while Entro's 2025 research found an average of 92 non-human identities per human identity.
Why are non-human identities risky? Most carry privileges beyond what their workload needs, many are never rotated, and leaked tokens often stay valid because no owner retires them.
What is the first step to secure them? Build a full inventory with a named owner and purpose for each identity, then review permissions and last use before cutting access.
Do AI agents change the problem? AI agents add identities that act on their own with elevated access, and CyberArk's 2025 study found 68% of organizations lack identity security controls for AI.
Which machine identity in your own stack would be hardest to retire today, and what would it take to give it an owner and an expiry date? Share your approach in the comments, including what worked and what broke when you tried. You can also use the share buttons below the post to pass this along to a teammate who manages service accounts or integrations.

Comments
Post a Comment