Skip to main content
Next Defence - Next-Gen AI Cyber Security Firm
Australia & New Zealand[email protected](02) 9064 2614
INSIGHT

Application Security Tabletop: Token Scope Regression at Release

Exercise an application token-scope regression before release, proving SaaS support staff cannot cross tenant or billing boundaries.

The operating problem

A multi-tenant SaaS vendor adds delegated support functionality to its administration API. A legitimate support operator should investigate a customer’s billing configuration, but a new release inadvertently broadens the token scope applied to a bulk-update endpoint. The release team needs a repeatable acceptance exercise that protects tenant boundaries without testing against real customers.

What the owner must establish

A delegated token must do only the operations and tenant-specific actions recorded in the support approval, including when endpoints evolve or feature flags change.

A customer-support token must not edit other tenants, promote itself, access unrelated billing records or retain authority after its short-lived approval is revoked.

System, information and authority in scope

Token issuer and audience, claims, role-to-method matrix, API endpoint list, tenant resolver, customer-support case, feature flag, audit event schema and deployment revision.

An API can correctly deny a GET request while accepting a new bulk PATCH method through a shared helper. A route-specific check is necessary; relying on one endpoint’s expected behaviour is insufficient.

Application security owns negative tests; product management confirms legitimate support scope; release engineering verifies that the tested build is the deployed one.

Validation 1: Baseline support path

Test: Obtain a test token for a delegated operator assigned to Customer A and request the approved billing view.

Expected evidence-based outcome: The response should contain only permitted Customer A data and carry an audit record of the actor, sponsor, reason and target tenant.

Review material: Issued token claims, authorisation decision and baseline request trace.

Validation 2: Object substitution

Test: Retain the same token but substitute an object identifier belonging to fictional Customer B.

Expected evidence-based outcome: The API must deny the cross-tenant request before data access and must not leak a different response shape that discloses Customer B metadata.

Review material: Denied response, server-side policy decision and synthetic object map.

Validation 3: Method escalation

Test: Compare GET, PATCH, DELETE and bulk-update paths for the same delegate role.

Expected evidence-based outcome: A route that does not appear in the approved capability matrix must be refused, even if a shared controller validates the token signature.

Review material: Method matrix, negative test request and protected state snapshot.

Validation 4: Property overposting

Test: Add a normally hidden field such as ownerRole or tenantId to a legal support-update request.

Expected evidence-based outcome: The service must reject or ignore unauthorised properties and leave privileged state unchanged while still allowing legitimate edits.

Review material: Payload diff, model validation decision and resulting record.

Validation 5: Expired assignment

Test: Revoke the delegated support case or let its time window close, then retry using a cached token in a laboratory client.

Expected evidence-based outcome: An active old session must not extend authority beyond the documented delegated support arrangement; any unavoidable cache duration needs explicit treatment.

Review material: Case closure time, claim TTL, revocation result and residual exposure.

Validation 6: Release drift

Test: Repeat the critical denials on the exact signed build after feature-flag activation and rollback simulation.

Expected evidence-based outcome: Both the feature-on and feature-off paths must enforce the same tenant boundary, with failures preventing promotion to production.

Review material: CI job reference, build digest, flag state and deployment approval.

A support feature changes the API’s threat model

Delegated administration is appealing because customer-support staff can resolve common problems without asking a tenant owner to perform every step. Its security boundary is not simply “the user has a valid token”. The relevant questions are what the support engagement authorises, whose tenant the action affects, whether the requested method is covered and whether the service itself rechecks access before changing stored state. A token signed by a trusted identity provider can still carry excessive authority. The release review should therefore start with an approval matrix that pairs actor, tenant, object class, method and time-bound support case.

In the laboratory, establish an approved delegated support case for a fictional customer and ensure its read-only function works. Then try the same actor against a second test tenant with a similar record identifier. A 403 decision can be good evidence only if the back-end policy generated it; a 404 resulting from an invalid test identifier proves little. Validate server logs against the API response and make sure no data was changed. Repeat through the new bulk method, because a shared service layer may apply role validation to individual records yet omit tenant scope from batch queries. It is the cross-tenant effect that matters, not only the route’s URL.

Scope regression at the data model

A release may alter a request schema or add optional fields without changing an endpoint’s visible name. Suppose a support agent is allowed to correct a billing address but the updated request body also accepts tenantId, role or an internal account owner field. Property-level authorisation must protect each sensitive attribute regardless of which fields the frontend normally displays. Test harmless synthetic overposting in the approved environment and verify the resulting stored object, rather than accepting a success response at face value. A secure design should make allowed attributes explicit and reject or ignore unauthorised changes consistently.

