You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Role-Based Access Control (RBAC) backend built with Spring Boot that provides JWT authentication, granular permission management, user/role administration, audit logging, and configurable data grids.
1. Client sends POST /api/auth/login with { username, password }
2. Server validates credentials via Spring Security AuthenticationManager
3. Server checks account status (Active, Locked, Disabled)
4. On success: JWT token generated (HS256, 1-hour expiry) and returned
5. Client includes token in subsequent requests: Authorization: Bearer <token>
6. JwtFilterConf intercepts each request, validates token, sets SecurityContext
Account locks after 5 failed login attempts
Lock count resets on successful login
Password reset codes expire after 48 hours
Permission Model
User ──> UserRoleMapping ──> Role ──> RolePermissionMapping ──> EntityPermissions
├── Entity (User/Role/AuditLog)
└── GenericPermission (Create/View/Edit/Delete/Copy/ChangePassword)
Every protected operation calls LoggedInUserService.isActionAllowed(entity, permission) which traverses this hierarchy to determine access.
The application follows a Controller → Service → Repository layered architecture with:
Centralized exception handling via @ControllerAdvice
Entity versioning (active/inactive records with version numbers)
Audit logging on all entity operations
Consistent response format via BaseResponse
About
A simple project done to build an RBAC system. Additional goal is to properly learn how to build applications using Spring Boot and Angular from scratch.