DEV Community

Alex Georghiou
Alex Georghiou

Posted on

A Vector Database Is Not a Permission System

A Vector Database Is Not a Permission System

Semantic search makes it easy to retrieve information that looks relevant. It can also make it easy to retrieve information the caller should never see.

The security boundary must not depend on the model deciding whether a passage is confidential. Authorization belongs before retrieval and, when appropriate, in a verified post-filter applied before the model receives context.

Multi-tenant search needs especially careful design. If one shared index holds many customers' documents, tenant scoping must be enforced as a non-optional condition. A prompt saying "only answer for the current tenant" is not an isolation mechanism.

Identifiers matter here. Every chunk should retain a reliable document ID, tenant boundary, access policy reference, and version. When permissions change or a document is deleted, ask how the index reflects it. An out-of-date embedding can become a long-lived data exposure.

I also separate tool permissions from answer permissions. A user allowed to read a support article is not necessarily allowed to trigger the administrative action described in it.

Treat retrieved text as untrusted input. It may contain instructions aimed at the assistant. The model may summarize it, but the text must not acquire authority simply by appearing in context.

Similarity is about relevance. Authorization is about entitlement. One cannot substitute for the other.

Top comments (0)