AI Cloud Architect

Implement on-behalf-of token exchange for multi-tenant agents with Amazon Bedrock AgentCore Gateway

AWSHow-to by Dhawalkumar Patel, Sahil Thapar and Aswin VasudevanAWS Artificial Intelligence Blog

Building multi-tenant agents with Amazon Bedrock AgentCore and Apply fine-grained access control with Bedrock AgentCore Gateway interceptors establish the conceptual foundation for on-behalf-of (OBO) token exchange in agentic systems. This post is the implementation guide. It walks through a complete multi-tenant OBO setup against Okta, shows the JSON Web Token (JWT) claim transformations on each hop, and demonstrates how audience binding produces defense in depth that scales across tenants.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

AgentCore Gateway can exchange a user's inbound token for a tenant-bound token (RFC 8693) before each tool call, so the agent does not implement the exchange itself.

Who it is for

Architects building multi-tenant agents on AgentCore who need per-user identity and tenant isolation with Okta.

Key points

  • Requires access_token as subject_token_type with Okta; the default jwt is rejected.
  • Okta ignores group-based scope caps during token exchange, so per-user permission uses an Expression claim (authorized_scopes) checked by the resource server.
  • DPoP must be disabled on the provider and delegate Okta apps, which removes holder-of-key protection.
  • The post's reference implementation is Okta-specific; other IdPs need per-provider configuration checks.

The same at other vendors

Timeline

Posts about Amazon Bedrock AgentCore Gateway, oldest first.

  1. Blog postExtending MCP support for Amazon Bedrock AgentCore Gateway · AWS · Blog post
  2. How-toBuilding a secure auth code flow setup using AgentCore Gateway with MCP clients · AWS · How-to
  3. Generally availableIntroducing Web Search on Amazon Bedrock AgentCore · AWS · Announcement
  4. Generally availableAWS WAF adds support for Amazon Bedrock AgentCore Gateway · AWS · Announcement
  5. This postImplement on-behalf-of token exchange for multi-tenant agents with Amazon Bedrock AgentCore Gateway
  6. Update to an existing featureHow AgentCore Gateway supports the MCP 2026-07-28 spec · AWS · Announcement
  7. How-toConfigure rate limits for AI traffic on AgentCore gateway · AWS · How-to
  8. How-toSecuring AI agents with temporal policies in Amazon Bedrock AgentCore · AWS · How-to
  9. How-toGovern AI agent tool access with Amazon Bedrock AgentCore Gateway · AWS · How-to
Show all 29 posts
  1. New featureAmazon Bedrock AgentCore Gateway supports AWS PrivateLink invocation and invocation logging · AWS · Announcement
  2. How-toSecure ingress connectivity to Amazon Bedrock AgentCore Gateway using interface VPC endpoints · AWS · How-to
  3. Blog postTransform your MCP architecture: Unite MCP servers through AgentCore Gateway · AWS · Blog post
  4. How-toBuild a biomedical research agent with Biomni tools and Amazon Bedrock AgentCore Gateway · AWS · How-to
  5. New featureApply fine-grained access control with Bedrock AgentCore Gateway interceptors · AWS · Announcement
  6. Blog postStreamline AI agent tool interactions: Connect API Gateway to AgentCore Gateway with MCP · AWS · Blog post
  7. How-toConnecting MCP servers to Amazon Bedrock AgentCore Gateway using Authorization Code flow · AWS · How-to
  8. How-toConfiguring Amazon Bedrock AgentCore Gateway for secure access to private resources · AWS · How-to
  9. What it explainsAmazon Bedrock AgentCore Identity now supports On-Behalf-Of (OBO) token exchange · AWS · Announcement
  10. How-toSecure AI agents with Policy and Lambda interceptors in Amazon Bedrock AgentCore gateway · AWS · How-to
  11. Blog postExtending MCP support for Amazon Bedrock AgentCore Gateway · AWS · Blog post
  12. How-toBuilding a secure auth code flow setup using AgentCore Gateway with MCP clients · AWS · How-to
  13. Generally availableIntroducing Web Search on Amazon Bedrock AgentCore · AWS · Announcement
  14. Generally availableAWS WAF adds support for Amazon Bedrock AgentCore Gateway · AWS · Announcement
  15. This postImplement on-behalf-of token exchange for multi-tenant agents with Amazon Bedrock AgentCore Gateway
  16. Update to an existing featureHow AgentCore Gateway supports the MCP 2026-07-28 spec · AWS · Announcement
  17. How-toConfigure rate limits for AI traffic on AgentCore gateway · AWS · How-to
  18. How-toSecuring AI agents with temporal policies in Amazon Bedrock AgentCore · AWS · How-to
  19. How-toGovern AI agent tool access with Amazon Bedrock AgentCore Gateway · AWS · How-to
  20. How-toBuild a multi-account AI agent with AgentCore Gateway and MCP · AWS · How-to
  21. Update to an existing featureAgentCore Gateway supports private TLS certificates for VPC endpoints · AWS · Announcement
  22. Blog postHow Eon built multi-cloud investigation with an MCP Gateway on Amazon Bedrock AgentCore · AWS · Blog post
  23. New featureAgentCore Gateway now supports Bedrock InvokeModel APIs and model fallback · AWS · Announcement
  24. New featureAWS Step Functions workflows now available as AI agent tools · AWS · Announcement
  25. Customer storyHow MoEngage turned over 400 APIs into agent tools with AgentCore Gateway · AWS · Customer story
  26. How-toServiceNow on-behalf-of token exchange with Bedrock AgentCore Gateway · AWS · How-to
  27. How-toGovern AI agent access with Okta Cross App Access and Amazon Bedrock AgentCore – Part 2 · AWS · How-to
  28. How-toConnect Amazon Bedrock AgentCore Gateway to private APIs in a hub-and-spoke network with centralized inspection · AWS · How-to
  29. Blog postProtect agent tool calls with Skyflow and Amazon Bedrock AgentCore Gateway · AWS · Blog post

Go deeper