Reputation: 33
I would like to connect a Keycloak OAuth server with OpenIDConnect to Spring, which in itself is not a problem.
However, I have many realms that can dynamically join or leave. That means a configuration in Spring with the spring.security.oauth2.resourceserver.jwt.issuer-uri
is not possible.
Is there any way to run the client registration on-demand at startup and configure the realm dynamically?
According to Spring docs there is a multi-tenant configuration, but unfortunately I was not able to start with that either.
I always got the Unable to resolve Configuration with the provided Issuer of "http://localhost:8080/realms"
error.
Currently, I'm trying out with SpringBoot 2.7.10. Maybe Spring Boot 3.x.x is a solution, but I couldn't find anything new on this topic.
Has someone an idea how I can solve this?
Thanks!
Upvotes: 1
Views: 1617
Reputation: 12825
I doubt you read the spring documentation carefully enough.
If you need something easier to configure, you can follow this tutorial of mine.
Upvotes: -1