Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
  1. Home
  2. Blog
  3. How Do I Know One Customer Cannot See Another Customer's Data in My SaaS?
Problems We Solve

How Do I Know One Customer Cannot See Another Customer's Data in My SaaS?

Worried one SaaS customer could see another's data? We check customer data isolation in your app, fix the gaps and add safeguards that stop regressions.

Updated 3 min readBy SpiderHunts Technologies

Free estimateNo obligation

Get a free estimate

Tell us what you need. A senior engineer reads every enquiry.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →

Quick answer — TL;DR

In most multi-tenant SaaS apps, isolation depends on every query remembering to filter by the customer, which works until one does not. We review every path to data, test for cross-tenant access, then enforce isolation at a lower level, such as database row-level security or a scoped data layer, so a single forgotten filter cannot leak data.

The question from a security questionnaire

A larger prospect sends a security questionnaire. One question asks how you ensure customer data is isolated. The honest answer is that every query includes the customer ID, and you think they all do. Or a developer mentions in passing that an export endpoint did not check the account, and it was fixed, and you start wondering what else might be like that.

Nothing bad has happened, as far as you know. But you cannot prove it, and you are not fully confident it could not.

Why isolation is fragile in most apps

Most SaaS products keep all customers in one database, with a column on each table saying which customer the row belongs to. That is a sound design. The weakness is how it is enforced. If isolation relies on each developer adding the right filter to each query, it holds only as long as nobody forgets.

  • New endpoints written in a hurry, missing the customer filter.
  • IDs in URLs that can be changed to another customer's record.
  • Background jobs and exports that run outside the normal request checks.
  • File storage where one customer's files sit next to another's under guessable paths.
  • Caches keyed without the customer, serving one tenant's data to another.
  • Admin and support tools that bypass the checks altogether.

What the uncertainty costs

RiskConsequence
A cross-tenant leakLoss of trust, possible regulatory reporting duties
Failed security reviewsLarger deals stall or are lost
Slow questionnairesSales cycles drag while answers are worked out
Developer anxietyEvery new feature carries the same risk

A data leak between customers is one of the worst things that can happen to a B2B SaaS product, because customers chose you partly on trust. Where personal data is involved, it may also carry legal obligations, which is something to take proper advice on.

How we check and harden data isolation

  1. Map every data path. Endpoints, background jobs, exports, file storage, caches, search indexes, analytics and admin tools, listing how each one decides which customer it serves.
  2. Test for cross-tenant access. With two test customers, we try to reach one's data while logged in as the other, through every path, including changing IDs in requests.
  3. Fix what we find, starting with anything exploitable, and report it to you clearly.
  4. Enforce isolation lower down. Depending on your stack, that means PostgreSQL row-level security, a data access layer that applies the customer scope automatically, or ORM-level scoping that cannot be skipped by accident.
  5. Scope files and caches. Storage paths and signed URLs per customer, and cache keys that always include the tenant.
  6. Add automated tests. Cross-tenant tests run on every release, so a new endpoint that leaks fails the build before it reaches production.
  7. Log access. Admin and support access to customer data is logged, so you can answer who saw what.
  8. Document it. A clear description of how isolation works, useful for security questionnaires and for new developers.

Where a customer needs stronger separation, such as a dedicated database, we can design for that too, but most products do not need it for every customer.

Confidence you can explain

The written description of how isolation works also changes how new features are built. Developers know which layer enforces the customer scope and do not have to reinvent it for each endpoint, and reviewers have a clear rule to check against.

You can answer the questionnaire with a description of how isolation is enforced, not a hope. Developers can add features without re-checking every query by hand, because the lower layer catches mistakes. Tests fail loudly if something regresses. And if a customer asks who accessed their data, there is a log to show them.

Should you check your isolation?

  • Isolation depends on each query including the customer ID.
  • You have not tested for cross-tenant access deliberately.
  • Record IDs in your URLs are sequential numbers.
  • Exports, jobs or admin tools run outside the normal checks.
  • Security questionnaires are becoming hard to answer honestly.

FAQ

Frequently asked questions

The questions readers ask us after this guide.

Still have a question?

Ask us directly — a senior engineer will get back to you.

Ask about your project

Do we need a separate database per customer?

Usually not. A shared database with isolation enforced at a lower level is sound for most products. Separate databases make sense for specific large customers or regulated data.

Is this the same as a penetration test?

It overlaps, but it is focused on tenant isolation and includes fixing the design. A broader penetration test by a specialist firm is still worth doing for larger deals.

Will row-level security slow the app down?

It adds a small overhead in most cases. We measure it on your queries before rolling it out.

What if you find a leak?

We tell you straight away, fix it, and help you work out whether any data was actually accessed. Whether you need to report it is a legal question to take advice on.

Does this cover AI features?

Yes. If your product uses AI with customer data, prompts, embeddings and vector search must be scoped to the tenant too.

Keep reading

More on Problems We Solve

Start here

Tell us what is slowing your SaaS product down

Describe the product, the stack if you know it, and the problem your team keeps running into. We will look at it honestly and tell you what we would change first, including when a smaller fix is the better answer than a big piece of work.

  1. You tell us what you needTwo minutes on the form, or a message on WhatsApp.
  2. A senior engineer reviews itAnd comes back with questions, a realistic range and an honest view on fit.
  3. Free 30-minute scoping callWe talk through scope, options and a realistic estimate — with no obligation.
Free estimateNo obligation

Talk to someone who builds this

Send a short brief and we will come back with an honest view and a realistic range.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →