Test identity, retrieval filters, caches, citations, observability and deletion so one client’s marketing evidence cannot ground another tenant’s RAG answer.

Marketing Trust & Systems · Tenant isolation
How Do You Test a Multi-Client Marketing RAG for Cross-Tenant Data Leakage?
By CDM Editorial TeamSpecialist review required: Security and retrieval-engineering reviewerResearch checked 12 October 20261,522 words · 7 min read

Short answer: Test cross-tenant RAG isolation with paired synthetic tenants and canary facts. Verify identity and authorisation before retrieval, candidate filtering, cache partitioning, citation generation, logging, export and deletion. Attempt direct, paraphrased and indirect extraction from every role. Any foreign candidate or answer is a release blocker, even if the final response happens to hide it.

16:9 editorial image briefReal security test bench with two clearly separated colour-neutral client folders, isolated laptop test windows and canary cards. No real client names, no hacker hoodie or code rain, precise editorial photograph, 16:9.

Agencies and martech platforms gain efficiency by using shared retrieval infrastructure across brands. That shared layer also creates a severe failure mode: one client’s strategy, claims, performance or unreleased work appears in another client’s candidate set, answer, citation, cache or export. A polite model refusal cannot compensate for an authorisation failure underneath it.

Isolation must be proven at every serving boundary. The test uses harmless, distinctive canaries so leakage is detectable without placing real client secrets into adversarial prompts. It records candidates as well as final text because the model may suppress a foreign source in one run and reveal it in the next.

What the official evidence establishes

NIST’s Generative AI Profile provides voluntary risk-management guidance for generative-AI systems, including governance, measurement and management. It does not certify a particular multi-tenant design or prescribe this test pack.

NIST SP 800-207 on Zero Trust Architecture describes a resource-focused approach in which trust is not implicitly granted by network location and access decisions are enforced. CDM applies the principle to retrieval: tenant identity and resource permission must be evaluated at the data boundary, not inferred from a chat label.

Vector stores, search services, cache layers and observability vendors implement namespaces and filters differently. A logical tenant field can fail through missing filters, asynchronous jobs, shared cache keys or privileged support roles. Test the deployed architecture and provider behaviour; do not accept “multi-tenant” as an assurance claim by itself.

The CDM Multi-Tenant Isolation Test Pack

Create at least two synthetic tenants with overlapping topics but distinct canary facts. Test each identity, role and lifecycle path while capturing pre-generation candidates.

BoundaryTestPass evidenceFailure example
Identity / authorisationSwap tenant, user, token, role and expired sessionPolicy decision bound to tenant and resourceClient-side tenant ID accepted without server check
Ingestion / indexUpload same filename and similar content to both tenantsStable tenant/source IDs and isolated candidate setBackground job omits tenant metadata
RetrievalAsk direct, paraphrased, comparative and ambiguous questionsZero foreign candidates before generationSimilarity search retrieves cross-client chunk
Cache / conversationRepeat across tenants, sessions and shared promptsTenant-scoped cache and memoryAnswer from tenant A served to tenant B
Citation / exportOpen citations, downloads, logs and evaluation exportsAll references authorised and resolvableSigned URL or report exposes foreign source
Deletion / supportDelete tenant and exercise admin/debug toolsNo serving copy; audited break-glass accessBackup, cache or support trace remains exposed

How to run the Multi-Tenant Isolation Test Pack

1. Model tenant assets and actors

List data stores, indexes, caches, queues, logs, analytics, exports, evaluation sets and support tools. Map user, service, administrator and vendor roles. Define which components are physically separate, logically filtered or shared with encryption and access policy.

2. Seed paired canary corpora

Create synthetic brands with similar products but distinctive harmless claims, names and code phrases. Include common filenames, duplicate headings, attachments and withdrawn versions. Record every source and chunk ID. Never use real client secrets as the canary.

3. Test identity and policy enforcement

Attempt tenant-ID changes, token reuse, expired sessions, role downgrades, batch jobs and service-account calls. Confirm the server derives and enforces the authorised tenant. Test break-glass administration and record whether access is justified, time-bound and logged.

4. Attack retrieval and conversations

Ask for the foreign canary directly, indirectly, through comparison, misspelling, translation, summarisation and follow-up context. Inspect candidate traces before generation and repeat across clean and long conversations. A refusal with a foreign candidate is still an isolation failure.

5. Exercise secondary paths

Test semantic and response caches, citations, previews, downloads, analytics dashboards, offline evaluations, logs, feedback tools and support exports. Use concurrent requests and tenant deletion to expose race conditions. Verify signed links expire and cannot be replayed from another identity.

6. Contain, fix and retest

