Skip to content

🏒 Multi-tenant

πŸ“ Short definition

In AI SaaS architecture, multi-tenant (multi-locataire) refers to deploying a single infrastructure β€” inference server, vector database, embedding pipeline β€” that simultaneously serves multiple independent organizations (tenants), with strict data isolation between them.

πŸ“– Detailed definition

The central risk of a multi-tenant RAG system: embeddings or documents from Tenant A are accidentally returned in response to a query from Tenant B. OWASP classifies this type of flaw under LLM08: Vector and Embedding Weaknesses in the LLM Top 10 (2025 edition)1.

Isolation cannot rely solely on the application layer β€” a forgotten tenant_id filter in a query is enough to cause a leak.

πŸ’‘ Mitigation patterns

Row-Level Security (RLS) with pgvector

PostgreSQL RLS applies a tenant_id filter at the engine level during each vector similarity search. Even if the application omits the filter, the RLS policy blocks access to another tenant’s rows2.

Payload partitioning with Qdrant

Qdrant allows scoping vector searches via payload filters (tenant-specific access keys), without multiplying collections β€” one shared collection, logical partitions per tenant3.

PatternEngineAdvantage
RLS + pgvectorPostgreSQLSQL-level isolation, native auditability
Payload partitioningQdrantVector scalability, native per-tenant filtering

⚠️ Common pitfalls

  • Believing one vector collection per tenant is enough without controlling shared API keys.
  • Forgetting to also isolate indexing pipelines: a worker that indexes the wrong corpus contaminates the entire database.
  • Neglecting non-regression tests on isolation with every schema or query change.
  • Forgetting that the shared inference engine is also a common point of failure: in 2026, several vLLM advisories showed that a single request from one tenant could bring the engine down for everyone, hence an up-to-date version (β‰₯ 0.34.0 as of Q4 2026, see Local inference security) and per-tenant quotas at the gateway4.

πŸ“š To go deeper

  1. 🧩 RAG & Agents β€” multi-tenant section
  2. πŸ”’ Local inference security β€” LLM08 OWASP

πŸ”— See also

Footnotes

  1. OWASP GenAI Security Project, LLM Top 10 for LLM Applications (2025). https://genai.owasp.org/llm-top-10/ ↩

  2. Crunchy Data, Row Level Security for Tenants in Postgres. https://www.crunchydata.com/blog/row-level-security-for-tenants-in-postgres ↩

  3. Qdrant, Multitenancy. https://qdrant.tech/documentation/manage-data/multitenancy/ ↩

  4. vLLM, advisories GHSA-rhcx-5729-88vg (cross-tenant DoS via prompt_logprobs, fixed 0.31.0) and GHSA-gx7p-2j49-hfq4 (unauthenticated DoS via mm_processor_kwargs, fixed 0.31.0), 6–9 October 2026 Β· GHSA-q9v9-qpjp-fc24 (engine shutdown under --skip-tokenizer-init, fixed 0.33.0), 2 November 2026 Β· GHSA-xgh8-qwjh-q853 (chat template lock bypass via /v1/systemone, fixed 0.34.0), 18 November 2026. https://github.com/vllm-project/vllm/security/advisories/GHSA-rhcx-5729-88vg Β· https://github.com/vllm-project/vllm/security/advisories/GHSA-gx7p-2j49-hfq4 Β· https://github.com/vllm-project/vllm/security/advisories/GHSA-q9v9-qpjp-fc24 Β· https://github.com/vllm-project/vllm/security/advisories/GHSA-xgh8-qwjh-q853 ↩

Give my opinion

Everything is optional: one answer is enough. This site sends nothing: you send it, the way you choose.

Your noteNo note
Your opinion is about
About what? (several choices possible)
What will be sent
Send by e-mail

Private, no account: opens your mail program with the message ready, for ia-on-prem@damien.becherini.fr.

Open a GitHub issue β†—

Public, with a GitHub account. You read the issue again before you publish it.

To paste it wherever you want.

Give at least a note, a subject or a message to be able to send.