What it is
Role-based access control (RBAC) grants permissions to roles, such as viewer, editor, approver or administrator, and then assigns roles to users. Instead of managing what each person can do individually, you manage a small set of roles that reflect job functions. When someone changes jobs, you change their role, and their access follows.
RBAC is often combined with attribute-based rules. A regional manager role might allow approving expenses, while an attribute limits that to the manager’s own region.
When you need it
- Different user groups should see or change different data.
- Permissions are currently granted ad hoc and nobody can say who has access to what.
- Auditors or customers ask for evidence of least privilege and periodic access reviews.
- You are building a multi-tenant product where customers manage their own users.
How we approach it
We start by listing the actions the system supports, such as viewing an invoice, approving a payment or exporting data, and turning them into granular permissions. Then we work with you to group those permissions into roles that match real job functions, and record the result in a role and permission matrix that both business and technical staff can read.
Enforcement happens on the server. Each API endpoint or service method declares the permission it requires, and a central authorization layer checks it on every request, including any scope such as tenant or region. The interface hides actions the user cannot perform, but that is a convenience, not the control.
Where you use an identity provider, we map its groups to application roles so access is managed in one place. For sensitive processes, we add separation-of-duties rules. We write automated tests that exercise every protected action as every role, so a later change cannot silently open access.
Common pitfalls to avoid
- Role explosion. Creating a new role for every exception produces hundreds of roles nobody understands. Use attributes for exceptions.
- Checking roles by name in code. Code that asks “is this user an admin?” is brittle. Check permissions instead, and let roles bundle them.
- Hiding instead of enforcing. A hidden button is not a permission check. Direct API calls must be denied too.
- Forgetting data scope. A user may be allowed to view orders, but only their own organization’s orders.
- No review process. Access accumulates over time. Regular reviews remove what people no longer need.