News for hackers. Stuff that matters.
Re:Keycloak SSO with Docker Compose and Nginx by durable_queue on Sunday February 11, 2024 @11:47AM (#39336222)
A problem I've had trying to do this for local dev is that the DNS name of the Keycloak server is "keycloak" inside of the Docker network, but "localhost" from the the outside. The user's browser will be redirected to localhost (since it's outside of the Docker network) but then there is a mismatch between hosts (it expects "keycloak" not "localhost") when it comes to an API server verifying the token.

Anyone figured this out?

Re:Keycloak SSO with Docker Compose and Nginx by mooreds on Sunday February 11, 2024 @01:07PM (#39336951)
I haven't tried this, but could you modify your /etc/hosts file (or analogous file on whatever operating system) to have `keycloak` as a valid hostname on your local computer? So that both within the docker container and in your host computer, `keycloak` was the hostname of the keycloak server?
Re:Keycloak SSO with Docker Compose and Nginx by durable_queue on Sunday February 11, 2024 @01:50PM (#39337429)
Always an option, but I dislike changing global settings on the system. It makes it harder to hop between projects and it's slower when onboarding.
Re:Keycloak SSO with Docker Compose and Nginx by eYrKEC2 on Sunday February 11, 2024 @09:21PM (#39340729)
You need to configure the "client" in keyclock that corresponds with you front-end.