Ephemeral credentials for AI agents: under one hour, single tool, single dataset

AAnna PaykinaOctober 30, 20268 min read
Ephemeral credentials for AI agents: under one hour, single tool, single dataset

Standing privileges are like master keys that are always available, even when they are not needed. Paul Mezzera of Gartner used that image at Gartner IAM London 2026, and the follow-on was the point. Just-in-time access is like getting a key made only when you need it, and then it ceases to work. Most organizations still hand out master keys. A January 2026 study by CyberArk found that 91% of organizations have at least half of their privileged access always on, and only 1% have fully moved to just-in-time. AI agents inherit that posture by default, and then hold it at machine speed.

Agents need a tighter credential bound than people do, and an expiring credential is still only half a control. This piece is part of our series on AI identity and access management, which starts with what AIAM is. For policy-driven token issuance in general, see our guide on tokens as authorization decisions.

What are ephemeral credentials for AI agents?

Ephemeral credentials for AI agents are credentials issued for a single task or hop, scoped to one tool or one dataset, and valid for a short window, under an hour and often minutes, so that nothing an agent holds outlives the work it was doing. They are minted at the moment of need by a token service or identity broker, never stored in the agent's code or configuration, and expire on their own rather than waiting to be revoked. The goal is zero standing privilege for agents. Every credential is temporary, every scope is narrow, and a leaked token is already useless by the time anyone could use it.

The contrast is the long-lived API key or shared service account most agents run on today. Those are the master keys.

Standing privilege is the norm, and agents make it worse

CyberArk's January 2026 study also found that 45% of organizations apply the same privileged access controls to AI agents that they apply to humans, which means an agent gets the credential a person would get, with the lifetime a person would get, and then runs unattended. The gap between what an identity holds and what it uses is the attack surface, and agents widen it because they hold whatever they were given for as long as it lasts.

Jonathan Care of KuppingerCole was less diplomatic at EIC Berlin 2026. Long-lived secrets are the original sin. Stop minting them. His six families of non-human identity all fail in the same direction. Service accounts accrete privilege over time. API keys end up committed to source repositories. OAuth bearer tokens are more secure than a raw key but still over-broad and rarely revoked. Agents combine all three and add reasoning, and without scope-down, he said, they will hold the broadest permission possible.

The reason this is more than a hygiene issue for agents specifically is the failure pattern behind the documented incidents. Broad standing credentials plus untrusted input is the recipe. An agent holding a long-lived, wide-scoped token reads a poisoned document or a malicious tool description, and the credential does exactly what it was allowed to do, which was too much. The MCP security guidance is explicit that a server must not accept a token that was not issued for it. A credential that was minted for one tool and dies in minutes is the practical way to honor that.

The three bounds, under one hour, one tool, one dataset

Care's vendor checklist at EIC states the target in a form you can put in a procurement document. Credentials of one hour or less, scoped to a single tool call, not long-lived API keys. Three bounds, and each one closes a different hole.

Under one hour is the lifetime bound. It limits how long a leaked or stolen credential is useful, and it removes the need for a revocation to reach every enforcement point before the credential becomes harmless. In practice the production implementations run far below the ceiling. Uber's security engineering team described their agent tokens in Solving the Identity Crisis for AI Agents as valid for a single hop with a lifetime in the order of minutes. Care's own description of good practice was a token time-to-live in minutes, scope claims pinned to the calling tool, and an issuer signing every credential.

One tool is the scope bound. A token minted for the payment tool cannot be replayed against the database, because its audience claim names the payment tool and nothing else. Uber's tokens carry a specific audience per hop for exactly this reason. A token issued for one agent to call a second agent is valid only for that destination. The Coalition for Secure AI makes narrowing the rule for chains. Scope should narrow at each hop and must never expand beyond the delegating principal's permissions.

One dataset is the data bound. A tool scope says the agent may call the read-records tool. It does not say which records. Binding the credential, or the authorization decision it feeds, to a single dataset, tenant, or customer stream keeps a retrieval agent from pulling everything the tool can reach. We cover the retrieval version of this in access control for RAG.

ephemeral-credentials-ai-agents-three-bounds.png

JIT reduces standing privilege, JEP reduces excess, agents need both

