A multi-user assistant can reveal information without copying a whole document into its final response. A summary, an inferred fact or a cited title may already expose material the user was never allowed to read. Retrieval access control therefore belongs before context assembly. A final instruction to hide secrets is too late to serve as the primary permission check.
Carry the authenticated identity into retrieval
In a fictional consultancy, teams Atlas and Beacon share one assistant but have separate client documents. The retrieval request must use the authenticated user's current memberships and resource permissions. A team name typed into the chat is not sufficient evidence of membership. Define how identity reaches the index and how permission changes propagate. If a revoked user retains a cached context from an earlier session, a correct new retrieval filter alone does not remove the older exposure path.
Check derived objects as well as files
A document may become many chunks, embeddings and summaries, each with its own storage key. All derived objects need an access relationship that remains connected to the original resource. An index that stores the document's tenant but drops it from one summary table creates an inconsistent boundary. Review every retrieval channel, including keyword search, vector search, recent-item suggestions and citation previews. A user can learn restricted information through a convenient preview even when the main answer is filtered correctly.
Use synthetic cross-tenant checks
Construct two small test collections with distinct fictional facts. Ask each test user ordinary questions whose answers exist only in the other collection. Inspect the actual context supplied to the model, not merely the generated response. Repeat after moving a document between groups and after revoking membership. The expected outcome is exclusion before the model sees the content. A refusal generated after receiving restricted chunks should be recorded as a boundary failure even if the visible answer happens to be harmless.
Make the safe failure understandable
When no authorized evidence is available, the assistant should say that it lacks accessible support rather than imply the document does not exist globally. Operational logs can record the policy decision without exposing the restricted title to the requester. Separate a permissions problem from an empty collection or a retrieval outage so support staff can investigate through an authorized channel. These distinctions improve usability while avoiding a fallback that silently broadens access in order to produce a more satisfying answer. Include citation previews in the same permission tests; they are often implemented through a different endpoint from the main retrieval request.
Original explanatory diagram. The worked organization and records in this article are fictional.
Take this into your next review
- Treat context assembly as a disclosure boundary.
- Propagate access relationships to derived objects.
- Inspect retrieved context in cross-tenant tests.
Primary references
- OWASP Authorization Cheat Sheet ↗
- OWASP GenAI Security Project: LLM Top 10 ↗
- NIST AI Risk Management Framework ↗
AgentX Editorial · AI-assisted educational writing. Historical analysis is separated from hypothetical future scenarios; publication does not imply independent field investigation. Referenced organizations do not endorse AgentX. Report a correction.
Continue reading
SolarWinds Orion: defending the trust placed in software builds
A supply-chain perspective on build provenance, privileged monitoring software and incident scoping.
Incident studiesColonial Pipeline: an incident can cross operational decision boundaries
Why business dependencies, remote access and safety-conscious containment matter in ransomware response.
Incident studiesCodecov: why CI credentials belong in incident scope
A 2021 supply-chain case about downloaded build helpers and secrets available to automation.