Skip to content
A sprawling swarm of small pink-lit tags, with one sealed and glowing amber inside a single capsule.

Agentic security

Non-human identity security: API keys, tokens and service accounts

The short answer

A non-human identity is a login that belongs to software: an API key, a token, a service account or the credentials an AI agent uses. Give each one a single owner and a single job, keep it in a vault, make it expire on its own, and log what it does, because whoever holds it is the software.

Written byBrian GagneCo-founder and CTO, Kief Studio
Technical review byAmelia GagneCo-founder and CEO, Kief Studio

Published

Activity log listing staff and team actions newest first, such as finished hand-offs, approvals and denials, each with a time stamp.
A non-human identity is only accountable if what it did shows up where a person reads it. In LTFI, the activity log lists every action by the staff and the team, newest first.

What is a non-human identity?

Every time two pieces of software talk to each other, one of them has to prove who it is. Your accounting app pulls bank transactions with a token. Your website sends form submissions to your CRM with an API key. A backup job signs in with a service account. None of those logins belong to a person, and that's what a non-human identity is.

Security people also call this a machine identity. The terms overlap, and you'll see both. Machine identity is used most often for the certificates and keys servers use to prove who they are to each other, and non-human identity is the wider bucket that includes all of it, plus the identities AI agents use.

Here's the part that matters for an owner. A non-human identity has no face, no phone and no manager. Nobody gets a login alert when it signs in late at night, because it signs in all the time. If one leaks, whoever holds it looks exactly like your software to every system it can reach.

The kinds of non-human identity in a small business

Most businesses have more of these than they think. A quick inventory usually turns up:

  • API keys: long strings that let one app call another, such as a payment processor, an email service or an AI model.
  • OAuth tokens: the passes an app gets when you click Connect and approve access to your Google or Microsoft account.
  • Service accounts: accounts created for a job, like the one your backup software or your scanner uses to save files.
  • Certificates and SSH keys: how servers and the people who run them prove who they are.
  • Agent identities: the keys and tokens an AI agent holds to reach your inbox, calendar, files and CRM.

Why AI agents multiply them

A person signs in once and uses a dozen tools. An agent needs its own credential for every tool it touches, and a business that runs a few agents can add dozens of new non-human identities in a month. Most of them get created in a hurry, during setup, by whoever was connecting the tool. That's how keys end up with more access than the job needs and no date when they stop working.

Dozens of cables plugged into an anonymous pillar, with one cable carrying an owner tag.

How big the problem is

The machine side of identity has outgrown the human side by a long way. The 2026 Identity Security Landscape (opens in a new tab) from Palo Alto Networks counts 109 machine identities for every human one.

Those identities leak. GitGuardian's State of Secrets Sprawl 2026 (opens in a new tab) found 28.6 million new secrets in public GitHub commits in 2025, up 34% on the year before, as the report's announcement (opens in a new tab) puts it. Secrets for AI services were up 81%. When GitGuardian retested secrets it had found leaked in 2022, more than 64% still worked in January 2026, because nobody had switched them off.

Code isn't the only place they turn up. The same report found that 28% of secrets sprawl happens only outside code repositories, in chat, tickets and shared documents. If someone on your team has ever pasted a key into a message to get a tool working, you have a copy of it sitting somewhere you don't control.

One amber sphere dwarfed by a vast cloud of pink-lit spheres.

Growth on the year before is highest in Secrets for AI services at 81%.

Secrets for AI services grew more than twice as fast as leaked secrets overall. Source: GitGuardian State of Secrets Sprawl 2026
Growth on the year before
All new secrets34
Secrets for AI services81
Secrets for AI services grew more than twice as fast as leaked secrets overall. Source: GitGuardian State of Secrets Sprawl 2026 (opens in a new tab)

The OWASP Non-Human Identities Top 10, risk by risk

OWASP keeps a list of the ten most common ways a non-human identity goes wrong, the Non-Human Identities Top 10 (opens in a new tab) for 2025. These six are the ones I see in small businesses, each with the control that answers it.

Secret leakage (NHI2)

