What problem does it solve?
Secures Java 21 / Spring Boot 3.x APIs by enforcing robust authentication, authorization, and auditable access controls to prevent unauthorized access, privilege escalation, and token misuse in a banking-grade backend.
Core Features & Use Cases
- OAuth2 Resource Server (JWT): Validate bearer tokens via jwk-set-uri or issuer-uri for stateless API authentication.
- Role-Based Access Control (RBAC): Map token roles to Spring authorities and enforce method- and endpoint-level restrictions with @PreAuthorize and hasRole/hasAuthority.
- Service-to-Service and Web Flows: Support client_credentials for machine-to-machine calls and authorization_code+PKCE for public clients, with optional opaque token introspection when immediate revocation is required.
- Audit & Safety: Correlation ID propagation, strict SessionCreationPolicy.STATELESS, secure password hashing recommendations, and Terraform/Keycloak provisioning guidance for production setups.
Quick Start
Configure your Spring Boot app as an OAuth2 resource server using jwk-set-uri or issuer-uri, set SessionCreationPolicy.STATELESS, register a JwtAuthenticationConverter to map the roles claim to ROLE_ authorities, and protect /api/** endpoints with role-based rules.