Explain RBAC vs ABAC.
RBAC (Role-Based Access Control)* ties permissions to user roles, while ABAC (Attribute-Based Access Control) uses user, resource, and environment attributes to determine access decisions.
When to Use
- Use RBAC when roles are stable (e.g., developer, admin) in databases or systems.
- Use ABAC when policies depend on context (e.g., access allowed only during business hours or from specific regions).
- Many enterprises combine both for balance.
Example
In a company database, a “DB Admin” role (RBAC) grants schema modification rights.
ABAC adds conditions like “only from the corporate network.”
Want to build deep design intuition?
Explore:
- Grokking System Design Fundamentals
- Grokking the System Design Interview
- Grokking Database Fundamentals for Tech Interviews or Mock Interviews with ex-FAANG engineers
Why Is It Important
Choosing the right model enforces least privilege, prevents data leaks, and supports compliance in modern systems.
Interview Tips
- Define RBAC vs ABAC simply.
- Provide a real-world example.
- Discuss when to choose one over the other.
- Mention hybrid adoption.
Trade-offs
- RBAC: Easier to implement, but suffers from role explosion.
- ABAC: Flexible and granular, but requires complex policies and more compute.
Pitfalls
- Mixing up authentication with authorization.
- Overloading RBAC with too many roles.
- Ignoring ABAC’s performance overhead.
TAGS
System Design Interview
System Design Fundamentals
CONTRIBUTOR
Design Gurus Team
-
GET YOUR FREE
Coding Questions Catalog
Boost your coding skills with our essential coding questions catalog.
Take a step towards a better tech career now!
Explore Answers
Conveying the evolution of designs under changing constraints
How to clear an Amazon interview?
What is a flex job?
Is cracking the coding interview enough to get a job?
What is containerization (e.g. using Docker) and how has it changed the way we deploy and scale applications?
Learn what containerization is, how Docker works, and why it matters for system design and tech interviews. Interview prep insights at DesignGurus.io
Can I become a software engineer in 2 months?
Related Courses
Grokking the Coding Interview: Patterns for Coding Questions
Grokking the Coding Interview Patterns in Java, Python, JS, C++, C#, and Go. The most comprehensive course with 476 Lessons.
4.6
(69,299 learners)
$197
New

Grokking Modern AI Fundamentals
Master the fundamentals of AI today to lead the tech revolution of tomorrow.
3.9
(1,107 learners)
$78
Grokking Data Structures & Algorithms for Coding Interviews
Unlock Coding Interview Success: Dive Deep into Data Structures and Algorithms.
4
(26,683 learners)
$78
One-Stop Portal For Tech Interviews.
Copyright © 2025 Design Gurus, LLC. All rights reserved.