New Security Challenges in the Age of AI Agents: 'Who acts for whom, and to what extent?'
As generative AI agents begin to update tickets, read customer records, and perform actual tasks, corporate identity teams are faced with fundamental questions. "Which agent can perform what actions on behalf of which user in which application?" Existing app-specific OAuth consents or shared service accounts cannot answer this question. The solution presented by AWS and Okta in a two-part technical blog series is clear: Governance should be separated from execution, implementing Zero Trust principles at the identity provider (IdP) layer and the agent runtime layer.
Part 1: Separation of Governance Plane and Execution Plane
Okta XAA — Centralization of Governance
Okta Cross App Access (XAA) registers agents with Okta, allows administrators to approve the applications that agents can access, and evaluates policies at runtime, serving as the governance plane. According to the original text, after an administrator removes a user's agent assignment, Okta denies the agent's new request for that user within approximately 1 second, and already issued tokens expire within 5 minutes. This indicates that permission changes are reflected in near real-time.
"Okta is the governance plane: it decides which agent might act for which user, against which resource. AgentCore Identity is the execution plane: it holds the agent's credentials, turns Okta's decision into a token the resource accepts, and keeps both identities in that token."
Three Tokens, Three Decisions
In the architecture of Part 1, each request carries three tokens, each recording different decisions.
| Token Type | Issuer | Meaning | Expiration/Characteristics |
|---|---|---|---|
| ID Token | Okta (OIDC) | User identity verification | Standard OIDC ID token |
| ID-JAG | Okta (Organization Authentication Server) | Okta's decision that Agent A can act on behalf of User U | Single use, 5-minute expiration, issued via RFC 8693 token exchange |
| Access Token | AgentCore Identity → Okta Custom Authentication Server | Credentials accepted by the resource (MCP server) | Stored in a token vault not visible to the agent code |
BFF (Backend for Frontend) exchanges the user's ID token for agent authentication with the Okta organization authentication server for ID-JAG (RFC 8693). The JWT authenticator of the AgentCore runtime only accepts the ID-JAG issued to that agent. Subsequently, AgentCore Identity exchanges the ID-JAG for access tokens for each target and stores them in the token vault.
Measurable Performance Overhead
In the AWS testing environment, AgentCore Identity added approximately 0.6 seconds to an end-to-end request of about 30 seconds. This suggests that the latency introduced by the governance layer is operationally negligible.
Part 2: From Single Agent to Enterprise Scale — Gateway, Policy, Observability
AgentCore Gateway: Single Entry Point, Runtime Neutrality
The intentionally small topology of Part 1 (1 agent, 2 MCP servers, each with built-in authentication checks) leads to the issue of "what worked for three becomes a task in an enterprise environment with hundreds of agents and thousands of tools." The key change in Part 2 is the introduction of the Amazon Bedrock AgentCore Gateway as a single front door.
The Gateway performs the following roles:
- Inbound authenticator: only accepts ID-JAG issued to Agent A
- Cedar policy evaluation: checks policies before querying the list of tools and invoking tools
- Exchanges ID-JAG for target-specific access tokens through AgentCore Identity only when policies are allowed
- Does not perform ID-JAG exchange when policies are denied (prevents unnecessary token issuance)
Cedar Policies: Tool-Level Permission Control
Cedar policies bind each tool to the scopes delegated by the agent and Okta. The MCP server verifies user groups and scopes as in Part 1, recording each decision with an `authz.check` span. This enables detailed audit trails of "which agent called which tool in which user context."
Amazon EKS Agent: Proof of Runtime Agnosticism
In Part 2, a second agent (Agent B) running on Amazon EKS follows the same Gateway path with its own Okta identity. This demonstrates that the Gateway does not care about the execution location of the agent (AgentCore runtime vs EKS). The cost of the EKS control plane is $0.10 per hour, with additional node costs and EKS Auto Mode management fees.
Observability: Integrated Audit Trails
All hops export OpenTelemetry spans to AgentCore Observability, and Amazon CloudWatch Transaction Search collects them. At the same time, Okta streams System Logs to CloudWatch via Amazon EventBridge. As a result, Okta's decisions, Gateway's policy evaluations, and MCP server's authorization checks can be analyzed in a single view.
XAA vs User-Specific OAuth Consent: Comparative Analysis
The series compares user-specific OAuth consent flows for applications that cannot accommodate Okta XAA. While XAA controls agent actions based on prior admin approval without user intervention, OAuth consent requires user consent for each request. The operational efficiency advantage of XAA becomes clear at enterprise scale.
Implementation Time and Cost Structure
Implementing the additions of Part 2 on top of Part 1 takes approximately 90 minutes. The cost model is usage-based:
- EKS Control Plane: $0.10/hour + node + EKS Auto Mode management fee
- AgentCore Features: usage-based billing (separate for AgentCore runtime, Identity, Gateway, Policy, Observability)
- Detailed pricing can be found at [Amazon EKS Pricing](https://aws.amazon.com/eks/pricing/) and [Amazon Bedrock AgentCore Pricing](https://aws.amazon.com/bedrock/agentcore/pricing/)
So What? — Implications for Developers, Enterprises, and Industries
This architecture transitions AI agent governance from 'post-monitoring' to 'pre-control.' Three implications are significant:
1. Developer Perspective: By externalizing tool-level permissions with Gateway and Cedar policies, authentication logic does not need to be hardcoded into agent code. The governance layer remains intact even when agent frameworks or models are replaced. 2. Security and Compliance Perspective: Measurable SLAs of 1 second for permission revocation and 5 minutes for token expiration can meet regulatory requirements (least privilege, immediate access revocation). Integrated audit logs simplify forensic investigations and compliance reporting. 3. Architect Perspective: The runtime-agnostic Gateway pattern allows integration of AgentCore runtime, EKS, and future on-premises or other cloud agents under a single governance plane. This is a prerequisite for multi-cloud and hybrid agent strategies.
---
*This report synthesizes the content of the two-part series (Part 1, Part 2) from the AWS Machine Learning Blog. All figures and technical details are based on the original source.*