AI Explainers Security

AI Agent Access Governance: How Okta and Amazon Bedrock AgentCore Control What Agents Do for Each User

AI agent access governance with Okta Cross App Access and AgentCore Identity ties every agent action to one user's permissions, checked at each request.

Illustration of layered identity checks representing AI agent access governance for an agent acting on behalf of a user
AI-generated editorial illustration.

When an AI agent updates a ticket or reads a customer record, whose permissions is it using? The answer an identity team wants is the signed-in user’s, and only for the applications an administrator has approved. AI agent access governance is the practice of enforcing that answer on every request, and AWS describes one way to do it by combining Okta Cross App Access (XAA) with Amazon Bedrock AgentCore.

This article digests the first part of an AWS Machine Learning Blog tutorial. AWS shows how to build a task agent on Amazon Bedrock AgentCore that acts for signed-in users through XAA and AgentCore Identity. The walkthrough is aimed at builders, but the design is worth understanding for anyone who has to approve or audit agents in their organization.

What problem does Cross App Access solve for agents?

AWS points to a gap left by two common patterns: per-app OAuth consent and shared service accounts. Neither clearly answers which agent may act for which user in which application, or how to stop it. XAA moves that decision into the identity provider (IdP), the system that manages sign-ins and permissions. In Okta, the agent is registered, an administrator approves the applications it may reach, and Okta evaluates policy each time the agent asks to act for a user.

AWS reports test results for how quickly changes take effect. After an administrator removed a user’s assignment to the agent, Okta refused the agent’s new requests for that user within about one second. Tokens already issued expired within five minutes. These are AWS’s own measurements from its test setup.

Who does what: governance plane and execution plane

AWS splits the work in two. Okta is the governance plane: it decides which agent may act for which user against which resource. Amazon Bedrock 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.

Two AgentCore capabilities carry the load. The AgentCore runtime, where the agent and its tool servers run, validates Okta’s grant. AgentCore Identity redeems that grant for a short-lived access token using credentials the agent code never sees, and stores the token in a token vault. AWS measured that AgentCore Identity added about 0.6 seconds to a request that took about 30 seconds end to end.

Three tokens, three decisions

A token here is a signed digital pass that proves something to the system receiving it. AWS explains that each request carries three, and each records a different decision:

  • The ID token says who the user is.
  • The Identity Assertion JWT Authorization Grant (ID-JAG) is Okta’s decision that this agent may act for this user. It is single-use and expires in five minutes.
  • The access token is what the resource, in this case the tool server, actually accepts. It names both the user and the agent, carries the user’s groups, and lasts five minutes.

AWS also mentions a fourth item, a workload access token, which AgentCore Identity uses internally to bind the agent’s workload identity to the user. Neither Okta nor the resource sees it, so it is not counted among the three.

How one request flows from sign-in to tool call

AWS lays out the sequence in six steps. Take a user asking the task agent to update a ticket:

  • The user signs in to the web front end, called a backend for frontend (BFF), with OpenID Connect through the agent’s linked Okta app.
  • For each request, the BFF exchanges the user’s ID token for an ID-JAG at Okta, authenticating as the agent. Okta checks that the agent is active, that the user is assigned to it, and that an administrator connected it to the target authorization server for the requested scopes.
  • The BFF invokes the agent on AgentCore runtime with the ID-JAG as its bearer token. The runtime’s authorizer accepts only ID-JAGs that Okta issued to this agent.
  • The runtime obtains the workload access token from AgentCore Identity and hands it to the agent code.
  • The agent asks AgentCore Identity for an access token. AgentCore Identity redeems the ID-JAG at the resource’s Okta custom authorization server, authenticated as the agent, and Okta returns the five-minute access token.
  • The agent calls the Model Context Protocol (MCP) servers with that token. MCP is a standard way for agents to reach tools. The task manager checks that a registered agent obtained the token and that the user’s group and scope allow the requested tool.

Because the final check lives in the tool, a user’s authority is enforced where the action happens, not only at the front door.

What you need before building

AWS lists an AWS account with access to Amazon Bedrock AgentCore and an Anthropic Claude model in the US West (Oregon) Region, plus an Okta org with Cross App Access for AI agents and API Access Management. AWS used an Okta Integrator Free Plan org. The tooling includes Python, the AWS CLI, boto3, the AgentCore CLI, and the AgentCore Python SDK. You also need permission to create AgentCore resources and IAM roles.

AWS estimates the walkthrough takes about an hour and notes that AgentCore charges for what you use, pointing readers to its pricing page. The tutorial builds on an AWS sample in the AgentCore samples repository on GitHub. AWS states that the snippets show the pattern conceptually, are not a complete deployable solution, and are sample code for non-production use that should go through security and legal review.

Registering the agent in Okta

The Okta side needs four things: an authorization server for the resource, the agent itself, a connection between them, and a policy that admits the agent’s grant. AWS describes the first steps in the Okta Admin Console:

  • Create a custom authorization server for the resource with the audience api://task-manager and the custom scopes xaa:read and xaa:write.
  • Request only the resource’s custom scopes. Okta rejects an ID-JAG request that includes OpenID Connect scopes such as openid or profile, returning an invalid_scope error, so a request needs at least one custom scope and no OpenID Connect scopes.
  • Add a groups claim to the access tokens, filtered to groups that start with xaa-. This claim carries each user’s authority to the tools.
  • Under Directory and AI Agents, register the agent manually, optionally assign an owner, and create a linked OpenID Connect app with a client secret before activating the agent.

The excerpt available for this article ends partway through the registration steps, so later details of the Okta setup and the AgentCore Identity configuration are not covered here.

Where this sits among familiar approaches

The design is easiest to understand against the two patterns AWS says it improves on. A shared service account gives an agent one broad identity, so the application cannot tell which person a request came from. Per-app OAuth consent asks each application to handle approval separately, which leaves the organization without one place to see or revoke an agent’s reach. XAA instead puts the approval and the revocation in the IdP, while AgentCore Identity keeps the resulting credentials out of the agent’s own code.

A concrete example: removing a user’s access

Picture an employee who moves teams and loses access to the task agent. An administrator removes that user's assignment to the agent in Okta. Any access token the agent already holds keeps working until its five-minute lifetime ends. That gap is a design property, and it shows why short token lifetimes matter in this model.

Limits to keep in mind

The timing figures come from AWS’s own tests on a free-tier Okta org and a single sample agent, so results in a production environment with different load, policies, or network paths may differ. The tutorial is explicitly sample code for non-production use. Teams evaluating the approach should check the current Okta and AWS documentation for feature availability, plan requirements, and costs before relying on it.

Part 2 of the series, per AWS, puts the same governance behind Amazon Bedrock AgentCore Gateway with Cedar policies, a second agent on Amazon Elastic Kubernetes Service, and an audit trail in Amazon CloudWatch.

Sources