Broken Object-Level Authorization and Tenant Isolation
A user retrieves, modifies, or deletes another customer's records by changing an object ID — role check passes but ownership is never verified.
Failure explanation
The API authenticates a caller and may check a broad role, but does not verify permission for the specific object being accessed. This is commonly called broken object-level authorization (BOLA) or insecure direct object reference (IDOR). Changing an identifier in a URL or body can expose another user’s or tenant’s records. Authorization must be checked for every operation and relationship, not inferred from possession of an ID.
Example
User A requests GET /accounts/1001 and is authorized. User A changes the path to /accounts/1002, which belongs to User B, and the API returns that account because it checks only that the caller is authenticated.
How to test
- Create separate synthetic users, roles, tenants, and resources.
- Attempt cross-user and cross-tenant reads, updates, deletes, exports, and nested-resource access.
- Test guessed, sequential, and substituted identifiers.
- Verify both allowed and denied cases.
Expected behavior
The API enforces object-level authorization on every relevant operation and returns a safe denial or not-found response according to the documented security policy.
Runnable examples
Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.
In the field
- STORY-023 primary The API Checked the User's Role but Not Who Owned the Record
- STORY-042 related The Profile Update That Quietly Promoted a Customer to Administrator
- STORY-043 related The Customer API That Returned Internal Risk Notes
- STORY-044 related The Gateway That Trusted a Customer-Supplied Admin Header