Define the isolation unit
First establish what a tenant represents. It is not necessarily a customer record in CRM. Companies may share employees while retaining different document-retention arrangements, administrators and provider agreements. Choose the boundary from the accountability model and permitted relationships between organisations. Correcting this decision later can be harder than replacing the database.
Case ownership should come from a trusted session or verified integration. A tenant parameter supplied by a user is a request, not evidence of membership. Every processing stage must verify the relationship between executor, case and resources, including retries and manually resumed work.
Design storage boundaries explicitly
Options include separate databases, separate schemas and shared tables with enforced row controls. The choice affects operations, migrations, recovery and incident scope. Storage prices alone do not describe that trade-off. Shared storage requires particular discipline around connection context, administrative jobs and reporting tools that bypass the normal application path.
Make the same decision for search indexes and object storage. A cache key needs tenant and permission scope when the response depends on access. A filename, random identifier or unlisted URL does not replace authorisation at download time. The control must remain effective after document ownership changes.
Isolate the AI invocation
Consider an illustrative scenario in which two companies ask an assistant about contracts with the same supplier. Similar content increases the chance that mixed results will look plausible. Model context, retrieved fragments, conversation history and source references must all belong to the authorised scope. Tests using only obviously different documents will miss this failure class.
Keep background execution isolated as well. A worker should not inherit an organisation's identity from its previous task. Re-establish permissions to the specific resource before invoking a tool. Access changing during a long-running job may require rejecting a later write or download even when the original request was valid.
Shared resources also share constraints
| Layer | Risk | Example control |
|---|---|---|
| Queue | One tenant blocks other work | Budgets and fair scheduling |
| Retrieval | Fragments outside the authorised scope | Authorisation before context assembly |
| Cache | Another organisation's answer is reused | Tenant and permission-version keys |
| Export | Access remains after ownership changes | Revalidation at every download |
Test boundary crossing, not merely missing data
Create pairs of similar documents for different tenants and users with partly overlapping roles. Test deliberate identifier substitution, resumption after access changes, exports and cached results. Inspect the sources cited by the model as well as its answer text. Revealing the title of a restricted document can itself disclose information.
Include support administrators and operational copies in acceptance testing. A platform support role should not automatically read every company's business data. Emergency access requires a reason, limited scope and an event record. Apply the same discipline to test environments, where production copies can otherwise lose their original isolation.
Make the operating trade-off visible
Before scaling, establish how to restore one tenant's data, disable its integration and restrict its consumption without disrupting other organisations. If those actions cannot be performed independently, the shared design may hide excessive operational coupling. Higher expenditure on selected isolated components can be justified when it reduces incident scope or clarifies responsibility.
The acceptance decision should name who owns each isolation boundary and how a suspected cross-tenant disclosure is contained. A successful functional demonstration provides little evidence about those properties.
Recovery is an isolation test
Restoring one tenant involves records, files, indexes and task state together. Restoring a database while leaving a stale index can re-expose removed information; replaying an old task can use permissions that are no longer valid. Include migrations, recovery and tenant retirement in boundary testing. Verify both data completeness and current authorisation before resumed operations create new business effects.
Migration identities often have broader access than the application, so give them an explicit scope and review record. Verify that a partially completed migration can resume without touching unintended organisations. Record affected resources without copying their full contents into logs. Administrative convenience should not silently remove boundaries maintained by the normal execution path.
Design platform boundaries with Geekforce
We help build applications, integrations and AI assistants serving multiple organisations. Together, we can assess data flows, permissions and operating arrangements so automation improves your business without uncontrolled mixing of processes or information.


