Backend API for submitting, approving, provisioning, revoking, expiring, and auditing access to internal resources such as VPN, GitLab, Jira, and HR systems.
- employees submit access requests for internal resources
- managers or admins approve or reject submitted requests
- admins provision and revoke approved access
- scheduled expiry marks overdue provisioned access as expired
- audit logs track login attempts and access lifecycle events
- role-based authorization restricts visibility and actions by user type
ADMINMANAGEREMPLOYEE
- employee submits a request
- manager or admin approves or rejects it
- admin provisions approved access
- admin can revoke provisioned access
- scheduler expires overdue provisioned access
- audit log records key events across the lifecycle
- Java 25
- Spring Boot 3
- Spring Web
- Spring Data JPA
- Spring Security
- PostgreSQL
- Flyway
- springdoc OpenAPI
- JUnit 5
- Mockito
- Testcontainers
- Docker Compose
docker compose up -d./mvnw spring-boot:runOn Windows PowerShell:
.\mvnw.cmd spring-boot:runhttp://localhost:8080/swagger-ui.html
http://localhost:8080/actuator/health
These are created by the dev initializer outside the test profile:
admin / Password123!manager / Password123!employee / Password123!
POST /api/auth/login
GET /api/usersPOST /api/usersPATCH /api/users/{id}/statusPATCH /api/users/{id}/manager
GET /api/resourcesPOST /api/resourcesPATCH /api/resources/{id}
POST /api/requestsGET /api/requestsGET /api/requests/{id}PATCH /api/requests/{id}/approvePATCH /api/requests/{id}/rejectPATCH /api/requests/{id}/provisionPATCH /api/requests/{id}/revoke
GET /api/audit-logs
- admins can manage users and resources, provision and revoke access, and view audit logs
- managers can view their own requests and direct reports’ requests, and approve or reject direct reports’ requests
- employees can create requests and view only their own requests
Flyway manages the schema from versioned SQL migrations.
Core tables:
rolesapp_usersresourcesaccess_requestsapprovalsprovisioning_eventsaudit_logs
This project includes:
- unit tests for business rules and expiry logic
- integration tests with Testcontainers and PostgreSQL
- full lifecycle coverage for submit, approve, provision, and revoke
- security and visibility checks by role
- integration tests require Docker/Testcontainers to be available from the environment running Maven
Run tests with:
./mvnw testOn Windows PowerShell:
.\mvnw.cmd test- login as employee and create a request
- login as manager and approve it
- login as admin and provision it
- login as admin and revoke it
- query audit logs as admin
This project was built to demonstrate real Spring Boot backend work instead of generic CRUD. It focuses on workflow, authorization, state transitions, auditability, scheduled background behavior, validation, SQL schema management, and test coverage.