Authorization

Deciding what the caller may do — role-based, attribute-based, and the object-level check whose absence is the most common serious backend vulnerability there is.

Authorization in Backends

Every request carries a claim about what the caller may do. The backend is the only place that claim can be tested.

Q · Who decides whether this specific request is allowed, and where does that decision actually live?
Authentication vs Authorization

"Who are you" and "may you do this" are different questions with different answers, different failure modes and different blast radii.

Q · Why is conflating authentication and authorization the most common serious backend security mistake?
Where the Check Belongs

A hidden button is not a control. Middleware, handler, service and query each enforce something different — and only one of them is a guarantee.

Q · At which layer should an authorization check run, and what does each layer actually guarantee?
Role-Based Access Control

Roles group permissions so people can be granted a job, not a list. What roles cannot express is anything about the object.

Q · When is "what role are you" a sufficient authorization model, and what does it fail to say?
Attribute-Based Access Control

Rules over attributes of the principal, the resource and the context — more expressive than roles, and correspondingly harder to reason about.

Q · When do roles stop being enough, and what does moving to attribute rules actually cost?
Object-Level Authorization

A user can be perfectly authenticated, hold exactly the right role, and still have no business touching project 123.

Q · Who checks that this authenticated user may act on this particular object, and where does that check have to happen?
Multi-Tenancy

One deployment serving many customers, where the worst possible bug is showing one of them another one's data.

Q · What changes in a backend when one deployment serves many customers who must never see each other?
Tenant Isolation

The tenant comes from the authenticated principal. Any other source — header, subdomain, path, body — is an authorization bypass with extra steps.

Q · Where does the tenant identifier come from, and how do you make it impossible to forget?