Broken Object Level Authorization is difficult because a vulnerable request often looks ordinary. The caller may be authenticated, the object may exist, and the API may return a successful response. The defect is that the server did not prove the caller was permitted to perform that action on that exact object.
What BOLA and IDOR Mean in API Security
Broken Object Level Authorization, or BOLA, occurs when an API accepts an object reference but does not enforce the correct access decision for the authenticated caller. OWASP ranks BOLA as API1:2023 because APIs routinely expose identifiers for accounts, orders, files, devices, messages, records, projects, tenants, and other business objects.
Insecure Direct Object Reference, or IDOR, describes a common pattern in which a user-controlled reference points directly to an object and changing that reference reaches data or actions outside the caller's authorization. In API discussions, IDOR is best understood as one way BOLA becomes exploitable. BOLA is the missing authorization decision; IDOR is the controllable reference that helps expose it.
BOLA vs IDOR, BOPLA, BFLA, and Broken Authentication
Authorization findings are often grouped together even though the required fix is different. The fastest way to improve triage is to identify whether the failure concerns an identity, an object, a property, or a function.
| Issue | Security question | Typical failure |
|---|---|---|
| BOLA / API1 | May this caller act on this object? | A user reads, updates, deletes, or shares another user's record. |
| IDOR | Can a controllable reference reach an unauthorized object? | Changing a path, query, body, header, or GraphQL identifier exposes a different record. |
| BOPLA / API3 | May this caller read or modify this property? | An allowed object contains private fields, or a writable property changes role or status. |
| BFLA / API5 | May this role invoke this function? | A regular user reaches an administrative operation. |
| Broken authentication / API2 | Is the caller's identity established securely? | Weak tokens, credential handling, or session controls allow identity compromise. |
These weaknesses can overlap. An endpoint may correctly identify the user, fail to authorize the selected object, and then return properties the caller should never receive. Accurate classification matters because fixing only the token, route, or response shape will not repair the missing object-level decision.
Why BOLA and IDOR Reach Production
BOLA is rarely caused by a single unusual programming mistake. It usually appears when authorization rules are distributed across controllers, services, database queries, gateway policies, mobile clients, background jobs, and microservices. One path enforces ownership while another assumes an earlier layer already did it.
Authentication is mistaken for authorization
A valid token proves identity, not ownership. Teams may validate the token and then trust any object reference supplied by the authenticated client.
Queries are not scoped to the caller
The application loads an object globally by ID and checks permissions later, inconsistently, or not at all. A safer pattern is to query through the caller's permitted tenant, account, or relationship.
Rules are copied across endpoints
Read, update, delete, export, share, batch, and nested-resource handlers often evolve separately. A missed check in one method is enough to expose the object.
Internal trust becomes permanent
Service-to-service and partner APIs may assume that network location or a machine token permits every object operation, even in multi-tenant systems.
Client behavior is treated as policy
Hidden buttons, filtered lists, and mobile application logic are user-interface choices. Attackers can call the API directly, so authorization must be server-side.
Business relationships are under-modeled
Real authorization may depend on ownership, delegation, organization membership, consent, geography, workflow state, or contractual role—not just a simple user role.
Practical BOLA and IDOR API Examples
The examples below focus on the authorization decision rather than exploit mechanics. They show where an API must connect identity, tenant, relationship, object, action, and current business state.
Customer invoices and statements
A customer requests an invoice by identifier. The API verifies the access token but retrieves the invoice from a global table without restricting the query to the customer's account. The correct control is not an unpredictable invoice number; it is a server-side rule that proves the invoice belongs to an account the caller may access.
Multi-tenant projects and files
A user belongs to tenant A but submits a project or file identifier from tenant B. Tenant context in the URL or token is not enough if the object lookup is not also restricted to the same tenant. Every nested resource must inherit and re-check the tenant boundary.
Batch and export endpoints
An endpoint accepts a list of record identifiers and returns a combined export. Authorizing the endpoint once is insufficient. The API must authorize each object in the collection, define whether partial results are permitted, and avoid revealing which unauthorized objects exist.
GraphQL nodes, edges, and nested resolvers
A top-level query may be authorized while a nested resolver returns a node from another account. Authorization must be enforced consistently on both graph edges and the nodes they resolve, including mutations and indirect references.
Support and delegated access
A support agent may be allowed to view a customer record only during an active case, from an approved role, and with an auditable reason. Static ownership checks may be too simple; relationship-based or attribute-based authorization can better express temporary delegation.
Machine-to-machine operations
A background worker or integration token may be authorized for one customer, region, device group, or data class. Service identity must be mapped to object scope rather than treated as an unrestricted internal superuser.
How to Test Object-Level Authorization Safely
The OWASP Web Security Testing Guide recommends verifying that users can interact only with objects they are authorized to access. Testing should be performed only in an authorized environment and with records created for the test.
- Define the object and action matrix. List important objects and the read, create, update, delete, export, share, approve, and administrative actions that apply to them.
- Create controlled identities. Use at least two standard users, separate tenants, and relevant privileged roles. Include service identities when machine-to-machine APIs are in scope.
- Create synthetic objects. Use test records with no real customer information. Record which identity owns or may access each object.
- Verify allowed cases first. Confirm legitimate access so test failures are not confused with broken functionality.
- Verify denied cases. Test cross-user, cross-tenant, wrong-role, expired-delegation, and invalid-workflow relationships across each method and channel.
- Cover indirect paths. Include nested resources, batch operations, GraphQL fields, exports, background tasks, mobile endpoints, alternate API versions, and partner routes.
- Check the complete response. A correct denial should not disclose protected fields, object existence, internal identifiers, or sensitive error detail.
- Add regression tests. Convert the authorization matrix into repeatable tests so refactoring and new API versions do not silently remove a check.
Runtime Signals That Can Reveal Object Authorization Abuse
Runtime monitoring cannot replace authorization in application code, but it can reveal missed checks, production-only paths, slow enumeration, compromised accounts, and attacks that static tests did not model. Strong detection combines several weak signals rather than treating every changed identifier as malicious.
| Signal | What it may indicate | Context needed |
|---|---|---|
| Cross-identity mismatch | The returned object's owner or subject differs from the caller. | Reliable identity and object relationship data. |
| Tenant mismatch | The token, route, organization, and object do not belong to the same tenant. | Canonical tenant mapping, not only client-supplied fields. |
| High object diversity | One identity touches an unusual number of unique object references. | Endpoint baseline, pagination behavior, and normal job patterns. |
| Successful traversal | Repeated reference changes receive successful responses. | Status, response size, object type, and data sensitivity. |
| Method or channel drift | A caller uses update, delete, export, batch, or an old API version unexpectedly. | Role, client type, API version, and normal workflow. |
| Low-and-slow access | Enumeration is spread across time or distributed identities. | Historical behavior and entity correlation. |
| Sensitive response evidence | A suspicious request returned protected data or high-value fields. | Safe classification and masking of evidence. |
Good telemetry records the authorization-relevant facts without copying secrets or full personal records into the security pipeline. Useful fields include caller ID, role, tenant, object type, normalized endpoint, method, relationship result, decision, response classification, trace ID, first and last seen time, and the reasons that raised risk.
event_type: object_authorization_anomaly
caller_id: user_1042
caller_tenant: tenant_a
endpoint: /api/invoices/{invoice_id}
method: GET
object_type: invoice
object_tenant: tenant_b
authorization_decision: unexpectedly_allowed
response_status: 200
response_classification: financial_record
risk_reasons:
- cross_tenant_object_access
- unusual_object_diversity
- successful_response
recommended_action: investigate, contain if confirmed, repair authorizationHow to Prevent BOLA and IDOR
The OWASP Authorization Cheat Sheet emphasizes deny-by-default behavior and validating permission on every request. Prevention works best when object authorization is a first-class application service rather than scattered conditional logic.
Authorize every object and action
Check read, write, delete, export, share, approve, and other actions independently. Batch requests require a decision for each object.
Scope data access by principal
Query through the authenticated user's permitted account, tenant, organization, or relationship instead of loading any object globally and checking later.
Centralize policy decisions
Use a consistent authorization layer or policy service so controllers, background jobs, GraphQL resolvers, and internal services apply the same rules.
Model real relationships
Use role-based, attribute-based, or relationship-based rules as appropriate. Include ownership, delegation, consent, region, purpose, and workflow state when they affect access.
Minimize returned data
Use explicit response models and property allowlists. Object authorization and property authorization should reinforce each other.
Use opaque IDs only as defense in depth
Non-sequential references can reduce easy discovery, but they never replace authorization and should not be described as the primary fix.
Protect service identities
Give machine identities the smallest object scope needed, rotate credentials, and avoid unrestricted shared tokens across tenants.
Test and observe continuously
Combine unit, integration, negative, and regression tests with production visibility and incident-ready telemetry.
NIST SP 800-228, updated in March 2026, organizes API controls across the lifecycle. That lifecycle view is useful for BOLA: design the policy, implement and test it, deploy it consistently, observe real behavior, and feed incidents and exceptions back into engineering.
Testing, Gateways, and Runtime Protection Have Different Jobs
| Control | Best contribution | What it cannot replace |
|---|---|---|
| Authorization design and code | Makes the correct object decision at the source. | Visibility into unknown production paths and compromised identities. |
| Automated security tests | Finds regressions before release using known roles and objects. | All real-world relationships, legacy versions, and runtime behavior. |
| API gateway | Authenticates calls and enforces routes, scopes, quotas, and coarse policy. | Application-specific ownership and relationship decisions. |
| Runtime API monitoring | Correlates identity, object use, response outcome, and behavior over time. | The permanent code fix for a missing authorization check. |
| Inline enforcement | Can contain a validated abuse pattern while engineering repairs the flaw. | Careful tuning, exception handling, rollback, and business approval. |
A mature program uses these controls together. The application remains responsible for the authorization decision. Runtime controls help discover coverage gaps, prioritize confirmed exposure, and reduce the time between first abuse and containment.
How to Investigate and Respond to a Suspected BOLA Incident
- Preserve scoped evidence. Retain request metadata, trace IDs, relevant authorization decisions, and masked response classifications. Avoid copying full sensitive payloads into tickets.
- Confirm the expected relationship. Ask the owning product team whether the caller was authorized by ownership, role, delegation, consent, tenant membership, or workflow state.
- Measure affected objects. Determine which object types, endpoints, API versions, identities, tenants, and time ranges are involved.
- Separate attempts from exposure. Distinguish denied requests from successful access and identify whether protected data was returned or changed.
- Contain carefully. Revoke compromised identities, disable a vulnerable route, add a temporary policy, or limit a feature when the evidence supports it and business impact is understood.
- Repair the authorization path. Add the missing server-side decision and review equivalent read, write, delete, export, batch, GraphQL, and legacy routes.
- Notify the right owners. Include application, security, privacy, legal, and customer-response teams when the affected data or jurisdiction requires it.
- Add regression coverage. Turn the incident relationship and alternate paths into automated tests and runtime detections.
A Five-Phase BOLA Risk-Reduction Plan
1. Inventory object-bearing APIs
Identify endpoints, resolvers, jobs, and services that accept or return object references. Prioritize high-value and multi-tenant objects.
2. Document authorization rules
Create a matrix of identities, roles, relationships, tenants, objects, actions, and expected allow-or-deny outcomes.
3. Test critical paths
Use synthetic identities and objects to test every method, version, batch route, nested resource, and delegated workflow.
4. Observe production safely
Monitor identity-to-object behavior, response outcomes, and object traversal while minimizing sensitive evidence.
5. Measure and improve
Track authorization test coverage, defects by object type, time to validate alerts, confirmed exposure, remediation time, and recurrence.
BOLA and IDOR API Security Evaluation Checklist
Use this checklist for architecture reviews, security testing, and API security platform evaluations. A product should make the authorization context clearer, not replace the application's responsibility to enforce it.
| Area | Strong evidence | Warning sign |
|---|---|---|
| API and object discovery | Finds active endpoints, versions, methods, parameters, and object-bearing routes. | Depends only on manually uploaded specifications. |
| Identity context | Correlates authenticated users, roles, clients, services, and tenants. | Treats an IP address as the main identity. |
| Relationship awareness | Can represent ownership, tenant, delegation, or expected access patterns. | Flags every identifier change without business context. |
| Request and response context | Shows whether suspicious access succeeded and classifies exposed data safely. | Copies full sensitive payloads into alerts. |
| Behavior analytics | Detects unusual object diversity, traversal, method use, and cross-tenant activity. | Uses fixed thresholds with no endpoint or identity baseline. |
| Investigation workflow | Provides traceable evidence, related events, first and last seen times, and exportable fields. | Produces a score without explaining the authorization concern. |
| Safe enforcement | Supports monitor-first rollout, exceptions, rollback, and precise policy scope. | Requires broad blocking before teams can validate signal quality. |
| Engineering feedback | Maps findings to endpoints, object types, code owners, and regression tests. | Leaves the SOC to interpret and route every event manually. |
Common BOLA Prevention Mistakes
- Assuming a valid token authorizes every referenced object.
- Using UUIDs, hashes, or encoded identifiers as the main protection.
- Checking ownership for GET but not update, delete, export, or share actions.
- Authorizing the endpoint once but not every object in a batch.
- Trusting tenant IDs, owner IDs, or role fields supplied by the client.
- Applying different rules in REST, GraphQL, mobile, partner, and legacy API paths.
- Logging full protected responses as evidence of the vulnerability.
- Blocking an anomaly before documenting legitimate delegations and exceptions.
- Treating runtime monitoring as a substitute for repairing authorization in code.
Primary References
Conclusion
BOLA and IDOR API security begins with one precise rule: every action on every object must be authorized for the current caller and context. Identity alone is not permission, an identifier is not a policy, and a successful response is not proof that access was legitimate.
The strongest program combines explicit authorization design, caller-scoped data access, repeatable negative tests, consistent coverage across API channels, safe runtime visibility, and incident workflows that return lessons to engineering. That approach reduces both the likelihood of exposure and the time needed to recognize and contain authorization abuse that reaches production.
Frequently Asked Questions
What is BOLA in API security?
Broken Object Level Authorization, or BOLA, occurs when an API fails to verify that the authenticated caller is allowed to access or modify a specific object. OWASP lists it as API1:2023 because object identifiers appear throughout modern APIs.
Is IDOR the same as BOLA?
IDOR is a common implementation pattern that can lead to BOLA. IDOR focuses on a user-controlled reference to an object, while BOLA describes the missing or ineffective object-level authorization decision around that object.
Can BOLA exist when an API uses UUIDs?
Yes. UUIDs and other opaque identifiers can make guessing harder, but they do not prove authorization. The server must still verify ownership, tenant membership, role, relationship, and permitted action for every requested object.
How is BOLA different from broken authentication?
Authentication establishes who the caller is. Object-level authorization decides which records or resources that identity may access. A BOLA request can use a valid token and still reach another user's or tenant's object.
How is BOLA different from BOPLA and BFLA?
BOLA concerns access to an entire object. BOPLA concerns unauthorized reading or modification of individual object properties. BFLA concerns access to functions or operations that a role should not be allowed to perform.
Which API requests should receive object-level authorization checks?
Every request that reads, changes, deletes, exports, shares, or acts on an object should be authorized. Checks must also cover nested resources, batch operations, GraphQL nodes and edges, background jobs, and service-to-service calls.
How should teams test for BOLA safely?
Use authorized test environments or explicitly approved production tests, create accounts with different roles and tenants, use synthetic records, and verify an allow-and-deny matrix. Avoid accessing real customer data or expanding beyond the agreed scope.
Which runtime signals can indicate BOLA or IDOR abuse?
Useful signals include high object-ID diversity, cross-user or cross-tenant mismatches, unusual successful responses, method changes, low-and-slow traversal, sensitive response fields, and access patterns that differ from the caller's normal behavior.
Can an API gateway prevent BOLA by itself?
A gateway can enforce identity, scopes, routes, and coarse policies, but it usually lacks the application-specific ownership and relationship context required for every object. Application authorization remains essential.
Should API security tools inspect responses for BOLA detection?
Response context can help determine whether a suspicious request returned protected data and how serious the event is. Sensitive values should be minimized, masked, or hashed in security evidence rather than copied into alerts and tickets.
When is runtime blocking appropriate?
Blocking is appropriate after the signal is validated, expected business exceptions are documented, owners agree on the policy, and rollback or fail-open behavior is understood. Code-level authorization fixes should remain the primary control.
What should a BOLA incident investigation record?
Record the caller identity, role, tenant, endpoint, method, object reference, expected relationship, response status, affected fields, first and last observed times, related requests, and whether access was read-only or changed data.
Evaluate object-level authorization in real API traffic
Ammune helps security teams map active APIs, analyze request and response behavior, identify suspicious object-access patterns, and provide investigation context for DevSecOps and SOC workflows.
