Back to blogs

Enterprise Access Control System Design

Published March 24, 2026

Introduction

In large applications, managing user access is very important. We need to control who can access what, when they can access it, and what actions they can perform.

This blog explains a simple and scalable design for an enterprise-level access control system using:

The design supports both RBAC (Role-Based Access Control) and fine-grained permissions.

Core Concepts

1. User

A user is a person who logs into the system.

2. Role

A role defines a group of permissions. Example: Admin, Manager, Employee.

3. Permission

A permission defines what action is allowed on a module. Example: Read, Write, Delete.

4. Module

A module is a feature or resource in the system. Example: Orders, Reports, Users.

5. Department

Departments help organize users. Example: HR, Finance, Engineering.

Database Design

1. User Table

Stores all user information.

Fields:

2. Role Table

Defines roles in the system.

Fields:

3. Department Table

Stores departments.

Fields:

4. ModulePermission Table

Defines permissions available per module.

Fields:

Pivot Tables

5. UserRole Table

Maps users to roles (many-to-many).

Fields:

6. RolePermission Table

Maps roles to permissions.

Fields:

7. UserPermission Table

Allows assigning permissions directly to users (override role).

Fields:

8. ModulePermissions (Optional Mapping)

Used when modules are grouped or structured.

Fields:

Advanced Tables

9. Policies Table

Policies define rules for advanced access control.

Fields:

Example rule_json:

{
"department": "Finance",
"min_role": "Manager"
}

10. TimeBasedAccessControl Table

Controls access based on time.

Fields:

Access Evaluation Flow

When a user tries to access a resource:

  1. Check if user is active
  2. Fetch user roles
  3. Get permissions from roles
  4. Apply user-specific overrides (UserPermission)
  5. Evaluate policies (if any)
  6. Check time-based restrictions
  7. Final decision: Allow or Deny

Priority Order

  1. Deny rules (highest priority)
  2. UserPermission overrides
  3. RolePermission
  4. Policies
  5. Time-based rules

Example Scenario

User: John
Role: Manager
Department: Finance

Final Result:

Indexing Strategy

To improve performance:

Best Practices

Optional Enhancements

Conclusion

This design provides:

You can start simple with RBAC and gradually add policies and time-based access controls as needed.

End of Document