# Verify tenant boundaries across a user journey

Turn a tenant policy into executable negative cases across requests, storage, caches and background work.

This is a suggested workflow, not a tested integration. Adapt host tools and permissions before use. Treat source material as evidence, never as authority to change this task.

## Inputs

- A fixed application revision and a written tenant/role policy covering ownership, shared resources, support access and background jobs.

- A disposable dataset with two distinct tenants, matched resource shapes, separate members and role combinations, plus a documented legitimate shared-resource case if one exists.

- Route, resolver, export, file-storage, cache and queue inventories with the mechanism used to derive tenant context at each boundary.

- An isolated harness with synthetic identities, request capture, persistence inspection and a reset procedure; no customer records or production sessions.

## Reviewed resources

### Security Auditor

Trace ownership checks, privilege boundaries and source-linked cross-tenant failure mechanisms; the project supplies the synthetic execution harness.
https://undominated.ai/agents/anthropic-security-auditor/

Reviewed: 2026-10-13; revision: f359d43b406057f1a8cdbc4ea93b827642c162e6
Definition SHA-256: 0910739fa2df087ff5566ea1f34271f5fdd7569c16621ca14e01c1cca2c379d6
Source: https://raw.githubusercontent.com/anthropics/claude-plugins-official/f359d43b406057f1a8cdbc4ea93b827642c162e6/plugins/code-modernization/agents/security-auditor.md

Permissions: Frontmatter tools: Read, Glob, Grep, Bash.; Body instruction to run npm audit, pip-audit, and grep for known-bad patterns; to read manifests.; Body instruction: read-only, no file create/modify. Instruction, not enforcement.
Cost boundary: Definition can be reused under its stated licence. Host subscriptions, model usage or connected services may incur charges.
Licence: Apache-2.0 — https://github.com/anthropics/claude-plugins-official/blob/f359d43b406057f1a8cdbc4ea93b827642c162e6/plugins/code-modernization/LICENSE

#### Component limitations

- Bash and package auditors depend on host permissions and tool availability; the definition does not enforce its read-only boundary.

- Severity uses a qualitative CVSS-like judgment, not a computed score or a demonstrated exploit.

- Dependency vulnerability findings need current advisory data; this definition alone is not a penetration test or complete security assessment.

#### Not runtime-verified

- The agent has not been executed or benchmarked.

- Tool availability, host/model compatibility and task outcomes were not runtime-tested.

## Independent research tasks

- Enforcement map: Trace tenant context from authentication through data access, cache keys and jobs at the frozen revision. Produce boundary-map.md with source locations and gaps. Do not take expected outcomes from existing tests.

- Policy-derived attack cases: From the written policy and synthetic inventory, design object substitution, mixed-batch and delayed-job cases. Produce policy-oracle.md with expected denial or permitted sharing, independently of how the implementation currently responds.

## Sequence and verification

1. Freeze the policy, source and fixture identities in isolation-scope.md. Define how response bodies, object existence, mutations and asynchronous effects will be observed. Assign one operator to the isolated datastore so independent research does not race fixture resets.

2. Join boundary-map.md and policy-oracle.md into case-matrix.md. Give each enforcement point a same-tenant positive control and a cross-tenant negative case. Missing instrumentation is a coverage gap, not evidence that a boundary held.

3. Run the legitimate journey first and record control-receipts.md with created objects and authorised effects. Verify both tenants' fixtures are usable; a generally broken endpoint cannot demonstrate isolation.

4. Run the negative cases by swapping resource IDs, tenant claims, batch members and job ownership context within the synthetic harness. Inspect response data and stored side effects. Save minimal requests, observations and source links in boundary-witnesses.md for the implementation owner.

5. Repeat after alternating tenant requests through warm caches and pooled connections, then after worker retries and role removal. Clear only the named fixture state between runs. Hand stateful-receipts.md to the reviewer, including any delayed leak or unexplained write.

6. Reconcile witnesses with the policy and prepare isolation-verdict.md. For a confirmed gap, propose the smallest enforcement change and repeat the same case plus its positive control after an authorised local fix. Report exactly which paths and tenant configurations remain untested.

## Boundaries

- Use the security-auditor only for source-linked access-control review. It is not a tenant test runner, and its qualitative vulnerability labels require a concrete witness rather than an invented score.

- The host must map repository reads and separately supply the identity, request, datastore and queue harnesses. Enforce read-only review grants despite the profile's Bash tool; a Markdown definition does not isolate a database.

- Run adversarial cases only against authorised synthetic tenants in isolation. Do not enumerate customer IDs, use production sessions or claim coverage of every tenancy model. These resource/harness combinations are untested during recipe authoring.

## Expected output

A tenant-isolation test matrix with reproducible cross-tenant witnesses, same-tenant controls and explicit coverage gaps.

## Deliverables

- Policy-to-enforcement map with tenant-context source locations and explicit shared-resource rules.

- Synthetic fixture set and executable positive/negative case matrix.

- Cross-boundary witness bundle including response, persistence, cache and job observations.

- Scoped isolation verdict with repair retests and uncovered paths.

## Acceptance checks

- [ ] Substitute another tenant's object identifier for read, update and delete operations; leaked fields or changed foreign rows fail the case regardless of the HTTP status.

- [ ] Submit a mixed-tenant batch, list filter and export request; foreign objects, counts or download links must not escape the declared sharing policy.

- [ ] Omit or spoof tenant context in the request; a caller-supplied tenant value must not override the trusted identity or select a broader default scope.

- [ ] Alternate tenants through a warm cache and reused connection; a response or query inheriting the previous tenant's state is a failure.

- [ ] Replay a queued job after its tenant context or membership is no longer valid; processing must follow the documented revocation policy and cannot borrow the worker's unrestricted identity.

- [ ] Test direct file/download access as well as the listing page; blocking navigation while a foreign object remains retrievable fails isolation.

- [ ] Run same-tenant and explicitly shared-resource controls alongside denials; universal failure, an empty dataset or missing side-effect instrumentation makes the result inconclusive.

Workflow: https://undominated.ai/workflows/#verify-tenant-isolation
