Who Touched Production? Your AI Agent Needs a Badge

Agent identity separates your actions from your agent's, so permissions and incident response can target the right actor.

Subscribe at Apple Podcasts Spotify RSS

AI agents using your credentials make production changes look like yours. Agent identity lets teams trace who acted, scope permissions and cut off an agent separately from its operator. Andrey Devyatkin and Vladimir Samoylov compare AWS, Google Cloud and Microsoft approaches, explain how SPIFFE workload identities fit agents, and examine the gaps in MCP authorization and SaaS onboarding. Separate identities improve control, but humans still own the access they grant.

Summary

Open CloudTrail after a bad change and you’ll see your own name on it. Maybe you made the change. Maybe the coding agent on your laptop did, using your AWS SSO session because that was the credential it could reach. Or maybe it was the pipeline that runs on a colleague’s AWS access keys. Most setups record who owned the credential. They don’t record who actually acted, and from the logs alone you can’t tell those cases apart.

Agent identity closes that gap. It gives each agent a badge of its own, so you can see what it did, scope what it may do, and cut it off without locking out the person who started it. The idea isn’t new. Workloads have had badges for close to a decade through SPIFFE and service meshes. What’s new is that AWS, Google Cloud and Microsoft now issue them to agents, each in a slightly different way. Our argument is simple. Treat an agent as a workload with a name, enforce permissions on that name, and keep in mind that a human still answers for what the agent was able to reach. The cloud providers have handed out the badges. Most systems outside the cloud still have no door that accepts them.

Borrowed Badges Hide Who Acted

Start with what happens when an agent has no identity of its own: it uses whatever it can find.

What goes wrong when an agent uses your credentials?

Everything it does gets logged as you. A coding agent on your laptop picks up your SSO session to AWS. Your badge is lying on the table, so it grabs that one and gets on with the job. When something breaks, nothing in the logs separates your action from the agent’s.

Autonomous agents running in the cloud have a quieter version of the same problem. Several of them assume the same IAM role to reach Amazon Bedrock, and if nothing gives each one a distinct session name or source identity, you have no idea which one called the model. AWS already lets you set distinct session names and enforce a source identity that CloudTrail records. Many setups don’t use either, though, and then every agent coming through the role looks the same.

Outside AWS it gets worse. A lot of teams hand the CI/CD system a personal access token, so GitHub, Vercel and Cloudflare all show one person doing everything.

“we don’t know if it’s the really person do that or it’s someone of their behalf or someone steal the token”

That uncertainty covers three different situations: the person acted, something acted on their behalf, or a stolen token acted. Each one calls for a different response, and a shared credential makes them look the same. One person can now run several agents in parallel. Without separate identities, all of them carry the same credentials and look like a single agent, which is also a single human. If you want to tell them apart, you have to name them, and they need to be identified in your systems.

An Agent Is a Workload With a Badge

The fix borrows from a problem infrastructure teams already solved once.

Is agent identity a new kind of identity?

Technically, no. It’s workload identity applied to agents. Think of a normal VPC. Services call each other’s APIs inside a trusted network, often without authorization, and the service that receives a call doesn’t know who made it. Around 2018 HashiCorp Consul tackled this by issuing identities to workloads, and Istio does the same for pods. The SPIFFE standard behind those identities, short-lived X.509 certificates in practice, has been around for about ten years. It’s proven technology.

The easiest way to think about it is an office badge. You arrive at work, you get a badge, and everyone knows it’s you. Give every pod and every workload a badge and you know who called. An agent fits that model. Strip out the romance about intelligence and an agent is a workload you deploy. It just got an identity. SPIFFE’s creators couldn’t have had agents in mind, but the name, Secure Production Identity Framework for Everyone, fits them anyway.

We don’t fully agree on this framing. One of us reads agents as something between a human and a service. They aren’t human, and they aren’t a deterministic service either. They’re a smart workload that can evolve and change what it does. We have mature answers for human identity and mature answers for service identity, and the industry is struggling because agents keep getting pushed into one box or the other. Both readings lead to the same practical conclusion. The agent needs a badge of its own, issued by something that checks what it is.

The two views do differ on what comes next. If an agent is a workload, the existing tooling mostly fits. If it’s a third category, some of that tooling will have to change: pricing, onboarding, and the doors other systems open for it. We come back to the doors below.

Identity Is What You Scope Permissions On

Logging isn’t the main reason to have a badge. The main reason is that you can write rules against it.

What does an agent identity let you enforce?

