A secure Spring Boot microservice designed to manage administrative privileges and access control using Keycloak for authentication and token-based authorization.
The service connects to a PostgreSQL database (via Docker) and supports schema migrations through Flyway.
The Admin Portal Service acts as the central authentication and authorization gateway within the MyCare system.
It leverages Keycloak for identity management, Spring Security for resource protection, and JWT tokens for secure access to endpoints.
With role-based access control (RBAC), administrators can perform privileged operations while other users are restricted according to their assigned roles.
✅ Role-based authorization for admin users
✅ Secure login and JWT validation via Keycloak
✅ Integration with Dockerized Keycloak and PostgreSQL
✅ Database schema versioning using Flyway
✅ RESTful API architecture built on Spring Boot 3.3.5
✅ Centralized configuration and modular design for scalability
| Category | Technology |
|---|---|
| Language | Java 21 ☕ |
| Framework | Spring Boot 3.3.5 🌱 |
| Security | Keycloak, OAuth2, JWT 🔐 |
| Database | PostgreSQL 🐘 |
| Migration Tool | Flyway 🪶 |
| Build Tool | Maven 🧱 |
| Containerization | Docker 🐳 |
- Keycloak 2.PostgreSQL
1.A user logs in via Keycloak (Realm: Mycare_realm).
2.Keycloak issues a JWT access token.
3.The token is passed with each request to the Admin Portal Service.
4.Spring Security validates the token via the Keycloak public JWK endpoint.
5.Access is granted or denied based on roles (ADMIN, USER, etc.).
⭐ "Authorization is the heartbeat of secure systems — protect it like your data depends on it."