A key gets committed to a repository, pasted into chat or saved in a shared document. The control is a vault: keys live in one place built to hold secrets, software reads them from there when it runs, and nobody copies them anywhere else. Scan code and chat for keys that slipped out, and treat a found key as a leaked key.

Long-lived secrets (NHI7)

OWASP describes these as keys and tokens with expiration dates too far in the future, or none at all. A key that never expires is a key that works for whoever finds it, years later. The control is expiry: short-lived credentials where the service supports them, and a rotation schedule where it doesn't.

Overprivileged non-human identity (NHI5)

The key your website uses to add a contact to the CRM doesn't need to delete contacts or export the whole list. It usually can, because full access was the default at setup. The control is least privilege, set per identity: the narrowest scope the tool offers that still does the job.

Improper offboarding (NHI1)

When an employee leaves, someone turns off their account. When a tool, a contractor's script or an agent is retired, its keys often keep working. The control is an owner for every non-human identity, written down, so retiring a tool includes revoking what it held.

Reuse and human use (NHI9, NHI10)

One key shared across three tools means you can't tell which one did something, and you can't revoke it without breaking all three. A person signing in with a service account's credentials erases the line between what software did and what a human did. The control is one identity per tool or agent, and people using their own logins.

A crowded brass key ring on walnut, old untagged keys glowing pink and one newer key with an amber-lit tag.

How a stolen token gets used, step by step

MITRE's catalog of attacker techniques tracks this as steal application access token (opens in a new tab) (T1528): adversaries steal application access tokens as a way to get credentials to remote systems and resources. A token is proof that someone already signed in, so a stolen one skips the password and the login prompt.

It happens to companies with real security teams. In December 2022, a chat company reported (opens in a new tab) that a limited number of employee tokens were stolen and misused to reach its externally hosted GitHub repository, and that private code repositories were downloaded. Here's the chain we design against, with the control that breaks each link.

  • A token sits in a config file, a chat thread or a laptop's browser. The control: tokens live in a vault, and nothing else keeps a copy.
  • An attacker copies it. The control: the token expires in minutes or hours, so a copy goes stale before it's useful.
  • The attacker tries it at other services. The control: the token is issued for one service and refused everywhere else.
  • The attacker uses it to pull data or make changes. The control: the identity can only do its one job, and anything that sends, pays or deletes waits for a person.
  • Someone notices weeks later. The control: every use is logged against that one identity, so you can see what it touched and revoke it in one place.

Token sits exposed

A token in a config file, chat thread or browser is answered by keeping tokens in a vault with no other copy.

Attacker copies it

A copied token goes stale before it's useful when it expires in minutes or hours.

Tried elsewhere

A token issued for one service is refused everywhere else.

Used for damage

The identity can only do its one job, and anything that sends, pays or deletes waits for a person.

Noticed weeks later

Every use is logged against that one identity, so you can see what it touched and revoke it in one place.

A chain of pink-lit links broken by one amber clasp that has opened.

Non-human identity security: vaulting, rotation and short-lived credentials

Strip away the vendor language and NHI security comes down to three habits, plus an owner for each key.

Vault every non-human identity

A secrets vault is a service that holds keys, hands them to the software that needs them at run time, and records who asked. Moving keys into one ends secrets sprawl at the source, because there's only one copy, and it gives you one place to rotate or revoke. If a key has to be typed somewhere, it gets typed into the vault and nowhere else.

Rotate on a schedule, and on every departure

Rotation means replacing a key with a new one and switching the old one off. Do it on a schedule for the keys that can't expire on their own, and do it right away when a person who could see the key leaves, when a tool is retired, or when a key shows up anywhere it shouldn't. If rotating a key would break things, that's a sign it's shared too widely.

Prefer short-lived, single-audience credentials

The best key is one that stops working on its own. Many services now issue tokens that last minutes or hours and are tied to one destination. The Model Context Protocol, the open standard AI agents use to reach tools, builds this in: its authorization spec (opens in a new tab) treats a protected server as an OAuth 2.1 resource server, requires it to accept only tokens issued for it, and says servers must not accept or pass on any other tokens.

Vault every key

Keys live in one vault that hands them to software at run time and records who asked.

Rotate on schedule