Feature flags and staged deployments complicate this work. An old function may be safe while a newly enabled code path bypasses the same policy; a rollback can restore the vulnerable path. Run the authorisation suite with relevant feature states and retain the build digest for each result. The identity platform, API gateway and application data layer may enforce different rules. Document which layer is authoritative for each decision and the expected behaviour if one component is unavailable. Do not allow a gateway check to become an excuse for omitting object-level enforcement in the application.

Revocation and response

Delegated access should end when the approved case closes, not whenever the support agent remembers to sign out. Test a fresh request and a cached token after revocation and measure any remaining valid period. If token lifetimes or caches introduce a known interval, that residual exposure requires approval, observability and a plan to narrow it. Consider a support employee whose assignment is revoked while a bulk job is queued: the service must define whether the job is cancelled, reauthorised or safely completed under a bounded previously authorised transaction. Otherwise revoking the role at the UI can leave a background operation running with more effect than intended.

When a negative test fails, capture the exact actor, action, object and stored-state difference; disable the affected capability or restrict it to a proven server-side path until fixed. Do not diagnose a defect by running broader adversarial tests against live customer records. The release gate should report allowed operations demonstrated, prohibited ones denied, unresolved cache behaviour and monitoring coverage. Application security and product owners must jointly approve the distinction between an acceptable support workflow and accidental administrative power.

Decision table for the delegated support release

Prepare a table that pairs the delegated support role with specific API actions. A normal representative might be allowed to view the customer’s billing summary and correct a contact field, but not change tenant ownership, issue credentials or export unrelated customer data. Run positive and negative tests for each high-risk action using synthetic records. Include the HTTP method and any bulk-operation equivalent in the table, as a rule for a single read route does not demonstrate protection of every update method.

Do not allow the test engineer to use a global admin token for convenience, because it bypasses the permissions being evaluated. Use the same identity type, case expiry and customer assignment that production support staff will have. If one action is denied because the object does not exist, treat that as insufficient evidence. Re-run using a known lab record outside the allowed tenant and inspect the application policy result. This shows whether the server enforced scope rather than accidentally returning no data.

A release gate with an operational consequence

Connect the test suite to the signed deployment build and relevant feature flags. A release pipeline can confirm that tests were executed without confirming that the configuration promoted to production is the tested one. Record code revision, policy revision, test fixture and expected denial for each case. When a test fails, the release owner should disable the affected feature or seek a bounded exception from the appropriate customer and security owners. A green general test suite should not override a specific cross-tenant authorisation failure.

Use the audit event from a denied action as one more acceptance check. If the platform can block misuse but cannot identify attempted access to another tenant, incident triage loses valuable context. Conversely, logging detailed sensitive request bodies for every denial can create privacy exposure. Record immutable actors, resource identifiers and decision reasons without unnecessarily retaining customer content. Revalidate the rule after token configuration, delegated-role scope or API schema changes.

What the reviewer should challenge in the authorisation design

Ask where tenant context is obtained, how it is bound to the authenticated principal and whether the application revalidates it for every changed object. A gateway may authenticate a token but leave row-level decisions to backend services. If a bulk endpoint calls a lower-level data function directly, it may skip checks used by interactive routes. Follow one permitted update through controller, service and persistence layer, then compare the forbidden cross-tenant attempt. This can reveal a design gap that a superficial HTTP response test would miss.

Also review support impersonation and queued work. A service may start a job while the delegated case is valid and execute it after the case closes. Define whether the job should reauthorise at execution, complete within a bounded approval or be cancelled. Preserve the decision in the technical design and audit events. When the product introduces new administrative actions, developers should update the capability matrix before enabling the feature. The control must evolve with the application rather than depend on a one-time penetration-test finding.

The final release record should identify exactly which tenant and role combinations were exercised. An authorisation test with only global administrators or empty lab resources does not represent delegated customer-support access.

Exception and accountable decision

If the new bulk endpoint cannot enforce object-level authorisation independently, disable that feature or constrain it to a verified server-side workflow until corrected.

Application security owns negative tests; product management confirms legitimate support scope; release engineering verifies that the tested build is the deployed one.

Sources and further reading

How Next Defence can help

Test token-scope regression before a production release as part of an application security and DevSecOps review. Product and application-security owners should witness denied cross-object actions against the same build that release engineering intends to deploy.

LET'S TALK

Let’s talk about your security.

Tell us what you are protecting, where you need greater visibility or what you want to achieve. We will help identify the right next step.

Talk to a Security Specialist

Describe your security requirements. Please do not submit passwords, credentials or confidential incident evidence. This form is not an emergency incident-response channel.

Form powered by HubSpot. Review our Privacy Policy. If the form doesn’t load, email [email protected].