advanced

Design a Permission and Role System

Design a role-based access control system. Include users, roles, and permissions, role hierarchy with inheritance, resource-level policies, permission resolution, and access evaluation.

Suggested time: 45 minutes

Loading the workspace...

About this problem

A permission and role system (RBAC) is a core OOD problem in enterprise software because it combines hierarchical data structures (role trees), the Chain of Responsibility pattern (policy evaluation), and demanding concurrency requirements (high-frequency reads with infrequent writes). Let's define exactly what the system must do.

What your design needs to cover

  • Role-Based Access

  • Hierarchical Roles

  • Access Checking

  • Granular Permissions

  • Deny Overrides

Key challenges the editorial covers

Learn from other designs

Related problems

Guides