

# Amazon Bedrock Managed Knowledge Bases ACLs

To have AWS Context apply the ACLs of documents in a Amazon Bedrock Managed Knowledge Base, complete the following steps:

1. Turn on ACLs when you create the data source in the knowledge base. You can’t turn them on or off later. For the steps for each data source, see [Access Control Lists awareness enablement](https://docs.aws.amazon.com/bedrock/latest/userguide/kb-managed-acl.html) in the *Amazon Bedrock User Guide*.

1. Connect the knowledge base to your Agent Context. For steps, see [Connecting data sources](connecting-data-sources.md).

1. Give the identity that reads the knowledge base permission to call `bedrock:Retrieve` and `bedrock:GetDocumentContent` on it. If the connection has a data access role, grant the permissions to the role. Otherwise, grant them to the callers' roles. If you map several connections that reach the knowledge base, grant them to the identity of the connection whose mapping you created first (see [When several connections reach the same data](how-access-controls-apply-when-aws-context-queries-data.md#overlapping-connections)). AWS Context can use `bedrock:GetDocumentContent` to check a user’s access to each document.

1. If the connection has a data access role, allow it to receive user identities. Add `sts:SetContext` to the trust policy statement that lets AWS Context assume the role.

1. Make sure that callers send requests with credentials that carry the user’s identity. For setup, see [How the user’s identity reaches your sources](configure-identity-propagation.md).

For how AWS Context applies these ACLs, see [Unstructured sources: ACLs attached at ingestion](source-acls-unstructured-ingestion.md).