Amazon Bedrock AgentCore Gatewayでマルチテナントエージェントの代理トークン交換を実装するImplement on-behalf-of token exchange for multi-tenant agents with Amazon Bedrock AgentCore Gateway
匿名の公開いいねです。記事の保存・お気に入りではなく、Featured、Top 3、重要度、掲載順位には影響しません。仕組みとプライバシーAnonymous public likes are reactions, not saved articles or bookmarks. They do not affect Featured, Top 3, importance, or listing order.How it works and privacy
- Bedrock AgentCore GatewayのOBO(On-Behalf-Of)トークン交換機能を使い、マルチテナント環境でエージェントが安全にユーザーの権限を委譲してAPIを呼び出す方法を解説。
- テナント分離とセキュリティを保ちながら柔軟なエージェント連携が実現できる。
This article explains how to use On-Behalf-Of token exchange in Amazon Bedrock AgentCore Gateway to let multi-tenant agents securely delegate user credentials when calling downstream APIs, enabling robust tenant isolation in agentic workflows.
本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (aws.amazon.com) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (aws.amazon.com).
要約と収集メタデータに基づく AI 解説。元記事全文の転載・翻訳ではありません。AI explainer based on the summaries and collected metadata, not a copy or translation of the full source article.
AWSは、生成AIエージェント基盤であるAmazon Bedrock AgentCoreのGateway機能で、マルチテナント環境向けの「代理トークン交換(On-Behalf-Of、OBO)」を実装する手法を公式ブログで解説した。複数の利用企業やユーザーが同居する環境において、エージェントがユーザー本人の権限を安全に引き継ぎ、外部APIを呼び出すための実践的な指針となる内容だ。
AgentCore Gatewayは、AIエージェントとツールやAPIをつなぐ中継層として機能し、認証・認可やプロトコル変換を担う。ここで鍵となるOBOトークン交換は、OAuth 2.0のトークン交換仕様(RFC 8693)に基づく仕組みで、エージェントが受け取ったユーザーのアクセストークンを、下流サービス向けの別のトークンへと安全に交換する。これにより、エージェント自身の広範な権限ではなく、あくまでユーザー本人が持つ範囲の権限でAPIが実行される点が重要とされる。
マルチテナントで課題となるのがテナント分離である。あるテナントのユーザー情報や操作権限が別のテナントへ漏れ出すことは許されない。OBO方式ではトークンにテナントやユーザーの識別情報とスコープが刻まれるため、権限の過剰付与を避けつつ、誰の代理で何を実行しているかを追跡しやすくなる。監査ログとの組み合わせにより、コンプライアンス要件への対応も見込める。
背景には、AIエージェントが自律的に外部システムを操作する「エージェンティックワークフロー」の広がりがある。従来はエージェントに固定の権限を与える設計が多かったが、それでは最小権限の原則を守りにくく、情報漏えいや権限昇格のリスクが指摘されてきた。ユーザー単位で権限を委譲するOBOは、この課題への現実的な解となりうる。
同種の取り組みは業界全体で進んでいる。Model Context Protocol(MCP)のようなエージェント連携の標準化や、各社のIDプロバイダーによるトークン交換対応が拡大しており、AgentCore GatewayもOAuthベースの相互運用性を意識した設計と見られる。企業がエージェントを本番運用へ移す際、認証・認可の設計は避けて通れない論点であり、今回の解説はその実装パターンを具体化する試みといえる。
Amazon Web Services has published guidance on implementing on-behalf-of (OBO) token exchange within Amazon Bedrock AgentCore Gateway, a pattern aimed at helping developers build multi-tenant agentic applications that can call downstream APIs while preserving the identity and permissions of the end user. As organizations move generative AI agents from prototypes into production, controlling precisely what an agent is permitted to do—and on whose behalf—has become one of the central security challenges, especially when a single deployment serves many customers at once.
The core problem is delegation. An AI agent frequently acts as an intermediary: a user asks it to retrieve records, update a support ticket, or query a service, and the agent must call an API to complete the task. In a naive design, the agent might use a single, broadly scoped service credential for every request. That approach undermines tenant isolation, because the downstream API cannot distinguish which user or tenant initiated an action, and it risks granting the agent more access than any individual user should hold. OBO token exchange addresses this by having the agent trade the user's token for a new token scoped to the specific downstream resource, while still representing the original user rather than a generic machine identity.
AgentCore Gateway sits between agents and the tools or APIs they consume, functioning as a managed layer that handles authentication, authorization, and protocol translation. According to the AWS description, the Gateway can perform token exchange based on the OAuth 2.0 Token Exchange specification (RFC 8693), accepting an inbound user token and exchanging it with an identity provider for a token that is valid against the target API. This allows the downstream service to apply its own access controls using the delegated identity, so permissions are evaluated per user rather than through a shared credential. In practice this keeps the principle of least privilege intact across the agent workflow.
In a multi-tenant setup, each tenant typically maps to its own identity provider configuration, or to a distinct set of scopes and claims. The Gateway is configured to recognize the tenant context carried in the inbound token and to request the appropriate exchange for that tenant. The flow generally involves a subject token that represents the user, credentials that represent the agent or client, and a requested audience or scope for the destination resource. Because the exchanged token encodes the user's identity, audit logs on the downstream API can attribute activity back to a specific person and tenant, which supports both compliance requirements and incident investigation.
This capability is part of the wider AgentCore family, which AWS positions as a set of building blocks for deploying and operating agents at scale. Alongside the Gateway, the suite includes components commonly referenced as Runtime for execution, Memory for state, Identity for credential handling, and Observability for monitoring. The Gateway and Identity pieces are the most relevant to token exchange, since together they manage how agents obtain and present credentials. AgentCore Gateway also exposes tools in a way compatible with the Model Context Protocol (MCP), an increasingly adopted standard for connecting language models to external systems, which means the same delegation model can apply across MCP-based tool calls.
The broader context is an industry-wide effort to define identity for AI agents. Traditional OAuth flows were designed for users and applications, not for autonomous software acting on a user's behalf across multiple hops. Vendors including Microsoft and Okta, the latter through its Auth0 identity platform, have introduced their own approaches to agent authorization, and standards bodies continue to refine token exchange and delegation patterns. AWS's use of RFC 8693 aligns AgentCore with an established specification rather than a proprietary scheme, which is likely to ease integration with existing enterprise identity providers such as Amazon Cognito, Okta, and Microsoft Entra ID.
For teams evaluating the approach, the practical prerequisites appear to include a configured identity provider that supports token exchange, clearly defined scopes for each downstream API, and a tenant model that maps users to their respective boundaries. Developers should also weigh operational considerations such as token lifetimes, refresh handling, and the latency added by an extra exchange step. Used carefully, the OBO pattern offers a route to combining flexible agent-to-API integration with the tenant isolation and traceability that regulated environments typically demand, though the security outcome still depends on how rigorously scopes and identity mappings are defined.
ポコとTECHガイドPoko & TECH Guide
ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.
- ポコPokoOBOトークン交換って何? エージェントがユーザーの代わりに動く仕組みなの?What is OBO token exchange? Is it a way for an agent to act on a user’s behalf?
- TECHガイドTECH Guide簡単に言うとじゃな、ユーザーの権限をエージェントへ安全に委譲し、代わりにAPIを呼べるようにする仕組みじゃよ。Simply put, it securely delegates a user’s permissions to an agent, allowing it to call APIs on that user’s behalf.
- ポコPokoそれって、複数のテナントが同じ環境を使うときに何が嬉しいの?What’s the benefit when multiple tenants share the same environment?
- TECHガイドTECH Guide記事によれば、テナント同士を分離してセキュリティを保ちつつ、エージェントが必要なAPIと柔軟に連携できる点じゃよ。According to the article, agents can work flexibly with needed APIs while preserving security and keeping tenants isolated.
- ポコPokoなるほど! ユーザーの権限を安全に引き継ぎながら、テナントごとに分けて動けるんだね。Got it! The agent can use delegated user permissions securely while keeping each tenant separate.
- TECHガイドTECH Guideその通りじゃ。実装ガイドとして、権限委譲とテナント分離をどう両立するかが見どころじゃよ。Exactly. As an implementation guide, its key focus is how to combine delegated permissions with strong tenant isolation.