Authorization determines what an authenticated identity (user, application, or service) can do and which resources it can access within a system.
In most systems, authorization follows authentication (AuthN). Once the system knows who you are, authorization determines what you’re allowed to do.
Authorization ensures that every authenticated identity operates within defined boundaries. Without it, a user who logs in successfully (AuthN) could access all sensitive data and perform any action (AuthZ failure). In Zero Trust architectures, authorization decisions are continuously evaluated throughout a session, not only at initial access.
Authorization connects three main components:
RBAC is the foundational authorization model. It simplifies permission management by assigning permissions to roles (e.g., Admin, Editor, Viewer) and then assigning those roles to users.
Enterprise IAM systems and large-scale cloud environments implement RBAC through their frameworks.
ABAC uses dynamic policies that evaluate attributes of the user, the resource, and the environment to make an access decision.
Standards-based policy engines (such as Open Policy Agent or XACML) enforce ABAC policies to maintain consistency and auditability.
ReBAC bases authorization on the relationships and ownership between a user and a specific resource.
ReBAC and FGA systems leverage relationship-aware infrastructure and graph-based authorization patterns to model and query these relationships at scale. Several open-source implementations (such as OpenFGA and SpiceDB) make this technology accessible to all developers.
Fine-Grained Authorization (FGA) extends ReBAC principles to enable authorization decisions based on complex relationship graphs at scale. FGA systems can answer questions like “Can user X edit document Y?” by traversing relationships through groups, organizations, and nested permissions. This model powers authorization in document collaboration and social platforms, where access can be inherited through folder hierarchies, group memberships, and sharing relationships.
API-driven applications enforce authorization via access tokens issued through the OAuth 2.0 authorization flow.
This token-based approach is stateless. The token contains everything the API needs: authorization context and a cryptographic signature.
Scopes define the permissions a client application requests from the Authorization Server. The Authorization Server grants only the scopes to which the user has authorized consent, and includes them in the issued Access Token.
Roles typically define broad access sets, while scopes represent fine-grained, action-level permissions. Combining roles and scopes provides flexibility for APIs.
OpenID Connect (OIDC) extends OAuth 2.0 by enabling the issuance of ID tokens for user identity verification and profile claims, in addition to authorization scopes.
Every protected API endpoint must validate the incoming access token. Verify the token’s signature (helps ensure integrity and authenticity), expiration (exp claim), audience (aud claim), issuer (iss claim), and required permissions (scopes or roles). Additional validation may include checking the token revocation status, validating the nbf (Not Before) claim, and enforcing rate limits per client. For JWTs, authorization servers publish public keys via the JSON Web Key Set (JWKS) endpoint for signature verification.
APIs must return specific HTTP status codes to communicate the type of failure.
Examples: Missing Authorization header, expired JWT, invalid signature.
Examples: A valid token, but the user lacks the admin role for DELETE /users/:id, resulting in an insufficient scope for the requested operation.
When authorization logic is scattered throughout the code, some paths may fail to enforce required checks, leaving vulnerabilities that attackers can exploit. Centralizing authorization enforcement through middleware or a policy engine is the best practice. Emerging approaches include Policy-as-Code, which utilizes languages like Rego (Open Policy Agent), separating authorization logic from application code and enabling centralized testing and auditing.
Step-up authentication balances security and usability. It challenges an already-authenticated user for additional factors (such as a biometric scan) only when they attempt a high-risk operation, such as a wire transfer or payroll modification. This approach is also called adaptive or contextual authentication.
Broken Object-Level Authorization (BOLA), also known as Insecure Direct Object Reference (IDOR), is a common vulnerability. It occurs when an API checks for general permission (e.g., “can read a document”) but fails to verify the user has access to the specific resource ID requested (e.g., “document ID 12345”). This vulnerability consistently ranks as API1:2023 in the OWASP API Security Top 10. Always validate both the action permission and the resource-level access.
Authorization is a component of access control. Access control is the broader security discipline encompassing authentication (verifying identity), authorization (granting permissions), and enforcement (ensuring policies are applied). Authorization refers explicitly to the decision-making and enforcement of what an authenticated identity can do.
Distributed systems enforce authorization at multiple layers: API gateway (coarse-grained), service mesh (network-level), or individual services (fine-grained). Token-based authorization using JWTs enables stateless verification across services. However, maintaining consistency is challenging. Policy updates must reach all services, and relationship-based decisions require centralized policy engines or distributed caching.
Authorization is one component of a comprehensive identity and access management strategy. Modern authorization frameworks, such as OAuth 2.0 and OpenID Connect, along with fine-grained models like ABAC, ReBAC, and Fine-Grained Authorization (FGA), enable developers to build more secure and scalable apps that align with Zero Trust principles. For more on authentication, access control models, and security best practices, explore Auth0’s Intro to IAM series.
Table of contents
Solve your authorization
Watch this webinar to see how one company solved their authrization problems with Auth0.
Watch the webinarQuick assessment
What reasons would you use authorization to control a computer resource? (select all that apply)
Quick assessment
Which authorization strategy allows you to create collections of permissions that can be easily assigned or removed to a user all at once?