Privacy engineering

Plan an API Security Review Around Object-Level Access

Review API permissions with controlled users, resources and actions so every object lookup respects the caller’s actual authority.

An authenticated API request is not automatically an authorized request for every object named in it. A person may be allowed to use the invoice endpoint while being allowed to read only invoices for their own organization. The review must connect the caller, the requested action and the specific resource, including its current ownership and state.

Consider a project API with two fictional organizations. Each has projects, comments and downloadable files. A member of one organization can legitimately call the project endpoint, but must not read the other organization’s private project by supplying its identifier. An unpredictable identifier can make accidental discovery less likely; it does not establish permission.

A useful object-level review turns that rule into a controlled test matrix. Perform the work in an authorized environment with synthetic records, so the evidence demonstrates the boundary without touching another customer’s data.

Inventory object references across the API

List endpoints that accept or return resource identifiers. Include identifiers in paths, query parameters, request bodies and nested structures. Review downloads, exports, search results and asynchronous jobs as well as the ordinary read and update routes.

The OWASP API Security guidance on broken object-level authorization explains that endpoints acting on an object need to verify the caller’s permission for that object and action. It also distinguishes object-level failures from access to functions the caller should never be able to use. This distinction helps define the review scope.

Trace indirect references. A request may name a report job that later retrieves a project, or a comment that belongs to a document within a workspace. The authorization decision must follow the relevant relationship rather than checking only that the first identifier exists.

Document resource ownership and sharing rules in plain language. A project may belong to an organization while a particular document is shared with a named external collaborator. The test model must represent these rules accurately; a simplistic same-user comparison may not match the product’s intended access model.

Build a caller-resource-action matrix

Create synthetic callers with distinct roles and relationships: owner, ordinary member, limited collaborator, unrelated authenticated user and unauthenticated requester. Add a privileged role only if the application actually supports it. Give each caller a clear purpose in the fixture.

Create resources that exercise the meaningful states: private, shared, archived, transferred and deleted where applicable. For each action, record whether it should be allowed and what information the response may contain. Reading a project, editing its settings and downloading an export may require different permissions.

Keep the expected outcome independent of the implementation. If the test merely repeats the same lookup condition as the endpoint, both can share the same mistake. Derive expectations from the documented product rule and have someone responsible for that rule review the matrix.

The authorization testing guide provides a broader way to organize these decisions. The API-specific matrix should connect each rule to a concrete route and response, including indirect or background operations.

Check where authorization is enforced

Identify the server-side decision point for each action. A disabled button or hidden link is not sufficient because the API can receive requests independently of that interface. The server must evaluate the relevant authority using trusted context.

Review whether resource lookup is scoped appropriately and whether the final action uses the resource that was checked. A common design risk is checking one object and then acting on another identifier from the request. Follow the data through the handler rather than reviewing the permission call in isolation.

Be careful with client-provided organization or owner fields. The request can identify a desired context, but it should not create authority to act in that context. Resolve membership and role information through the system’s trusted authorization model.

Centralized helpers can make consistent enforcement easier, but they still need the correct resource and action inputs. Record which routes bypass the shared helper and why. A special export or legacy endpoint can become the gap in an otherwise coherent design.

Test read paths beyond the detail page

A denied detail request is only one part of the evidence. Check collection endpoints, search, counts, previews, metadata and downloadable representations. These surfaces may reveal private information even when the main object view is protected.

For a controlled cross-organization test, confirm that the unrelated caller receives the intended denial and that the response does not disclose a private title, owner name or attachment location. Use the synthetic marker to make leakage easy to identify without exposing real records.

Review pagination and filtering behavior. An endpoint may filter unauthorized objects after computing totals, leaving a count that reveals their existence. Whether that is acceptable depends on the product’s information boundary, so document the intended behavior and test it explicitly.

Check error consistency where private existence matters. Different responses for nonexistent and unauthorized resources can disclose information. The appropriate public contract should be chosen deliberately and aligned with the error handling design.

Test changes and delayed work

Write operations need their own matrix. Verify create, update, delete, share, transfer and bulk actions where available. An endpoint that correctly checks read permission may still allow an unauthorized state change through a different path.

For bulk requests, establish how mixed-authority inputs are handled. The system might reject the entire operation or return an explicit per-item result. Either behavior should prevent unauthorized changes and avoid disclosing private details in failure output. Test the chosen contract with a small controlled set.

Background work adds time between request and action. A person may lose membership after starting an export but before downloading it. Decide which permission checks occur at creation, execution and retrieval, and test revocation during that interval.

State transitions can change authority too. A document moved between workspaces or a project transferred to another organization should not retain accidental access through an old relationship. Add regression cases for these transitions, not just for resources created directly in their final state.

Verify identifiers without relying on secrecy

Use identifiers according to the system’s design, but keep permission checks independent of their apparent randomness. A URL can be shared, logged or exposed through another legitimate feature. The access decision should still hold when an unauthorized test user knows the identifier.

If the product intentionally uses a bearer-style sharing link, treat that as a separate access mechanism with an explicit scope, lifetime and revocation behavior. Do not confuse it with ordinary authenticated access. Document what possession of the link permits and what it does not.

Review caches and stored download URLs. A resource protected at the API layer may still be exposed if its generated file is placed at a public location. Test the actual retrieval path and the effect of revocation rather than assuming the original API check follows every copy.

Keep identifiers and test credentials out of public reports when they represent live access. For synthetic environments, use a fixture manifest that makes the relationships reproducible without distributing secrets. The review should produce evidence, not another uncontrolled access path.

A separate reviewer should be able to recreate the result from the fixture description. Include the application version, relevant configuration and the order of actions when state changes matter. If the outcome depends on a cache expiring or a job finishing, record that dependency rather than relying on an unexplained pause. Reproducibility makes it easier to tell whether a later failure is the same defect, a changed product rule or an incomplete test setup. It also reduces the temptation to validate a fix against real customer resources.

Turn findings into durable regression coverage

Record each failed rule with the caller relationship, resource state, action, expected result and observed result. Avoid describing the issue only as a vulnerable endpoint; the same endpoint may enforce some relationships correctly and fail another important case.

After a fix, rerun the failing case and neighboring permitted cases. A change that denies every request can hide the original failure while breaking the product. Verify that legitimate owners and collaborators retain the actions the product promises.

Preserve the controlled fixtures and assertions in the test suite. Add a review trigger for new endpoints, sharing features, role changes and background exports. These changes alter the authorization model even when the authentication mechanism stays the same.

The final evidence should show a consistent relationship between caller, action and resource across direct reads, changes and delayed outputs. That is a stronger basis for release than a successful sign-in test or an assumption that object identifiers are difficult to guess.