Skip to content

Commit 180dc3c

Browse files
committed
docs: add policy tracing verification section to IDENTITY_POLICY.md
1 parent 1acc6e6 commit 180dc3c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

docs/IDENTITY_POLICY.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,21 @@ When deploying in VPC mode, Approach 1 (direct Cognito call) requires a **NAT Ga
206206
Approach 2 (`@requires_access_token` decorator) does not require a NAT Gateway — the AgentCore Identity service handles the Cognito token exchange server-side within AWS, reachable through the `bedrock-agentcore` VPC endpoint.
207207

208208
See `docs/DEPLOYMENT.md` for full VPC configuration details.
209+
210+
## Verifying Policy Decisions via Tracing
211+
212+
To verify Cedar policy allow/deny decisions in CloudWatch logs:
213+
214+
1. Go to **AWS Console → Bedrock AgentCore → Runtimes**
215+
2. Click on your runtime (e.g., `FAST_stack_FASTAgent`) from the Runtime resources section
216+
3. Scroll down to **Tracing**, click **Edit**, and toggle **Enable tracing** to Enable
217+
4. Go to **Bedrock AgentCore → Gateways**
218+
5. Click on your gateway (e.g., `FAST-stack-gateway`), scroll down to **Tracing**, click **Edit**, and toggle **Enable tracing** to Enable
219+
6. Run a query from the frontend that triggers a tool call
220+
7. Go to **CloudWatch Console → Log Management → Log groups**
221+
8. Find and click on the `aws/spans` log group, then click on the default log stream
222+
9. In the **Filter events** search box, type `policy`
223+
10. Look for the `AgentCore.Policy.PartiallyAuthorizeActions` span — it contains:
224+
- `aws.agentcore.policy.allowed_tools`: tools the user is permitted to use
225+
- `aws.agentcore.policy.denied_tools`: tools the user is denied access to
226+
- `aws.agentcore.gateway.policy.mode`: should show `ENFORCE`

0 commit comments

Comments
 (0)