Cross-Tenant Boundary Discovery
Locate every point where one tenant's data could cross into another's, using two tenants you control
Use when: the API is multi-tenant and you can operate two separate tenants for testing
Avoid when: you have only one tenant available, where cross-tenant tests cannot be performed honestly
Procedure
- Create two tenants you are authorized to use and populate each with clearly labeled fixtures so leakage is unmistakable.
- Record how tenant context is derived: claim, header, host, API key or a server-side session attribute.
- Identify every endpoint that returns lists, exports, search results or aggregates, since those are where isolation must be enforced.
- Run each tenant's requests while watching for the other tenant's fixture labels appearing anywhere in responses.
- Check background and asynchronous paths such as webhooks, exports and caches, which often bypass the request-scoped filter.
- Document the tenant derivation mechanism per endpoint group, marking any endpoint where it is absent.
Signals
- A response contains a fixture identifier that belongs to the other test tenant.
- Tenant context comes from a client-supplied header with no server-side confirmation.
- Search or aggregation results are broader than the tenant filter applied to plain list endpoints.
- An asynchronous export delivered later contains objects from both test tenants.
Patterns
1. Fixture labeling
tenant A fixture: ACME-ALPHA-001 tenant B fixture: ACME-BETA-002
leak detector: response contains the other tenant's label -> finding
2. Derivation table
endpoint group | tenant from | client-controllable
/api/v2/* | claim | no
/api/export | header | yes -> verify server-side binding
3. Async check
export job submitted as A -> download -> scan for B labels
Pitfalls
- Testing with two accounts in one tenant, which proves nothing about tenant isolation.
- Checking only synchronous responses while the leak happens in a background job or cached view.
- Skipping endpoint groups such as webhooks and exports, which frequently lack the request-scoped filter.
Done when
- Tenant derivation is documented per endpoint group, and both tenants' fixtures are checked on list, search, export and async paths.
- Any endpoint with no server-confirmed tenant derivation is flagged for focused review.