6 lessons

Authorization

What are you allowed to do? Ownership checks, RBAC, ABAC and policy, broken access control, tenant isolation, and where enforcement must live.

Asset→Threat→Attack Surface→Trust Boundary→Vulnerability→Exploit Path→Impact→Mitigation→Defense in Depth→Residual Risk

Every lesson below identifies the asset, attacker capability and boundary before naming the vulnerability. Controls are split into prevention, detection and recovery; residual risk is explicit.

Authorization Models
▶ lab

Ownership checks, roles, permissions, attribute policies, scopes and tenant isolation are different tools for the same question — and most real systems need three of them at once, layered in a specific order.

Boundary · Between the identity established by authentication and the action performed on a specific resource.
Role-Based Access Control
▶ lab

Users get roles, roles get permissions — simple to reason about, easy to audit, and prone to a predictable failure when the role set grows to match every feature.

Boundary · Between the identity and the set of verbs it may perform.
ABAC and Policy-Based Authorization
▶ lab

Decide by evaluating a rule over the requester's attributes, the resource's attributes, the action and the environment — expressive where roles are not, and dangerous when the rules become unreadable.

Boundary · Between the policy decision point and the code that enforces it.
Broken Access Control (IDOR / BOLA)
▶ lab

`GET /invoices/100` works; `GET /invoices/101` also works and it is not yours. Authentication succeeded, authorization was never asked — the most common serious vulnerability in web applications and APIs.

Boundary · The record-level boundary between requester and resource owner.
Multi-Tenant Isolation
▶ lab

A `tenant_id` column is not isolation. Isolation is that column enforced consistently across queries, caches, queues, storage, search, logs and AI context — every place a copy of the data exists.

Boundary · The tenant boundary, which exists in every subsystem and is enforced in each one separately.
Where Authorization Must Live
▶ lab

Not in the frontend, not only at the gateway, and not as an optional call in each handler — but at the point where the resource is loaded, structured so it cannot be skipped.

Boundary · The point of enforcement — which must sit on every path to the data.