Skip to content

Commit 983596d

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/codebuild-remove-git-dependency
2 parents 7257716 + b58f646 commit 983596d

38 files changed

Lines changed: 4141 additions & 296 deletions

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- User identity propagation from frontend JWT through M2M tokens to Cedar policy evaluation at AgentCore Gateway
13+
- Cedar Policy Engine and Cedar Policy lifecycle management via Custom Resource Lambda (`infra-cdk/lambdas/cedar-policy/`)
14+
- Cognito V3 Pre-Token Generation Lambda for injecting custom claims into M2M tokens (`infra-cdk/lambdas/pretoken-v3/`)
15+
- Cedar policy file with custom claim-based access control — two versions for allow/deny testing (`gateway/policies/policy.cedar`)
16+
- Cognito ESSENTIALS tier for V3 Pre-Token Lambda trigger support
17+
- Direct Cognito `/oauth2/token` call with `aws_client_metadata` for user identity propagation (Approach 1) across all 6 agent patterns
18+
- Alternative `@requires_access_token` decorator approach (Approach 2) documented and commented out in each pattern's `tools/gateway.py`
19+
- Identity propagation and Cedar policy documentation (`docs/IDENTITY_POLICY.md`)
20+
- Cedar policy syntax, capabilities, and reference documentation (`docs/CEDAR_POLICY_GUIDE.md`)
21+
- Identity provider swap and Gateway interceptors guide (`docs/REPLACING_COGNITO.md`)
22+
1023
### Changed
1124

25+
- Updated all 6 agent patterns to pass `user_id` to Gateway client for identity-aware M2M tokens
26+
- Updated NAT Gateway documentation in `docs/DEPLOYMENT.md` for VPC mode with identity propagation
27+
- Updated root `README.md` architecture flow and project structure
1228
- Updated architecture diagram with latest logos (`docs/architecture-diagram/FAST-architecture-20260403.png`)
1329

30+
### Fixed
31+
32+
- ZIP packager: permissive pattern directory reader with recursive subdirectory support
33+
- ZIP packager: added `patterns/utils/` to deployment package
34+
- ZIP packager: renamed repo-root `tools/` to `agentcore_tools/` to avoid conflict with pattern's `tools/` directory
35+
- ZIP packager: dynamic entry point detection instead of hardcoded `basic_agent.py`
36+
- Cognito domain creation ordering to resolve "Internal error from downstream service" with newer CDK versions
37+
- `langgraph>=1.1.5` version bump to fix `ServerInfo` import error
38+
- `copilotkit>=0.1.84` version bump to fix compatibility with newer langgraph
39+
- Added placeholder graph in `ActorAwareLangGraphAgent.__init__` for newer copilotkit validation
40+
1441
## [0.4.1] - 2026-03-25
1542

1643
### Added

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ What comes next? That's up to you, the developer. With your requirements in mind
5555
The out-of-the-box architecture is shown above. The diagram illustrates the authentication flows across the stack:
5656
1. User login to the frontend (Cognito User Pool — Authorization Code grant): The user authenticates with Cognito via the web application hosted on AWS Amplify. Cognito issues a JWT access token for the session.
5757
2. Frontend to AgentCore Runtime (Cognito User Pool JWT validation): The frontend passes the user's JWT in the Authorization header. The Runtime validates the token against the Cognito User Pool.
58-
3. AgentCore Runtime to AgentCore Gateway (OAuth2 Client Credentials / M2M): The Runtime authenticates as a service using the OAuth2 Client Credentials grant — independent of the user's identity. AgentCore Identity manages token retrieval via the Token Vault.
58+
3. AgentCore Runtime to AgentCore Gateway (OAuth2 Client Credentials / M2M): The Runtime authenticates using the OAuth2 Client Credentials grant with user identity propagated into the M2M token via the Cognito V3 Pre-Token Lambda. The Gateway evaluates Cedar policies against the user's claims to enforce fine-grained access control.
5959
4. Frontend to API Gateway (Cognito User Pool JWT validation): API requests are authenticated using a Cognito User Pools Authorizer with the same user JWT from Flow 1.
6060

