# Authorization

The process of deciding whether an authenticated or anonymous actor may perform a specific action on a particular resource in context.

- Type: term
- Domain: Engineering & architecture
- Level: Foundational
- Last reviewed: 2026-09-23
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/authorization/>)

## What 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.

## Why 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.

## When 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.

## How it works

1. Define resources, actions, subjects, permissions, ownership, and contextual policy rules.
2. Authenticate the actor when policy requires identity and obtain trustworthy attributes.
3. Evaluate the specific request with deny-by-default behavior at a trusted boundary.
4. Enforce the decision consistently without relying on hidden user-interface controls.
5. Record important decisions and review policies, roles, exceptions, and revoked access.

## A 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.

## Where 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.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/authorization/#visualization-authorization>)

## Sources

1. [Authorization Cheat Sheet](<https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html>) — OWASP Foundation · Security practice guidance
2. [REST Security Cheat Sheet](<https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html>) — OWASP Foundation · Security practice guidance

## Related topics

- [Authentication](<https://wiki.soroush.uk/topic/authentication/>)
- [Role-Based Access Control \(RBAC\)](<https://wiki.soroush.uk/topic/role-based-access-control/>)
- [OAuth 2.0](<https://wiki.soroush.uk/topic/oauth-2-0/>)
