The operational problem in Serverless Applications Still Need Data Access Boundaries
An invoice-processing SaaS product uses short-lived cloud functions to scan uploaded documents and write results to customer folders. The function executes briefly, but its service role can list unrelated tenants’ files.
The trust boundary is the function identity and object-store policy that authorises each read; isolation of code executions does not substitute for business-level tenant permission.
Trace the actors and dependencies behind Serverless Applications Still Need Data Access Boundaries
Map invocation source, token claims, event queue, object key design, secrets access, callback destination and retained files. Include batch retries and asynchronous processing after the user session ends.
A serverless architecture can give the impression that every function is naturally isolated. In practice, the execution role may be shared across many customer invoices, and the developer may pass a storage object key from a request straight into the function. If the application does not validate that the object belongs to the active customer, a correctly authenticated user can exploit the function’s broader cloud permissions.
Follow one invoice across asynchronous execution
Use scoped function roles or per-tenant credentials, validated tenant-to-object mapping, short-lived tokens and deny-by-default bucket policies with enforced resource conditions.
The decisive serverless test is not whether two functions run in separate containers. Seed two fictional customers with different invoice objects, invoke the same worker role for Customer A and attempt to read the object belonging to Customer B. The storage layer should deny the wrong tenant independently of the request payload. Repeat after account revocation with a queued job created beforehand, because asynchronous execution can outlive the user who submitted it. Keep the effective identity and object policy evaluation in the evidence; a successful function invocation alone says nothing about the boundary.
A failure sequence specific to Serverless Applications Still Need Data Access Boundaries
One broad execution role may use a caller-supplied object path without checking the invoice belongs to the originating customer, creating a cross-tenant file disclosure.
A queue makes authorisation harder because processing and submission occur at different times. A message created before account revocation may be delivered after the user’s privileges have changed. The worker must know which customer is authorised for the object when it processes the job. Simply retaining the original session token is not reliable if its expiry or scope no longer matches the action.
Enforcement where Serverless Applications Still Need Data Access Boundaries could fail
Validate the object owner on the server before calling storage, restrict outbound destinations, separate scan from export roles and log effective permissions during release checks.
The product team should inspect role permissions at the level of individual storage resources, secrets and outbound APIs. An invoice scanner may need to read one original and write a derived result; it does not need global enumeration of every customer’s confidential documents. Test whether role policy conditions reflect that requirement after deployment packaging, not just in an infrastructure-as-code review.
What would prove this serverless applications still need data access boundaries safeguard works
Capture function version, IAM policy evaluation, object request IDs, caller claims, queue message provenance, error response and completed customer invoice record.
Positive test: preserve the authorised task
Upload fictional invoices for two tenants and show each workflow reads only its own object and writes a result under the correct tenant context.
An important serverless edge case is an asynchronous queue message created before a user’s permissions change. The worker may run minutes later under its own role, without checking that the originating tenant still has authority to process the file. Include this time gap in the threat model and ensure the receiving function revalidates the object and operation rather than assuming the enqueue step settled permission permanently.
Negative test: challenge the unsafe route
Change the object key in an authorised request and replay a dead-letter queue message using the wrong tenant token; the function should refuse both paths without revealing filenames.
A release gate can evaluate a sample of effective cloud IAM permissions for each function version, but it also needs a business test of cross-tenant isolation. Use separate fictional customer accounts, inject an object key from the wrong tenant and inspect the storage access decision and application result. A gateway-level denial alone will not prove the worker cannot reach the object through another execution path.
Operational interpretation and decision record
The API that invokes an invoice-processing function needs to carry a trustworthy tenant context. It should not accept an arbitrary customer ID supplied by the browser and then use a broad cloud service role to retrieve documents. Validate the customer relationship before enqueueing work and again where the function reads the object. The resulting authorisation event should identify which resource was checked without recording the confidential invoice contents.
Function environments also change through deployments. A role granted a broad wildcard during troubleshooting may survive after the code is updated, because infrastructure permissions follow a different release lifecycle. Review effective privileges in production and build a regression test that exercises a forbidden object path. Static analysis of infrastructure definitions is helpful but cannot prove that an unexpected cloud policy did not override the intended resource boundary.
Retries and dead-letter queues require equal scrutiny. A worker that picks up an old message may run with an updated role but an outdated claim about the originating user. Reject stale or inconsistent tenant context, and retain the rejection event so a support engineer can distinguish a legitimate failed document from attempted cross-customer access. Do not process a queued object solely because the original request was accepted earlier.
A meaningful release result records both invoice processing success and the refused cross-tenant attempt. Check where documents landed, who could open them and whether any support or export role had unexpected visibility. Avoid concluding the fix worked merely because the wrong customer did not see a document in the user interface; the object could still have been read by the function or stored in an unrelated location.
Exceptions that must not become permanent access
An emergency support reprocess may require exceptional access; issue a narrow expiring role through an audited workflow rather than editing the production function’s default policy.
How the operating design behaves after a change
A useful negative case changes a single input: a valid Tenant A invocation carries a Tenant B object key. The storage call and application result should refuse it without revealing the second customer’s filename or content. Add a replay of the queued request after a permission change, then verify the denial is preserved in a correlation trail that links request and worker execution.
Decision rights and response authority
The application architect owns tenancy rules, the cloud security owner reviews effective policies, and the billing product owner approves the permitted document lifecycle.
Measures that can be challenged
Measure cross-tenant deny tests at release, excessively broad identities, ambiguous queue retries and time from revocation to effective policy change.
Monitoring should distinguish a failed function invocation from a deliberate resource-level denial. A general 500 error could hide an application bug or an overly broad permission check. The release gate should accept the legitimate invoice processing flow while showing that tenant boundaries hold for direct calls, queued retries and background automation.
Implementation handover and confirmed decision gates
The application owner should define a fictional invoice workflow for two customer tenants and identify the cloud role that reads the documents. Capture resource policies, function version and queue behaviour. The security design should specify exactly which object paths an invocation may use, including those reached by background retries after a user’s permissions change.
The release test processes one authorised invoice and then submits another tenant’s key through a valid user session. Add an old queue message after revocation. Review storage-level access results and the final application record rather than relying on a gateway response. The secure outcome allows the original invoice while denying cross-tenant access without revealing document titles.
After release, monitor function-role drift and repeat the negative test when a new API or batch process is added. The cloud security owner reviews effective permissions; the product owner confirms legitimate invoice throughput. Treat emergency reprocessing as a separate expiring role instead of expanding the default function identity. These conditions provide a practical basis for deployment approval.
An actionable acceptance decision
Treat a function as a privileged integration even if it runs for milliseconds; the correct test is whether it can read only the intended invoice.
Source material and reading notes
- https://owasp.org/www-project-application-security-verification-standard/
- https://www.cisa.gov/securebydesign
How Next Defence can support the review
For a Next Defence review of this operating boundary, responsibility needs to be clear: The application architect owns tenancy rules, the cloud security owner reviews effective policies, and the billing product owner approves the permitted document lifecycle. Proposed tests and any resulting access must be explicitly approved, suitably bounded and safe for the affected systems.
Explore the relevant Next Defence service to discuss an appropriately scoped assessment.