Technical insight

API authorization testing: finding BOLA, IDOR and function-level access failures

Authentication tells a service who is making a request. Authorization decides what that identity may do. In modern APIs, those decisions are distributed across gateways, application logic, downstream services and data layers. A request can therefore carry a valid token, pass schema validation and still cross a boundary that the business intended to protect. Effective API authorization testing explores that decision from multiple perspectives and judges the result against the application's real ownership and role model.

A-Secure Offensive Security Team23 November 2026Authorized testing focus

Build an authorization model

Authorization testing needs an expected result. For each endpoint, identify the action, the protected object, the legitimate owner, the roles that may perform the action, any workflow or state constraint and the downstream service that ultimately enforces or relies on the decision.

Create a matrix with endpoints as rows and roles as columns. Mark each cell as allowed, denied, limited or conditional. This matrix becomes more useful as testing progresses: it exposes missing combinations and forces the team to distinguish intentional restrictions from accidental behavior.

The matrix should include object relationships as well as role names. A support agent may be allowed to view a customer record in one workflow but not export it. A service account may create a transaction but not approve it. A user may read an order while its financial status is still provisional. Object type, ownership, state, tenant and purpose can all constrain access.

Test object-level authorization

Broken object-level authorization—often called BOLA, and in some contexts IDOR—occurs when the service verifies that a requester is authenticated but does not verify that the requester may act on the specific object identified in the request.

The most visible symptom is horizontal access: one customer can retrieve or act on another customer's record. Vertical access can also occur when a low-privilege user reaches an object reserved for an administrator or another tenant. The weakness may appear in a path parameter, query parameter, request body, header, filename or nested relationship.

A disciplined test compares a permitted action with the same action for a controlled peer object. Two synthetic accounts can make the expected boundary clear. The tester changes only the minimum necessary identifier, keeps the rest of the request stable and records the response and server-side effect. Useful evidence includes the request method and route, the altered parameter, the identities used, the status or business outcome, and evidence that the protected object was exposed or changed.

Sequential identifiers are not the only concern. Object references may be UUIDs, opaque tokens, slugs or signed identifiers. A secure-looking identifier does not create authorization by itself. The service must make an ownership or entitlement decision regardless of identifier format.

Test function-level authorization

Broken function-level authorization occurs when a user can call a function that their role should not be able to invoke. Examples include administrative endpoints, bulk export, account recovery, approval, refund, role-management or configuration functions. The endpoint may be difficult to discover, but obscurity is not an authorization control.

Test these functions from lower-privilege identities and compare the result with the expected role matrix. Pay attention to whether the request is rejected before performing work and whether the attempted action produces a side effect even when the response is hidden. A service that returns an error but still creates a pending operation can still create risk.

Also review alternate routes to the same capability. A feature may be protected in one controller but exposed through a background job, GraphQL mutation, legacy API, mobile endpoint or administrative import. A functional inventory should therefore cover the capability, not only one URL.

Test object property and workflow authorization

Some authorization failures occur because the server accepts a field but ignores whether the caller may control it. A user might submit a role, account status, price, approval flag, balance, owner or tenant identifier. The response may look correct while the backend silently ignores the field; in other cases, it trusts the field and creates a serious integrity issue.

Build a table of sensitive properties and their legitimate mutation paths. For each property, identify who may set it, who may clear it, when it may change and which server-side workflow should enforce that transition. Test using harmless changes to synthetic records where possible.

Workflow authorization deserves separate attention. A sequence may work because each individual request appears valid, yet the complete business action should be constrained. Relevant cases include skipping approval steps, repeating a one-time transition, changing a resource after a deadline, using a stale or replayed request, and racing parallel operations. Rate limits and transaction controls should be tested within agreed bounds to protect availability.

Review authentication and token handling

Authorization tests are more meaningful when identity context is sound. Review how tokens are issued, validated, scoped and revoked. Confirm that expiry, audience, issuer and signature validation behave as designed. Observe whether logout, password change or account disable invalidates the relevant session or refresh token. Test whether a token issued for one environment or client is accepted in another context.

Session and token behavior should also be evaluated across roles. Two users may authenticate differently through different login flows yet end up with equivalent or excessive privileges. Recovery and multi-factor flows can introduce alternate paths into the same application that the primary test missed.

Do not disclose live tokens or sensitive response bodies in the report. Redact evidence while preserving enough detail for engineering to reproduce the issue.

Inventory and integration risks

An API may expose more than the current documentation describes. Compare the approved inventory with client traffic and approved discovery methods to find legacy, debug, preview or deprecated versions. For each additional endpoint, determine whether it enforces the same authorization model as its documented equivalent.

Downstream trust is equally important. An API may validate a request and then pass user-controlled identifiers to a service that treats them as authoritative. Check that the upstream service does not rely on the client to decide ownership. Also review server-side request behavior, internal service credentials, and whether one integration endpoint can access data or actions beyond its documented purpose.

Inventory should include the mobile application and web clients when they materially consume the API. Client-side hidden endpoints are not a security boundary, but comparing client behavior with the server can reveal inconsistent enforcement and missing test cases.

Turn findings into durable fixes

Authorization fixes should be centralized rather than repeated independently in every controller. A service layer or policy layer can evaluate the subject, action, resource and context, then deny access by default when no rule applies. Deny-by-default behavior reduces the risk that a new endpoint forgets to implement a check.

Resource lookup should be constrained by the authorized owner or tenant, so an inaccessible object does not appear to exist merely because the identifier is known. Property filtering and validation should be applied server-side, based on the caller's role and the object's current state. Workflow transitions should be enforced by an authoritative state machine rather than by the sequence of client requests.

Fixes need regression tests. For each confirmed failure, retain a negative test with a peer identity or unauthorized role, plus a positive test proving that legitimate access still works. Centralized authorization middleware should have its own tests for policy composition and edge cases.

The final report should explain the business workflow that was affected, not only the endpoint. A concise example—showing who should access which object, what happened instead and why—makes the risk easier to prioritize and verify.

Key takeaways

Apply the guidance with a tested, authorized scope

  • Define expected access by action, object, owner, role, tenant and workflow state.
  • Test a valid action from peer identities and compare it with the role matrix.
  • Treat hidden endpoints and unguessable identifiers as discovery issues, not authorization controls.
  • Check sensitive properties, state transitions and downstream trust, not only GET requests.
  • Centralize authorization decisions and add negative regression tests for every fix.

References and further reading

  1. OWASP API Security Top 10
  2. OWASP Web Security Testing Guide — Identity Management, Access Control and API testing
  3. OWASP Cheat Sheet: Authorization
  4. OWASP API Security Top 10: Broken Object Level Authorization
Testing notice: Only perform security testing against systems you own or have explicit written authorization to assess. Use controlled environments, agreed safety controls and the organization's escalation process.