The identity problem: whose power is it wielding?

Lesson 1 of 5 in Agent Identity, Auth, and Secrets.

Here is how almost every agent ships its first production version. Someone creates a service account — svc-ai-automation — gives it the union of every permission any planned agent might need, drops the key in an environment variable, and moves on. It works. It demos beautifully. And it has quietly destroyed three properties your security program depends on.

It is unauditable. Six agents, forty tool integrations and one shared principal means the log line says svc-ai-automation deleted 1,204 rows. Which agent? Running which prompt version? For which user? You cannot answer, and no amount of log retention will change that — the information was never captured, because the identity was never distinct.

It is unrevokable. When one agent misbehaves at 02:00, your only lever is disabling the shared account, which stops every agent and every integration that shares it. In practice teams do not pull that lever; they wait, argue, and let the incident run. A control nobody dares use is not a control.

It is unscopable. A shared principal must hold the union of every permission its consumers need. So the low-risk summarizer agent also holds the finance agent’s write access to the ledger. Least privilege is arithmetically impossible in that design — you scoped the account, not the agent.

Key terms: agent identity, service principal, workload identity, delegation, impersonation, least privilege

Shared service account vs per-agent identity — the four properties that decide incidents
PropertyShared service accountPer-agent identityWhy it decides the incident

Attribution

Every action logs as one principal. Agent, version and requesting user are lost.

Each action carries a distinct principal id, so the actor is recoverable from the log alone.

Fifteen minutes into an incident, "which agent did this" must be a query, not an investigation.

Revocation

One kill switch for all consumers. Using it causes a second outage, so it goes unused.

Disable one identity, stop one agent. Blast radius of the response matches the incident.

A kill switch you are afraid to pull is decoration. Per-agent identity makes revocation cheap.

Scoping

Must hold the union of all consumers’ permissions — permanently the widest role in the system.

Scoped to one agent’s job. The summarizer never holds the ledger write.

Union-of-permissions is how a prompt-injected low-value agent reaches high-value systems.

Rotation

Rotating the key breaks every consumer at once, so rotation gets deferred indefinitely.

Short-lived credentials issued per agent (often per session) — rotation is the normal case, not a project.

Long-lived shared secrets are the artefact most likely to be sitting in a repo, a log, or a prompt.

Sort the questions below before reading on. Some are about the agent’s own authority, some are about delegated authority, and the interesting ones need both to be true before the call is allowed — that intersection is the whole design.

Interactive sorting exercise: Each row is a check the runtime must perform before a tool call fires. Which identity question does it answer?

Interactive checkpoint quiz (2 questions) — open this page in a browser to take it.