AIToday
Large Language ModelsAI Safety & AlignmentOpen-Source AIAmazon AI BlogPublished: Nov 13, 2026, 01:00 JST

AWS: lock AI agent search to the signed-in user on Bedrock Managed Knowledge Base

Send on LINE
AWS: lock AI agent search to the signed-in user on Bedrock Managed Knowledge Base

3 Key Points

  1. What happened

    AWS published a reference architecture for a shared internal assistant on Amazon Bedrock Managed Knowledge Base, where AgentCore Gateway automatically injects each signed-in user's verified email into every search request instead of letting the AI model choose it.

  2. Why it matters

    Without this, an employee in one department could receive another department's documents in an answer, since the model — not application code — picks the search parameters.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

By signing up you agree to the Terms of Service and Privacy Policy.

Context & Analysis

The post is aimed at a problem that grows with agent adoption: a single organization might soon run hundreds of agents, each connected to many data sources. In a traditional application, code decides who the signed-in user is and searches with that user's permissions. In an agent, a large language model decides at runtime which tool to call and with which arguments, so if a search tool takes "who to search as" as an argument, a prompt injection or a model error could make the agent search as a different employee.

The proposed architecture separates the tool layer (AgentCore Gateway) from the resource layer (Managed Knowledge Base) and gives each a primary and a secondary defense. The primary pair is a request interceptor that injects the user identity deterministically from the verified token, plus ACL awareness in the knowledge base, which returns only documents that user is allowed to view. The secondary pair — a Cedar policy check and a resource-based policy — covers cases where an assumption behind the primary defenses fails, such as an interceptor bug or a principal calling the knowledge base without going through the gateway.

The post is explicit that ACL awareness filters results based on the userContext it receives and isn't an authorization mechanism by itself; Managed Knowledge Base doesn't authenticate end users and trusts the userContext, so passing a verified value is the caller's responsibility. It also flags operational caveats: a document without an ACL entry isn't ingested, ACL changes apply only after the next sync, and mistakes fail silently rather than with an error. For teams adapting the pattern to an existing Amazon Cognito user pool, access token customization requires the Essentials or Plus feature plan.

FAQ
How does the pattern keep one user's documents out of another user's answers?
A request interceptor on AgentCore Gateway overwrites the userContext argument of every tool call with the email claim from the validated access token, so the knowledge base filters results by the signed-in user rather than a value the model chose.
What does Managed Knowledge Base require to filter documents by user?
It uses ACL awareness: for an Amazon S3 data source, you define ACLs in a global ACL file per prefix or in a metadata file per document, and at search time pass the email in userContext.userId. Queries without userContext return no documents from an ACL-enabled data source.
What can go wrong with the access control?
The post notes ACL mistakes don't return errors — affected documents are silently left out of results — and that Amazon S3 has no real-time ACL verification, so a change applies after the next sync.
Amazon AI BlogRead Original Article
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleVoinosis wins DETO 2026 pitch for Startup Battlefield 200