← Back to blog

Role-Based Access Control: Design and Implementation Guide

December 6, 2026
Role-Based Access Control: Design and Implementation Guide

Role-based access control (RBAC) gives permissions to roles such as "Support Agent" or "Finance Approver" and then assigns people to those roles, so nobody is granted access one account at a time. In a custom application the model is the easy part. The hard part is deciding which roles exist, what each may do, and how that survives new features, new customers and staff turnover. Teams that settle this during business analysis, before the first screen is built, avoid the painful rewrite that comes when permissions are scattered across hundreds of code paths.

Requestum
requestum.com
Plan Access Rules Before Development
Requestum provides business analysis and custom software development to help define application requirements, including role-based access control.
Business Analysis Services

TL;DR

  • RBAC attaches permissions to roles, and users get access only through the roles they hold, which keeps access rules auditable and easy to change.
  • Design roles from job functions and the minimum privileges each function needs, not from a list of individual people.
  • Use RBAC as the base and add attribute rules (ABAC) only where context such as location, time or record ownership must decide access.
  • Deny by default, check permissions on every request on the server, and review who holds which role on a schedule.
  • Decide the role model in discovery, before development, because it touches the data model, the API and the interface.

Table of Contents

What RBAC actually controls

NIST, the US standards body, defines RBAC as a model where permitted actions on resources are tied to roles instead of to individual identities. Role permissions can be inherited through a hierarchy, and they typically reflect what people need to do their defined functions in the organization.

A concrete case: a property management platform has leasing agents, maintenance coordinators, accountants and owners. A leasing agent can create and edit leases. An accountant can view leases and post payments but not edit lease terms. A maintenance coordinator sees work orders and unit addresses but no financial data. When a new accountant joins, you assign one role. When the company decides accountants may also export tax reports, you change the role once and every accountant gets it.

NIST's model rests on three rules: a user can exercise a permission only if they have been assigned a role, the role they are acting in must be authorized for them, and the permission must be authorized for that active role. In an application these rules translate into a plain structure: users, roles, permissions, and two mappings between them.

RBAC users, roles, permissions, and authorization rules

The model is old and well tested. The RBAC model was adopted as an American National Standard (INCITS 359) in 2004 and revised in 2012. The standard defines four components: core RBAC, hierarchical RBAC, and static and dynamic separation of duty. Most business applications use the first two and add separation of duty where money or sensitive records are involved.

Designing roles that stay manageable

The NIST authors who wrote the guidance on role engineering argue that this step decides whether an RBAC project works: structuring permissions into a practical set of roles, with proper requirements work up front, saves money and operational trouble later. That matches what goes wrong in practice. A team ships "Admin" and "User", then adds "Power User", "Admin Lite" and "Admin (Sales)" as customers ask for exceptions, and within a year nobody can say what any role can do.

The same paper describes three ways to build the structure:

  1. Top-down: subject-matter experts identify the roles and permissions from the business processes, starting from a blank page.
  2. Bottom-up: you harvest the access rules that already exist in current systems and spreadsheets and consolidate them into roles.
  3. Hybrid: you start top-down from the business processes and check the result against what people really do today.

For a new product, top-down works best. For replacing a legacy system or a spreadsheet-driven process, take the hybrid route, because the old access habits contain rules nobody wrote down (the regional manager who has always been able to override a quote, for example). Large organizations, the paper notes, often end up needing hundreds of roles, which is why hierarchy matters.

Start from job functions and least privilege

Least privilege, as NIST's early RBAC paper frames it, means identifying job functions, working out the minimum privileges each needs, and limiting users to those. In practice, run a workshop per function and ask: what does this person do on a normal Tuesday, what do they do at month end, and what must they never be able to do?

Write permissions as an action on a resource: "invoice:approve", "lease:edit", "report:export". Name roles after functions in the business, not after screens or people. Then use a hierarchy where operations genuinely overlap, so a "Senior Accountant" inherits everything an "Accountant" can do and adds approval rights, instead of duplicating the permission list.

Keep roles few and permissions fine-grained

A reliable rule of thumb: permissions are many and specific, roles are comparatively few and meaningful. If you find yourself creating a role for one person, the model is missing a permission or an attribute rule. If two roles differ by a single permission, consider whether the second should be a child role in the hierarchy.

Separate duties where fraud or error is costly

NIST's revised RBAC model defines static separation of duty as marking certain roles mutually exclusive, so one user can't hold both. The goal is to make fraud or conflict-of-interest violations require collusion between two or more people. The classic pair is "creates payment" and "approves payment". Sandhu, Ferraiolo and Kuhn add that least privilege tells you where those separation boundaries belong.

RBAC vs ABAC: which one your application needs

With RBAC a user reaches a resource with the privileges of an assigned role. With attribute-based access control (ABAC), the system decides at the moment of the request by evaluating rules against attributes of the user, the resource and the environment, such as location, time of day or threat level.

NIST's own guidance observes that roles alone are sometimes insufficient to express real-world access policies and can't react to real-time conditions. NIST also describes ABAC as easy to set up but complex to manage as rules multiply.

Our verdict for a typical business application: start with RBAC, because it's understandable to product owners, auditors and support staff, and add a small number of attribute rules where a role can't express the policy. Examples that call for attributes:

  • A property manager may edit only the buildings in their own portfolio (ownership attribute).
  • A claims reviewer may approve claims only up to a set amount (value attribute).
  • Payroll data may be opened only from managed devices during business hours (environment attributes).