Mezzera drew a distinction at IAM London that maps directly onto agent credentials. Just-in-time access reduces the risk of standing privilege, the credential existing when it is not needed. Just-enough privilege reduces the risk of excessive privilege, the credential being broader than the task. You need both, he said.

For agents the two halves are the lifetime bound and the scope bounds. Under one hour is just-in-time. One tool and one dataset are just-enough. An agent credential that expires in ten minutes but carries a scope that reaches every tool is still a master key with a short fuse. An agent credential scoped to one tool but valid for a year is a narrow key that never stops working. The Gartner presentation on IAM for AI agents at the same conference framed the objective as enabling access on demand to minimize persistent privileges, and the OWASP Non-Human Identities Top 10 lists long-lived credentials and over-privileged identities as separate entries because they are separate failures.

The practical shape is a token service or identity broker in the path. The agent never holds a durable secret. When it needs to act, the broker checks who it is and what it is allowed to ask for, and mints a credential bound to that one call. Uber's implementation centralizes minting in a single security token service and reports the exchange runs under 40 milliseconds at the 99th percentile across thousands of agents, which is the number to keep in mind when someone says per-call credentials are too slow.

Short-lived is not the same as authorized

An ephemeral credential answers when and roughly what. It does not answer whether. A token that is valid for ten minutes, scoped to the invoicing tool, and bound to one customer's dataset can still be presented by an agent that has been prompted into approving an invoice it should not approve, from a supplier that is not on the approved list, for an amount over the threshold. Every property of the credential is correct. The action is wrong.

The credential is an input to that decision, not the decision. Something at the point of action has to evaluate the agent, the user it acts for, the tool, the arguments, and the current context, and return allow or deny before the call runs. The CoSAI framework says enforcement must happen at every hop and at the last mile, the tool, the API, the data system, not only at the gateway that minted the token. Our co-founder Alex Olivier's shorthand from Identiverse 2026 is that an agent follows its access, not its instructions. Shrinking the access with ephemeral credentials narrows the blast radius. Deciding on each action is what stops the blast.

That is also why the bound matters even when the decision layer is strong. A policy check that denies a bad action is the control. A credential that expires in minutes and reaches one tool means that if the check is ever bypassed, misconfigured, or fails open for a moment, the damage is bounded by design. Both layers, and the agent is covered when either one is having a bad day.

How Cerbos fits

Your token service, identity broker, or vault mints the credentials. The Cerbos PDP, the policy decision point in the Cerbos authorization management platform, evaluates every action those credentials are presented for. When an agent presents a short-lived token to a tool, gateway, or MCP server, that component asks Cerbos whether this agent, acting for this user, may take this action on this resource with these arguments, and enforces the answer before anything runs. Policies are YAML with CEL conditions, so a rule can read the token's scope, audience, and delegation chain and still say no when the action itself is wrong, which is the case an expiring credential cannot catch on its own.

The bound and the decision reinforce each other in both directions. Because the PDP is stateless and answers in under a millisecond, checking every call is affordable even when every call carries a fresh credential. And because Cerbos policies can read the structured authorization details a broker attaches to a verified token, the one-dataset bound becomes a policy input rather than a convention, so the retrieval agent that may read one customer's records is denied the moment it asks for a second customer's. Cerbos Synapse fetches the agent's registry state and its sponsor from your systems at decision time, so a credential minted for an agent whose owner has since left is denied regardless of how many minutes it has left on the clock. Shortening the lifetime alone only narrows that window, which is the stale claims problem. Every decision is written to the audit log with the credential's scope, the action, and the policy version, which is how you prove after the fact that the ten-minute key was used for exactly one thing.

Standing credentials were a workable compromise when the thing holding them was a service that ran the same code every day. An agent that reasons, delegates, and reads untrusted input needs a credential that dies in minutes, reaches one tool, and touches one dataset. Then it needs something that decides whether the one thing it asked to do should happen at all.


Try Cerbos to see every agent action checked against your policies, even when the credential is valid, or book a call to talk through your agent credential model with our team.

The full AIAM series:

FAQ

Tagged in

Free policy workshop

Get your first Cerbos policy written by our team.

Book a session to talk through your requirements and walk away with a working policy.

Book a session