Retrieval-augmented generation is the architecture that put language models into enterprises, and it is the architecture that quietly dismantled a decade of document permissions. The model is the part everyone discusses. The retrieval layer is the part that produces the findings.
Permission mirroring: the structural problem
Documents in SharePoint, Drive, Confluence and the ticketing system carry access control lists built up over years. Embed them into a vector store and the access control stays behind, because an embedding is a float array with some metadata and nothing in that structure knows about groups.
What we find, consistently: the HR folder indexed alongside the engineering wiki, salary bands and disciplinary notes retrievable by anyone who phrases a question the right way. No exploit involved. The assistant is working exactly as built.
- Index-time filtering alone goes stale the moment permissions change, and permissions change constantly.
- Post-retrieval filtering has already put the content into the process and often into the prompt.
- Per-user pre-filters require the retrieval layer to know the user’s effective permissions at query time, which means a live sync with the source system — the part teams skip because it is the hard part.
- Deletion and revocation need to propagate to embeddings. A document whose access was revoked, or which was deleted entirely, frequently stays retrievable because nobody deleted the vectors.
Corpus poisoning
If a user can add a document to the corpus, that user can influence every answer the assistant gives. We test this end to end: write a document crafted to rank for a high-value query ("what is the approval process for vendor payments"), containing both false guidance and embedded instructions, then ask the question as a different user and see what comes back. Successful poisoning is one of the highest-impact, lowest-effort attacks in the entire AI surface, and almost nobody tests for it.
- Who can write to the corpus, directly or through a sync from a system with weaker controls.
- Whether ingestion records provenance a reader can see — a cited answer with no verifiable citation is an unverifiable answer.
- Whether a single document can dominate retrieval through keyword stuffing or repetition.
- Whether instructions inside retrieved text are treated as data, and at what success rate.
Embeddings are data, and they leak
Teams treat vectors as opaque. They are not: inversion research recovers substantial portions of the source text from embeddings, and membership inference can establish whether a specific document was indexed. The practical consequence is simple — a vector store containing embeddings of confidential documents must be protected as if it contained the documents, including in backups, in replicas, in the analytics copy and in whatever a developer pulled down to debug a relevance problem.
What we test, in order
- Map the corpus: every source, every sync, every ingestion route, and who can write to each.
- Establish where the permission filter is applied and whether it reflects live permissions.
- Run cross-user retrieval probes with seeded canaries across permission boundaries.
- Test revocation and deletion propagation to vectors, caches and any derived index.
- Attempt corpus poisoning for a high-value query, as a low-privileged user.
- Test instruction-following from retrieved content and report the rate.
- Review vector store exposure: network reachability, authentication, backups, and copies in non-production environments.
- Check citation integrity — whether the cited source actually supports the claim, which is where hallucinated citations and poisoned ones look identical to a reader.
Controls that hold up
- Per-user pre-filtering driven by a live permission sync, with retrieval scoped to what that user can already read. If that is not feasible, index only content with uniform access and say so plainly.
- Ingestion with provenance, review for corpus sources that users can write to, and per-source trust levels that affect ranking.
- Deletion and revocation jobs that remove vectors, with monitoring on their completion rather than faith in the queue.
- A vector store treated as a crown-jewel datastore: private networking, authentication, encryption, audited access, and no casual copies.
- Citations that resolve to a document the reader can open and verify, with the retrieved passage shown.
- Retrieved content delimited and labelled untrusted in the prompt, as defence in depth rather than the boundary.
Where to start
Ask your assistant a question only HR should be able to answer, from an ordinary employee account. The answer, or the refusal, tells you immediately whether the permission model survived the migration into the vector store. In the deployments we have tested, it usually has not.