Architecture
System Architecture Diagram
✨ Enhanced architecture diagram with colorful icons, modern design, and 96% code-verified accuracy. Shows all 5 layers with clear relationships, implementation status, and feature highlights. Edit in diagrams.net
Overview
RBAC Algorithm uses a layered, protocol-based architecture designed for:
- Language Agnostic: Works with any programming language
- Extensible Storage: Plug in any backend (SQL, NoSQL, Cloud, Custom)
- Enterprise Grade: Multi-tenancy, role hierarchies, ABAC support
- Clean Architecture: Clear separation of concerns
Architecture Layers
1. Application Layer
Your application interacts with the RBAC system through the main API:
RBACclass - Primary entry point- Batch operations for bulk processing
- Multi-tenant domain isolation
2. Protocol Layer
Language-agnostic interfaces that define contracts:
IStorageProvider- CRUD + indexes + batch operationsIAuthorizationEngine- Permission checks and context evaluationIRoleHierarchyResolver- Role inheritance and DAG validationIPolicyEvaluator- ABAC rules with 12 operators
3. Implementation Layer
Concrete implementations of protocol interfaces:
MemoryStorage- In-memory storage (750+ lines)AuthEngine- Authorization engine (540+ lines)HierarchyResolver- Role hierarchy (390+ lines)PolicyEvaluator- ABAC engine (380+ lines)
4. Data Models
Core entities with domain isolation:
User- User entityRole- Role with permissionsPermission- Action + resource patternResource- Protected resourceRoleAssignment- User-role mappingRoleInheritance- Role hierarchy