AivexaNewsSearch
AI news for builders and product teamsChecked every hour

Govern AI agent access with Okta Cross App Access and Amazon Bedrock AgentCore – Part 1

Collected Nov 6, 2026

AWS published the first of a two-part walkthrough showing how an organization can register an AI agent in Okta and have Okta decide, per request, which user that agent may act for and which applications it may reach. The mechanism is Okta Cross App Access (XAA); the enforcement on the AWS side runs on two capabilities of Amazon Bedrock AgentCore, its agent runtime and AgentCore Identity. The post is written for identity engineers and agent developers and centers on a task-management agent that calls two Model Context Protocol (MCP) servers, all of them hosted on AgentCore runtime. Part 2 is slated to extend the same governance to AgentCore Gateway with Cedar policies, a second agent on Amazon Elastic Kubernetes Service and an audit trail in Amazon CloudWatch.

The design splits responsibilities. Okta acts as the governance plane: it decides what the agent may do for whom, against which resource. AgentCore Identity acts as the execution plane: it stores the agent's credentials, exchanges Okta's decision for a token the resource will accept, and keeps both identities inside that token. Agent code never handles the Okta client secret or talks to Okta's token endpoint directly.

Each request carries a chain of three tokens, each recording a different decision. The user's ID token establishes who the person is. An Identity Assertion JWT Authorization Grant (ID-JAG) represents Okta's decision and is single-use with a five-minute expiry. The access token is what the downstream resource actually accepts. A fourth, internal token — the workload access token minted by AgentCore runtime — binds the agent's workload identity to the user; it never leaves AWS and is not one of the three.

The flow begins when a user signs in through OpenID Connect at a backend-for-frontend (BFF) using the agent's linked Okta app. For every request, the BFF exchanges the user's ID token for an ID-JAG at Okta's org authorization server, authenticating as the agent via RFC 8693 token exchange. Okta verifies that the agent is active, that the user is assigned to it, and that an administrator has connected the agent to the target authorization server for the requested scopes. The BFF then calls the agent on AgentCore runtime with the ID-JAG as bearer token; the runtime's JWT authorizer accepts only ID-JAGs Okta issued to that agent. The agent requests an access token from AgentCore Identity, which redeems the ID-JAG at the resource's custom authorization server using the JWT authorization grant (RFC 7523), again authenticating as the agent. Okta returns a five-minute access token naming both user and agent and carrying the user's groups. The agent calls the MCP servers with that token, and each tool checks that a registered agent obtained it and that the user's group and scope permit the action.

Configuration in Okta covers a custom authorization server for the resource, with audience api://task-manager and scopes xaa:read and xaa:write, plus a groups claim filtered to groups starting with xaa-. Registration of the AI agent happens under Directory, AI Agents in the Admin Console; it creates a linked OpenID Connect app sharing one client ID with the agent, and users must sign in through that app. The custom authorization server needs an access policy rule allowing the agent's JWT Bearer grant with a five-minute token lifetime. Two misconfigurations surfaced in testing: requests that include OpenID Connect scopes such as openid or profile are rejected with invalid_scope, and omitting the grant type from the policy produces no_matching_policy.

On the AWS side, the credential provider is created through the bedrock-agentcore-control API with vendor CustomOauth2, a discovery URL pointing at the custom authorization server, and onBehalfOfTokenExchangeConfig set to JWT_AUTHORIZATION_GRANT. AgentCore Identity stores the client secret in a service-managed AWS Secrets Manager secret that can be rotated, or it can reference a secret the team already manages by ARN. Private Key JWT is offered as an alternative to a shared secret. Each Okta agent needs its own provider because Okta binds both exchanges to the client named in the ID-JAG; redeeming one agent's ID-JAG as another fails with a client_id mismatch.

Two implementation details are worth flagging for anyone building this. The AgentCore Python SDK keeps the workload access token in BedrockAgentCoreContext rather than in request headers; the AWS team's first version searched the headers, found nothing, and fell back to a separate identity call on all 21 requests it checked. Reading from the context avoids that. The agent's IAM role must also be narrowed to its own workload identity, token vault entry and provider secret, because AgentCore Identity does not bind workload identities to credential providers within an account. The post notes that the ARN segment must use the hyphenated form oauth2credentialprovider, since every call otherwise failed with AccessDeniedException. A second nuance: the runtime's JWT authorizer needs allowedClients set to the agent's client ID; without it, another agent's ID-JAG was admitted with HTTP 200 and failed only later at the exchange, whereas with it the runtime returned HTTP 401.

In the tests, the token AgentCore Identity returned matched one redeemed directly at Okta claim for claim: sub was the user, cid and act identified the agent, scp held the connection's scopes, groups held the user's groups, and the lifetime was 300 seconds. AgentCore Identity added roughly 0.6 seconds to a request taking about 30 seconds end to end, most of which was model and tool work. Across 10 requests, the agent's first call redeemed the ID-JAG in about half a second, and a second call for the other MCP server returned the same token in a median of 58 milliseconds without redeeming the single-use ID-JAG again. A new ID-JAG for the same user yielded a new token, so each request reflects Okta's latest decision.

Governance in operation was measured too. 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, and tokens already issued expired within five minutes. Because all users of a connection receive its scopes, per-user authority travels in the groups claim — in the test, Alice carried xaa-readers, Bob xaa-writers and Carol none — and tools enforce it. Two gaps were found: a write check that accepted tokens lacking a groups claim let Carol create tasks, and before an agent check was added, a plain token-exchange token from a service app with no act claim created a task for Bob. The token vault caches the access token for the rest of a request, and Okta's System Log records each grant with the agent as actor.

The walkthrough is estimated at about an hour and builds on AWS sample 08-okta-xaa-delegation-chain, with 06-okta-xaa showing the token request in Python. The snippets are described as conceptual rather than a deployable solution, and the code is sample code for non-production use. Stated prerequisites include an AWS account with AgentCore and an Anthropic Claude model in US West (Oregon), an Okta org with XAA and API Access Management, Python 3.11, AWS CLI version 2, boto3 1.43, AgentCore CLI 0.31.1 and AgentCore Python SDK 1.24.1; AgentCore is billed by usage.

Why it matters: Teams shipping agents that touch real records now have a documented pattern for per-user, per-agent delegation that lives in the identity provider rather than in per-app OAuth consent or shared service accounts. The measured revocation window — roughly a second for new requests, at most five minutes for live tokens — is the number to weigh when setting token lifetimes. Inference: the operational complexity sits in IAM scoping, provider-per-agent setup and claim checks inside every tool, so plan for identity engineering time and expect the second part's audit trail to matter for security review.

Read at AWS Machine Learning Blog

Based on reporting from the original publisher. Visit the source for full context and later updates.

Publisher excerpt

An AI agent that acts for a user raises an identity question that per-app OAuth and service accounts leave open: which agent may act for which user, and how you stop it. In this first post of two, you build a task agent on Amazon Bedrock AgentCore that governs access through Okta Cross App Access and AgentCore Identity, and enforces each user's authority.