Skip to main content

Multi-tenant SaaS hardening · Memox

How Memox turned a tenant-isolation fix into an engineering standard

One tenant-isolation defect in our own multi-tenant SaaS architecture became a shared permission pattern, regression tests and a review rule that blocks a merge.

Memox public website introducing its managed AI workflows
Memox is an Autonomous-owned product. Its public site is shown for context, not as a screenshot of the internal agent platform. Captured 11 September 2026.
Integrations & Custom Systems5 minute readBy Rizwan QaiserRead the case study
Paired backend and dashboard fix
1 day
From fix to blocking review standard
17 days
Permission tests protected during a later CI change
61 tests

We found a tenant-isolation defect in our own multi-tenant SaaS architecture. The fix took a day. Turning it into a house rule took seventeen.

Quick primer: tenant isolation is the wall between customers who share the same software. Every client (a "tenant") lives in the same building, running on the same servers and often the same database, but each one should only ever see their own stuff. When isolation works, nobody notices. When it breaks, Customer A opens their dashboard and finds Customer B's orders staring back at them.

Autonomous is a Shopify systems agency. We build and repair the systems behind stores for the founders and staff who run them, and we run our own products on the same rules. Every date and figure on this page comes from our own engineering record, checked in September 2026.

The rule behind a multi-tenant SaaS architecture

Multi-tenant means many firms share one running application. Memox calls each firm an organisation. Tenant isolation is the rule that keeps them apart. Every read, every change and every search has to stay inside the firm that owns the record.

Memox is our own product. We built it and we run it. Businesses use it to cut the hours their staff spend hunting through documents and sales records, by letting a trusted agent do the looking. So keeping one firm’s material away from another’s is not a nice extra. It is the product.

We found a tenant-isolation defect and corrected it. There is no evidence that any tenant’s data was read across the boundary. The part worth telling is what changed in how we work. The fix reached both the server and the dashboard, and the pattern became a rule for everything built after it.

A backend fix was only part of the job

Knowing who someone is and knowing which firm they may act for are two different checks. Both have to hold on every screen.

Signing in proves identity. It does not prove which firm you may act for. A feature has to apply that line when it reads data, when it writes data and when it searches. Write that logic once per feature and the versions drift apart.

The fix landed on April 30, 2026. We moved the affected code onto one shared permission pattern, with every query scoped, meaning limited to the records of one firm. We added regression tests for requests that should be refused. A regression test locks in a bug you have already fixed, so it cannot come back quietly.

The dashboard changed the same day. Switching firm now asks for fresh content instead of holding the last one’s view. That pairing covered what the user sees as well as what the server decides.

How the system works: Organisation context, Shared permissions, Scoped operations, Regression review
Illustration of the implemented workflow. The same organisation boundary must hold across reads, changes, search and the interface.

Workflow: Organisation context → Shared permissions → Scoped operations → Regression review.

Turning the correction into a repeatable rule

We did not just fix the defect. We made the fix the house rule, so the next person has one pattern to follow and a reviewer who will spot a departure from it.

Review found a way to simplify further. The app already had one standard guard, a single place that decides whether a request is allowed. So we dropped a one-off helper and used that instead. The principle was simple. A future contributor should be able to follow one written pattern, and a reviewer should notice when they have not.

The engineering guide gained a worked example and a test pattern for isolation. The repository instructions carried the rule at once. A numbered checklist followed. Within seventeen days the review standard treated a departure as a blocking issue, not a note. New feature specs now list tenant isolation in their acceptance criteria; the list a feature must satisfy before it counts as done. The same controls apply to work written by people and work written with an agent.

Keeping the permission tests present matters too

A test only protects you if the pipeline still runs it. So we added a guard against the tests being switched off by accident.

Later we looked at speeding up continuous integration, the system that runs the tests on every change. Review caught a config edit that would have stopped collecting 61 role, organisation and team tests. The workflow we shipped added a guard against that config coming back.

That episode widened the lesson. Four things make one chain: the permission code, the tests, the step that finds the tests, and the review habit. Improve one link while quietly weakening another, and the team believes a boundary is better covered than it is. Reviewing the delivery machinery is part of maintaining the app.

A stronger practice, with limits

The result is a shared pattern backed by tests and review rules. It is not proof that a growing app has no isolation defects left. A later review found a separate issue elsewhere, which is the point: a written rule does not replace reading the existing code.

If you build across accounts, stores or business units, make four calls up front.

  1. Which firm owns a record.
  2. Where you check membership.
  3. Which actions are scoped.
  4. What a refused request looks like.

Those belong in the build and its acceptance criteria from day one.

People behind the work

Abdullah, Autonomous co-founder and engineer. The project sources document his contribution to this platform.
Abdullah, Autonomous co-founder and engineer. The project sources document his contribution to this platform.

Questions and answers

Why is login not enough for tenant isolation?

Login says who someone is. The app must also work out which organisation they may act for, and hold the request inside that organisation’s records.

Why did the dashboard need a change?

A server can apply the right permissions while the screen still shows stale data from an earlier organisation. The paired change made switching context refresh what you see.

Did the incident result in confirmed cross-tenant access?

There is no evidence that any tenant’s data was read across the boundary. We describe the defect we fixed and what we changed, and we do not claim tests prove the absence of every possible defect.

How does this relate to store automation?

An integration serving several stores or business units needs the same explicit account boundaries. The transferable habit is to define them, enforce them in one shared place, and test refusals as well as successes.

What does a multi-tenant SaaS architecture have to enforce?

Which organisation owns each record, where membership is checked, which operations are scoped to that organisation, and what a refused request returns. In Memox those checks moved onto one shared scoping and permission pattern on April 30, 2026, with regression tests for refused requests and a paired dashboard change so switching organisation refreshes what is shown.

Loading page