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
What is the standard system design interview?
How to handle stress in coding interviews?
Does Meta do system design interview?
How to Handle Database Sharding in a System Design Interview
Learn how to handle database sharding in a system design interview. Understand key strategies, challenges, and best practices to ace your interview confidently.
How long is Cisco hiring process?
Is ByteDance a startup?
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

$72

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.