Illustration of an AI agent operating with shared human credentials
All articles
Satya Devarakonda

Why AI Agents Must Not Inherit Your Credentials

Service account tokens live in secrets managers with access accumulated over time. Giving one to an autonomous agent exposes that entire permission surface and creates a structural identity problem: the credential identifies an account, not the agent making decisions.

We built Scalekix because we could not tell from logs whether a human or an agent was responsible when something went wrong. The audit trail named the service account credential, so diagnosis required reconstructing events instead of inspecting them. This pattern is structurally broken, not merely inconvenient.

Three losses when agents run as human identities

Credential inheritance looks like one small implementation choice. In reality, it combines three distinct policy failures.

You lose the ability to limit what the agent can touch

Service accounts gather permissions as engineers add access and seldom remove it. Their surface grows beyond any one agent's needs. Passing the account to an agent passes the whole surface too: every API, data store, and system the account can read or write.

It is tempting to assume an agent will do only what you requested. Orchestrated agents choose tools from available options and task demands. An agent gathering customer records for a report does not inherently know that record writes are forbidden. If its credential permits writing, an execution path will eventually test that permission.

You lose the ability to change what the agent holds

Rotating a service account token requires coordination: replace it everywhere, then confirm nothing failed. Sharing that account with a human engineer and three agents makes the change multi-party. Update nothing first, and the agents fail. Update them first, and old and new credentials overlap. Avoid rotation because coordination is costly, and the production credential remains stale indefinitely.

Most teams therefore skip rotation when automated and manual workflows share an account. Preventing an outage feels more urgent than avoiding a stale credential. That sensible local choice introduces a system-level weakness.

You lose the ability to know what the agent did

This is how an incident begins. The audit log captures credential use, not actor type. At 2:47 AM, an agent reads 80,000 records through the database read API, and the log names the service account rather than the agent. The on-call engineer spends 45 minutes deciding whether a human acted, automation ran, and security escalation is needed. That work is wasted if the agent was simply performing its normal workload at an unusual hour.

During an incident, reconstruction becomes even harder. Without a boundary between agent and human activity, you cannot rely on the log for the relevant period. Your own incident record becomes suspect.

The case for separate agent identity

Separate agent identity means the credential belongs to the agent, not a human or team. The agent registers as its own principal, receives credentials limited to required APIs and resources, and presents them on each request. Logs name that agent instead of a shared human account.

The concept is established. Service meshes have used workload identities for years, with SPIFFE/SVID as the most widely deployed model. The relevant extension is treating AI agents as workloads whose properties increase the need for identity: they make more autonomous decisions, have permission surfaces harder to infer from task descriptions, and fail less predictably than traditional microservices.

What separate identity actually requires

Historically, friction blocked separate agent identity. Teams needed agent registration, short-lived credentials, and authorization that checked scope on every call. For a team shipping production code, maintaining that infrastructure is a real cost against a benefit that is difficult to see upfront.

Consider a hypothetical platform team at a growing software company. It operates 8 agents across internal tooling: 4 data pipeline agents, 2 for customer-facing workflow automation, and 2 internal tooling helpers. All 8 borrow credentials from 3 human-owned service accounts. During a quarterly access review, the security team cannot connect API calls to individual agents, so it cannot decide which permissions to reduce. No changes are made because breaking a running agent feels riskier than reducing an uncertain permission surface.

This is not a policy knowledge gap. The team understands that permissions should shrink. Without a distinct identity for each agent, it lacks a practical way to do so without risking production breakage.

A boundary worth drawing clearly

We are not saying service accounts are bad. They are appropriate for many workloads. A scheduled batch job that reads records and writes results to a report store needs no elaborate identity model. Its credential can be properly scoped and regularly rotated, while its audit trail remains clear because the job performs one defined function.

The mismatch appears when this pattern is applied to agents whose permission surface is unknown at registration, whose choices change dynamically, and whose actions must be attributed to an individual agent rather than an account. Those conditions differ from service account design assumptions. The consequences surface where attribution matters most: incidents, access reviews, and efforts to reduce permissions.

What to do instead

The remedy is clear, though implementation takes work. Register every agent as a distinct principal. Set its scope at registration from its actual task: required APIs, data stores it reads, write versus read-only access, and expected call frequency. Issue a short-lived credential tied to that scope, rotate it automatically, and log each action against the agent identifier rather than the underlying account.

The discipline is to model scope before deployment, not after an incident. That can mean an agent fails on its first run because its scope is too narrow. A clean permission-denied failure is infinitely easier to debug than an agent successfully doing something it should never have been allowed to do.

Teams making this change report a common pattern: the first deployments take longer because scope comes first. After three or four deployments, permission modeling becomes routine and takes much less time. The result is an audit trail that supports investigation and a permission surface the team can govern.