Bug 57290 - Keycloak admin console hangs forever if keycloak/server/sso/fqdn contains uppercase letters
Summary: Keycloak admin console hangs forever if keycloak/server/sso/fqdn contains upp...
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: Keycloak
Version: UCS 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 5.0-7-errata
Assignee: Julia Bremer
QA Contact: Arvid Requate
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-16 08:40 CEST by Julia Bremer
Modified: 2024-05-29 13:19 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julia Bremer univentionstaff 2024-05-16 08:40:27 CEST
The keycloak admin console somehow checks the hostname that is requested and the redirect URLs case-sensitively.
Since the browser doesn't and always sends the lowercase version of the requested host, the Keycloak admin console doesn't load anymore if keycloak is started with a hostname that has uppercase letters.

We use ucs-sso-ng.$(ucr get domainname) as a default for keycloak/server/sso/fqdn. 
We should convert that default to lowercase to catch most cases.
We should put a sentence in the documentation, that there are problems with uppercase letters in case someone adjusts the setting.

We need to change the UMC ipchange module as well, which checks
if the sso_fqdn matches the zone case sensitively.
Comment 1 Julia Bremer univentionstaff 2024-05-21 10:20:43 CEST
Keycloak repository:
4c51543 Issue #214: Lowercase domainname and keycloak/server/sso/fqdn per default
The keycloak/server/sso/fqdn setting has now an all lowercase default.
If it is manually set to a mixed case value, it is converted to lowercase in the compose file from the appcenter.

We also adjusted the UMC module "ipchange" to check the zone name case insensitively.
UCS repo:
c09fbca2e9 Bug #57290: Compare zone case insensitively

Cherry-picked and build in 5.0-7, 5.1 and 5.2
Comment 2 Arvid Requate univentionstaff 2024-05-24 12:08:02 CEST
701cb0ae5a | remove yaml from 5.1-0

Verified:
* MRs for https://git.knut.univention.de/univention/components/keycloak-app/-/issues/214 merged
* Patch for univention-management-console-module-ipchange present in 5.1 and 5.2
* New version of univention-management-console-module-ipchange built in 5.1 and 5.2
* UCS 5.2 Keycloak test case fixed: https://jenkins2022.knut.univention.de/job/UCS-5.2/job/UCS-5.2-0/job/AutotestJoin/SambaVersion=s4,Systemrolle=master/lastCompletedBuild/testReport/81_keycloak/01_test_keycloak_login/test_login_administrator_chromium_/
* Functional test
* Advisory
Comment 3 Arvid Requate univentionstaff 2024-05-24 12:09:57 CEST
Also:
* No regression for the other tests:
  https://jenkins2022.knut.univention.de/job/UCS-5.2/job/UCS-5.2-0/job/AutotestJoin/
Comment 4 Iván.Delgado univentionstaff 2024-05-29 13:19:59 CEST
<https://errata.software-univention.de/#/?erratum=5.0x1058>