Articles
A vector index inherits the data, not the permissions
By Leandro Oliveira, Founder of BeryxTech
Published · 7 min read
- Topic
- AI agents
- For
- DPO
- Data engineering
An assistant that answers from the company's documents first searches a vector index: the origin's texts, split into chunks and turned into numbers. The copy carries the information, but it does not carry who could read it at the origin, nor the classification the origin had. That is why the security of a RAG starts with the data, with three questions: where did the vectors come from, what sensitivity do they inherit, and who reads the index without reading the origin. The first two are data governance questions, not model security ones.
What the copy carries
In a RAG, a pipeline reads the origin documents or tables, splits the text into chunks and asks an embedding model for one vector per chunk. The vectors go into an index, next to each chunk's text, and the assistant searches the index by closeness to the question. What comes back from the search is the original text, which the model uses to answer.
The origin's permissions stay where they were: the roles with access to the table, the row policies and the column masks. The index is another object, in a vector database, a search service or a new warehouse table, with whatever permissions the person who built the pipeline gave it. The classification stays at the origin too. The personal data label is on the column the text came from, and an embedding is numbers, where nobody searches for a tax number or an email.
The OWASP 2025 list for LLM applications gives this point a risk of its own, LLM08:2025, vector and embedding weaknesses. The first example is unauthorised access and data leakage when access controls are inadequate or misaligned: the model can fetch personal or confidential data from the index and show it. The same page describes attacks that invert embeddings and recover a significant part of the origin information, so the numbers do not anonymise what they hold. Sensitive information disclosure has a risk of its own in the same list, LLM02:2025.
1. Where did the vectors come from?
Without knowing which tables and documents fed an index, nobody knows what it contains or who should read it. The pipeline that builds it is often a notebook or a scheduled job, and the link between the origin and the index is not in any catalogue. An index outside the catalogue has no owner either, and nobody answers for it when the origin changes.
In BeryX, a table with embedding columns enters the catalogue as a vector index: a dataset like any other, with an owner, domain, lineage, trust and links to the agents that consume it. In pgvector, Snowflake, Oracle, SQL Server and MySQL, the column type proves it. In BigQuery, Databricks AI Search and MongoDB, the vector index the source declares proves it. A Weaviate collection comes in with only its schema and count, without BeryX reading an object or a vector. With the engineering sweep turned on, Snowflake's Cortex Search services enter the inventory, with each one's embedding model. See vector indexes, the vector index mark, Weaviate and the sweep on Snowflake.
In BeryX, embeddings never leave the source: vector columns stay out of the row sample, checksums and duplicate matching, so they do not reach an LLM either. An index's origin is declared on its page, where an admin states which datasets the vectors came from. With no origin, the index shows the gap "Origin not declared" and inherits nothing. See vector indexes and the sensitivity that comes from the sources.
2. What sensitivity do they inherit?
If the origin has personal or confidential columns, the index holds the same information in another form. Since it cannot be searched for in the vectors, the index's classification has to come from the origin, through lineage. And it should only go up: an origin declassified by mistake, or an edge deleted in a clean-up, must not lower the index without anyone noticing.
In BeryX, an index's vector columns inherit from the declared origins the highest level they have, personal or confidential, counting the detected PII that curation has not declassified. Inheritance only goes up. Classifying the origin later reaches the index in the same transaction, without running its scan, and declassifying the origin or deleting the edge does not lower the index. Lowering an inherited column is for an admin or the owner of one of the dataset's domains, and it stays in the trail. The text and metadata columns next to the vectors go through the usual PII detection. See the sensitivity that comes from the sources.
In BeryX, inheritance is only as good as the declared lineage. It follows one hop from the origin, plus indexes in a chain, and an unclassified intermediate view does not count. A missing or wrong origin leaves the index without the classification it should have, and BeryX does not read the vectors to confirm it. See the limits of inheritance.
3. Who reads the index and not the origin?
The third question is about permissions, and it is where the copy drifts furthest from the origin. The origin table grants read access to a restricted role. The index gets the permissions of whoever built the pipeline, often a service account or a broader role. Someone who cannot read the table can read the index, and an assistant on that index hands them the chunks of text the origin hides from them.
Among the mitigations for LLM08:2025, OWASP asks for fine-grained access controls and permission-aware vector stores, the classification of data within the knowledge base, and detailed, immutable logs of what each search retrieved.
In BeryX, a classified index, like any classified dataset, is only readable by an approved agent with a declared purpose and a complete go-live, if the index is linked to it and through a tool the rights matrix lets reach classified data. Other requests get a 403. At go-live, the classification of the linked datasets has to be verified by a person or by the catalogue, and the one inherited through lineage counts. See the agent register and the sensitivity that comes from the sources.
In BeryX, every agent request, accepted or refused, goes into the usage log, with the tool, the datasets, whether they were classified and the reason for the refusal. See the agent register and per-agent identity and governance. The rest of an agent's path, from its identity to the actions it proposes, is in the article The four questions before giving data to an agent.
From the origin to the agent
The chart puts the three questions on the path of a RAG: what passes from the origin to the index through lineage, and what stays at the source.
The path of a RAG
The origin's texts become vectors in an index, and the agent searches the index.
- OriginClassified columns and PII detected in the values
- IndexA catalogue dataset; the scan does not read the vectors
- AgentReads through MCP, with its record applied on every request
What passes through lineage
The sensitivity of the origins an admin declares on the index page.
- Declared origin, or the gap “Origin not declared”
- The origins' highest level, only upwards
- Lowering is for whoever decides, and stays in the trail
- The text next to the vectors goes through PII detection
What does not pass on its own
The source's permissions. Through BeryX, the agent guards apply the inherited classification.
- A classified index only with a complete go-live
- And through a tool the matrix lets reach classified data
- Other requests get a 403 and go into the usage log
Only what is already in production.
What is still missing
In BeryX, the guards on inherited classification apply to whoever reads through BeryX, with an agent token. Someone who reads the index directly at the source, with the permissions the source gives them, does not go through them. BeryX does not yet compare who reads the index with who reads the origin, so it does not show the index built from a restricted table that, at the source, a role without access to the table can read. See the sensitivity that comes from the sources.
Where to start
Start with the inventory: which vector indexes exist, which tables and documents they came from and who answers for each one. For each index with a personal or confidential origin, compare at the source itself the roles that read the index with those that read the origin. Where the index has readers the origin does not, remove their access before linking an agent to the index.
The page for those who govern AI gathers what is already in production, from the agent register to the go-live. To measure on your sources, the Data diagnostic connects to some of them, read-only.
Transparency: BeryxTech, which publishes this article, builds BeryX, and we have an interest in you using it. The sections about the product describe what is in production, with a link to the documentation. The OWASP content is licensed under CC BY-SA 4.0, and we cite it in our own words, with a link to each page.