Keys that can't expire are replaced on a schedule and right away when someone leaves, a tool is retired or a key turns up where it shouldn't.

Prefer short-lived

The best key stops working on its own and is tied to one destination.

Scattered pink copies fading away outside a vault, while one amber thread sits safely inside it.

What this looks like in a 5 to 50 person business

A small business can do this without an identity team. It takes a list of every key and a few rules everyone follows. When Meelie and I talk with owners about AI agents in our client work, one question comes up early: who set up these connections, and could we turn them off tomorrow if we had to? Most can't answer yet, and getting to that answer is most of the work.

NIST's Cybersecurity Framework 2.0 (opens in a new tab) already covers this, in language that names software alongside people. PR.AA-01 asks that identities and credentials for authorized users, services and hardware be managed by the organization, and PR.AA-05 asks for least privilege and separation of duties. A service account is a user as far as those rules are concerned, and so is an AI agent.

A small office after hours with five desks, an open network cabinet with pink cables and an amber-lit clipboard on a hook.

What we've learned running agents on real keys

We run our own company on LTFI, with AI staff connected to mail, calendars, the CRM and our websites every day. A few things we'd tell any owner about non-human identity work.

  • The inventory is the hard part. Once every key has an owner and a job written next to it, the rest is routine.
  • Separate keys per agent pay for themselves the first time something looks odd, because you can switch one off and leave the rest running.
  • Keys never belong in a prompt. An agent should call a tool that already holds the credential, so the model never sees the key and can't repeat it.
  • Rotation only happens if it's easy. If replacing a key takes a meeting, it won't get done, so build the system so it takes a minute.
A panel of separate brass key switches with pink running lights, one switched off with its key lit amber.

How LTFI handles non-human identity risk

LTFI is the agentic business operating system Kief Studio makes and runs. These are the controls that apply to the keys and tokens your AI staff use, and they ship today.

  • Rules, permissions, credentials, deleting and money stay with people. An AI teammate can't change them.
  • Your AI runs on keys you own, under your contract with the AI company, with spend caps you set.
  • Anything that sends, posts, publishes or spends waits in one queue for the person who owns it.
  • The activity log records every action by the staff and the team in plain words, newest first, with who approved it.
  • Each company runs on its own dedicated server, managed, patched and watched by us.

What to do about non-human identities this month

Two lists: one for the person who owns the business, one for whoever runs its systems.

If you own the business

  1. Ask for a list of every app, script and AI tool connected to company email, files, banking and customer data.
  2. Make sure each connection has a named owner, and that someone checks it when that person leaves.
  3. Ask that no key or password is ever pasted into chat or email again, and give people a vault to use instead.
  4. Before you buy an AI tool, ask how it stores the keys it uses and how you'd revoke them.

If you run the systems

  1. Inventory API keys, OAuth grants, service accounts and certificates, with an owner and purpose for each.
  2. Move every secret into a vault and scan repositories and chat history for ones that leaked.
  3. Replace shared keys with one identity per tool or agent, scoped to the narrowest permission that works.
  4. Prefer short-lived credentials bound to one audience, rotate the rest on a schedule, and log every use.

Key takeaways

  • A non-human identity is any login that belongs to software, and whoever holds it is that software to your systems.
  • AI agents multiply them, so give each agent its own identity, scoped to one job, with an owner.
  • Keys belong in a vault, never in code, chat or prompts, and the ones that can't expire should rotate.
  • Short-lived, single-audience tokens turn a stolen credential into a stale one.

Where this lines up with the standards

The frameworks and rules this page maps to, with the exact item and what it asks of you.

