Keycloak 24 rejects http://[::1]:* (and every other port wildcard on an
IPv6 literal) when importing the realm, so it fails to start with
"Invalid client openshell-cli: A redirect URI is not a valid URI". That
broke every lane that loads scripts/keycloak-realm.json, including the
features/keycloak suite and the OIDC Docker E2E jobs.
Restore the IPv4 loopback and localhost entries only, and correct the
authentication docs: IPv6 callback binds against the bundled realm need
an exact http://[::1]:<port>/callback redirect URI.
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Summary
Fixes the E2E jobs that load the Keycloak fixture realm, which have failed since #5065 merged. That PR added
http://[::1]:*to theopenshell-cliclient inscripts/keycloak-realm.json. Keycloak 24 refuses to import it, so Keycloak exits at startup withInvalid client openshell-cli: A redirect URI is not a valid URIand never becomes healthy.Example failures:
main(50a3237): docker-e2e / E2E (oidc-pkce-docker), docker-e2e / E2E (oidc-python), feature-specific-integration (fedora-podman-rootful, provider-refresh)Related Issue
No issue required: localized fix for a test fixture that broke E2E on
main.Changes
http://[::1]:*redirect URI and web origin from theopenshell-cliclient in the Keycloak fixture realm.docs/how-it-works/gateways/authentication.mdx: the bundled realm allows only the IPv4 loopback andlocalhostforms, so an IPv6 callback bind against it needs an exacthttp://[::1]:<port>/callbackredirect URI.The CLI's IPv6 callback support from #5065 is unchanged.
Keycloak 24 can't allowlist an IPv6 loopback address with an arbitrary port. Tested against
quay.io/keycloak/keycloak:24.0:http://[::1]:*,http://[::1]*,http://[0:0:0:0:0:0:0:1]:*andhttp://[::1]:1*all fail realm import.http://[::1]/*imports but rejectshttp://[::1]:<port>/callback, and Keycloak doesn't relax the port for IPv6 loopback.Testing
mise run pre-commitpasses (ran as the commit hook)openshellrealm imports, the discovery endpoint returns 200, and an auth request withredirect_uri=http://127.0.0.1:41234/callbackis accepted.test:e2eapplied so the OIDC Docker, provider-refresh andfeatures/keycloaklanes run on this PRChecklist