Unstructured sources: ACLs attached at ingestion
Unstructured sources reach AWS Context through an Amazon Bedrock Managed Knowledge Base, connected as a BEDROCK_KNOWLEDGE_BASE connection. When the knowledge base sends a document to AWS Context, it sends the document’s ACL with it, and AWS Context records the ACL on the document node and on every entity node extracted from that document. An entity is never more visible than the document it came from. A document that has no ACL at the source, or whose data source does not crawl ACLs, is sent as public.
A document’s ACL lists the users and groups that may read the document, using the identities the knowledge base holds, and any that are denied. Where the source defines access in levels, for example a site, a library, and a folder that each have their own readers, the knowledge base sends each level and a caller must be allowed at every one. A denial wins over an allow, including for a public document.
At query time, AWS Context resolves the groups the end user belongs to in each connected knowledge base and returns a node only when the end user may read the document it came from. The end user comes from the trusted identity on the call, not from any user the caller names in the request. A request with no trusted end-user identity, or with an identity from a source the Agent Context does not list in trustedIdentitySources, sees public nodes only. For how to make an identity source trusted, see How the user’s identity reaches your sources.
Two consequences follow from recording the ACL on the node:
-
A node with no recorded ACL is public. Knowledge base documents always carry one, so this applies to nodes from other kinds of connection and to nodes written before ACLs were sent.
-
An edge has no ACL of its own. It is visible when both of its nodes are visible to the end user.