Meet us at Gartner IAM, Booth #408, Dec 7–9, and join our executive dinner with Joy Chik

Your Agents Need an Identity, Not a Key

With AWS adopting SPIFFE for agents at re:Invent 2026, short-lived, attested workload identity is becoming the way to keep secrets out of prompts.

, Product Management, NewCoreDec 03, 20266 min read

On October 21, a Dragos researcher put an AWS key into one AI prompt and sent it to one inference provider. The key existed nowhere else, yet someone used it the next day and was still using it weeks later. Secrets are meant to be used, and anything that gets used eventually gets exposed.

That key was bait in a five-month study by HD Moore and the Dragos research team, published November 19. They sent about two million prompts, each carrying credentials that existed nowhere else. People touched them. The longer an agent holds a key, the more likely that key leaks.

What did Dragos find?

Attackers were inside at least three AI hosting providers. None of the three knew until Dragos told them. Planted AWS keys sent to one provider were stolen in late October, tested within hours and used for tens of thousands of AWS API calls.

Resellers read prompts without breaking anything. Sellers on an AI inference marketplace listed models at the lowest price, turned on request logging and waited.

Privacy settings were not honored. A Chinese AI lab fetched the secret links from more than half of the prompts sent to its models, including roughly two-thirds of those marked "no data collection" or Zero Data Retention.

On November 22, OpenRouter said it had off-boarded three providers, removed 125 endpoints from Zero Data Retention eligibility and notified potentially affected customers, and that it was not breached itself. (OpenRouter, The Hacker News)

Why will a static key leak?

Because an agent sends what it can read, and you do not control where it goes. As Dragos puts it, "a privacy flag only binds the first hop," and "AI agents will happily send whatever they can read, including credentials." A key in a prompt, config or environment ends up in the context. The context ends up in every log, cache and router between you and the model. The fix is to stop giving agents keys.

What does workload identity mean for an agent?

Workload identity means the agent proves who it is through where it runs, not through a secret someone stored for it.

A static key is a house key: anyone with a copy gets in, for as long as the lock stays the same. Workload identity is a boarding pass, issued only after your booking checks out, for one passenger and one flight, and useless once the gate closes. A bait key still working three weeks later is a house key nobody thought to change the lock for.

The platform the agent runs on already knows it: the cluster, the function, the account, the machine certificate. It can vouch for the agent. The agent trades that proof for a credential that is short-lived and scoped to one job. Nothing long-lived sits in its prompt, config or environment. If the context leaks, any credential in it is close to expiring.

Workload identity proves what the agent is, but it is not enough on its own. The agent also needs an accountable owner and, for a Personal Agent, the person it acts for. That is the argument we made in Your Agents Aren't Service Accounts (October 13, 2026).

Why workload identity works for agents, with the right practices

Workload identity removes the secret, and these practices keep that identity scoped, owned, audited and revocable through the agent's life.

  1. 1.When an agent is created. It gets its own identity from the runtime, never a copied key, and a named owner from day one.
  2. 2.While it works. Each task gets a scoped credential that expires in minutes. Higher-risk actions go to a person to approve and, for a Personal Agent, to the person it acts for.
  3. 3.When something looks off. Every call traces to the agent and its owner, so a canary hit or a strange CloudTrail entry points to one agent, not a shared role.
  4. 4.When it is done or compromised. Revoke the identity, not a key, so it stops working everywhere at once, and retire agents with no owner.

See it in action: how AWS handles agent identity

Cloud providers already support workload identity: Google Cloud and Microsoft Entra through federation, and AWS through IAM roles. On AWS today:

  • One role per agent, no access keys. The runtime vouches for the agent: EKS Pod Identity on Amazon EKS, an execution role on AWS Lambda, or IAM Roles Anywhere outside AWS. (AWS IAM best practices)
  • Short sessions, tight limits. STS sessions can be as short as 15 minutes. Scope each role to the agent's job and cap it with a permissions boundary. (AssumeRole)

Where AWS is heading: an identity for each agent.

As part of re:Invent 2026, AWS announced agent and workload identity for IAM, in preview, on December 1. Each agent gets its own SPIFFE-compliant identity, issued only after the service running it attests the workload. The identity rides on the IAM role session, so IAM policies and CloudTrail see which agent made each request, even when many agents share one role. Outside AWS, the agent presents the same identity as a short-lived JSON Web Token or X.509 certificate. AWS building on SPIFFE, the open workload identity standard from the CNCF, is a strong signal. We expect more vendors to follow with standard, attested workload identity for agents.

The way we see it, with an identity per agent, a suspicious CloudTrail call or a canary seeded per agent points to the agent whose context leaked, and to its runtime and, if you name identities that finely, its session. You learn which agent's prompts reached which provider, and what to cut off. With no static secret in the agent's context, a provider-side attacker also has less to take. It is a preview and subject to change, so one IAM role per agent is still the pattern to run today. (AWS What's New, IAM User Guide)

What to do after the Dragos findings

  1. 1.Rotate what may have been exposed. Search system prompts, agent config and environment variables for keys and tokens. If OpenRouter notified you, or a provider you use has posted a notice, rotate every secret that may have passed through those prompts, and check CloudTrail for which role or access key made the calls. (OpenRouter)
  2. 2.Give each agent its own identity. Replace stored keys with one identity per agent. On AWS today, that means one IAM role per agent, with the shortest session the task allows and a permissions boundary. Evaluate AWS IAM's agent and workload identity preview, which gives each agent a SPIFFE-compliant identity on top of its role.

Let the runtime vouch for the agent, keep credentials short-lived, and give every agent its own identity and owner. If an agent can read a secret, assume someone else can too.

Stronger agent identity, better access decisions

A per-agent identity can tell you which agent made a call. In AWS, though, the owner of the agent isn't readily apparent. Often the agent was deployed by a CI pipeline or by a person who has since left the company. We solve a hard problem: when an AI agent in AWS calls a model provider, a SaaS app or an internal tool, NewCore ties that call to an owner and limits the agent to what its task requires.

With NewCore, each agent gets a named owner. Each agent has an identity, and its calls are governed through the NewCore Secure MCP Gateway. The NewCore token broker holds the app credential and the gateway attaches it to the forwarded call, so the agent doesn't need to hold the app credential. A Personal Agent acts within the access of the person it represents, and a sensitive action can require that person's approval based on your organization's policy.

Workload identity gives stronger evidence of who an agent is than a static key does. That stronger proof supports a higher level of trust, which can inform decisions about what privileges to grant and for how long. Access still depends on the organization's policies, not trust alone.

Together, workload identity provides the proof, and NewCore brings that proof into the access decision.

Cite this blog

Mark, G. & Orot, R. (2026, December 3). Your agents need an identity, not a key. NewCore. https://newcore.com/blog/agents-need-an-identity-not-a-key

Subscribe to our blog.

New posts, sent when published.