Skip to content
anythingai.space
AI Securityintermediate13 min · 9 steps

Access Control

Authenticate every caller, authorize every action, isolate every tenant's data and cache, and leave an audit trail, including for agents.

renewal terms?top-kA's contractUser Atenant AUser Btenant BRAG serviceShared vector DBA's contractsB's tickets
requesterrorsignaldataresponsetool call
1 / 9
ProblemStep 1 of 9

User B asks a question and gets tenant A's contract

Two companies share one RAG deployment. A user from tenant B asks about renewal terms. The vector DB returns the closest chunks it has, and the closest happen to be tenant A's contracts.

Nothing was hacked. Similarity search simply doesn't know who is asking. Any data access path without a mandatory tenant filter is a cross-tenant leak waiting for the right query.

Watch outIn multi-tenant LLM apps, tenant_id is a mandatory filter at every data access point, not an optional parameter.
What changed
  • +Two tenants, one shared index
  • ~A's chunk reaches B

Lesson 2 of 22 in AI Security