Unable to use Keycloak in Spring Boot 2.1 due to duplicated Bean Registration httpSessionManager

This helped me to resolve an issue, remove @KeycloakConfiguration and use this instead (from KEYCLOAK-8725): Java: @Configuration @ComponentScan( basePackageClasses = KeycloakSecurityComponents.class, excludeFilters = @ComponentScan.Filter(type = FilterType.REGEX, pattern = “org.keycloak.adapters.springsecurity.management.HttpSessionManager”)) @EnableWebSecurity Kotlin: @Configuration @ComponentScan( basePackageClasses = [KeycloakSecurityComponents::class], excludeFilters = [ComponentScan.Filter(type = FilterType.REGEX, pattern = [“org.keycloak.adapters.springsecurity.management.HttpSessionManager”])] ) @EnableWebSecurity

“HTTPS required” while logging in to Keycloak as admin

I was running the key cloak inside a docker container, The keycloak command line tool was avaialble inside the keycloak container. docker exec -it {contaierID} bash cd keycloak/bin ./kcadm.sh config credentials –server http://localhost:8080/auth –realm master –user admin ./kcadm.sh update realms/master -s sslRequired=NONE If the admin user is not created, then the user can be created … Read more

Keycloak Docker HTTPS required

Update Feb 2022: Keycloak 17+ (e.g. quay.io/keycloak/keycloak:17.0.0) doesn’t support autogeneration of selfsigned cert. Minimal HTTPS working example for Keycloak 17+: 1.) Generate selfsigned domain cert/key (follow instructions on your terminal): openssl req -newkey rsa:2048 -nodes \ -keyout server.key.pem -x509 -days 3650 -out server.crt.pem 2.) Update permissions for the key chmod 755 server.key.pem 3.) Start Keycloak … Read more

Spring Boot 2.6 regression: How can I fix Keycloak circular dependency in adapter?

allowing the circular dependencies might not be the best option. One thing that you can do is to create a specific configuration class for your KeycloakConfigResolver bean. package com.stackoverflow; import org.keycloak.adapters.springboot.KeycloakSpringBootConfigResolver; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration public class KeycloakConfiguration { @Bean public KeycloakSpringBootConfigResolver KeycloakConfigResolver() { return new KeycloakSpringBootConfigResolver(); } }

Enabling remote access to Keycloak

The standalone Keycloak server runs on the top of a JBoss Wildfly instance and this server doesn’t allow accessing it externally by default, for security reasons (it should be only for the administration console, but seems to affect every url in case of Keycloak). It has to be booted with the -b=0.0.0.0 option to enable … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)