Problem
- A user is logged into a Windows workstation joined to the domain.
- Upon accessing the UCS portal or the UMC via a link (e.g., “School Console”), the user is prompted for a manual login at the Keycloak screen instead of being automatically authenticated.
-
- Keycloak logs may contain warnings such as:
type="LOGIN_ERROR", realmId="ucs", ..., error="expired_code"WARN [org.keycloak.authentication.authenticators.browser.SpnegoAuthenticator] (...) Received kerberos token, but there is no user storage provider that handles kerberos credentials.
- Keycloak logs may contain warnings such as:
Cause
Seamless Single Sign-On (SSO) via Kerberos/SPNEGO requires strict consistency of the Fully Qualified Domain Name (FQDN) across all involved components. The authentication handshake will fail if there is a mismatch between:
- Keycloak Configuration: The SSO FQDN defined on the Keycloak server.
- Client/Browser: The URL used to access the Identity Provider (Keycloak).
- Windows Group Policy (GPO): The URLs defined in “Trusted Sites” or specific authentication policies.
For example, if the GPO directs authentication to ucs-sso.example.local but Keycloak is configured as login.example.local, the seamless handshake fails, and Keycloak falls back to prompting the user for credentials.
Solution
Ensure that the FQDN is identical across all configurations.
1. Verify Keycloak Configuration
Check the FQDN assigned to the SSO service within the Keycloak configuration.
- Example:
keycloak/server/sso/fqdn: login.example.local
2. Align Windows Group Policy (GPO)
Verify the active Group Policies on the client machines (e.g., under Internet Options → Security → Trusted Sites). The URL used for authentication must exactly match the Keycloak FQDN.
- Incorrect:
ucs-sso.example.local - Correct:
login.example.local(matching the Keycloak configuration)
3. Update Links and Bookmarks
Ensure that all links (e.g., portal shortcuts, bookmarks, or “School Console” links) point to the current, correct URLs. Avoid using legacy paths (e.g., /univention/login/...) that might bypass or interfere with the SSO flow.