Apply document permissions before protected passages reach the model. Asking the assistant to hide restricted material after retrieval leaves an unnecessary disclosure and influence boundary inside the answer-generation context.
Retrieval access is a resource decision
Permission-aware retrieval limits eligible documents using trusted identity and current resource relationships. Relevance ranking then operates within the permitted scope. A semantically useful document is not automatically one the employee may see.
For a proposed pipeline, resolve employee identity, tenant, groups, and applicable document access through approved systems. Apply the selected search engine’s supported filtering or enforcement mechanism to every candidate path. Check keyword, vector, fallback, and context-expansion paths independently.
OWASP’s authorisation guidance recommends request-level permission enforcement. In retrieval, that principle also applies to snippets, metadata, previews, and source links, not only original file downloads.
Test a fictional salary-policy query
A general employee asks about compensation practices. The collection contains public employee guidance and restricted individual salary notes. The assistant may retrieve permitted guidance but should not receive the restricted notes in its context.
Use fictional employees with different roles and unique restricted markers. Inspect candidate results and the actual assembled prompt. A final answer that omits the marker is insufficient if unauthorised content already entered the model request.
| Employee and resource | Expected evidence |
|---|---|
| Ordinary employee, public guidance | Permitted retrieval |
| Ordinary employee, restricted notes | Excluded before answer context |
| Authorised reviewer, scoped notes | Access limited to approved scope |
| Employee group removed | Revocation behaviour verified |
| Source permission service unavailable | Defined safe failure policy |
Test direct resource identifiers and paraphrased queries. Controls should not depend on whether the employee knows the document’s exact title.
Keep access changes observable
Copied permission metadata can become stale. Define update latency, revocation handling, and the trusted fallback when current scope cannot be established. Do not describe eventual synchronisation as immediate revocation without evidence.
Pre-filtering can affect candidate coverage and query performance, depending on the engine and configuration. Evaluate relevance within permitted scope rather than weakening access to improve result counts. Empty authorised results are preferable to silently using protected evidence.
This design is proposed. The voice integration case study describes retrieval experience without claiming this permission implementation. Pair it with employee access changes.
Retrieval permission FAQ
Can the model select its own access groups?
No. Use trusted application identity and policy rather than generated role claims.
Is checking the final answer enough?
No. Verify eligible candidates, assembled context, previews, caches, and source access too.
What should happen when scope is unknown?
Follow the explicit safe failure policy and avoid retrieving protected content under guessed authority.