Articles

Access control on sources: permissions do not survive the index

An index is a second copy of the corpus, and the copy carries no permissions of its own.

Reading: 6 minAutomation & AI

Article cover: Access control on sources: permissions do not survive the index

An index is a second copy of the corpus, in a different system, queried by a different component. The permissions that applied to the original do not travel with it: they live in the source system, while the index knows only what the ingestion step told it. Retrieval that filters by relevance and not by permission answers from documents the caller may not read — and that answer is a disclosure, whether or not anything looked like a leak.

Why the default is wrong

Four ordinary decisions produce the exposure, and none of them is careless on its own:

  • Ingestion copies text without copying rights. A file’s access control list belongs to the file, not to its paragraphs; unless the ingestion step explicitly records the identity and the permissions, the chunk has neither.
  • The pipeline queries with a service account. The index is reached with a technical credential that usually has broad read over the whole corpus — because that is what indexing needs.
  • “Who is asking” arrives as data, not as a rule. The user’s identity reaches the retrieval step as a string, and the index has no idea what that string may see.
  • Testing happens with the most privileged account. An administrator’s searches never expose the bug, because an administrator is allowed to see everything.

The same four decisions appear in the storage guidance as one requirement: the platform’s security model covers “document-level permissions” among the controls a search deployment must configure, and the same documentation describes building “permission-aware” knowledge bases rather than access-agnostic ones.

The mechanisms, from weakest to strongest

Query-time filtering on tags stored with the chunk. The chunk carries the tenant or the group identifiers, and every query adds a filter. This is the common answer because it is cheap, and the multitenancy guidance states both the requirement and the trade-off: “Each tenant’s data must stay isolated: when a tenant searches, they should only see their own data.”, and sharing one collection with payload filters is usually better than “creating a separate collection for each tenant”, because “each collection carries its own resource overhead”.

Filters that live inside the search. The filtering must be part of the query plan, not a post-processing step over results — which is why the filter fields need their own indexes (the hybrid-search sheet). A filter applied after retrieval can also leave too few results to answer with, which tempts an implementer to loosen it later.

Stronger isolation where it is warranted. The same guidance offers the next step up: “User-defined sharding gives each tenant its own dedicated shard. This trades some resource overhead for stronger isolation, and is best suited to a smaller number of larger tenants.” Isolation, not filtering, is the right answer when the parties are customers of the same system.

Access control in the store itself. Beyond the query path, the index has administrative surfaces — who may create collections, change schemas, read raw vectors — and a permission model of its own: “If role-based access control (RBAC) is enabled, access can be further restricted based on the roles of users”, with roles defined over resource types. Document-level security of the same kind exists in the search platforms used for retrieval, where it is expressed as a role-level restriction on which documents a query may return.

The decisions, in the order they matter

  1. What is the unit of permission? Tenant, group, role, individual. This choice propagates into the metadata schema and cannot be changed later without re-indexing (the chunking sheet’s rule).
  2. Where do the tags come from, and how do they stay current? Permissions change after ingestion: a document is moved into a restricted folder, a person leaves a group. Without a re-sync, the index holds a snapshot of yesterday’s permissions.
  3. Is the default deny? A chunk with no permission tags must be reachable by nobody except the pipeline, not by everybody. The failure to design for is an ingestion path that silently produces untagged chunks.
  4. What happens to a document that is withdrawn or restricted? Its vectors have to leave the index, or be made unreachable, in the same operation that changes its permissions (the preparation sheet’s deletion case).
  5. Who can query the index directly? The store has its own credentials, its own network exposure and possibly its own console — the surface the secrets sheet covers for the whole system.
  6. What is logged, and where does the retrieved text go afterwards? Caches, traces and debug logs are additional copies; a permission filter at the query does not protect the copies made downstream.

What does not work

  • Asking the model to be discreet. A prompt-level restriction is not a control: OWASP’s entry on sensitive information disclosure records that such restrictions “may not always be honored”. The filter has to run before the text reaches the model.
  • Treating the tenant as a relevance preference. A permission filter is a correctness condition. Making it a weighted hint, or letting a model decide whether to apply it, converts a control into a suggestion.
  • Letting the query text define the filter. If the filter is derived from the user’s text, the user can write the filter — the same class of problem as prompt injection.
  • Forgetting what an index contains. An embedding is not an anonymised form of the text (the embeddings sheet registers the inversion result), so an index is as sensitive as the corpus it mirrors.

Level and prerequisites. L3 — integration level: the reader must be able to specify how permissions travel from a source system into an index and back out at query time. No store is configured and no permission model is implemented here. Prerequisites: the chunking sheet (metadata) and the hybrid-search sheet (filters); governance-level material belongs to the Cybersecurity Governance area.

Where to go next

References

  • Qdrant — Multitenancy — the isolation requirement and the trade-off between payload filters and sharding.
  • Microsoft — Security in Azure AI Search — document-level permissions as part of the security model.
  • OpenSearch — Document-level security — the same control expressed at the role level.
  • Weaviate — RBAC — role-based restrictions over resource types.
  • OWASP — Top 10 for LLM Applications (2025), LLM08 and LLM02 — embedding and vector weaknesses, unauthorized access, and the limits of prompt-level restrictions.
Nodrius Field Kit — cover

Get the Nodrius Field Kit

Enter your email and we'll send you the complete Field Kit: eight technical resources in one download.

Your email address is sent to Nodrius and used to deliver the Field Kit to you by email. Marketing messages are separate and optional: the checkbox does not affect your download, and you are only added to our updates list if you tick it. Privacy Policy.

Privacy & cookies

This site does not use cookies, analytics or tracking, and it does not profile you. There is nothing technical to switch off, so Accept and Reject change nothing about how the site works: either choice lets you browse everything normally.

The only difference is what your browser remembers: two entries in local storage — your choice here, so this notice is not shown again, and a marker that the Field Kit offer has already been made — so the offer is presented once and not on every page. They contain no identifier, they are not shared with anyone, and the site sets no cookie for either.

What we do with your data
How your email address is used when you ask for a Resource, how long it is kept and which rights you have — in the Privacy Policy.
What the site stores in your browser
Two entries in local storage — your choice on this notice and whether the Field Kit offer has been shown — and no cookies, no session storage, no third-party content: in the Cookie Policy.