TL;DR: Anthropic’s support for Workload Identity Federation pushes AI agents toward short-lived, cryptographically verifiable credentials instead of API keys, according to Defakto Security. The shift makes identity a central control for agent authentication, but it also exposes the deeper need for federated authorization, on-behalf-of context, and real-time policy.
At a glance
What this is: This is an analysis of how workload identity federation changes AI agent authentication by replacing API keys with short-lived, cryptographically verifiable credentials.
Why it matters: It matters because IAM teams now have a clearer baseline for governing agent access, but they also need to address authorization, on-behalf-of context, and dynamic policy after authentication.
Context
Workload identity federation is the use of short-lived, cryptographically verifiable credentials to authenticate a workload or agent without relying on reusable secrets. In this article, the governance gap is clear: AI agents have been treated as though secret storage and rotation were enough, when the real issue is how the identity is authenticated and authorized at runtime.
For IAM and NHI teams, the important change is not just that a different credential type is available. It is that agent authentication can now sit inside existing identity infrastructure instead of forcing a parallel API-key model, which changes how access is issued, audited, and revoked.
The article also shows why authentication alone does not complete agent governance. Once an agent can authenticate federatively, practitioners still need on-behalf-of context, real-time authorization, and policy decisions that reflect the actual runtime request, not just the credential used to get there.
Key questions
Q: How should security teams replace API keys for AI agents?
A: Security teams should replace API keys with short-lived federated identities wherever the target service supports them. The goal is to remove standing secrets from agent workflows and shift trust to verifiable identity assertions, policy checks, and lifecycle-managed access. That reduces blast radius, improves auditability, and makes compromise far less persistent.
Q: Why do long-lived API keys create more risk for AI agents?
A: Long-lived API keys increase risk because they persist across tasks, deployments, and runtime changes. If one is exposed in a container, pipeline, or config file, the attacker can reuse it until it is manually revoked. For AI agents, that persistence creates a larger blast radius than the workload actually needs.
Q: What breaks when on-behalf-of context is missing in agent governance?
A: Auditability breaks first, because teams can no longer tell whether a request came from a user, an intermediate agent, or an automated chain acting on delegated authority. Incident response also loses precision, since the team cannot reconstruct who initiated the decision. Without that context, accountability collapses into an attribution gap.
Q: How should IAM teams govern AI agent access differently from human developer access?
A: IAM teams should govern AI agents as runtime consumers of access, not as users with durable credentials. That means binding privileges to the task, not the identity alone, and maintaining approval, revocation, and logging around the access event. The control objective is to prevent the agent from becoming a standing secret holder.
Technical breakdown
Why workload identity federation changes agent authentication
Workload identity federation replaces reusable secrets with short-lived credentials that are issued and validated through federated identity infrastructure. For AI agents, that means the credential proves the workload’s identity without creating a standing API key that can be copied, replayed, or left behind in tooling. The mechanism matters because it reduces secret sprawl and aligns agent authentication with the enterprise identity stack already used for workloads and cloud services. It also narrows the gap between human identity governance and non-human identity governance, because the same federation principles now apply to agents acting at runtime.
Practical implication: move agent authentication onto federated workload identity rather than managing a separate secret-based access model.
Why API keys are the wrong baseline for AI agents
API keys are static bearer secrets. Whoever holds the key can use it until it is revoked, which creates a standing trust problem rather than a verified identity problem. In an agentic workflow, that is especially risky because keys often end up embedded in platforms, delegated to third parties, or copied across environments where offboarding is slow. The article’s point is not simply that keys are older technology. It is that the security model itself assumes long-lived secret custody, while agents need ephemeral proof of identity that can be evaluated at the moment of use.
Practical implication: treat API keys as a transitional liability for agents and retire them where federation is available.
Why authentication is not the same as authorization for agents
Federated authentication answers who or what the agent is. It does not answer whether the request should be allowed, on whose behalf it is being made, or whether the action fits current policy. That is why the article elevates on-behalf-of context and dynamic authorization as the next layer. In practice, an agent may authenticate correctly and still be over-authorised if the system does not preserve user context or evaluate the request in real time. This is where workload identity federation becomes a baseline rather than a complete control.
Practical implication: pair federated agent authentication with request-time authorization and preserved user context.
Threat narrative
Attacker objective: The attacker wants to turn stolen AI credentials into repeatable access and monetisable usage of provider and cloud resources.
- Entry occurs when AI platforms or agents rely on long-lived API keys that can be copied, stored, or leaked across environments.
- Credential abuse follows when stolen keys are reused to access AI providers, cloud services, or third-party tools with no fresh identity proof.
- Impact is financial and operational, because compromised keys can drive unauthorised usage, customer rotation campaigns, and service disruption.
Breaches seen in the wild
- Hugging Face Spaces breach 2024: Unauthorised access to Hugging Face Spaces may have exposed secrets users stored for AI apps; tokens were revoked and org tokens removed.
- OneLogin API flaw (CVE-2025-59363): A OneLogin API flaw exposed OIDC client secrets to anyone with an API key, including vendors (CVE-2025-59363); fixed with no customer impact.
Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
API-key identity is now a broken baseline for agentic access: The article confirms that static secrets no longer match how AI agents operate across platforms and services. A key can authenticate possession, but it cannot express runtime trust, delegated context, or revocation precision. For NHI governance, the implication is that secret-based agent authentication is not a mature end state but a transitional control that leaves standing exposure.
Workload identity federation shifts the centre of gravity from secret custody to federated trust: Once agents authenticate through short-lived credentials, the control problem moves from storing secrets safely to governing issued identities correctly. That brings agent access into the same lifecycle discipline used for other non-human identities, with issuance, scope, auditability, and revocation all becoming first-class concerns. Practitioners should treat federation as the starting point for governance, not the finish line.
On-behalf-of context is the missing accountability layer in agent governance: The article is right to separate authentication from the user or system the agent represents. Without preserved delegation context, audit trails collapse into “the agent did it,” which is operationally useless for incident response and access review. The governance problem is no longer merely who authenticated, but which human, workflow, or downstream agent initiated the action.
Dynamic authorization is becoming mandatory because agent velocity outpaces static access models: Annual reviews and fixed allow-lists were built for identities whose access state changes slowly. Agents can act quickly, recursively, and across multiple systems, so access decisions need current policy and request-time evaluation. The practical conclusion is that the authorisation layer has to become as dynamic as the workload it governs.
Ephemeral credential trust debt is the right named concept for this transition: Organisations that keep extending API-key patterns to agents accumulate trust debt every time they postpone federation, context propagation, and real-time policy. That debt is not technical debt in the abstract. It is the gap between a credential model built for static custody and an execution model built for runtime delegation. The longer teams wait, the more governance they will have to reconstruct later.
From our research library:
- Only 44% of organisations have implemented any policies to manage their AI agents, despite 92% agreeing that governing AI agents is critical to enterprise security, according to the 2026 Infrastructure Identity Survey.
- 69% of security leaders agree identity management must fundamentally shift to address agentic AI systems, according to the 2026 Infrastructure Identity Survey.
- Read next: Agentic AI Identity Guide
What this signals
Ephemeral credential trust debt: Every time teams extend API-key patterns to agents, they add more standing risk that has to be unwound later through federation, context propagation, and policy redesign. The issue is not just secret leakage. It is that the governance model remains tied to custody instead of runtime identity.
Identity programmes that already cover workloads should absorb agents into the same federation and audit model rather than building a parallel access path. That keeps issuance and revocation in one control plane and avoids the separate exception process that tends to become permanent.
The gap is now visible in adoption data: 19% of organisations give AI systems dramatically more access than human employees, nearly one one one one five?
For practitioners
- Replace agent API keys with federated workload identities Move AI agent authentication onto short-lived, cryptographically verifiable credentials issued through enterprise federation rather than reusable secrets stored in vaults or embedded in workflows.
- Preserve on-behalf-of context across agent chains Record the originating user, intermediate agents, and final action target so audit and incident response can reconstruct delegated decisions instead of seeing only the last acting agent.
- Move authorization to request time Evaluate each agent request against current policy, identity proof, and task context instead of relying on static entitlements or annual recertification cycles.
- Decouple agent identity from the agent platform Keep the identity source in the enterprise NHI estate so multiple tools and model endpoints federate from one governed control point rather than creating per-platform credential silos.
Key takeaways
- AI agents should not be governed with the same static secret patterns that were already failing for API keys and cloud workloads.
- The shift to federated identity makes runtime authentication stronger, but it also exposes the need for delegated context and request-time policy.
- Teams that keep API-key workflows for agents will carry standing trust risk longer than they need to.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-04 — Insecure Authentication | The article centres on replacing API-key authentication with federated workload identity for agents. |
| NHI-07 — Long-Lived Secrets | API keys are the long-lived secret pattern the article argues agents should stop using. | |
| NHI-05 — Overprivileged NHI | The article warns that agent credentials often carry more access than the task requires. | |
| Recommendation — Adopt federated authentication for agents to reduce reliance on reusable secrets. Retire long-lived agent secrets and move to short-lived credentials wherever possible. Constrain agent entitlements to the minimum scope needed for the current request. | ||
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | The article addresses how agent identity and privilege must be governed across delegated runtime actions. |
| Recommendation — Map agent authentication and delegated privilege controls to ASI03 before rollout. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | The article emphasises request-time authorisation and current policy for agent actions. |
| Recommendation — Apply PR.AA-05 to evaluate agent permissions against current policy at request time. | ||
Key terms
- Workload Identity Federation: A mechanism allowing workloads in one environment to authenticate to another using short-lived tokens rather than stored credentials, based on mutual trust between identity providers.
- On-behalf-of Context: The delegation information that shows which user, service, or agent initiated an action and which identities acted in the chain. It matters because agent authentication alone does not explain accountability, and without this context incident response cannot reliably trace who caused the change.
- Dynamic Authorization: Dynamic authorization is an access model that makes the trust decision at request time using current identity and context. It replaces reusable stored credentials with short-lived, policy-scoped tokens issued only after the workload proves itself.
- Ephemeral Credential Trust Debt: Ephemeral credential trust debt is the hidden risk that appears when short-lived tokens create a false sense of safety while permissions remain broad. The credential expires quickly, but the underlying blast radius stays large unless identity scope, revocation, and audit controls are also tightened.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
Published by the NHIMG editorial team on June 12, 2026.
Updated on October 6, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org