frameworkEngineering & architecture

Role-Based Access Control (RBAC)

An access-control model that assigns permissions to roles and assigns users or service identities to those roles.

Download Markdown (.md)

01What it means

Role-Based Access Control (RBAC) groups permissions into roles representing responsibilities, then grants actors membership in those roles. Access decisions derive from active role assignments, and advanced models can include role hierarchies and separation-of-duty constraints.[1][2]

Permission assignment hierarchy Actors receive roles; roles collect permissions
Actors
Person or workload
Role assignments
Role ARole B
Permissions
ReadChangeApprove
Protected resources
Resource set

Role design should follow responsibilities, preserve least privilege, and enforce separation-of-duty constraints where needed.

02Why it matters

RBAC makes repeated permission sets easier to review, grant, and revoke than managing every user-action pair. Well-designed roles support least privilege, onboarding, offboarding, audits, and consistent policy across many resources.

03When to use it

Use RBAC when responsibilities are reasonably stable and many actors need common permission bundles. Attribute- or relationship-based rules may fit ownership, tenant, context, or highly dynamic decisions better and can complement roles.

04How it works

  1. Inventory protected actions and group them into explicit permissions.
  2. Design roles around job responsibilities rather than individual people.
  3. Assign permissions to roles and actors to the minimum roles they need.
  4. Evaluate active roles and resource context at every enforcement point.
  5. Constrain conflicting roles and privileged activation where necessary.
  6. Review assignments, unused permissions, exceptions, and role definitions regularly.

05A practical example

Example

A commerce platform defines Support Viewer, Refund Operator, and Billing Administrator roles. A support agent can inspect orders but cannot issue refunds until an approved temporary role is activated and logged.

06Where it breaks

Roles can explode when they encode every location, project, and exception. RBAC alone handles ownership and contextual conditions poorly, and stale group membership can preserve access after responsibilities change.

Common mistakes

  • Creating a unique role for each user or one broad administrator role for convenience.
  • Naming roles after teams without defining their permissions.
  • Checking roles only in the interface instead of at protected operations.
  • Never reviewing inherited, temporary, or unused access.

07Sources

  1. Role Based Access ControlNIST Computer Security Resource Center · Government research and standardization resourceRole Based Access Control
  2. Authorization Cheat SheetOWASP Foundation · Security practice guidanceAuthorization Cheat Sheet
View saved topics

Start typing to search titles, definitions, categories, and frameworks.