mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
A link to the dashboard from an external portal, such as a billing system brokered into Keycloak as an identity provider, always lands on the realm login page first: the user has to pick that provider by hand, even though the link already knows which one they came from. Keycloak skips the page when the auth request carries kc_idp_hint, but the gatekeeper builds that request from a fixed login URL and its flags cannot pass a parameter through. The OIDC gatekeeper now runs oauth2-proxy from an alpha configuration, which allows kc_idp_hint on /oauth2/start to reach the login URL, so /oauth2/start?kc_idp_hint=<alias>&rd=<path> goes straight to that provider. A login without the parameter is unchanged. Provider, upstream, listen address and injected headers move into a ConfigMap, because oauth2-proxy refuses them as flags alongside the alpha configuration; the values are those its --convert-config-to-alpha produces for the previous flags, and the pod restarts when they change. The client secret is mounted as a file. The tests that read the Keycloak URLs from the container args go with the flags; the rest of the gatekeeper suite now also loads the config template the deployment checksums. Assisted-By: LLM Signed-off-by: Andrey Kolkov <androndo@gmail.com>