01 / 20

RBAC vs. ABAC
Access Control Models

Understand the two dominant approaches to access control in modern systems: Role-Based and Attribute-Based models.

Cyber Security

What Is Access Control?

Access control is the security practice of determining who can access what resources and under what conditions. It is one of the most fundamental pillars of cybersecurity.

Authentication
Verifying who the user is (login, password, biometrics)
Authorization
Determining what the verified user is allowed to do

Role-Based Access Control (RBAC)

In RBAC, access permissions are assigned to roles, and users are assigned to roles. A user inherits all permissions associated with their role(s).

User: Alice User: Bob User: Carol Admin Editor Viewer Read Write Delete Manage Users assigned to grants USERS ROLES PERMISSIONS

Attribute-Based Access Control (ABAC)

In ABAC, access decisions are made by evaluating attributes of the user, the resource, the action, and the environment against a set of policies.

Policy Engine Evaluates Rules User Attributes Department: HR Clearance: High Resource Attrs Type: Personnel File Sensitivity: High Environment Time: 9 AM Location: Office Action Operation: Read Purpose: Audit

Why Does Access Control Matter?

Choosing the right access control model directly impacts your organization's security posture, regulatory compliance, and operational efficiency.

Data Breaches
Overly permissive access is a leading cause of insider threats and data leaks
Compliance
HIPAA, GDPR, and PCI-DSS all require robust access control mechanisms
Least Privilege
Users should only have the minimum permissions they need to do their job

The RBAC Model: Core Principles

1
Role Assignment: A user can only exercise a permission if they have been assigned (or selected) a role.
2
Role Authorization: A user's active role must be authorized for that user. Users cannot self-assign roles.
3
Permission Authorization: A user can exercise a permission only if the permission is authorized for the user's active role.

The ABAC Model: Core Principles

1
Subject Attributes: Properties of the user requesting access (department, clearance level, job title).
2
Object Attributes: Properties of the resource being accessed (file classification, owner, creation date).
3
Environment Attributes: Contextual conditions (time of day, IP address, device type, threat level).
4
Policy Rules: Boolean expressions combining attributes to produce an allow or deny decision.

RBAC vs. ABAC: The Key Distinction

RBAC: Who Are You?
Access is determined by the role you hold. All users with the same role get the same permissions, regardless of context.
ABAC: What's the Situation?
Access is determined by multiple attributes evaluated together. Two users with the same title may get different access based on context.

RBAC Role Hierarchies

RBAC supports role hierarchies where senior roles inherit all permissions from junior roles. This simplifies management in large organizations.

Super Admin Admin Manager Editor Viewer ↑ inherits all permissions from roles below

ABAC Policy Example

An ABAC policy is a rule that combines attributes using logical conditions. Here is an example policy for accessing patient records:

ALLOW access IF: Subject.Role = "Doctor" OR Subject.Role = "Nurse" AND Resource.Type = "PatientRecord" AND Environment.Time is between 06:00 and 22:00

How to Choose a Model

1
Assess complexity: How many distinct access scenarios do you need to support? Fewer than 20 roles? RBAC may suffice.
2
Consider context: Do access decisions depend on time, location, device, or data sensitivity? If yes, lean toward ABAC.
3
Evaluate scalability: Will the number of roles "explode" as the organization grows? Role explosion is a sign ABAC is needed.
4
Check compliance: Some regulations (e.g., HIPAA) may require fine-grained, attribute-level controls.
5
Consider hybrid: Many real-world systems use RBAC + ABAC together: roles provide a baseline, attributes add fine-grained control.

Example 1: RBAC in a School System

A school system has three roles: Principal, Teacher, and Student. Determine who can perform each action.

Action Principal Teacher Student
View Grades ✓ ✓ ✓ (own)
Edit Grades ✓ ✓ ✕
Manage Teachers ✓ ✕ ✕
Expel Students ✓ ✕ ✕

Example 2: ABAC for the Same School

With ABAC, we can write a single policy that handles the nuance RBAC could not:

1
IF Subject.Role = "Student" AND Resource.Owner = Subject.ID THEN ALLOW "View Grades"
2
IF Subject.Role = "Teacher" AND Resource.Class = Subject.AssignedClass THEN ALLOW "Edit Grades"
3
IF Subject.Role = "Principal" THEN ALLOW all actions (no additional attribute checks needed)

Example 3: Hybrid RBAC + ABAC

A hospital uses RBAC for broad access tiers and ABAC for contextual refinements. Consider a nurse trying to access patient records:

RBAC Check Role = Nurse? ✓ ABAC Checks Patient.Ward = Nurse.Ward? ✓ Time is work hours? ✓ Device is hospital-owned? ✓ ACCESS GRANTED If any check fails: ACCESS DENIED

Common Mistakes

✕ Role Explosion
Creating too many RBAC roles to handle every edge case (e.g., "Night-Shift-Senior-Nurse-Ward-3") instead of switching to ABAC.
✕ Confusing RBAC with ABAC
Claiming ABAC "replaces" roles entirely. In practice, ABAC policies often reference roles as one of many attributes.
✕ Ignoring Least Privilege
Assigning users to overly broad roles (e.g., "Admin") because proper role design feels complex. This defeats the purpose of RBAC.

Summary Comparison

Criterion RBAC ABAC
Decision basis User's role Multiple attributes
Granularity Coarse-grained Fine-grained
Scalability Can suffer role explosion Scales with attributes
Implementation Simpler, well-understood More complex setup
Context-awareness None (static) Yes (dynamic)
Best for Stable organizations with clear hierarchy Dynamic environments needing contextual control
Standards NIST RBAC (2004) NIST ABAC (SP 800-162)

Question 1 of 5

In RBAC, permissions are assigned directly to:

Question 2 of 5

Which of the following is NOT a category of attribute used in ABAC?

Question 3 of 5

A company creates separate roles like "Morning-Shift-Nurse", "Night-Shift-Nurse", "Weekend-Nurse-Ward-A", etc. This problem is called:

Question 4 of 5

A hospital wants to ensure that doctors can only access patient records during business hours and from hospital devices. Which model best supports this?

Question 5 of 5

Which statement about RBAC and ABAC is most accurate?