RBAC role design: map job duties to permissions and test access
Design roles from concrete tasks, prevent conflicting duties, and verify allowed and denied access.
RBAC role design: map job duties to permissions and test access
Role-based access control (RBAC) assigns permissions to job roles and assigns users to those roles. It makes access easier to review when roles reflect real duties and the application enforces them. This guide uses a hypothetical invoice workflow to show how to design roles, prevent conflicting duties, and test actual allow and deny decisions.
The RBAC model
Core RBAC connects users, roles, permissions, and sessions. A permission pairs an action with a resource: editing an invoice and approving it are different permissions. A role groups permissions for a defined responsibility; a session is the context in which a user acts. Some systems let users activate only a subset of their assigned roles in a session, but support varies.
user --assigned to--> role --granted--> action on resource
\---- may activate selected roles in a session (if supported)Permissions should be linked through roles, not hidden in user-specific grants or loosely named groups. Track role assignments, inherited permissions, direct exceptions, and who approved them. Role hierarchies may pass a lower role's permissions to a higher role; verify how the product implements inheritance.
Example: invoice processing
| Role | Allowed work | Boundary |
|---|---|---|
| Invoice preparer | Create drafts and answer correction requests | Cannot approve or pay |
| Reviewer | Read evidence, record review, request changes | Cannot approve an invoice they prepared |
| Payment operator | Initiate payment for approved invoices | Cannot edit or approve invoices |
| RBAC administrator | Change role definitions and assignments | Does not automatically receive finance duties |
The example is illustrative, not a tested product configuration. Separation of duties (SoD) constraints can prevent one user from receiving conflicting roles (static SoD), or prevent conflicting roles from being active together in a session (dynamic SoD). These are different controls. A role name alone does not enforce either: the application must check the policy at the point of action, including server-side/API requests.
Design and verify roles
List protected resources and concrete actions: read, create, change, delete, approve, or export. Split distinct steps such as drafting an invoice and authorizing payment.
Group duties with the same purpose and responsibility. Record an owner, approval basis, scope, and review interval; do not put every permission in a broad “employee” role.
Grant only the necessary action-resource pairs. Confirm what broad product permissions such as `admin` or `write` actually permit.
Check conflicting roles, hierarchy inheritance, duplicate grant paths, and direct exceptions. If the product cannot enforce a conflict, document the limitation and add an independent approval or review control.
Assign roles from an approved source of responsibility. A job title may not match application access; verify the source attributes and approval rules before automating changes.
Test both positive and negative cases at the server/API: a preparer can save a draft but cannot approve it; a reviewer can review another person's invoice; one user cannot prepare and pay the same invoice if policy forbids it. A hidden UI button is not proof of denial.
Periodically compare users, permissions, inherited grants, direct exceptions, inactive accounts, and role-change records. Remove old access when duties change and expire temporary roles.
If results differ from expectations, trace the role definition, inheritance, direct grants, user assignment, and enforcement point before adding permissions. Confirm why an action should be allowed or denied, then correct the smallest responsible rule.
When roles are not enough
RBAC works well when responsibilities and permissions are stable. If decisions depend on the record, time, location, device, or business relationship, adding ever more roles can become unwieldy. Attribute-based access control (ABAC) can add conditions: for example, a reviewer may act only when the invoice is pending review and belongs to the reviewer's business unit. NIST describes core RBAC separately from optional hierarchy and static/dynamic SoD features; a product's “RBAC support” does not guarantee each feature. Check the actual implementation.
Sources
[NIST CSRC: Role-Based Access Control FAQ](https://csrc.nist.gov/Projects/Role-Based-Access-Control/faqs)
[Sandhu et al. (1996), NIST-hosted RBAC models preprint](https://csrc.nist.gov/csrc/media/projects/role-based-access-control/documents/sandhu96.pdf)
[NIST SP 800-162 Rev. 2: ABAC](https://csrc.nist.gov/pubs/sp/800/162/upd2/final)
[NIST CSRC: RBAC project](https://csrc.nist.gov/Projects/Role-Based-Access-Control)