CGMS · Module 4 of 5 · 11 min
Tenant isolation for memory and vectors
A shared vector store with a tenant filter applied in application code is one bug away from cross-tenant leakage.
Enforce tenancy at every query path, test it with cross-tenant probes, and make the absence of a tenant id a refusal rather than 'all tenants'.
CAIN treats cross-tenant leakage as a structural anomaly its trust graph looks for.
Key points
- App-level filters are fragile.
- Enforce tenancy on every query path.
- Missing tenant id = refuse.
- Probe for leakage.
In the CAIN-42 codebase
platform-gateway/trust_graph.py— cross-tenant leakage among the 8 anomaly queries
Practice check
Practice 1 · choose one
A query arrives with no tenant id. A safe store…
Practice 2 · true or false