Design: Role-Based Access Control (RBAC) System
Design covers the RBAC system including role management, permission assignment, and enforcement in microservices. Out of scope are user authentication mechanisms and UI design.
Functional Requirements
FR1: Users can have one or more roles assigned.
FR2: Each role has specific permissions to access resources or perform actions.
FR3: The system must enforce access control checks for microservices APIs.
FR4: Support dynamic role and permission management by administrators.
FR5: Audit logs for access attempts and changes to roles or permissions.
FR6: Support at least 100,000 users and 1,000 concurrent API requests.
FR7: API response latency for access checks should be under 100ms p99.
FR8: Ensure high availability with 99.9% uptime.
Non-Functional Requirements
NFR1: Microservices architecture with independent services.
NFR2: Centralized authorization service for role and permission management.
NFR3: Use token-based authentication (e.g., JWT) for user identity.
NFR4: Access control decisions must be fast and scalable.
NFR5: Data consistency for role and permission updates must be eventual.