RAG fails at the permissions layer, not the embeddings
The retrieval-quality debate hides the real enterprise risk. An assistant that answers from documents the user was never allowed to read is a data breach with a friendly interface. Access control, permission freshness and tenant isolation are the first design question, not the last.
Most conversations about retrieval-augmented generation are about quality. Which embedding model, how to chunk documents, whether to add a reranker, how to measure recall. Those questions matter, and teams spend months on them.
In an enterprise, they are the second question. The first is simpler and far more dangerous to get wrong: when this assistant answers a question, is every document it used one the person asking was allowed to read?
A search engine that returns a forbidden document at least shows a title you can report. An assistant that summarizes it into a fluent answer leaves no trace for the user and a serious problem for the company. The HR investigation, the acquisition memo, the salary review and another customer’s contract are all just text to a retrieval system.
How permission leaks happen
Leaks rarely come from a single bad decision. They come from the gap between how permissions work in the source systems and how they are copied, or not copied, into the retrieval layer.
| Failure | How it happens | Control |
|---|---|---|
| Permissions not copied | Documents are indexed by a service account that can read everything; access rules stay behind in the source | Store each chunk’s access list with it and filter at query time |
| Stale permissions | Someone leaves a project or a group; the index still lists them for weeks | Sync permission changes on a short, monitored schedule |
| Shared index across customers | One vector store serves several tenants, separated only by a filter in application code | Separate index or namespace per tenant |
| Derived content | Summaries, caches and suggested answers built from restricted documents are shown to everyone | Derived content inherits the strictest source permission |
| Aggregation | Each document is visible, but combining them reveals something sensitive | Classify sensitive topics and restrict answers, not just documents |
The first two cause most real incidents. Connectors are usually set up quickly, by an engineer with broad access, to get a demo working. The demo becomes the pilot, the pilot becomes production, and nobody revisits whose permissions the index is enforcing.11A useful test: ask the assistant, as a new employee with minimal access, about salaries, reorganizations, legal disputes and named customers. Many first deployments fail it.
A search engine shows you a forbidden title. An assistant summarizes the forbidden document and leaves no trace.
Enforce access at query time, with the user’s identity
The principle is straightforward: retrieval must run as the user, not as the system. In practice that means three things.
Carry permissions into the index
Every chunk stores the access list of the document it came from: users, groups, roles. At query time, retrieval filters by the identity of the person asking, before ranking, so restricted content never reaches the model at all. Filtering the model’s answer afterwards is too late.
Check against the source for sensitive content
For the most sensitive repositories, add a second check at fetch time: before a chunk is used, confirm with the source system that the user can still read the document. It costs some latency and is worth it where the cost of a leak is high.
Treat permission freshness as a service level
Document freshness gets attention because stale answers are visible. Permission freshness rarely does, because stale permissions are invisible until they leak. Set a target, for example permission changes reflected within an hour, monitor it, and alert when the sync falls behind.
Tenant isolation is not a filter
For products that serve several customers, a shared index with a tenant filter in application code is a single bug away from a cross-customer leak, and that kind of leak ends contracts. Separate indexes or strictly enforced namespaces per tenant cost more to operate. They also make the security review with an enterprise buyer a short conversation instead of a long one.
The same logic applies to anything derived from customer data: caches, embeddings, fine-tuning sets and evaluation samples. If it was built from one customer’s data, it belongs to that customer’s boundary.
Buying instead of building
Many companies will not build this themselves. They will switch on an assistant inside a platform they already use, or buy one that connects to their drives, wikis and ticketing systems. The same risks apply, and they are harder to see because the plumbing is someone else’s.
The questions shift slightly. How does the vendor’s connector authenticate to each source: with each user’s own credentials, or with one admin-level account? How often does it re-read permissions, and is that configurable? Does it index everything it can reach by default, or only what you select? Can you exclude repositories, such as HR or legal, entirely?
Ask for the answers in writing, then test them yourself before rollout, as a low-privilege user, on content you know should be hidden. Vendor documentation often describes the intended behavior of a correctly configured system. Your environment, with its years of inconsistent sharing settings, is rarely that system.
Over-sharing in the source systems is the other half of the problem. An assistant that respects permissions perfectly will still surface the board minutes that were shared with “everyone in the company” by mistake years ago. Before switching on enterprise search or an assistant, run a cleanup of the most sensitive repositories. It is tedious, and it is the cheapest risk reduction available.
What to ask before rollout
- Whose identity does retrieval run as, the user’s or a service account’s?
- How long does it take for a permission change in the source system to reach the index, and who is alerted when it is late?
- Can derived content, such as summaries or cached answers, be seen by someone who cannot read the source?
- For multi-tenant products: what, other than application code, separates one customer’s data from another’s?
- Has someone tried to extract restricted information as a low-privilege user, and what happened?
If the answers are vague, fix permissions before investing another month in retrieval quality. A slightly less accurate assistant that respects access control can be rolled out to everyone. A brilliant one that ignores it cannot be rolled out at all.
When this applies to you
You are building or buying an internal assistant over company documents, tickets or customer data, or you already run one and have not tested what it reveals to a low-privilege user.
In a Strategy & Architecture Audit we review how permissions flow from your source systems into retrieval, test for leaks, and set the controls and freshness targets that make the assistant safe to roll out.
