Securityauthzauthorisationaccess controlpermissions

Authorization

Definition

Authorization evaluates a caller's identity, the requested action, the target resource and context against rules, and returns allow or deny.

In practice

Authorization runs on every request, close to the data. A gateway can enforce coarse rules that need only the token (valid signature, required scope, rate limit), but only the service that loads the object can check ownership, tenancy or record state. Models range from roles (RBAC) to attributes (ABAC) to relationships (ReBAC), evaluated inline, by a library such as OPA or Cedar, or by a remote policy service.

Authorization must fail closed: a policy call that times out means deny, which makes a remote policy engine part of every request's critical path. Missing object-level checks (BOLA) are the most common API vulnerability. A 403 reveals that a resource exists; returning 404 instead hides it.

Example

Alice is authenticated, but GET /invoices/42 belongs to another tenant, so the invoices service loads the row, compares tenant_id with Alice's and answers 404.