Authorization Models
Design permissions correctly using RBAC, ABAC, ownership checks, scopes, and resource-level authorization.
Role-Based Access Control
Role-Based Access Control assigns permissions through roles.
Example roles may include admin, editor, and viewer.
RBAC is simple and useful when permissions map cleanly to organizational roles. However, real applications often require more context than a role can express.
For example, an editor may edit documents only inside their own organization. A global role check cannot express that relationship by itself.
users:read, users:write, users:deleteusers:read, users:writeusers:readScopes and Attribute-Based Authorization
OAuth scopes provide coarse-grained permissions such as orders:read or orders:write.
Attribute-Based Access Control can evaluate attributes of the user, resource, action, and environment. For example: allow update when user.organizationId === resource.organizationId and resource.status !== 'locked'.
In complex systems, authorization becomes a policy decision rather than a simple role comparison.
- Authentication alone is never sufficient for resource access.
- Scopes are useful for API-level permissions.
- Resource-level checks prevent BOLA/IDOR vulnerabilities.
- Complex systems may require policy-based authorization.