The role answers "what kind of work can this person do?" and the attribute answers "on which records, and under what conditions?" Going pure ABAC from day one usually means writing and testing a policy language before you've learned what your users do. Going pure RBAC with ever more roles produces the role explosion described above. The combination keeps both in check.

QuestionRBACABAC
How is access decided?By the role assigned to the userBy rules evaluated against user, resource and context attributes
Easiest to explain to auditors?Yes: a list of roles and their permissionsNeeds policy documentation and test cases
Handles "only my own records"?Awkwardly, usually through many rolesNaturally
Handles time, location, device?NoYes
Typical riskRole explosionRule sprawl that's hard to manage

Implementing RBAC in a web or mobile application

A workable sequence for a custom build looks like this.

1. Map actors, resources and actions

List every type of user, including external ones (customers, contractors, partner companies), every resource in the system (leases, invoices, reports, settings) and every action. This is business analysis work, and it's cheaper on paper than in code. Our business analysis techniques guide covers methods for getting this out of stakeholders.

2. Draft roles and the permission matrix

Build a grid of roles against permissions and review it with the people who do the jobs. Confirm the separation-of-duty pairs at this stage, and mark which permissions need an attribute condition on top.

3. Decide the scope of a role

In many products a role applies at a particular level: the whole company, one department, one project, one client account. Microsoft's cloud documentation illustrates the idea well: a role assignment combines a principal, a role definition and a scope, and effective permissions are the sum of all assignments. If your product serves several customer organizations in one system, scope is the point where tenant isolation and RBAC meet, and our piece on multi-tenant architecture walks through the trade-offs.

4. Enforce on the server, on every request

OWASP's authorization guidance says to deny by default and validate permissions on every request, applying least privilege both horizontally (one user to another's data) and vertically (ordinary user to admin functions). Hiding a button in the interface is a usability feature and nothing more: the API must refuse the call. A central authorization layer or middleware, rather than ad hoc checks in each endpoint, is what keeps one forgotten check from becoming a breach, since an attacker, as OWASP puts it, needs only one way in. For API-specific controls, see our API security best practices.

5. Test every role, including the negative cases

For each role, test what it can do and, just as important, what it must be refused. Automated tests that log in as each role and try forbidden actions catch regressions when someone adds an endpoint. Requestum's software testing and QA services include this kind of verification, and our web app security checklist frames access controls as testable items with owners and evidence.

6. Log, review and expire

Microsoft's guidance recommends granting specific permissions, at a specific scope, for a specific period, using just-in-time elevation that expires automatically, and running recurring access reviews to remove what's no longer needed. OWASP makes the same point about privilege creep: it's easier to add permissions than to take them away, so start narrow. Build an admin screen that shows who holds which role, and write role changes to an audit log. Quarterly reviews, tied to HR events such as role changes and departures, keep the model honest.

Common design mistakes

The most frequent one is hard-coding role names in business logic ("if role == manager"), which makes every change a code release. Check permissions, not role names, and let roles be data. The second is mixing authentication and authorization: signing in proves who someone is, and the role says what they may do. The third is forgetting machine users. Integrations, background jobs and AI agents need roles of their own with narrow permissions, and that matters more as teams add automation. Finally, teams skip the "break glass" path: an audited, time-limited emergency elevation is far safer than a shared admin password.

Where Requestum fits

Where Requestum fits

Access control touches the data model, the API, the interface and the test plan at once, so it's cheapest to settle at the start of a project. Requestum builds custom web and mobile applications, including CRM and ERP systems and marketplaces, where role and permission models are part of the core design.

Our discovery phase and business analysis are where roles, resources and approval flows get mapped before development begins, and our QA team verifies them afterward. If you're planning a new product or replacing a system whose permissions have become unmanageable, look at our web development services or start with a discovery phase.

Requestum

For products that serve several customer organizations, or for internal tools handling financial and personal data, bringing us in at the analysis stage lets you set the role model, the separation-of-duty rules and the review process together.

Our perspective

In our work on custom platforms, access control is rarely the feature a client asks for first, and it's often the one they regret not specifying. The reason is simple: roles look like a settings page, but they're really a statement about how the business runs. Who approves, who can see money, who can act for a customer.

That's why we treat the role model as a business analysis deliverable rather than a developer task. A permission matrix reviewed by the people who do the jobs, with separation-of-duty rules agreed in advance, makes development faster and QA more precise, because every role becomes a test script.

We'd rather see a team begin with a small, well-named set of roles and extend with attribute rules than begin with a policy engine nobody can read. Our dedicated teams and discovery work are built around getting those decisions made early, with the product owner in the room.

Dmitry

FAQ

What is the difference between RBAC and ABAC?

RBAC grants access through the role a user holds. ABAC evaluates rules against attributes of the user, the resource and the context, such as time or location, at the moment of each request. Many applications use RBAC for the base permissions and add attribute conditions for cases like "only your own records".

How many roles should an application have?

There's no fixed number, but permissions should be many and roles comparatively few. If roles are being created for individual people or differ by a single permission, the design needs a hierarchy or an attribute rule instead. Large organizations can legitimately need hundreds of roles, which is why NIST's guidance stresses structuring them in a hierarchy.

How often should access be reviewed?

Set a recurring schedule, quarterly being common, and also review whenever someone changes jobs or leaves. Reviews should compare each person's roles against what their job requires today and remove anything extra.

Can RBAC be added to an existing application?

Yes, though it's easier with a central authorization layer. The usual path is to inventory current access rules, define roles from them, move the checks into one enforcement point on the server, and test each role before switching over. A hybrid role-engineering approach, combining business process analysis with existing access patterns, suits this case.

Sources