AI and LLM Security

RAG and Knowledge Source Security

We test whether document permissions in the knowledge base are preserved in your assistant's answers. We show how externally added content can affect the model.

What it is

RAG (retrieval-augmented generation) means the model retrieves relevant document chunks from a knowledge base before answering. Documents are split into pieces and stored in a vector database. If permission data is lost during this process, the model may quote from documents the user cannot access. OWASP addresses these risks under vector and embedding weaknesses.

Scope

  • Whether document permissions are enforced per user at retrieval time
  • Whether deleted documents or documents with changed permissions remain in the index
  • Direct access to the vector database and separation between customers
  • Who can add content to the knowledge base
  • Instructions hidden in externally added content

The need

When organizations need it

  • When HR and legal documents are added to the knowledge base of an assistant used by all employees.
  • When the knowledge base includes documents uploaded by customers or suppliers.
  • When a source such as SharePoint, Confluence, or Google Drive is about to be connected to the assistant.

Method

How we work

  1. Data flow

    We analyze how documents move from source to index and from index to answer, and where permissions are enforced.

  2. Permission testing

    With accounts in different roles, we attempt to access content of documents they cannot reach.

  3. Freshness

    We check whether deleted documents or those with removed access still appear in answers.

  4. Content trust

    We test whether a document added from outside can steer answers or tool calls.

Outcome

What you have at the end

You see which documents a user can access through the assistant without proper permission. It becomes clear how to enforce permissions at retrieval and keep the index synchronized with the source.

Frequently asked questions

If permissions are correct in the source system, will the assistant behave correctly?

Not always. Permission data can be lost or updated late when documents are copied to the index. Permissions should be checked against the user's identity at retrieval.

Do embeddings also need protection?

Yes. OWASP lists attacks that can recover significant source information from embeddings under this risk. The vector database should be protected as much as the documents themselves.

AI and LLM Security

Other services in this area

Let's talk about this service.

Tell us briefly what you need. We will agree on the scope and timing together in the first meeting.

Schedule a Meeting