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.
requesterrorsignaldataresponsetool call
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