[keycloak-user] keycloak 4.5 client integration with spring boot and spring security problem

Pedro Igor Silva psilva at redhat.com
Thu Oct 4 14:45:02 EDT 2018


Hi,

Please, see
http://lists.jboss.org/pipermail/keycloak-user/2018-September/015688.html.
I'm working in a fix, right now.

Regards.
Pedro Igor

On Thu, Oct 4, 2018 at 1:43 PM ZKX <z_88 at yahoo.com> wrote:

> We are doing a POC with a spring boot/security project with keycloak.
> Initially we only had keycloak-spring-boot-starter without directly
> reference with spring security. It is very straightforward with just
> setting the keycloak properties in the application.properties file.
> Later on we need to use @PreAuthorize("hasRole('admin')") to enforce
> security check on some services, therefore, we added spring security
> library with additional security configuration:
> as mentioned in the keycloak document.  Mostly as the described in this
> tutorial: https://www.baeldung.com/spring-boot-keycloak
> Everything works fine with keycloak 4.3/4.4, we still can use the keycloak
> config in application.properties file together with spring security, since
> we had following code in our spring boot configuration:    @Bean    public
> KeycloakSpringBootConfigResolver KeycloakConfigResolver() {        return
> new KeycloakSpringBootConfigResolver();    }
> However, recently we upgrade our spring boot keycloak starter to 4.5, and
> our application failed to start with following error:
> Error creating bean with name 'KeycloakSpringBootConfigResolver':
> Requested bean is currently in creation: Is there an unresolvable circular
> reference?
>
> Just wondering how to resolve this?Anyone use spring boot with spring
> security together with keycloak starter 4.5 successfully?
> Thanks,Kevin
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user


More information about the keycloak-user mailing list