Spring Boot supports a lot of authentication and integration mechanisms. However, when configuring a non-trivial authentication/integration you will probably end up looking solutions/examples all over the web: spring docs, github projects and stackoverflow. Often, what you really want is a simple working configuration that you can then start to work with. That’s why I created spring-tsers-auth.

This example project tries to provide working out-of-the-box Spring Boot authentication examples with real (dockerized) databases and IDPs including: MySQL, OpenLDAP and Shibboleth. No inMemoryAuthentication() that you usually see in the examples but real end-to-end authentication workflows!

Docker (with Docker Compose) gives the possibility to easily set up an environment that have multiple components. Such is the architecture of this project:

The architecture of the project

To set up the project:



> docker-compose up -d

> ./gradlew bootRun > git clone https://github.com/lhartikk/spring-tsers-auth.git && cd spring-tsers-auth> docker-compose up -d> ./gradlew bootRun

(The spring application is intentionally left outside the Docker)

Open https://localhost:9001 to login using either MySQL, OpenLDAP or Shibboleth.

You can scrutinize the project and use it to get an answer for example to one of these questions:

How to configure Spring Boot’s WebSecurityConfigManager when you have multiple authentication providers

How create MySQL and LDAP integrations with Spring Boot

How to create a SAML integration with Spring Boot

How to configure Shibboleth to serve as an IDP using LDAP

Project inspired by:

https://github.com/vdenotaris/spring-boot-security-saml-sample

https://github.com/jhipster/generator-jhipster