Permissions tied to the specific agent instead of to whoever it borrowed credentials from. Static firewall rules work on addresses, and allowlists of fixed IPs get hard to maintain when pods change IP addresses all the time. A security group is closer to a network identity: if the workload belongs to the group, allow the traffic, and Amazon EKS can even attach security groups to individual pods. Consul, Istio and the other meshes went a step further and wrote the rules against an authenticated service identity. Service A may call service B, A shows its badge, and the mesh checks the rule. Once you can tell an agent apart from the identity it used to ride on, the same enforcement applies to the agent.

The second reason is tracing. Agents sometimes behave unpredictably. Picture a fully autonomous agent that decides a production service is too slow because it’s written in an old framework. It rewrites the service in Rust and removes the original. Technically it solved your problem, and you still won’t like the outcome. You want to know when that happened, where, and why, and you can only trace it back if the agent had its own identity.

The third reason gets overlooked. You can stop an agent without stopping a person. When an agent misbehaves under a human’s credentials and nothing distinguishes its sessions from the human’s, the blunt option is to block that human from every system and wait while you find out where their agents are. Finer controls exist on AWS: an IAM policy with an explicit deny can match the source identity carried by the agent’s sessions, which blocks those sessions and leaves the human’s own access alone. The deny has to target whatever sets the agent’s sessions apart, so it only helps if those sessions were tagged that way to begin with. A separate agent identity makes that the default, so you can act on the agent and the engineer keeps working.

Cutting an agent off still isn’t instant. AWS distinguishes stopping new identity issuance from denying access the agent already holds, and credentials already issued for use outside AWS can stay valid until they expire. Plan for both steps, and keep credential lifetimes short. The same goes for a malicious agent that gets into your systems. If it had to obtain an identity to get in, you can trace it and act on that one identity.

Responsibility Stays With the Human

An agent identity makes it clear who acted. It doesn’t move the responsibility away from the person who set the agent up.

“why should we hire you and not AI to do this job? And the guy saying, Because I’m criminally liable.”

One of us saw that joke the day we recorded. The punchline is that the candidate gets the financial director job. Like most jokes, it’s partly true.

Who is responsible when an AI agent deletes production?

Operationally, you are, for the access, even when the agent performed the action. We mean ownership of the outcome, not a legal ruling, which depends on your contracts and jurisdiction. Say Claude Code, Kiro or another coding agent on your laptop picks up production credentials you happen to have lying around and runs something destructive. Every system log shows you. Without an agent identity the agent is impersonating you, and nothing tells the two of you apart. With one, you at least have a record showing that the agent did it, not you.

That record doesn’t clear you.

“You’re still liable for having the production credentials that are capable of destructive actions lying around, available for the agent.”

And you were the one who should have been supervising the agent. The OAuth 2.0 Token Exchange spec (RFC 8693) draws a useful line here. With impersonation, A “is B” to anyone who receives the token. With delegation, A keeps its own identity and acts on B’s behalf, with both the subject and the actor stated explicitly, the actor in an act claim. An agent identity on its own only covers the actor: it names the agent. Recording which human started the action takes a separate delegation mechanism, such as that token exchange. Neither of them takes away the human’s responsibility for what the agent was able to reach.

So in practice, identity is only half the control. The other half is making sure destructive credentials aren’t within reach in the first place. We covered one way to do that with Paul Stack in episode #27: the agent asks for an operation, and something deterministic holds the token.

Badges Exist, Doors Don’t

Inside a single cloud, the provider that issues the badge also runs the door that accepts it. Outside, agents mostly have the badge.

Why can’t you onboard an agent like an employee?

Because the systems an employee logs into expect a human with a browser. That’s the trap we ran into building the first version of B.O.R.I.S. It’s present in Slack, where people ask it questions and it answers from the context layer. Slack is the human-to-machine interface, and MCP is the machine-to-machine one. Putting an agent in Slack makes “onboard it like an employee” feel natural, and a lot of startups building agents you can hire think the same way. It doesn’t get you far. An employee gets a Google Workspace address, and Workspace acts as their identity provider. When they open the corporate portal, a browser pop-up runs the OpenID Connect flow. Agents mostly can’t get through that browser step. They need machine-to-machine token exchange, and a Google Workspace identity won’t take them through that authorization flow.

We felt this with OpenClaw. We don’t advise giving an agent access to your own mailbox, so people created separate mailboxes for their agents. One of us did that for his Hermes agent, and then had to create accounts for it in GitHub and every other system. That takes time, and under per-seat pricing it costs money. What the agent needed was a small subset of permissions, not a full identity. OpenAI’s dots, which reached the EEA, the UK and Switzerland on December 2, will soon get email addresses of their own, so the pattern is going mainstream.

