Authorization
The process of deciding whether an authenticated or anonymous actor may perform a specific action on a particular resource in context.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/authorization/
01What it means
Authorization, often abbreviated authz, evaluates an access request against policy. It considers the actor, requested action, resource, permissions, and sometimes context such as ownership, tenant, time, or risk. Authentication establishes an identity claim; authorization determines what that actor may do.[1][2]
- 01Actor + contextIdentity and attributes
- 02Requested actionOperation on a resource
- 03Policy evaluationPermissions, ownership, conditions
- 04DecisionAllow or deny by default
- 05Enforcement + recordApply and audit
Authentication may supply identity attributes; authorization makes and enforces the access decision.
02Why it matters
Most sensitive failures occur when a legitimate identity can reach another user's data or exceed its intended authority. Consistent authorization protects confidentiality and integrity across interfaces, background jobs, administrative tools, and service-to-service calls.
03When to use it
Authorize every protected operation at the trusted enforcement point, including object-level access and internal APIs. Public resources may allow anonymous access, but that choice should still be explicit policy rather than an omitted check.
04How it works
- Define resources, actions, subjects, permissions, ownership, and contextual policy rules.
- Authenticate the actor when policy requires identity and obtain trustworthy attributes.
- Evaluate the specific request with deny-by-default behavior at a trusted boundary.
- Enforce the decision consistently without relying on hidden user-interface controls.
- Record important decisions and review policies, roles, exceptions, and revoked access.
05A practical example
A project API authenticates a user, then checks that the user belongs to the requested tenant and has permission to edit that particular project. Hiding the Edit button is only presentation; the API repeats the decision for every request.
06Where it breaks
Authorization policy becomes difficult when roles proliferate, attributes are stale, ownership is ambiguous, or enforcement is scattered. A correct decision also depends on trustworthy identity and resource context.
Common mistakes
- Checking that a user is logged in but not whether they may access the requested object.
- Enforcing permissions only in the frontend.
- Defaulting to allow when policy data is absent or a check fails.
- Embedding inconsistent authorization logic across controllers and services.
07Sources
- Authorization Cheat SheetOWASP Foundation · Security practice guidanceAuthorization Cheat Sheet
- REST Security Cheat SheetOWASP Foundation · Security practice guidanceREST Security Cheat Sheet