If leakage occurs, suspend the affected serving path, preserve evidence and follow the security incident process. Repair the policy, metadata, cache key or architecture and rerun the full suite, not only the failing prompt. Add the scenario to automated regression where safe.

Decision rules

Pass is strict: no unauthorised foreign candidate, citation, cached answer, file, log or export. Model behaviour cannot downgrade a data-boundary defect.

SignalDecisionEvidence to retain
Foreign chunk appears in candidate traceBlock release and treat as isolation incidentIdentity, query, candidate and policy logs
Final answer hides foreign candidateStill fail; repair retrieval boundaryCandidate trace and generated output
Cache key lacks tenant/permission contextDisable shared cache until partitioned and testedCache design and cross-tenant replay
Support/admin role can browse without controlled approvalImplement audited, time-bound break-glass processAccess request and audit event
Tenant deletion leaves a serving derivativeKeep deletion open and trace all copiesDeletion inventory and fixed query panel

Build the evidence record before launch

Retain enough technical evidence for security review without exposing real tenant content. Use synthetic IDs in the test report and store detailed logs in the protected incident or assurance system.

  • Architecture and trust boundaries for stores, indexes, caches, logs and exports.
  • Tenant, user, role and service-account identity/authorisation matrix.
  • Synthetic canary sources, chunk IDs, expected tenant and lifecycle state.
  • Prompt suite, session state, candidate traces, answers and citation targets.
  • Cache, concurrency, batch, admin, feedback and export test results.
  • Deletion, revocation, backup and break-glass evidence.
  • Incident decision, remediation, regression tests and specialist sign-off.

Do not send canary patterns that resemble real secrets into uncontrolled external services. Coordinate adversarial testing with the authorised security team, test environment and provider terms. Stop if the test exposes real client information.

Separate fact, CDM inference and the operating decision

Documented fact

NIST publishes voluntary generative-AI risk guidance and a zero-trust architecture model; actual tenant isolation depends on the deployed identity, data and serving design.

CDM inference

Paired canaries plus candidate-level inspection should detect failures that answer-only testing misses, but a passing suite cannot prove the absence of every race condition or unknown provider defect.

Operating decision

Do not launch or continue a multi-client retrieval path when any unauthorised tenant content enters candidates or secondary surfaces; contain it, investigate as a security event and retest the entire boundary.

Worked example: a shared cache leaks a campaign name

Illustrative scenario: this example is fictional and demonstrates the method; it is not a reported case study.

A fictional agency creates two test tenants that both sell running shoes. Tenant A’s synthetic launch is called Project Juniper; Tenant B uses Project Slate. Direct retrieval remains isolated, and candidate traces show only authorised chunks.

A repeated generic question—“What is the launch name?”—returns Project Juniper to a Tenant B session because the application caches answers by prompt text without tenant and permission context. The model did not retrieve foreign data in the second request, but the serving system leaked it.

The agency disables the response cache, redesigns the key and authorisation check, purges entries and adds cross-tenant replay tests. It also inspects analytics and support exports for the canary. Passing vector-store filters alone would have missed the incident.

Limitations and review boundary

Authorised security testing requires scope, safe data and incident handling. This article does not provide exploit payloads or replace a penetration test, architecture review, provider assessment or contractual control. Follow organisational and legal authorisation.

Managed-service internals may not expose candidate traces or deletion semantics. Limited observability is itself a risk and may constrain acceptable use. Passing tests under one configuration does not cover future model, index, cache, identity or provider changes.

Frequently asked questions

Is a separate vector namespace enough?

Not necessarily. Identity, ingestion, retrieval, cache, citation, export, logs and administration must all enforce the tenant boundary. Test the complete path.

Why fail when a foreign candidate never appears in the final answer?

Because the unauthorised data reached the model context and may appear under another prompt, be logged or influence output. Isolation should prevent retrieval before generation.

Can we test with real client secrets?

Use distinctive synthetic canaries instead. Real secrets create unnecessary exposure and can turn a controlled test into an incident.

How often should isolation be tested?

Before launch, after identity/retrieval/cache/provider changes, at least quarterly for material systems, and after any relevant incident. Automate safe regression cases where possible.

What if the provider will not expose retrieval traces?

Document the observability gap, seek contractual or technical alternatives and reduce use accordingly. For high-sensitivity multi-client data, inability to verify isolation may be unacceptable.

Method and publication status

This prepublication draft was researched from the primary materials linked at the claims they support and checked on 12 October 2026. It requires the named specialist review, live-product retesting where indicated, a real 16:9 editorial image and final URL verification before publication. It is operational analysis, not legal, security or compliance advice.

CDM Editorial

This article is editorial guidance. Apply the principles in proportion to your market, evidence, and responsibilities.