TL;DR: API gateways and directories can observe AI agents but cannot govern what they do at execution time, especially when agents share credentials or touch regulated systems, according to Stacklok. Identity-first control moves identity into the workload path so every model call, tool call, and spend event resolves to a named agent, which changes accountability and enforcement.
At a glance
What this is: This is a blog analysis arguing that AI agent security requires identity-first controls because perimeter observation and directory authentication do not govern agent actions once execution begins.
Why it matters: It matters because practitioners need to decide whether agent governance stops at visibility or extends into execution-time enforcement, attribution, and spend accountability for autonomous workflows.
Context
AI agent identity governance breaks down when tools can confirm that a principal logged in, but not what that principal did after execution began. In this model, identity is treated as an execution-time control, not just an onboarding or access-checking step.
The article contrasts observer tooling such as API gateways and directories with identity-first governance that binds every action to a named agent. That distinction matters for AI agents that touch regulated systems, shared service accounts, or workloads where attribution and spend control must follow the action itself.
For agentic AI programmes, the real question is whether governance can still rely on perimeter visibility and login records. If the control plane cannot attribute, meter, and stop actions mid-flow, it is observing behaviour rather than governing it.
Key questions
Q: Where do API gateways and directories fail to govern AI agents in practice?
A: They fail at execution time. Gateways can inspect requests and directories can authenticate a principal, but neither owns what the agent does after access is granted. If the control must block, attribute, or meter an action while it is happening, governance has to move into the workload path rather than remain outside it.
Q: Why do shared service accounts create risk for AI agents?
A: Shared service accounts hide which agent made a request, so they collapse accountability and make incident response slower. They also turn credential exposure into a single compromise path for multiple workloads. For agentic systems, every identity should be attributable to a specific workload or delegated task.
Q: How can teams tell whether identity-first control is working for agents?
A: A useful signal is whether every meaningful action resolves to a named agent and can be traced to a team, workflow, and cost center without ambiguity. If attribution only exists at the account level, the programme still relies on observation rather than governance. Another signal is whether disallowed actions can be stopped before completion, not only investigated later.
Q: What should security teams do when agent actions must be governed, not just observed?
A: They should enforce identity where the workload runs, use short-lived credentials, and reserve perimeter tools for visibility rather than control. That approach is most important for regulated data, production changes, and spend-bearing automations. If the business cannot tolerate ambiguous attribution, the control model is not strong enough yet.
Technical breakdown
Why API gateways and directories stop at observation
An API gateway sees requests at the perimeter, applies policy, and logs that a call occurred, but it does not own the agent's runtime. A directory authenticates the principal and provisions access, then hands off a token and exits the decision path. That means both tools are useful observers, but neither can govern what the agent touches, which tool it selects next, or whether an action should be blocked after the session begins. The limitation is structural: they are adjacent to execution, not inside it.
Practical implication: treat gateways and directories as visibility and access layers, not as the place where agent action control is enforced.
Identity-first governance moves control into the workload path
Identity-first governance binds the agent's identity to the workload itself, so each model call and tool call resolves to a named identity by design. In the article's framing, the agent runs inside a pod created by the control plane, which puts governance in the path of execution rather than beside it. That changes attribution, enforcement, and spend tracking because the control is tied to the running workload, not to traffic inspection or a one-time login event. The practical effect is that policy follows the action, not the audit trail.
Practical implication: place policy enforcement where the workload executes, so action approval and attribution happen before the call completes.
Short-lived tokens and named identities reduce replayable trust
The article describes short-lived tokens carrying both user ID and role, with no long-lived credentials left sitting around to be shared or replayed. That matters because shared service accounts collapse agent-level accountability into account-level noise, especially when multiple agents reuse the same identity. Named workload identities preserve separation between agents, while ephemeral tokens limit the window in which credentials can be abused or reused. The design goal is not just authentication, but controlled, attributable execution.
Practical implication: minimise shared service accounts and prefer short-lived, named credentials that preserve per-agent accountability.
NHI Mgmt Group analysis
Identity-first governance is the point where AI agent security stops being observational and starts being enforceable. Gateways and directories still matter, but only as adjacent control points that record or permit activity. Once an agent can act inside a workload, the question becomes whether identity is part of execution or only part of the audit trail. Practitioners should treat execution-time identity as the governing model for any agent that can affect systems, data, or spend.
Shared service accounts create an accountability collapse for agents at scale. When multiple agents operate under one account, the control plane can see activity but cannot assign action, intent, or cost to a specific agent. That is not a visibility problem alone, it is a governance failure because accountability becomes an account property instead of an actor property. The implication is that fleets of agents need named identities if teams expect to answer who acted, on whose behalf, and at what cost.
Perimeter authentication was designed for principals that enter once and then act within a bounded session. That assumption fails when agent identity must persist through every model call and tool call, because the decision boundary is no longer the login event. Identity-first controls break that assumption by making the workload itself the locus of governance. The implication is that agent programmes need to be designed around runtime enforcement, not login-time approval.
Spend attribution is now an identity control, not just a finance report. When each action resolves to a named agent, cost can be decomposed to agent, team, and workflow instead of remaining trapped at the shared account level. That makes budgeting, chargeback, and anomaly detection part of identity governance rather than a downstream analytics exercise. Practitioners should treat cost resolution as a sign that identity has been successfully bound to execution.
Identity-first control defines the boundary between low-risk observation and high-risk governance. Low-privilege read-only agents can often be monitored acceptably with existing tools, but regulated actions, production changes, and spend-bearing workflows move the requirement from visibility to enforcement. The market is converging on a simple truth: once an AI agent can materially act, the control plane has to govern the actor, not just the traffic.
What this signals
Runtime identity is becoming the control boundary for agentic AI programmes. Teams that keep treating gateways and directories as sufficient will end up with better logs, not better governance. The practical shift is to decide which workflows need execution-time enforcement because that is where accountability, stop conditions, and chargeback now converge.
For identity teams, the important programme question is no longer whether an agent can authenticate, but whether the workload itself is the governed actor. That reframes access reviews, privilege design, and lifecycle management around named agents instead of shared accounts or anonymous automation.
For practitioners
- Map agent controls to execution time Identify which AI agent workflows still rely on perimeter checks or directory authentication alone, then classify whether those workflows require policy enforcement in the runtime path instead.
- Eliminate shared agent accounts where attribution matters Replace blanket service accounts with named workload identities for agents that touch regulated data, production systems, or chargeable actions so every event stays attributable.
- Require short-lived credentials for agent sessions Use ephemeral tokens that carry user ID and role so there is no durable credential for replay, reuse, or uncontrolled sharing across agents.
- Separate observation from governance Keep API gateways and directories for authentication, logging, and policy visibility, but do not treat them as sufficient when the business requirement is to stop or attribute action before completion.
Key takeaways
- AI agent governance fails when visibility tools are mistaken for enforcement points, because they can confirm activity without controlling it.
- Identity-first controls make the workload itself the governed actor, which improves attribution, cost allocation, and execution-time enforcement.
- Shared service accounts are acceptable only in low-risk cases; regulated or production-facing agents need named identities and short-lived credentials.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF, NIST Zero Trust (SP 800-207) and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | The article is about AI agents acting under identities and the risk of shared or misbound privilege. |
| Recommendation — Bind agent actions to distinct identities and prevent shared privilege from collapsing accountability. | ||
| OWASP Non-Human Identity Top 10 | NHI-05 — Overprivileged NHI | Shared service accounts and execution-time overreach are central to the article's control model. |
| Recommendation — Limit agent credentials to the minimum scope needed and remove shared accounts where attribution matters. | ||
| NIST AI RMF | GOVERN — AI Governance and Accountability | The piece is fundamentally about who governs AI agent actions and how accountability is assigned. |
| Recommendation — Establish governance roles that define who owns agent decisions, enforcement, and accountability. | ||
| NIST Zero Trust (SP 800-207) | Continuous verification and least privilege | The article argues for enforcement inside the execution path rather than trust at the perimeter. |
| Recommendation — Apply continuous verification so agent access is enforced at action time, not only at login. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | The article focuses on who can do what once authenticated, especially for agentic workloads. |
| Recommendation — Review entitlements for agent workloads and align them to the actions they must perform. | ||
Key terms
- Identity First Control: Identity first control is the practice of making identity, ownership, access scope, and lifecycle the starting point for security design. For AI agents and NHIs, it means approval, review, and expiry are built into the identity model rather than added later as a compensating control.
- Workload Identity: The identity assigned to a software workload, such as a containerised application, serverless function, or microservice, enabling it to authenticate to other services without storing static credentials.
- Generic Service Account: A generic service account is a shared non-human identity used by applications, scripts, or automated jobs in cloud environments. It is created for convenience, but it often lacks clear human ownership and individual accountability. If poorly governed, it can retain broad access and become difficult to audit or contain.
- Execution-Time Policy Enforcement: Execution-time policy enforcement checks each proposed action immediately before it runs and blocks anything outside policy. This approach matters for autonomous agents because it still works when the agent is in a permissive mode or operating on untrusted inputs. It turns written rules into a real control.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an identity security programme, it is worth exploring.
Published by the NHIMG editorial team on August 18, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org