Pick the fix
An editor in tenant A requests GET /docs/99, which belongs to tenant B. The role check passes. What's missing?
Hint 1 of 1
What links the user to doc 99?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A A tenant or ownership check on the document itself
Correct. Roles say what kind of action; ownership says on which data.
Roles answer what kind of action someone may take. Whether this document is theirs to touch is a property of the data, so each request has to check the tenant or owner on the object itself.
Why not the others?
- B A stronger password policy. Unrelated.
- C Rate limiting. Doesn't stop one request.
- D A new 'tenant-editor' role. Still needs the per-resource check.