Non-Human Identities: How to Secure the AI Agents and Service Accounts in Your Network

Your network has users you never hired. They never badge in, take breaks, or sit through security training. Yet they log in all day, every day. These are non-human identities. They include service accounts, API keys, tokens, and now AI agents.

For years, these accounts ran quietly in the background. Few teams tracked them closely. That approach no longer works. AI agents now read data, call tools, and act on their own. Each one needs access, and each one widens your attack surface.

This blog explains what non-human identities are and why they keep multiplying. You will see the biggest risks and a breach that exposed them. Then you get a practical plan to secure every machine identity. We also cover extra controls for AI agents and the skills involved.

Key Takeaways

  • Machine identities now vastly outnumber the people in your organization.
  • Most non-human identities have excessive access and no clearly assigned owner.
  • Leaked secrets often remain valid for years after exposure.
  • AI agents operate autonomously, making strict access controls essential.
  • A single stolen token can expose multiple connected systems.
  • Short-lived credentials and least-privilege access limit the damage attackers can cause.
  • Every non-human identity needs a designated owner and a defined retirement date.

What Are Non-Human Identities?

A non-human identity is any identity used by software, not a person. It lets apps, scripts, and agents prove who they are. It also defines what each one can access. Think of it as a login for machines.

You may also hear the terms “machine identity” or “workload identity”. They overlap heavily. Here are the most common types you will find in a network:

TypeWhat it doesCommon example
Service accountRuns background jobs and application processes.A nightly backup job with database access.
API keyLets one application communicate with another.A payment service key stored in code.
OAuth tokenGrants delegated access to a SaaS application.A chat tool connected to your CRM.
CI/CD credentialLets pipelines build and deploy code.A deployment key inside your build system.
Workload identityIdentifies and authenticates a running cloud workload.A container role in your cloud account.
AI agentPlans tasks and takes actions using granted tools and permissions.An assistant that files tickets and reads email.

Human accounts usually get MFA, access reviews, and offboarding. Machine accounts often get none of that. That gap is where attackers like to work.

Why Non-Human Identities Are Multiplying

Every new app, pipeline, and cloud service creates more machine logins. AI agents now add to the pile at record speed.

Palo Alto Networks surveyed 2,930 security leaders for its 2026 identity report. It found machine identities outnumber humans 109:1. Of those 109 identities, 79 are AI agents. And 91% of organizations already run autonomous agents in production.

Growth is not slowing either. Respondents expect AI agent identities to grow 85% in a year.

Measured ratios vary by environment, of course. Veza’s telemetry-based research found a ratio closer to 17:1. Either way, machines far outnumber people.

Power is concentrated too, according to the same research. Just 0.01% of machine identities controlled 80% of cloud resources. Lose one of those, and an attacker gains enormous reach.

Why AI Agents Change the Risk

A service account does the same job every day. An AI agent does not. It reads a goal, picks its tools, and decides its next step. That freedom changes the identity problem in four ways.

Agents chain actions fast. One prompt can trigger dozens of API calls in seconds. A mistake spreads before anyone notices.

Agents borrow human access. Many agents act on behalf of a user. They inherit that user’s permissions, often far beyond the task.

Agents spawn other agents. One agent can call another, which calls a third. Each hop makes access harder to trace.

Agents can be talked into things. Prompt injection can trick an agent into misusing its access. The credentials stay the same, but an attacker steers the actions.

Agent tooling leaks secrets too. Model Context Protocol (MCP) files specify how agents connect to tools. GitGuardian found 24,008 unique secrets in MCP files on public GitHub. Of those, 2,117 were verified as valid.

Standards bodies have noticed. In February 2026, NIST’s NCCoE proposed a project on AI agent identity. Its concept paper drew over 600 responses.

The Biggest Non-Human Identity Risks

OWASP ranks the most critical NHI risks in its Non-Human Identities Top 10. These six show up most often in real environments:

  • Secret leakage (NHI2): Keys and tokens end up in code, chats, and tickets. GitGuardian counted 28.65 million new hardcoded secrets on public GitHub in 2025.
  • Long-lived secrets (NHI7): Credentials that never expire stay useful to attackers. 64% of valid 2022 leaks were still unrevoked in 2026.
  • Improper offboarding (NHI1): Old service accounts outlive the projects that created them. Veza found 8% of accounts had no owner but kept live access.
  • Overprivileged NHI (NHI5): Teams grant broad access because scoping takes effort. Broad access turns one leak into a full breach.
  • Vulnerable third-party NHI (NHI3): Connected SaaS apps and extensions hold tokens to your data. Their breach becomes your breach.
  • Human use of NHI (NHI10): People sometimes log in with service accounts to skip controls. That hides who really did what.

AI makes several of these worse. Leaked secrets tied to AI services rose 81% in 2025. AI-assisted code leaked secrets at roughly twice the baseline rate.

Visibility is another gap. In Orchid Security’s data, 67% of non-human accounts lived inside apps. Central IAM tools never saw them.

