A bulk export is a tenant-boundary test, not a pagination demo
This worksheet tests a synthetic multi-tenant SaaS reporting API that allows an authorised customer analyst to request a large export. The central question is whether the backend can prove that every object returned belongs to the requesting tenant, including objects fetched asynchronously after the first response. The exercise must run in a dedicated test environment with two fictional tenants, Cedar and North, and a third support-only identity with explicitly approved privileges. Do not run enumeration or high-volume requests against a live customer service. The security reviewer should receive application architecture, documented export rules, schema for the job queue and permission to inspect the logs before testing begins. The product owner defines which exports are permitted; the test team verifies that the API enforces those rules.
Create two sets of synthetic records of different sizes and classifications, including a record that is moved or deleted while a job is pending. Each record must have a stable object ID, tenant owner, creator and export eligibility state. Generate separate human-user tokens and service tokens, with known expiry and audience values. Log the tenant claim received at the gateway and the ownership decision made at the data store. Do not assume that tenant IDs in a JWT are sufficient if the internal worker ignores them. Prepare a disposal date for every export file because downloadable test bundles can become persistent secondary copies.
Set an unambiguous baseline request
Case one: an authorised Cedar analyst requests an export of Cedar invoices filtered to a permitted quarter. Record HTTP response, export job ID, expected row count, request actor, tenant context and file checksum. The worker should generate only the eligible Cedar records, and an authorised Cedar user should be able to retrieve the file during its stated lifetime. Validate both row ownership and exported field-level redaction; tenant separation can be correct while a sensitive internal field still leaks. The test passes only when the completed file content matches the synthetic source manifest, not when the create-job endpoint merely returns a 202 status.
Case two: North requests its own export simultaneously. The scheduler may place both jobs in one worker pool, so inspect the queue message to confirm that tenant and authorisation context is bound to each job. Check that worker caches, temporary storage locations and progress endpoints do not use global keys that can be overwritten by the other job. A test should compare output hashes to each tenant’s manifest and confirm that the job notifications go to the right account. If mixed rows appear, stop the exercise, preserve the test artefacts and treat the design as failing tenant isolation even if every API call was individually authenticated.
Direct object requests must fail at the resource
Case three: a Cedar token requests North’s export status by substituting the job identifier in the status URL. The response must not reveal North’s file size, user email or object count; a consistent forbidden or not-found response may be appropriate according to the product’s design. Capture the backend authorisation decision and a request correlation ID. Case four: repeat the substitution against the download endpoint itself, including a previously signed URL if the architecture uses one. A link generated for North must not become downloadable by Cedar merely because the storage service recognises the signature. Verify the signature’s actual tenant, principal, object and expiry binding rather than relying on the UI to hide the link.
Case five: attempt to change a filter parameter so the query joins North’s records to Cedar’s permitted dataset. The application should enforce tenant scoping inside the data query or equivalent authoritative policy regardless of user-supplied filters. Check whether aggregation or count endpoints disclose data through totals even when row downloads are blocked. Use a test schema with deliberately distinct values so accidental mixing is visible. The reviewer should document whether the failure arises at input validation, policy evaluation, query construction or export assembly. Each is a different engineering correction with different regression coverage.
Async jobs should not become standing permission grants
Case six: create an allowed job, then revoke the Cedar user’s export role before the worker begins. Define the product policy in advance: should the job cancel, require renewed authorisation or be permitted as an already committed task? The expected result must be agreed by the product and privacy owners rather than invented during the test. Verify that the worker actually implements that rule; queue acceptance is not the same as permission to release a future file. Record both the creation-time policy and the completion-time decision. If the job continues legitimately, retrieval must still require the correct authorised user and must not create a public permanent artefact.
Case seven: expire the analyst’s authentication token while a large export is running. The worker should use a narrowly scoped service identity rather than copy the analyst’s access token into a long-lived log or queue. Inspect the storage destination, retention clock and actor attribution. When the job completes, test retrieval with the expired credential and then with a newly authorised session. Case eight: suspend the tenant or revoke a shared-service integration while the export is queued. The application should not rely on stale cache entries that allow newly prohibited operations. If the business design includes a grace period for in-flight jobs, document its length, approval basis and boundary clearly.
Cross-tenant delivery and support handling
Case nine: alter the notification recipient in a synthetic job request to a North mailbox while retaining a Cedar user token. Notification routing must follow verified account membership rather than a free-form external address. If cross-organisation distribution is supported, it should require a separate explicit authorisation and should not happen as a side effect of a normal export request. Check generated email links, webhook payloads and cloud storage permissions. An incorrect notification can disclose the existence of sensitive data even when the export itself is protected. The reviewer should distinguish metadata leakage from content exposure in the findings.
Case ten: use the approved internal support identity to view export diagnostics and then attempt to download a full customer report without a valid support access grant. A support session may legitimately need job duration, worker failures and redacted error traces; full content access requires its own approval. Confirm that support impersonation, if implemented, creates an auditable authorisation chain and cannot silently switch tenant context. A support tool that accepts a tenant ID typed by an administrator without checking the case grant is a separate bypass. Capture the refused action at the receiving system as well as the operator audit event.
Evidence worksheet and failure handling
For each of the ten cases, record objective, actor, source tenant, requested target, request and job IDs, expected rule, observed HTTP outcome, actual file manifest, audit event, reviewer and disposition. Keep test material synthetic. A correct denial should be corroborated by an absence of cross-tenant rows in storage and completed exports; a 403 page alone does not show whether a background job already ran. For successful cases, verify that the export file contains only expected fields and that its signed download route expires as specified. If a queue is shared, include a worker log reference that proves which tenant context was applied, without exposing secrets in the final report.
Set stop conditions in advance: a test must halt if it reaches production data, if a trial artefact becomes accessible without the authorised identity, or if a job begins saturating shared infrastructure. Product engineers should preserve the failed test’s configuration and logs, correct the authorisation boundary and rerun the relevant case plus a legitimate positive control. Avoid describing an unexpected 500 error as a successful security denial; a crash can hide an unauthorised operation or introduce an availability issue. Track the difference between prevented disclosure, detected attempt and actual data returned in the findings.
Close with a business acceptance decision
The product owner signs off that Cedar and North can obtain their own authorised exports and that unsupported cross-tenant actions are denied at create, query, status, retrieval, notification and support paths. Security confirms that the logs can correlate these operations without storing credentials or real customer data. Privacy reviews output minimisation and retention, while operations validates cleanup of temporary objects and the effect of retries. Re-run the matrix after changes to worker queues, caching, storage signing, tenant migration and support tooling. A claim that the API is tenant-isolated should cite specific passed cases and their software version; it is not a blanket assertion for every endpoint or future release.
The exercise deliberately balances prevention and legitimate business access. An export system that blocks every request is not useful, while a system that trusts a job ID as proof of authorisation is not safe. The defensible result is one in which the right customer gets an exact, minimised dataset, an unauthorised customer cannot infer or retrieve another’s export, and the platform can reconstruct how each decision was made. That outcome is measurable with synthetic records and can be integrated into release testing without endangering real tenants.
Sources and further reading
Explore Next Defence expertise
Next Defence can help organisations assess the technical and business exposure examined in api bulk export tenant test: ten cases for a saas security reviewer. Our team can review the available source records, test the relevant access or operational controls and work with accountable owners to deliver object-level test matrix, expected denial codes and audit fields.