# Fine-grained access control for Amazon Bedrock Managed Knowledge Base tools

DevFeed: [Fine-grained access control for Amazon Bedrock Managed Knowledge Base tools](<https://devfeed.tech/articles/fine-grained-access-control-for-amazon-bedrock-managed-knowledge-base-tools-130562.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/machine-learning/fine-grained-access-control-for-amazon-bedrock-managed-knowledge-base-tools/>)

Author: Renya Kujirada

Published: 2026-11-12T15:40:24Z

Content type: article

Language: en

Sources: [Artificial Intelligence](<https://devfeed.tech/sources/artificial-intelligence.md>)

Topics: [Access Control](<https://devfeed.tech/topics/access-control.md>), [Amazon Bedrock Knowledge Bases](<https://devfeed.tech/topics/amazon-bedrock-knowledge-bases.md>), [Amazon Bedrock AgentCore](<https://devfeed.tech/topics/amazon-bedrock-agentcore.md>), [Amazon Cognito](<https://devfeed.tech/topics/amazon-cognito.md>), [AWS IAM](<https://devfeed.tech/topics/aws-iam.md>), [Zero Trust](<https://devfeed.tech/topics/zero-trust.md>)

Tags: [access-control](<https://devfeed.tech/tags/access-control.md>), [advanced-300](<https://devfeed.tech/tags/advanced-300.md>), [agentcore](<https://devfeed.tech/tags/agentcore.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [amazon](<https://devfeed.tech/tags/amazon.md>), [amazon-bedrock](<https://devfeed.tech/tags/amazon-bedrock.md>), [amazon-bedrock-agentcore](<https://devfeed.tech/tags/amazon-bedrock-agentcore.md>), [amazon-bedrock-knowledge-bases](<https://devfeed.tech/tags/amazon-bedrock-knowledge-bases.md>), [base](<https://devfeed.tech/tags/base.md>), [based](<https://devfeed.tech/tags/based.md>), [bedrock](<https://devfeed.tech/tags/bedrock.md>), [bedrock-agentcore](<https://devfeed.tech/tags/bedrock-agentcore.md>), [control](<https://devfeed.tech/tags/control.md>), [fine](<https://devfeed.tech/tags/fine.md>), [gateway](<https://devfeed.tech/tags/gateway.md>), [identity](<https://devfeed.tech/tags/identity.md>), [knowledge](<https://devfeed.tech/tags/knowledge.md>), [knowledge-base](<https://devfeed.tech/tags/knowledge-base.md>), [managed](<https://devfeed.tech/tags/managed.md>), [technical-how-to](<https://devfeed.tech/tags/technical-how-to.md>), [tools](<https://devfeed.tech/tags/tools.md>)

## AI overview

The design keeps a shared agent from choosing whose documents it searches: a gateway interceptor overwrites the MCP tool's `userContext` with the email from a JWT validated by the gateway, and Managed Knowledge Base ACL awareness filters results to that user's permitted documents. ACL awareness trusts the supplied identity, so it is not authorization by itself. Policy in AgentCore can independently deny calls when the injected user ID does not match the JWT email; a knowledge base resource policy can also restrict `Retrieve` and `GetDocumentContent` to the gateway execution role, blocking direct calls and other principals. These defenses have limits: the resource policy cannot distinguish another gateway using the same role, and explicit denial can affect other consumers. The sample requires a verified email claim; Cognito token customization needs the Essentials or Plus plan. S3 ACL updates apply after sync, and ACL mistakes silently omit documents.

## Source excerpt

Learn how to expose an Amazon Bedrock Managed Knowledge Base to AI agents as MCP tools through Amazon Bedrock AgentCore Gateway while keeping per-user access control. A request interceptor injects verified identity, Policy in AgentCore validates it independently, and a resource-based policy restricts direct access to the knowledge base.