Crossing organizations makes it harder. Suppose a penetration testing company sends its agent to work inside a client’s systems. The client has never seen that identity, and identifiers can collide. That calls for something like a digital passport, verifiable against shared public key infrastructure. Proposals exist, but nothing settled yet. One individual IETF submission, OAuth on-behalf-of for AI agents, described how an agent could carry its own identity alongside the user who asked it to act. It expired on February 27, 2026, so read it as an idea, not as active standards work.

MCP Became the Door, Unevenly

Some of those doors are already being built, in a protocol that wasn’t designed to be one.

Does MCP solve agent authorization?

Partly, and inconsistently. MCP has become the way agents get into SaaS systems: streamable HTTP with authorization on top. It wasn’t exactly designed for that, but it works well enough that we got in. The MCP authorization spec is based on OAuth 2.1. In practice, implementations vary widely. Across the clients and servers we connect to, we’ve seen OAuth 2.1, OAuth 2.0 machine-to-machine tokens and static client credentials. Each one went its own way, which makes the setup both brittle and complex. The industry has a lot of work to do here.

One of us thinks this is what you get when a protocol is vibe coded. Humans defined MCP, but machines have done much of the implementing, and each implementation chose its own standards. Protocols used to take years of human design before anyone relied on them. MCP may be the first one built largely by machines from the start.

Some vendors are working on the problem from the other side. Linear marks actions made through MCP, so you can see that something was probably done by an agent, not a person. That’s a label, not an identity, but it’s useful today. We mentioned the same feature in episode #26 as a way to filter agent noise.

Pricing will have to change too. If a team sends a fleet of agents through one integration, per-seat models charge for seats nobody needs. Agents aren’t machines and they aren’t humans, and the commercial side still prices them as one or the other.

Guardrails Work for Code Too

An identity is a guardrail you put in place before you let an agent loose. The same applies to the code agents write.

Is AI-generated code bad, or is it how you use it?

Mostly how you use it. We ran the /improve-codebase-architecture skill from AI Hero on two services written entirely by AI. It applies domain-driven design thinking and suggests where structure could improve. Picture a diagram of boxes joined by arrows in completely random order. That was the current state. The proposed version was a straight line of boxes. If you want to lose your illusions about code AI writes unattended, try it.

We don’t like the word “slop”. The model isn’t being sloppy. The person using the tool without any preparation is. If you put in the guardrails, the thinking and the architecture, the model can fill in the blueprint you give it. If you did no prior work and just vibe coded, you get the box diagram.

Pointing the model at documentation and best practices helps. Tell it which rules to follow, the ones people have refined over years. AI multiplies whatever it starts from. A small mess becomes a big mess. Paul Stack’s team writes its architecture rules down and checks them automatically, as we covered in episode #27, and it’s the same reason foundations come first in episode #16.

How AWS, Google Cloud and Microsoft Build It

Google Cloud was one of the first to roll out agent identities. Microsoft introduced Entra Agent ID in public preview in May 2025, gave it a lot of attention at Ignite in November, and it is now generally available. AWS announced its version on December 1 at re:Invent. The implementations differ in ways that matter when you design around them.

How does agent identity work on AWS?

The IAM role stays, and the agent’s identity rides along on the role session. IAM agent and workload identity is in preview for Amazon EKS, Amazon Bedrock AgentCore Runtime and AgentCore Gateway. The role still defines what the agent can do. Before issuing credentials, AWS STS checks facts about the workload, such as the cluster, namespace and service account, or the runtime and session, then adds a SPIFFE identity to the session. CloudTrail records it in userIdentity.onBehalfOf.subject, so you see the role and the workload identity that used it. Not every event carries that field. For those, the logging guide says to take the event’s access key ID and find the originating AssumeRole event, which carries the identity. Policies can match it through the aws:OriginIdentity/Subject condition key, and the launch post also covers JWT-SVID and X.509-SVID credentials for services outside AWS. The trust policy doesn’t change, and workloads without an identity association keep working as before. It’s existing tooling, though you can argue about whether people know IAM.

How fine the identity is depends on the identity template you configure. With the default EKS templates, agents sharing a service account share one identity. Custom identity paths can use finer-grained attested facts, down to a runtime or a single session, so scope the identifier to the level you want to trace.

On Google Cloud, every agent gets its own SPIFFE-based principal, and you grant roles to it directly. Unlike service accounts, these identities can’t be impersonated or shared by default, and they don’t allow long-lived keys. One gotcha: the identity comes from the hosting resource’s ID. Deleting and recreating the agent gives it a new principal; deployment can succeed while subsequent API calls fail authorization until you grant the new principal access. The old principal’s bindings stay behind as inactive grants until you remove them. Watch for this in a blue-green or Terraform pipeline that recreates the hosting resource.

