This is a simple cloud api gateway that is secured with OAuth2+OIDC having multiple OIDC clients to login.
- Docker, version >= 24.0.2
- Run
docker compose -f src/main/docker/compose.yaml up
- And navigate to http://localhost:32900
- You will see following links to login in multiple customers realm (credentials are provided)
- Click on any link and provide the credentials (in following screenshot, I clicked on customer3 login link)
- Expected output (OIDC user)
After KeyCloak 21 (see issue), curl
command is no longer working. So, for health check, we are using custom script.
See: health-check by this stackoverflow answer and compose.yaml that is using this script.
We have two services (keycloak and edge-service) in docker-compose.
This application (edge-service) has graalvm native image that starts within seconds while keycloak takes 6-30 seconds to start,
So this application have to wait 6-30 seconds for KC as it needs to register oidc clients during startup.
As we cannot use curl
command in KC container, so we are using custom script in keycloak service health check as mentioned above.
- Add
127.0.0.1 keycloak
entry in /etc/hosts file.