Non-human identity, usually abbreviated NHI, is the collective term for the identities that software uses to authenticate to other software. Service accounts, API keys, OAuth client credentials, cloud IAM roles, SSH keys, certificates, and workload identities are all non-human identities. In most enterprises they now outnumber human identities many times over, and AI agents are adding to the count quickly.
Why NHIs are a security concern
Human identities have accumulated decades of controls: password policy, multi-factor authentication, single sign-on, conditional access, joiner-mover-leaver processes, and periodic access reviews. Non-human identities have very few of these.
They are (or, at least, have been before Gradient) long-lived. An API key issued during a project is often still valid years later. Rotation is manual and frequently skipped because no one knows what will break.
They are over-privileged. Service accounts are typically granted whatever permission was needed on the day they were created, plus a margin for convenience. Least privilege is rarely enforced and almost never revisited.
They are portable. A key or token is a string. Anyone or anything that can read the string can use it, from anywhere. The receiving system cannot tell the difference between the legitimate holder and a thief.
They have no owner. When the engineer who created a service account leaves, the account stays. There is often no record of who is accountable for it or what depends on it.
They are not monitored. Because they are expected to act automatically and repetitively, their activity is rarely reviewed, and anomalous use blends into normal traffic.
Where NHIs live
Non-human credentials accumulate in environment variables, CI/CD pipeline secrets, configuration files, container images, source repositories (sometimes committed by accident), secrets managers, and cloud metadata services. A large organization typically does not have a complete inventory.
How AI agents change the picture
An AI agent is a non-human identity with two additional properties. First, it decides its own actions based on content it reads, so a compromised or manipulated agent can use its credentials in ways no script would. Second, it typically acts on behalf of a specific human, so its identity should be tied to that person’s status and entitlements rather than existing independently. Handing an agent a conventional service account gives it standing, ownerless, portable access, which combines the weakest properties of a machine identity with the unpredictability of a model.
What good NHI practice looks like
Inventory: Know every non-human identity, what it can reach, and who is accountable for it.
Ownership: Every NHI maps to a human or team, and is disabled when that owner leaves or changes role.
Short life: Credentials are issued for a task or a session, not indefinitely, and rotate automatically.
Binding: Where possible, a credential is bound to the platform that is allowed to use it, so a copy is useless elsewhere.
Least privilege per action: Permission is checked for each request against what the task requires, not granted in bulk up front.
Audit: Every use is recorded under the identity that made it and the owner it acts for.
The following articles look at how agents authenticate today and why the current approach falls short of this list.