Skip to content
Let's talk ↗︎

Independent engineering · Samrat Neupane

Tenant isolation is a behavior you need to test.

A tenant identifier is not a complete isolation strategy. Requests, jobs, exports and administrative actions all need a clear account of which organization owns the data and who may act on it.

Published · Updated

Get a free review

Model membership separately from identity

A person can belong to several organizations with different roles. Treating the user record as the tenant can make invitations, account switching and delegated administration difficult. Start with the actual membership and permission rules before choosing database isolation.

Choose a boundary the team can operate

Shared tables, separate schemas and separate databases have different isolation and operational tradeoffs. Reporting, migration frequency, restore requirements and customer-specific constraints matter. PostgreSQL row security can be one part of a design, but its policies and privileged-role behavior still need to be understood and tested.

  • Authenticated membership and resource ownership
  • Tenant scope in queries, jobs and exports
  • Administrative access and audit requirements
  • Tests that attempt cross-organization operations

Follow the background work

A request may be correctly scoped while a scheduled export or job is not. For example, an invoice export needs to retain the originating organization through queueing, retrieval and file delivery. Testing only the screen that starts the export misses the rest of the boundary.

Make isolation an acceptance criterion

A scoped architecture or implementation engagement should name the operations and roles tested. The deliverable can include a tenancy model, migration plan and regression cases for cross-tenant access. It should not promise that selecting a tenancy pattern automatically makes the application secure.

Questions about multi-tenant saas architecture

Does every tenant need a separate database?

No. The choice depends on isolation, operations, customer requirements and recovery needs. It should be an explicit tradeoff.

Can you add tenancy to an existing application?

Yes, subject to investigating current ownership and records. Existing data needs a migration and verification plan.

Sources and further reading

These references explain technical mechanisms. They do not imply a partnership or endorsement.

Related articles

Discuss your product

Send the current stage, the problem and any public product information. I can clarify requirements in writing before quoting a fixed scope. Repository investigation and implementation are paid work, agreed separately.

Get a free review