{"resourceId":"aws-bedrock-managed-kb-mcp-usercontext-spoofing-controls-20261112","versions":[{"version":"external-442d7b29cf7adcde299388aeb11bc421f2c6d6cf52aa1c8648172c2c67e839eb","resource":{"id":"aws-bedrock-managed-kb-mcp-usercontext-spoofing-controls-20261112","title":"AWS warns that when a Bedrock Managed Knowledge Base is exposed as an MCP tool, the LLM sets the user identity, and shows four layers to stop that","organization":"Amazon Web Services","sector":"Cross-SLED knowledge assistants (government, HHS, higher ed, K-12)","geography":"AWS Regions where Managed Knowledge Base, AgentCore Gateway, Policy and runtime are available; GovCloud not addressed","publishedAt":"2026-11-12","publicationDate":"2026-11-12","eventDate":"2026-11-12","sourceName":"AWS Artificial Intelligence Blog","sourceLabel":"Fine-grained access control for Amazon Bedrock Managed Knowledge Base tools","sourceUrl":"https://aws.amazon.com/blogs/machine-learning/fine-grained-access-control-for-amazon-bedrock-managed-knowledge-base-tools/","evidenceClass":"vendor-claim","outcomeClass":"cautionary","topics":["data-security","developers-agents","knowledge-work"],"finding":"AWS's November 12, 2026 post says that when Amazon Bedrock Managed Knowledge Base is exposed to an agent as an MCP tool through AgentCore Gateway, the ACL-aware userContext becomes a tool argument the LLM writes, and neither the gateway nor the knowledge base verifies it belongs to the signed-in user. A user prompt, model error or indirect prompt injection could make the agent search as someone else. AWS's sample adds a Lambda request interceptor that overwrites userContext from the validated JWT, a Cedar policy in AgentCore that denies mismatches, and a knowledge-base resource policy limited to the gateway role. AWS also notes ACL mistakes return no errors and S3 ACL changes apply only after the next sync.","sledRelevance":"Shared assistants over records with per-user permissions are common SLED designs: caseworker knowledge bases in HHS, student-record or advising assistants in higher ed and K-12, and departmental document search in state agencies. This post documents a default where the model can choose whose documents to search, which matters for FERPA, HIPAA, CJIS and state privacy obligations. Interpretation: agencies should ask any integrator how identity reaches tool calls.","evidence":"Vendor technical guidance with a public CDK sample; the spoofing risk is described by AWS, not demonstrated in an incident. No test results or independent validation are reported.","architectureImplications":"Cognito sign-in with a pre-token-generation Lambda adding an email claim; agent on AgentCore runtime forwards the JWT; AgentCore Gateway JWT authorizer; request interceptor overwrites userContext; Policy in AgentCore (Cedar) checks userContext.userId against the token; connector target calls Managed Knowledge Base Retrieve or AgenticRetrieveStream with ACL awareness; resource-based policy denies other principals.","governanceImplications":"Design principle stated by AWS: do not let the LLM generate values that affect authorization. ACL awareness filters results but is not itself an authorization mechanism. Documents without ACL entries are not ingested, and ACL errors fail silently.","securityPrivacyImplications":"Primary defenses: interceptor injection and ACL awareness. Secondary: Cedar policy and resource-based policy for interceptor bugs or callers that bypass the gateway. Interceptor must not log the bearer token passed in headers. Alternative email lookups have scope trade-offs and break the Cedar comparison.","caveats":"Vendor guidance; the example company is fictional. Requires Cognito Essentials or Plus for token customization. GovCloud availability of Managed Knowledge Base and AgentCore Gateway/Policy is not stated. The pattern applies to other MCP tools that take access-affecting arguments, but each needs its own review.","streamIds":["aws"],"roles":{"sales":"Interpretation: lead with data protection for shared assistants. The customer problem is that one agent serving many users can leak records across departments, students or clients if the model chooses whose permissions apply. Stakeholders are the CISO, privacy officer, records owner and the program sponsoring the assistant. Discovery should ask how user identity reaches retrieval calls in any existing chatbot. This source documents a control design, not a measured reduction in leaks, so no assurance claims should be made.","engineering":"Interpretation: fit is any Bedrock agent that exposes permissioned search as an MCP tool. Engineers should overwrite identity arguments from validated tokens at the gateway, add a Cedar deny on mismatches and lock the knowledge base to the gateway role. Prerequisites include Cognito Essentials or Plus, ACL metadata per document and Regions where the services exist. Constraints: GovCloud availability is not stated, ACL errors fail silently and changes apply after sync. Proof of value should include a spoofing test.","delivery":"Interpretation: delivery is a security hardening increment for an assistant, not a new product. Dependencies are the identity team, data owners who assign ACLs and the agent developers. Ownership sits with the application owner, with the CISO approving the control design. Governance checkpoints are ACL coverage review, prompt-injection testing and log review for token leakage. Proposed acceptance criteria are zero cross-user results in adversarial tests and full ACL coverage. Risks include silent ACL gaps and interceptor defects."},"roleDetails":{"sales":{"customerProblem":"Shared AI assistants that search permissioned records can return another user's documents if the model sets the user identity for search.","stakeholders":["CISO","Privacy or records officer","Program owner of the assistant","Identity and access management team"],"discoveryQuestions":["How does user identity reach retrieval or tool calls in your assistant today?","Which records carry per-user or per-role access rules?","Has the assistant been tested with prompt injection asking to search as another user?","Must the solution run in GovCloud?"],"valueHypothesis":"Adding verified identity injection and policy checks can reduce the risk of cross-user disclosure in shared assistants; effectiveness must be tested locally.","potentialEngagement":"A bounded access-control review and hardening sprint for one Bedrock-based assistant, including adversarial tests.","unsupportedClaims":["Elimination of all data leakage","Compliance certification for FERPA, HIPAA or CJIS","GovCloud availability","That ACL awareness alone authorizes access"]},"engineering":{"fit":"Strong fit for multi-user Bedrock assistants exposing permissioned search via AgentCore Gateway; GovCloud fit unconfirmed.","architectureIntegration":"Cognito JWT, AgentCore Gateway JWT authorizer, Lambda request interceptor overwriting userContext, Cedar policy in AgentCore, Managed Knowledge Base with ACL awareness and a resource-based policy.","prerequisites":["Cognito Essentials or Plus plan","ACL metadata for every document","Gateway targets registered before policies","Services available in the chosen Region"],"constraints":["GovCloud availability not stated","ACL errors fail silently","ACL changes apply only after sync","Documents without ACLs are not ingested"],"security":"Never let the LLM set authorization values; overwrite from validated tokens; deny mismatches; restrict knowledge-base callers; keep tokens out of logs.","proofOfValue":["Prompt user-a to search as user-b and confirm denial","Indirect prompt-injection test via a retrieved document","Confirm a direct bedrock:Retrieve call from another principal is denied","Audit ACL coverage across the corpus"]},"delivery":{"work":"Implement identity injection, policy checks and resource restrictions for one assistant and verify with adversarial tests.","dependencies":["Identity provider configuration","Data owners assigning ACLs","Agent development team","Security testing capacity"],"ownership":"Application owner of the assistant, with the CISO approving the control design.","skillsAdoption":"Developers need Cedar policy and gateway interceptor skills; data stewards need ACL metadata practices.","governanceCheckpoints":["Control design approval","ACL coverage review","Adversarial testing sign-off","Log review for token exposure"],"acceptanceCriteria":["Proposed: zero cross-user documents returned in a defined adversarial test set","Proposed: 100% of ingested documents carry ACL entries","Proposed: all mismatched userContext calls denied and logged"],"risks":["Silent ACL misconfiguration","Interceptor bugs","Principals bypassing the gateway","Stale permissions until next sync"]}},"retrievedAt":"2026-11-13T03:57:38Z","enrichedAt":"2026-11-13T04:04:14Z","enrichmentBasis":"retrieved source","accessibilityWorkforceImplications":"No accessibility detail. Workforce: identity, agent and data owners must coordinate ACL metadata for every document.","procurementImplications":"Buyers can make verified identity propagation to tool calls an explicit requirement in RFPs and statements of work for agent or chatbot projects.","operatingModelImplications":"ACL changes on S3 data sources need a sync; global ACL file changes reindex a prefix. Policies must be created after gateway targets register tool schemas.","sourceVerification":{"openedUrl":"https://aws.amazon.com/blogs/machine-learning/fine-grained-access-control-for-amazon-bedrock-managed-knowledge-base-tools/","referenceExcerpt":"Neither the gateway nor the knowledge base verifies that this value belongs to the authenticated user.","promptVersion":"sled-research-v4.0","model":null,"basis":"agent-reported inspection"}}}]}