|
1 | 1 | --- |
2 | | -layout: default |
| 2 | +layout: home |
3 | 3 | title: Home |
4 | 4 | nav_order: 1 |
5 | 5 | description: "Expose OAuth 2.0-secured APIs as MCP tools for AI agents while preserving user authentication context" |
6 | 6 | permalink: / |
7 | 7 | --- |
8 | 8 |
|
9 | | -# Amazon Bedrock AgentCore Gateway User Federation |
| 9 | +# AgentCore Gateway User Federation |
| 10 | +{: .fs-9 } |
10 | 11 |
|
11 | | -This sample demonstrates how to expose existing OAuth 2.0-secured APIs as MCP (Model Context Protocol) tools for AI agents while preserving user authentication context using Amazon Bedrock AgentCore Gateway Interceptors. |
| 12 | +Expose OAuth 2.0-secured APIs as MCP tools for AI agents while preserving user authentication context using Amazon Bedrock AgentCore Gateway Interceptors. |
| 13 | +{: .fs-6 .fw-300 } |
12 | 14 |
|
13 | | -## Key Features |
| 15 | +[Get Started](SETUP.md){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } |
| 16 | +[View on GitHub](https://github.com/aws-samples/sample-bedrock-agentcore-gateway-user-federation){: .btn .fs-5 .mb-4 .mb-md-0 } |
14 | 17 |
|
15 | | -- **USER_FEDERATION pattern** - JWT propagation through the entire request chain |
16 | | -- **Three-layer JWT validation** - Runtime, Gateway, and API Gateway |
17 | | -- **Gateway Interceptor** - Authorization header injection to downstream APIs |
18 | | -- **CUSTOM_JWT authorizer** - Works with any OIDC provider (Okta, Auth0, Azure AD, Amazon Cognito) |
| 18 | +--- |
19 | 19 |
|
20 | | -## Documentation |
| 20 | +## Overview |
21 | 21 |
|
22 | | -| Guide | Description | |
23 | | -|-------|-------------| |
24 | | -| [Architecture](ARCHITECTURE.md) | System architecture and component overview | |
25 | | -| [Setup](SETUP.md) | Local development setup guide | |
26 | | -| [Deployment](DEPLOYMENT.md) | AWS deployment instructions | |
27 | | -| [Security](SECURITY.md) | Security considerations and best practices | |
| 22 | +This sample demonstrates the **USER_FEDERATION** pattern for Amazon Bedrock AgentCore, enabling AI agents to access user-specific data through existing OAuth 2.0-secured APIs while maintaining the original user's authentication context. |
28 | 23 |
|
29 | | -## Quick Start |
| 24 | +### Key Features |
30 | 25 |
|
31 | | -```bash |
32 | | -git clone https://github.com/aws-samples/sample-bedrock-agentcore-gateway-user-federation.git |
33 | | -cd sample-bedrock-agentcore-gateway-user-federation |
34 | | -./deploy.sh |
35 | | -``` |
| 26 | +| Feature | Description | |
| 27 | +|:--------|:------------| |
| 28 | +| **USER_FEDERATION** | JWT propagation through the entire request chain | |
| 29 | +| **Three-layer validation** | Independent JWT validation at Runtime, Gateway, and API Gateway | |
| 30 | +| **Gateway Interceptor** | Authorization header injection to downstream APIs | |
| 31 | +| **OIDC Compatible** | Works with Okta, Auth0, Azure AD, Amazon Cognito | |
36 | 32 |
|
37 | | -See the [Setup Guide](SETUP.md) for detailed instructions. |
| 33 | +--- |
38 | 34 |
|
39 | | -## Architecture Overview |
| 35 | +## Architecture |
40 | 36 |
|
41 | | -The solution uses Amazon Bedrock AgentCore Gateway with a custom Interceptor Lambda to bridge the gap between AI agent tool calls and your OAuth-protected APIs. The Gateway validates incoming JWTs but doesn't automatically forward them to downstream targets. The Interceptor Lambda handles this critical step. |
| 37 | +The solution uses Amazon Bedrock AgentCore Gateway with a custom Interceptor Lambda to bridge the gap between AI agent tool calls and your OAuth-protected APIs. |
42 | 38 |
|
43 | 39 | ### Components |
44 | 40 |
|
45 | 41 | | Component | Purpose | |
46 | | -|-----------|---------| |
| 42 | +|:----------|:--------| |
47 | 43 | | Amazon CloudFront | Hosts frontend and routes API requests | |
48 | 44 | | AWS App Runner | Backend service that invokes AgentCore | |
49 | | -| Amazon Bedrock AgentCore Runtime | Hosts and executes the AI agent | |
50 | | -| Amazon Bedrock AgentCore Gateway | MCP server exposing APIs as tools | |
| 45 | +| AgentCore Runtime | Hosts and executes the AI agent | |
| 46 | +| AgentCore Gateway | MCP server exposing APIs as tools | |
51 | 47 | | Interceptor Lambda | Extracts JWT and injects into outbound requests | |
52 | 48 | | Amazon API Gateway | HTTP API with JWT authorizer | |
53 | 49 |
|
54 | | -## Security |
| 50 | +--- |
55 | 51 |
|
56 | | -This project implements defense-in-depth security with JWT validation at multiple layers. See the [Security Guide](SECURITY.md) for details. |
| 52 | +## Quick Start |
| 53 | + |
| 54 | +```bash |
| 55 | +git clone https://github.com/aws-samples/sample-bedrock-agentcore-gateway-user-federation.git |
| 56 | +cd sample-bedrock-agentcore-gateway-user-federation |
| 57 | +./deploy.sh |
| 58 | +``` |
| 59 | + |
| 60 | +See the [Setup Guide](SETUP.md) for detailed instructions. |
| 61 | + |
| 62 | +--- |
| 63 | + |
| 64 | +## Documentation |
| 65 | + |
| 66 | +- [Architecture](ARCHITECTURE.md) - System architecture and component overview |
| 67 | +- [Setup](SETUP.md) - Local development setup guide |
| 68 | +- [Deployment](DEPLOYMENT.md) - AWS deployment instructions |
| 69 | +- [Security](SECURITY.md) - Security considerations and best practices |
| 70 | + |
| 71 | +--- |
57 | 72 |
|
58 | | -## License |
| 73 | +## About |
59 | 74 |
|
60 | | -This library is licensed under the MIT-0 License. See the [LICENSE](https://github.com/aws-samples/sample-bedrock-agentcore-gateway-user-federation/blob/main/LICENSE) file. |
| 75 | +This project is maintained by [AWS Samples](https://github.com/aws-samples) and licensed under the [MIT-0 License](https://github.com/aws-samples/sample-bedrock-agentcore-gateway-user-federation/blob/main/LICENSE). |
61 | 76 |
|
62 | | -## Contributing |
| 77 | +### Contributing |
63 | 78 |
|
64 | | -See [CONTRIBUTING](https://github.com/aws-samples/sample-bedrock-agentcore-gateway-user-federation/blob/main/CONTRIBUTING.md) for information on how to contribute to this project. |
| 79 | +Contributions are welcome! See [CONTRIBUTING.md](https://github.com/aws-samples/sample-bedrock-agentcore-gateway-user-federation/blob/main/CONTRIBUTING.md) for guidelines. |
0 commit comments