6161
### Tech Stack
@@ -100,7 +100,9 @@ fullstack-agentcore-solution-template/
100100
│ │ └── fast-main-stack.ts
101101
│ ├── bin/ # CDK app entry point
102102
│ ├── lambdas/ # Lambda function code
103+
│ │ ├── cedar-policy/ # Cedar Policy Engine lifecycle
103104
│ │ ├── oauth2-provider/ # OAuth2 Credential Provider lifecycle
105+
│ │ ├── pretoken-v3/ # Cognito V3 Pre-Token Generation Lambda
104106
│ │ ├── feedback/ # Feedback API handler
105107
│ │ └── zip-packager/ # Runtime ZIP packager
106108
│ └── config.yaml # Deployment configuration
@@ -130,6 +132,8 @@ fullstack-agentcore-solution-template/
130132
│ └── code_interpreter/ # AgentCore Code Interpreter integration
131133
│ └── code_interpreter_tools.py # Core implementation
132134
├── gateway/ # Gateway utilities and tools
135+
│ ├── policies/ # Cedar policy definitions
136+
│ │ └── policy.cedar # Department-based access control policy
133137
│ └── tools/ # Gateway tool implementations
134138
│ └── sample_tool/ # Example Gateway tool
135139
├── scripts/ # Deployment and utility scripts
@@ -151,7 +155,12 @@ fullstack-agentcore-solution-template/
151155
│ ├── AGENT_CONFIGURATION.md # Agent setup guide
152156
│ ├── MEMORY_INTEGRATION.md # Memory integration guide
153157
│ ├── GATEWAY.md # Gateway integration guide
158+
│ ├── IDENTITY_POLICY.md # Identity propagation & Cedar policy guide
159+
│ ├── CEDAR_POLICY_GUIDE.md # Cedar policy syntax, capabilities & reference
160+
│ ├── REPLACING_COGNITO.md # Identity provider swap & Gateway interceptors guide
154161
│ ├── RUNTIME_GATEWAY_AUTH.md # M2M authentication workflow
162+
│ ├── SESSION_MANAGEMENT.md # Session persistence & resumption guide
163+
│ ├── CONTEXT_MANAGEMENT.md # Context window management guide
155164
│ ├── STREAMING.md # Streaming implementation guide
156165
│ ├── TOOL_AC_CODE_INTERPRETER.md # Code Interpreter guide
157166
│ └── VERSION_BUMP_PLAYBOOK.md # Version management

docs/AGENT_CONFIGURATION.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ bedrock_model = ChatBedrock(
7676
**Gateway Integration** (`patterns/langgraph-single-agent/langgraph_agent.py`):
7777

7878
```python
79-
# Create MCP client for Gateway
80-
mcp_client = await create_gateway_mcp_client(access_token)
79+
# Create MCP client for Gateway with user identity propagation
80+
mcp_client = await create_gateway_mcp_client(user_id)
8181

8282
# Load tools from Gateway
8383
tools = await mcp_client.get_tools()
@@ -158,7 +158,7 @@ EXPOSE 8080
158158
CMD ["python", "your_agent.py"]
159159
```
160160

161-
**For ZIP deployment**: No Dockerfile is needed. The ZIP packager automatically bundles your `patterns/<pattern>/` directory along with `gateway/` and `tools/` directories, plus dependencies from `requirements.txt`.
161+
**For ZIP deployment**: No Dockerfile is needed. The ZIP packager automatically bundles your `patterns/<pattern>/` directory along with `patterns/utils/`, `gateway/`, and `tools/` directories, plus dependencies from `requirements.txt`.
162162

163163
### Step 4: Update CDK Configuration
164164

0 commit comments

Comments
 (0)