hardConceptDesignMidSeniorStaff
How do you enforce per-user permissions in a retrieval system?
6 min readUpdated 2026-08-15
Answer
Short answer
Carry the authorised principal set on every chunk and pass the user's principals into the search as a filter, so the candidate set is legal before ranking. Filtering after retrieval leaks through counts and gaps, and destroys recall for the users with the narrowest access.
Was this answer helpful?
Likely follow-ups
- A folder containing sixty thousand documents is reshared. What does your ACL representation cost you?
- How do you keep filtered approximate search from losing recall when the filter is highly selective?
- Where do deny rules live, given that a set-overlap filter cannot express them?
- How would you test that a user can never retrieve a document they cannot open in the source system?
Related questions
- A user's access to a document set is revoked. What has to happen across your RAG stack?hardAlso on authorisation and rag-security6 min
- Walk me through what happens between a customer tapping a card and the merchant getting paid.hardAlso on authorisation6 min
- How do you design the tools an agent calls?hardAlso on authorisation5 min
- Customers want per-project roles rather than one global role. How do you model that, and where in the request does the check happen?hardAlso on authorisation6 min