RBAC vs ABAC vs ACL Access Control Models
On this page
- Authentication vs authorization
- Access control lists (ACLs)
- Role-based access control (RBAC) and role explosion
- Attribute-based access control (ABAC)
- Relationship-based access control (ReBAC)
- RBAC vs ABAC vs ReBAC vs ACLs: which to use
- Access control principles that matter more than the model
- Check yourself
Authentication vs authorization
Authentication answers "who are you?". Authorization answers "may you do this, to this thing, now?". It's where most real access bugs live: OWASP ranks broken access control first in its Top 10 (Day 6). The model you choose decides how easy those rules are to get right.
Access control lists (ACLs)
An ACL works like a guest list on a door: each object carries its own list of who may do what. For example: "document 42: Ana can edit, Bo can view". File systems and S3 bucket ACLs work this way.
- Good for: sharing individual objects with specific people.
- Problem at scale: permissions are scattered across millions of objects; answering "what can Bo access?" means scanning everything.
Role-based access control (RBAC) and role explosion
RBAC grants permissions to roles, and roles to users: finance-approver can approve invoices; Ana has finance-approver.
- Good for: clear job functions, easy auditing ("who are the admins?").
- Problem: roles don't know about the specific object. This check passes for every invoice:
// RBAC only: "is this user a finance approver?"
if (!user.roles.includes('finance-approver')) throw new ForbiddenError();
approveInvoice(invoiceId); // any invoice, any amount, any departmentTeams then invent ever more specific roles (finance-approver-emea-under-10k), a problem known as role explosion.
Attribute-based access control (ABAC)
ABAC decides with attributes of the subject, the resource, the action and the context:
{
"effect": "Allow",
"action": "invoice:approve",
"condition": {
"subject.role": "finance-approver",
"subject.department": "${resource.department}",
"resource.amount": { "lessThan": 10000 },
"resource.createdBy": { "notEquals": "${subject.id}" }
}
}An approver can approve invoices in their own department, under 10,000, and not ones they created themselves (separation of duties). One rule, no role explosion. AWS IAM conditions, Open Policy Agent and AWS Cedar express rules like this.
Relationship-based access control (ReBAC)
Apps like Google Drive decide by relationships: you can edit a document because you're an editor of the folder it's in, which belongs to your team. ReBAC systems (Google's Zanzibar, OpenFGA, SpiceDB) model these graphs efficiently.
RBAC vs ABAC vs ReBAC vs ACLs: which to use
| Need | Fits |
|---|---|
| A few clear job functions | RBAC |
| Rules about ownership, amounts, departments, time | ABAC (often RBAC plus conditions) |
| Sharing and nested hierarchies (folders, orgs, teams) | ReBAC |
| Per-object sharing in a small system | ACLs |
Most applications combine RBAC for broad permissions with object-level checks (ownership, tenant, relationship) on every request.
Access control principles that matter more than the model
- Deny by default: no rule, no access.
- Least privilege: grant only what's needed, and review periodically.
- Check on the server, for every request and every object. Hiding a button isn't authorization.
- Centralize decisions in one policy module or engine, so rules aren't copied into every handler.
- Separation of duties for sensitive actions (approving your own expense, granting yourself admin).
- Test the negatives: user A can't read or change user B's data (Day 11).
Check yourself
It confirms the user has a role like approver but says nothing about the specific invoice: its amount, department, or whether the user created it. Object-level checks on those attributes are still needed.
Creating ever more specific roles, such as eu-finance-approver-under-10k, to encode conditions, until nobody understands them. ABAC expresses those conditions as rules over attributes of the user, resource and context instead.
On the server, for every request and every object it touches. Client-side checks, like hiding a button, only improve the interface; anyone can call the API directly.
When access follows relationships, such as documents shared with people, folders inheriting permissions, or members of teams, as in Google Drive. Systems like OpenFGA implement it.
Granting users and services only the permissions they need for their task, for the time they need them, so a compromised account can do little.