Non-human identity

Also known as: NHI

On this page 7

A non-human identity (NHI) is any digital identity that authenticates and acts on behalf of software rather than a person, including service accounts, API keys, OAuth applications, bots, workload identities and certificates. In automation security, NHIs are the credentials that let workflows, integrations and scripts read data, call APIs and change systems without a human signing in each time.

Because automated systems multiply quickly, NHIs commonly outnumber human identities by a wide margin, often by ten to one or more in cloud-heavy organizations. They rarely use multi-factor authentication, they often hold broad, long-lived permissions and nobody receives an alert when they misbehave, which makes them a primary target for attackers.

How non-human identities authenticate

A non-human identity proves who it is with a machine credential instead of a password typed by a person. The credential is presented automatically by code, so its protection depends entirely on where it is stored and how long it remains valid.

The table below lists the main credential types and their security characteristics.

Credential typeHow it worksMain risk
Static API keyShared secret sent with each requestLeaks in code, logs and tickets
Personal access tokenUser-scoped token used by a scriptInherits a person’s full rights
OAuth client credentialsClient ID and secret exchanged for short tokensSecret sprawl across environments
X.509 certificateMutual TLS with a private keyExpired or unmanaged certificates
Workload identity federationPlatform-issued token traded for cloud accessMisconfigured trust conditions
Common credential types used by non-human identities

The strongest pattern is short-lived, federated credentials issued at runtime, for example through OpenID Connect tokens exchanged with a cloud provider. This removes the need to store a long-lived secret anywhere in the pipeline.

Types of non-human identities in automated environments

NHIs appear wherever software talks to software. Classifying them helps security teams decide who owns each identity and which controls apply.

CategoryTypical exampleUsual owner
Service accountsDirectory account running a scheduled jobApplication or IT team
Integration connectionsLow-code connector to a CRM or mailboxCitizen developer or business unit
RPA botsSoftware robot using a dedicated loginAutomation center of excellence
CI/CD identitiesPipeline deploying to cloud infrastructurePlatform engineering
Cloud workload rolesContainer or function accessing storageCloud operations
AI agentsAgent calling tools and APIs on a scheduleProduct or data team
Categories of non-human identities and where they appear

AI agents are the fastest-growing category. They combine broad tool access with non-deterministic behavior, so their identities need tightly scoped permissions and detailed logging of each action they take.

Non-human identities compared with human identities

Identity programs were built for people, and many of their controls do not translate directly to software. The differences below explain why NHI governance needs its own processes.

AspectHuman identityNon-human identity
Lifecycle triggerHiring, transfer or departure in HRProject start, deployment or forgotten script
AuthenticationPassword plus multi-factor authenticationKey, token or certificate without MFA
OwnershipThe person themselvesOften unclear or shared
Activity patternWorking hours, interactiveConstant, predictable, machine speed
OffboardingAutomatic on terminationFrequently never removed
Key differences between human and non-human identities

The predictable behavior of software is also an advantage. Because a healthy NHI performs the same calls from the same locations, deviations such as a new IP range or an unusual API are strong indicators of compromise.

Governing non-human identities securely

Effective NHI security rests on inventory, ownership, least privilege and rotation. Without a complete inventory, the other controls cannot be applied consistently.

  1. Discover every identity across directories, cloud accounts, code repositories and automation platforms.
  2. Assign an accountable owner and a business purpose to each identity.
  3. Apply least privilege, granting only the scopes the workflow actually uses.
  4. Store secrets in a credential vault and never in code, variables or shared documents.
  5. Rotate or replace credentials on a schedule, preferring short-lived tokens.
  6. Review access periodically and remove identities without an owner or recent activity.

Mature programs also monitor behavioral baselines and link each NHI to the workflow inventory, so that retiring an automation automatically triggers removal of its credentials.

Frameworks increasingly name this area explicitly. The OWASP Non-Human Identities Top 10 catalogs risks such as improper offboarding, secret leakage and overprivileged identities, while zero trust architectures treat every workload as untrusted until it presents a verifiable, short-lived credential. Mapping internal controls to such references helps auditors and engineers share one vocabulary for machine access, and it makes gaps visible during risk assessments and penetration tests.

Risks and common mistakes

Most NHI incidents result from ordinary hygiene failures rather than sophisticated attacks. The table maps frequent mistakes to their consequences and remedies.

MistakeConsequenceFix
Hardcoded credentialsSecrets exposed in repositoriesMove to a vault and scan code
Admin rights by defaultOne leak grants full controlScope permissions per task
Running as a human userAccess persists after the person leavesUse a dedicated service identity
Never-expiring keysStolen keys work indefinitelyEnforce rotation and expiry
Shared connectionsNo attribution of actionsOne identity per workflow
Frequent NHI mistakes and how to correct them

A frequent blind spot is third-party OAuth grants, where an external application keeps access to company data long after the integration stopped being used. These grants deserve the same review cycle as internal service accounts.

Another recurring error is logging secrets by accident. Verbose debug output, failed HTTP requests and workflow run histories can capture tokens in plain text, so log redaction and restricted access to run histories are essential parts of NHI protection.

The simple explanation

People log in with a username and password. Programs need to log in too, so they get their own digital identities, called non-human identities. They work like spare keys handed to a delivery service so it can enter the building without ringing the bell.

The trouble is that companies hand out many such keys and often forget who has them. Good practice means knowing every key, giving each one access to only the rooms it needs and changing the locks regularly.

How it is used in practice

A regional insurance company ran an inventory of its automation landscape and found about 2,300 non-human identities against 400 employees. They included low-code connections, service accounts for nightly data loads and personal access tokens used by deployment scripts.

The security team discovered that 37 percent had no identifiable owner and several tokens belonged to engineers who had left the company. One integration connection to the claims database held write access although its workflow only read data.

Over two quarters, the team assigned owners, moved secrets into a central vault, replaced pipeline keys with federated short-lived tokens and deleted around 600 unused identities. Quarterly access reviews now cover NHIs alongside human accounts, and the attack surface from standing credentials shrank by more than half.