A scalable Spring Boot application, built with WebFlux and reactive paradigms for Authn/Authz.
288
This project is a Spring Boot WebFlux application designed to explore scalable, reactive implementations of authentication and authorization. It builds upon prior work using Spring MVC by shifting to non-blocking, reactive programming for greater efficiency and performance.
The application demonstrates production-grade practices including:
🛠️ This project serves both as a learning tool and a solid foundation for integrating secure, scalable authN/authZ into your own applications.
The Docker configuration uses a multi-stage build to separate development dependencies from the final runtime image:
Build Stage
Uses maven:3.9.9-eclipse-temurin-21-alpine to compile the application and resolve dependencies.
Runtime Stage
Uses eclipse-temurin:21.0.5_11-jre-alpine-3.21 for a lean final image containing only the compiled .jar and minimal runtime.
# Build stage
FROM maven:3.9.9-eclipse-temurin-21-alpine AS builder
# ... build steps ...
# Runtime stage
FROM eclipse-temurin:21.0.5_11-jre-alpine-3.21
# ... runtime setup ...
This project uses GitHub Actions for continuous integration and deployment. The automated pipeline performs the following steps:
Maven to verify the application’s integrity.This CI/CD setup ensures:
You can find the workflow configuration under .github/workflows/ci.yml.
This project uses a layered testing strategy to validate the application at multiple levels:
Unit Tests
Focused on individual components like services and utilities using JUnit 5 and Mockito.
Integration Tests
Verify interactions between layers, such as controller-service-database flows, using Spring Boot’s @SpringBootTest.
End-to-End (E2E) Tests
Simulate full authentication workflows, including login, 2FA, and session management.
Contract Tests
Ensure API compatibility with external consumers using tools like Spring Cloud Contract and OpenAPI.
These tests are automatically run during CI and can be executed locally with:
./mvnw test
Content type
Image
Digest
sha256:e886fb466…
Size
107.6 MB
Last updated
over 1 year ago
docker pull auwate/reactivelearningdemo