What the Salesloft Drift Breach Teaches Us

Drift is an AI chat agent that many sales teams link to Salesforce. In August 2025, attackers stole its OAuth and refresh tokens. They used those tokens to log in as the trusted integration. The data theft ran from August 8 to August 18, 2025.

Google’s Threat Intelligence Group tracked the attacker as UNC6395. Inside Salesforce, the attackers went hunting for more secrets. They searched support cases for AWS keys, passwords, and Snowflake tokens. Google researchers said hundreds of Salesforce tenants were targeted.

Notice what did not happen. No password was cracked. No MFA prompt was bypassed. The attackers simply used a machine identity everyone already trusted.

Four lessons stand out. Treat every third-party integration as a privileged identity. Keep secrets out of support tickets and case notes. Watch integrations for unusual query volume. And keep a plan to revoke tokens fast. Salesloft and Salesforce did exactly that, revoking every active Drift token.

How to Secure Non-Human Identities: A Step-by-Step Plan

You cannot protect what you cannot see. So start with visibility, then tighten from there.
  1. Build a full inventory. Find every service account, key, token, and agent. Check cloud consoles, code repos, CI/CD tools, and SaaS integrations.
  2. Assign a named owner. Every identity needs a person who answers for it. Without an owner, nobody notices when it goes wrong.
  3. Cut access to the minimum. Grant only the permissions each task needs. Review unused permissions and remove them on a schedule.
  4. Replace long-lived secrets. Use short-lived tokens and workload identity federation where possible. Rotate the static keys that remain.
  5. Move secrets into a vault. Pull keys out of code, config files, and chat threads. Scan repos and tickets so new leaks get caught early.
  6. Monitor behavior, not just logins. Learn what normal looks like for each identity. Alert on new locations, odd hours, or sudden data pulls.
  7. Retire identities on purpose. Set an expiry date when you create each identity. Remove it the day its project or vendor ends.

Extra Controls for AI Agents

AI agents need everything above, plus a few more guardrails.

Give each agent its own identity. Never let agents share a human’s login or a common key.

Scope access to the task, not the agent. Grant permissions just in time, then revoke them when the job ends.

Keep a human in the loop for risky actions. Payments, deletions, and permission changes should need approval.

Trace every action back to a person. Each agent step should link to the human who delegated it.

Treat agent inputs as untrusted. Filter prompts and tool results to limit injection attacks.

Watch for agents creating agents. Any identity an agent spawns should inherit tighter limits.

Skills That Non-Human Identity Security Demands

NHI security sits where cloud, code, AI, and governance meet. No single skill covers it. Cloud identity design matters most, since most NHIs live in cloud IAM. Secure coding keeps secrets out of repos in the first place. AI security skills help teams test how agents behave under attack. And governance turns all of it into policy that sticks.

ECCU offers four paths that map to this work.

MSCS Cloud Security Architect: This track covers cloud security design, cloud platforms, and secure programming. You learn to build the scoped, short-lived access this blog describes. It also prepares you for the Certified Cloud Security Engineer (CCSE) exam.

MSCS Security Analyst: This track now includes Offensive AI Security and Red Team Operations. You learn to test agents, APIs, and integrations before criminals do. The course prepares you for the COASP exam.

Master of Science in Computer Science (MCS): This degree suits the people who build agents and write their code. Secure programming and artificial intelligence courses sit side by side. That pairing helps stop secret leaks at the source.

MBA in Cybersecurity Executive Leadership and Governance: This specialization fits leaders who set agent and vendor policy. Its AI governance course covers third-party risk and continuous monitoring. Those are the exact gaps the Drift breach exposed.

Machine identities will keep multiplying. The teams that govern them well will stay ahead. Not sure which path fits you? Talk to an ECCU enrollment advisor and map your next step.

Frequently Asked Questions

It is a digital identity used by software instead of a person. Service accounts, API keys, OAuth tokens, and AI agents all count. Each one accesses systems without a human logging in.

The terms overlap heavily. Machine identity often refers to certificates and workload identities. Non-human identity is the broader umbrella. It also covers service accounts, tokens, bots, and AI agents.

Yes. AI agents authenticate and act through granted permissions, like service accounts. The difference is autonomy. Agents choose their own steps, so their access needs tighter limits.

They often hold broad access and never expire. Many have no clear owner. Attackers love them because misuse rarely triggers alerts.

Store them in a secrets vault, never in code or chats. Prefer short-lived tokens over static keys. Rotate what remains, scan for leaks, and revoke exposed keys right away.

It is a ranked list of the most critical NHI risks. OWASP built it from real breaches, surveys, and vulnerability data. Improper offboarding and secret leakage top the list.

Share this post

Recent Posts

INQUIRE NOW

Related Posts

Are you looking to pursue a career in cybersecurity?

Unlock Your Cyber Security Potential at EC-Council University

Admission Inquiry

Admission Inquiry