Fine-grained access control solution for Bedrock knowledge base tools
Understand this story
In an official blog post, AWS introduces a fine-grained access control solution for Amazon Bedrock Managed Knowledge Base tools, addressing the privilege escalation risk that can arise when the large model itself decides userContext during agent calls to the search tool. The solution uses a request interceptor at the AgentCore Gateway tool layer to inject userContext from a verified JWT, and then the Managed Knowledge Base's ACL awareness filters documents according to user permissions. The solution requires an AWS account and IAM permissions to create the relevant resources. If applied to an existing Amazon Cognito user pool, the user pool must be on the Essentials or Plus feature plan, because access token customization requires that plan; on a Lite plan user pool, access tokens do not contain an email claim, and the interceptor and the Policy in AgentCore will reject all tool calls. After testing is complete, the stack should be deleted to avoid subsequent charges.
AI overview based on source reports · Updated 2 days ago
Coverage timeline
Follow the coverage to explore different perspectives.
- AWS Machine Learning BlogFine-grained access control for Amazon Bedrock Managed Knowledge Base tools
This post describes an architecture in which all employees share one agent and knowledge base, but each user can search only the documents they are allowed to view, using Amazon Bedrock Managed Knowledge Base ACL awareness exposed as MCP tools through Amazon Bedrock AgentCore Gateway. The design keeps the LLM from deciding who the user is: a request interceptor injects the verified email from the JWT into userContext, Policy in AgentCore checks it against the token's email claim, and a resource-based policy denies searches from principals other than the gateway execution role. It also covers prerequisites, ACL metadata files, tool schema configuration with parameterOverrides, and a verification script that tests each defense.
Activity for this story
- Current comparable activity
- 3
- Peak comparable activity
- 10Nov 13 01:00
- Change in the past 24 hours
- -50%
Trends compare the same fully observed participants, which may cover fewer participants than current activity. Move the pointer or tap the chart to inspect hourly activity; use the left and right arrow keys with a keyboard.