Retrieval-augmented generation (RAG) brings enterprise documents into a language model’s context. Authorization before retrieval ensures that policy—not the model—determines which protected content can enter that context. Unauthorized data is never fetched, rather than being retrieved and filtered after generation. section 17.4
A concrete authorization-before-retrieval flow is:
- Build a structured authorization request from the user’s principal, requested action, and relevant context. section 17.4.3
- Evaluate applicable policies with Cedar typed partial evaluation (TPE), producing a policy residual rather than only allow or deny. section 17.4.3
- Translate the residual into a retrieval filter, or authorize a bounded candidate set before fetching permitted content. section 17.4.3
- Apply constraints to resource metadata such as tenant, ownership, or classification before chunks enter the model context. section 17.4.3
Multi-tenant retrieval
A user asks an AI assistant to find a document. The policy residual becomes a filter restricting vector-database chunks to that user’s tenant. The language model receives only matching chunks, so access is constrained before generation. section 17.4.3
Figure 17.4 Authorization before retrieval in RAG systems. Authorization constrains retrieval rather than generated output. By enforcing access before data is retrieved, the system ensures that the language model operates only on authorized inputs, making information leakage structurally impossible rather than merely discouraged.
The architecture diagram makes the security boundary visible: authorization constrains retrieval before authorized inputs reach the language model. section 17.4 section 17.4.3
