[ MSP, APIs & integrations ]

Tenant isolation in an MSP authentication service

Test tenant isolation across reads, exports, writes and background work rather than relying on a hidden user-interface filter.

By the EmailAuth research team · 2 min read

[ Key points ]

  • Test tenant isolation across reads, exports, writes and background work rather than relying on a hidden user-interface filter.
  • Test allowed and forbidden paths at each API, job and artifact boundary; hiding an interface control is not access enforcement.
On this page

An MSP service may present many customers in one console while still needing strict separation of their data and authority. Tenant isolation means that every request and derived artifact remains within the tenant scope the current principal is allowed to access. A customer selector in a browser is not a security boundary.

Map the boundaries

List report records, domain inventory, configuration proposals, exports, audit events and scheduled jobs. Identify how each object carries tenant context and where access is enforced. OWASP's multi-tenant guidance treats tenant context as a security concern across application and data layers; its authorization guidance recommends default denial and checking every request.

Derive tenant scope from trusted authenticated context and approved membership. Treat a tenant ID supplied in a URL or payload as untrusted input to validate, not as sufficient authority. When a background job runs, preserve the initiating tenant and recheck the permissions required for its action. Cross-customer MSP analysts need explicit multi-tenant grants, not a bypass inferred from their job title.

Test resources and operations independently

Use two fictional customers with distinct reports and domain objects. Attempt a permitted read, then swap only the resource ID. Repeat for export download, proposed DNS write and user-management change. Test direct API requests because an invisible button does not prevent a crafted request. Confirm denial does not disclose report content or object details unnecessary for the response.

Test cached results, search indexes and generated exports as well as database queries. A correctly scoped query can still leak data through a cache key that omits tenant identity. Export storage and download authorization need their own negative tests. Include role changes, suspended accounts and removed membership; a stale session must not preserve withdrawn privileges indefinitely.

Follow a report into its exported artifact

Suppose tenant A’s report API correctly denies tenant B, but a previously generated export can be downloaded by changing only its object identifier. The API test passed within its scope, yet export isolation failed. Preserve the request and artifact evidence without collecting unnecessary customer data, restrict affected access through the authorized incident process and investigate the exposure before expanding the pilot.

In a separate case, an analyst leaves the account after scheduling an export. The job consumer must re-establish trusted tenant context and check current authorization when it performs the work; a historical queue submission is not an enduring grant. These are hypothetical failure scenarios, not results from an actual product. Test both a valid scoped download and prohibited requests at the real API, job and storage boundaries, retaining identity, tenant, operation, object and observed result without secrets.

Define recovery and evidence

Keep isolation failures distinguishable from ordinary missing-resource errors in restricted operational logs while avoiding unnecessary disclosures to callers. Record the incident scope, affected artifacts, containment and re-test results. Do not silently delete evidence to make the test clean.

Acceptance requires successful allowed paths and failed forbidden paths across every relevant operation. A single passed matrix does not prove all application code is isolated. Re-run tests after permission-model, storage, cache, export or job-system changes. Assess shared infrastructure and privileged support access explicitly, with time-bounded grants and audit review where needed.

[ Takeaway ]

Test allowed and forbidden paths at each API, job and artifact boundary; hiding an interface control is not access enforcement.

[ By role ]

What this means for you

Choose your role for practical next steps.

IT / Mail Admin

Test the direct boundaries

UI behavior does not show what an API or export permits.

Next steps

  1. Swap object IDs between tenants.
  2. Test caches and scheduled jobs.
  3. Re-test after storage or export changes.

CISO / SecOps

Require evidence of denial

Access design needs observable enforcement.

Next steps

  1. Review privileged support grants.
  2. Retain cross-tenant regression tests.
  3. Investigate any forbidden action that succeeds.

Founder / Non-technical

Treat isolation as a service prerequisite

A shared console must not create shared customer data.

Next steps

  1. Budget negative-path testing.
  2. Define incident ownership.
  3. Require isolation acceptance before scaling.

[ FAQs ]

Frequently asked questions

Is a UI tenant filter sufficient?

No. Enforce authorization at the API, data and artifact access boundaries.

Can a request supply its own tenant ID?

It can submit an identifier, but the service must validate it against trusted scope.

Why test exports separately?

Generated files can have different storage, links and authorization from the original report.

What can a cache leak?

A result stored without tenant context can be returned to another customer.

Should MSP analysts bypass tenant checks?

No. Grant explicit scoped access for each authorized customer.

Do these scenarios prove a product is isolated?

No. They describe expected decisions. Actual API, job and artifact boundaries require allowed-and-denied tests with observed results.

What happens after a forbidden request succeeds?

Contain access, investigate exposure, preserve evidence and re-test before acceptance.

When should tests run again?

After material changes to permissions, storage, caching, exports or jobs.

[ Sources ]

Sources

  1. OWASP Authorization Cheat Sheet

    Sections Enforce Least Privileges · Deny by Default · Validate the Permissions on Every Request · Create Unit and Integration Test Cases for Authorization Logic

  2. OWASP Multi Tenant Security Cheat Sheet

    Sections §1. Tenant Identification & Context Management · §3. Preventing Cross-Tenant Data Access (IDOR Prevention) · §4. Cache & Session Isolation · §5. API, Asynchronous Work & Resource Controls · §6. File Storage & Blob Isolation · §7. Tenant Onboarding & Offboarding Security

[ Glossary ]

Glossary

Tenant context
Trusted scope tying a request or artifact to a customer.
Negative test
A test that verifies a forbidden action is denied.

Enterprise provenance

Why top financial institutions and governments retired their email security dashboards.

Traditional email authentication platforms sell you a dashboard and ask your engineers to do the labour. In high-stakes environments, manual oversight means delayed enforcement, configuration drift and unmonitored shadow domains.

EmailAuth is the agentic email provenance platform. Our agents enforce p=reject, keep third-party senders aligned and move your domains to full RFC 9989 compliance, the new DMARC standard,, with human-in-the-loop auditability.

Governments Large enterprises Tier-1 financial institutions

SaaS · Dedicated tenancy · Air-gapped on-prem · BYOK encryption

Knowledge Base