Retrieval without authorization: RAG that ignores document permissions
Retrieval-augmented generation can surface documents the asking user is not allowed to read. How permission-aware retrieval works, where ACLs get lost during indexing, and how to test with two accounts.
Diagram
Where permissions are lost in a RAG pipeline
Step 1 of 4
Source
Documents have ACLs in the wiki or drive.
doc: "2027 reorg plan.docx" acl: [hr-leads]
The example on the open step is one illustration, or the fix you can paste into an application you own.
What this page is made of
3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.
ACLs dropped at indexing
- What fails
- Text is copied into the index and its permissions stay behind.
- Who is affected
- Owners of restricted documents.
- What you would notice
- Index records with no permission fields.
- What you change
- Carry ACLs into each chunk’s metadata.
Stale permissions
- What fails
- Access is revoked in the source but the index still has the old ACL.
- Who is affected
- People removed from a project or team.
- What you would notice
- No sync job for permission changes.
- What you change
- Sync ACL changes and re-check against the source at query time.
Service-account indexing
- What fails
- Indexers run with read-all access, so the index holds everything.
- Who is affected
- Every restricted document in scope.
- What you would notice
- A crawler account with org-wide read.
- What you change
- Limit indexing to spaces intended for the assistant.
Two-account test
Create a document visible only to account A in a test space. Ask the assistant a question about its contents as account B. If B gets an answer or citation, retrieval is not permission-aware. Repeat after removing A’s access to test revocation.
account A (hr-leads): "What is in the reorg plan?" -> answer with citation account B (staff): "What is in the reorg plan?" -> answer with citation <- finding expected for B: "I could not find anything you have access to."
Check yourself
Recognition and the fix. Nothing here is a procedure.
Where is the most common place document permissions are lost?
Sibling techniques
Pages at the same depth, plus a lab and a glossary card for this one.
This page stands on its own. The lab and the glossary card are the next reading.