Microsoft Entra Agent ID uses Entra OAuth tokens instead of SPIFFE, with agent identities created as special service principals from an agent identity blueprint. OAuth can serve workload identity through JWTs, but it’s mostly associated with human sign-in.

All three work well within a single cloud. Between clouds, identity federation exists, but how much of the agent’s identity survives the hop is still being worked out.

What This Means for Teams

Agent identity separates who acted from whose credential was used. You can then scope permissions to an agent, trace what it did, and cut it off without locking out a person, as long as the identity is as fine-grained as the agent you want to track and you account for credentials that outlive the cutoff. It won’t make a human less responsible for what the agent could reach, and outside your cloud it’s only as useful as the doors that accept it. Inside AWS, Google Cloud and Azure you can start now.

Four things to do this week:

  • List the agents that run on someone’s credentials. Coding agents on laptops, CI pipelines on personal access tokens, autonomous agents sharing one IAM role without distinct session names. Each one is an action you can’t attribute.
  • Remove standing production credentials from developer laptops. If a coding agent can reach a credential capable of destructive actions, you own that access, whatever identity the action runs under.
  • Try agent identity on one workload. On AWS, enable the preview for an EKS service account or an AgentCore runtime, then query CloudTrail for userIdentity.onBehalfOf.subject. On Google Cloud, before you rely on it, make sure any pipeline step that recreates the hosting resource also grants roles to the new principal and removes the old principal’s bindings.
  • Check what your MCP servers record. Find out whether actions made through MCP show up as yours, as labeled agent actions, or as a separate identity.

Common Questions, Answered

How do I tell in CloudTrail whether an AI agent or a human made an AWS change?

Give the agent an IAM agent and workload identity, in preview for Amazon EKS and Amazon Bedrock AgentCore, then look for userIdentity.onBehalfOf.subject on its events. CloudTrail then shows both the IAM role and the workload identity that used it. If an event lacks the field, trace its access key ID back to the originating AssumeRole event. An agent that uses your own SSO session can’t be told apart from you, because it’s acting with your credentials.

What is the difference between a service account and an agent identity?

A service account can be shared by many workloads and impersonated. On Google Cloud, agent identities are per-agent SPIFFE-based principals that, by default, can’t be shared or impersonated and can’t use long-lived keys. On AWS, the role still grants permissions, and the identity records which workload used it at the level the template sets: the default EKS templates work at the service account, and custom templates can go down to a single session. To scope, trace or cut off one specific agent, the identifier has to be scoped to that agent.

How do I keep production credentials out of a coding agent’s reach?

Start by not leaving them lying around. Standing production credentials on a laptop where a coding agent runs are available to that agent, and any destructive action it takes is logged as you. When an agent does need to touch production, have it request the operation from something deterministic that holds the token, as we discussed in episode #27. Give the agent its own identity with scoped permissions, so its access is limited and traceable to it.

Resources

  • AWS IAM agent and workload identity (preview): how attestation, role sessions and onBehalfOf fit together. Read it before designing around the preview, which may change.
  • AWS IAM: workload identity templates: the default templates and the custom identity paths that use finer-grained attested facts. Read it before you decide whether agents sharing a service account should share an identity.
  • AWS IAM: attestation policies for workload identity: the difference between stopping new identity issuance and denying access an agent already holds. Read it before you write the runbook for cutting off a misbehaving agent.
  • Google Cloud: Agent Identity overview: per-agent SPIFFE principals and how they differ from service accounts. The identity and permission lifecycle section explains why deleting and recreating an agent’s hosting resource needs new grants and why the old principal’s inactive bindings need cleanup.
  • Microsoft Entra Agent ID: agent identity blueprints: Microsoft’s OAuth-based model, where blueprints act as templates for agent service principals. Useful for comparing with the SPIFFE approach AWS and Google Cloud took.
  • SPIFFE overview: the workload identity standard that service meshes and two of the three clouds build on. It explains why the “badge for every workload” model predates agents by years.
  • RFC 8693: OAuth 2.0 Token Exchange: defines delegation versus impersonation and the act claim. It shows why naming the agent and recording the human who started the action are two separate pieces.
  • MCP authorization specification: what the protocol asks for (OAuth 2.1, protected resource metadata, resource indicators). Compare it with what your MCP servers actually implement.

Give your AI tools the context they're missing

Partners

Need a HIPAA foundation first?

Talk to our partner network