FrameworkItemWhat it asks
OWASP Non-Human Identities Top 10NHI1 Improper Offboarding; NHI2 Secret Leakage; NHI5 Overprivileged NHI; NHI7 Long-Lived Secrets; NHI9 NHI Reuse; NHI10 Human Use of NHI (opens in a new tab)Offboard retired identities, stop leaks, cut excess privilege, expire secrets, and keep identities single-use and machine-only.
OWASP Top 10 for Agentic ApplicationsASI03 Identity and Privilege Abuse (opens in a new tab)Keep each agent's identity and privileges narrow so a fooled agent can't borrow more.
NIST CSF 2.0PR.AA-01, PR.AA-05 (opens in a new tab)Manage identities and credentials for services, and enforce least privilege and separation of duties.
MITRE ATT&CKT1528 (opens in a new tab)Defend application access tokens against theft and reuse.
MCP authorization specToken handling (opens in a new tab)Accept only tokens issued for this server, and never pass a token on.
Massachusetts201 CMR 17.04 (opens in a new tab)Where a key reaches personal information: control user IDs, keep passwords secure, and limit access to active accounts.

Key terms

Machine identities for every human oneSource: paloaltonetworks.com
109
New secrets found in public GitHub commits in 2025Source: gitguardian.com
28.6 million
Secrets leaked in 2022 that still worked in January 2026Source: gitguardian.com
64%

Questions

Non-human identities

What is a non-human identity?

A non-human identity is a login that belongs to software instead of a person: an API key, an OAuth token, a service account, a certificate or the credentials an AI agent uses to reach your tools.

What is an example of a non-human identity?

The API key your website uses to send form submissions to your CRM is one. So is the token your accounting app uses to read bank transactions, and the account your backup software signs in with.

What is NHI security?

NHI security is the practice of managing non-human identities safely: knowing which ones exist, giving each an owner and one narrow job, storing secrets in a vault, expiring or rotating them, and logging what they do.

Is machine identity the same as non-human identity?

Mostly. Machine identity is often used for the certificates and keys servers use with each other, while non-human identity is the broader term that also covers API keys, service accounts and AI agents.

Is an AI agent a non-human identity?

Yes. An AI agent acts through the keys and tokens it holds, so each agent should have its own non-human identity with its own permissions, rather than borrowing a person's login or a shared key.

How often should API keys be rotated?

Rotate on a regular schedule you can keep, and right away when someone who could see the key leaves, a tool is retired or the key appears anywhere it shouldn't. Where a service offers short-lived tokens, use those instead.

What is secrets sprawl?

Secrets sprawl is keys, passwords and tokens scattered across code, chat, tickets and shared documents. Every extra copy is another place one can leak, and it makes rotation slow because nobody knows where they all are.

How do you secure a non-human identity?

Give it one owner and one job, scope it to the least privilege that works, keep its secret in a vault, make it expire or rotate it, and log every use so you can revoke it in one place.

Keep reading

  • A heavy threshold gate lets one cleared path through while dozens of pink trails stop at it.

    Start here

    Agentic AI security

    Agentic AI security explained for owners: identity, least privilege, approvals and an audit trail for AI agents, from the team that runs them in Massachusetts.

    Brian Gagne

  • Medallions tangled into one pink knot, and one free medallion with its own amber thread.

    Identity and access

    Agentic IAM

    Agentic IAM gives every AI agent its own identity, scoped short-lived credentials and authority it can trace to a person. How it works and where to start.

    Brian Gagne

  • A blurred hub drowns in pink cables while a clean hub in front holds one amber line.

    Identity and access

    AI agent permissions

    AI agent permissions decide what an agent can read, change and send. How to scope its tools, catch permission drift and run an access review.

    Brian Gagne

  • Many pink cables converge on one hub, and every connection passes through its amber iris.

    Threats

    MCP security

    MCP security for businesses running AI agents: what the Model Context Protocol's authorization rules require, and how to vet servers and stop tool misuse.

    Brian Gagne

  • A capsule travels through a line of rings and exits cleanly through an amber one.

    Identity and access

    AI agent lifecycle

    The AI agent lifecycle, run like staffing: who requests and owns an agent, what it gets on day one, how access is reviewed, and how to retire it cleanly.

    Amelia Gagne

  • Reference

    Glossary

    An agentic AI glossary in plain words: AI agents, agentic IAM, non-human identities, prompt injection, shadow AI, MCP and more, each with a short definition.

Most MSPs are resellers. Kief Studio is the manufacturer.

A reseller sends your problem to the company that made the software. We are that company: we build LTFI and run it, so the people you talk to can change it. Book a walkthrough and see it on your own business.

Nothing plays until you press play.