Skip to main content
VectisFlow
VectisFlow
All insights

Architecture · 7 min

What permission inheritance actually requires

Filtering results after retrieval is not access control. It is a leak with a user interface.

Platform engineering ·

Every enterprise retrieval project reaches the same meeting. Someone from security asks what happens when a user searches for something they are not allowed to see, and the answer determines whether the system is deployable.

There are three common answers. Two of them are wrong.

The two wrong answers

The first is filtering after generation: retrieve from everything, generate an answer, then check whether the user can see the sources and suppress the answer if not. This leaks. The suppression itself is a signal, and worse, an answer synthesised from restricted material has already been produced: the model saw content the user cannot access, and the system's own logs now contain it.

The second is filtering after ranking: retrieve the top fifty, drop the ones the user cannot open, return what remains. This leaks more subtly. The user's result count and ordering vary with the existence of documents they cannot see, and a determined user can enumerate what exists by watching how results shift. It also degrades quality, because a user with restricted access gets a thin result set assembled from what happened to survive the filter rather than the best fifty they were entitled to.

The answer that works

Filter before ranking, using access data stored in the index itself. Each chunk carries the ACL of its source document. At query time the user's group membership is resolved against the directory, and the candidate set is constrained before any ranking occurs.

The user then gets the best results from the corpus they are entitled to, which is both correct and better. Ranking operates on a set that is already legitimate.

  • Store source ACLs alongside each chunk at index time, not as a lookup at query time
  • Re-resolve group membership per query, cached memberships are how a revoked permission stays live for six hours
  • Re-index on permission change, and treat permission changes as a first-class event in the ingestion pipeline
  • Test with synthetic users on every release, including indirect questions that name a subject rather than a document

The part everyone under-scopes

Permission changes are events, and most ingestion pipelines are built to notice content changes only. A document that is re-permissioned but not edited will keep its old ACL in the index until something forces a re-crawl, and 'something' is usually a person discovering the problem.

Budget for it. It is not difficult; it is simply never in the original estimate, and it is the failure mode most likely to end a deployment.

Related

  • Retrieval · 6 min

    Chunking is a decision, not a default

    The 512-token window is the most consequential unexamined choice in most retrieval systems. Here is how to examine it.

    Retrieval engineering ·

    Read
  • Evaluation · 6 min

    Your evaluation set is too big, and too small

    Two hundred stratified questions will find regressions ten thousand unstratified ones will miss. Coverage is a shape, not a count.

    Evaluation and assurance ·

    Read

Get in touch

Talk to us.

A first conversation runs about forty-five minutes and covers three things: what your estate actually looks like, whether anyone can define a correct answer or an agreed number, and whether your permission model resolves per user. Any one of them can rule the work out, and we would rather tell you in week one.

Response time
One working day, from a person who has read it.