Nested Resources, Bulk Actions, and Tenant Isolation
Follow parent and child permissions through mixed batches, exports, jobs, and caches without losing verified tenant scope.
You’re reading a preview. Premium includes the full lesson and specialist practice. View the full curriculum.
A parent permission is not a batch permission
Nested APIs often look reassuring: /projects/12/tasks/bulk-close names a project the caller can access. But the body can select task IDs independently. If the service authorizes project 12 and then updates tasks only by ID, a foreign child can cross the boundary.
In BuildBoard, Sol is a member of Cedar. Project 12 and tasks 101 and 102 belong to Cedar. Task 901 belongs to Birch's project 77. The API accepts a list of task IDs to close. The policy permits Sol to close tasks only inside the selected authorized project.
{ "taskIds": [101, 901] }
Every ID is syntactically valid. Project authorization succeeds. The problem appears at the relationship between each task and the authorized project. A test using only [101,102] cannot reveal it.