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:

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

Design Gurus Newsletter - Latest from our Blog
Boost your coding skills with our essential coding questions catalog.
Take a step towards a better tech career now!
Explore Answers
Is Spotify a good job?
Does Tesla pay well?
How to Handle Unfamiliar System Design Interview Questions
Struggling with unfamiliar system design interview questions? Learn a step-by-step approach to handle any system design problem with confidence.
Is system design asked in freshers interview?
How to start an interview?
Why should I join Oracle?
Related Courses
Course image
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
Discounted price for Your Region

$197

Course image
Grokking Modern AI Fundamentals
Master the fundamentals of AI today to lead the tech revolution of tomorrow.
3.9
Discounted price for Your Region

$78

Course image
Grokking Data Structures & Algorithms for Coding Interviews
Unlock Coding Interview Success: Dive Deep into Data Structures and Algorithms.
4
Discounted price for Your Region

$78

Image
One-Stop Portal For Tech Interviews.
Copyright © 2026 Design Gurus, LLC. All rights reserved.