Tag: Spring-Boot
-
Howto: Swagger OIDC and Spring Boot 3
This small post will show you how to have an OIDC authentication on the Swagger interface of your Spring-Boot backend. The important part is, in the example the “client” used for the Swagger authent will be different than the client used for the “main” authent, that will allow you to turn of one authent channel…
-
Spring-Boot – Custom Actuator
Let say you need a specific actuator for your Spring-Boot backend. This small post show you how to extend the interface HealthIndicator to create your custom actuator. First you’ll have implement the HealthIndicator interface: Now you will try to make your custom actuator load at the start of you application, here is the “auto-configuration” you…
-
Spring-Boot 3 – register an OIDC token provider
Let say you have a Spring-Boot application and you need a token in order to authenticate/authorize a call made by your application targeting another app. Since Spring-Boot 3, and Spring 6, the spring-security packages handle the OIDC mechanism with built-in code. Also their is a common part in registration of OIDC provider used to authenticate/authorize…
-
Spring 6 – Oauthenticated http call
Let’s say you have a Spring backend app, and you need to make some http(s) call from that backend to any web-service you want without configuring a global WebClient. Doing that you’ll face three possibly to authenticate your http call: – forward the token of the current user; – get a new token to authenticate…
-
Spring – BeanPostProcessor
BeanPostProcessor is a factory hook that allows the Spring framework to customize and modify Bean instances when they are newly created. For example: by checking it’s marked interface or using a proxy to wrap it. The application context will automatically detect BeanPostProcessors from the Bean definition and apply them to any beans created subsequently. On…
-
Spring Boot 3 – multitenant OIDC with Keycloak
Naturally Spring Security 3 allow you to do some kind of multi-tenant autentication, but you can’t use more than one OIDC tenant. Let say you are building a Spring Boot App with Spring-Boot 3.x.x and you use Keycloak as OpenID Connect provider, ans you need to validate some tokens from more than one OIDC tenant.…
-
How to: Spring-Boot 2.x.x Hibernate 5.x.x EhCache 3.x.x
This post is the very short sumup of how to setup and run Hibernate L2 Cache, with EhCache 3. A version of the full documentation is here Hibernate 5.6 – Cache Since Spring-boot 2.x.x use EhCache 3.x.x to serve the caching features of Spring, and Hibernate 5.x.x use EhCache 2.x.x as cache engine to provide it’s…