Fix and verify: invoice access

Bob at fictional Acme can read Alice’s invoice at fictional Birch because the handler trusts the query string. Choose where tenant and role come from, then run the cases. The reference solution is not shown until your policy passes. This does not prove a production API is safe.

A customer may read only their own invoice. Billing support may read invoices in the same trusted tenant. A role or tenant supplied by the browser is not authority. Inactive sessions are denied.

See the same bug as a tester and as an analyst · Continue in the expert lab · Read the lesson