Bug 55967 - Custom domains are not (yet) supported in Keycloak App
Custom domains are not (yet) supported in Keycloak App
Status: RESOLVED WORKSFORME
Product: UCS
Classification: Unclassified
Component: Keycloak
UCS 5.0
Other Mac OS X 10.1
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-04-13 15:28 CEST by Ingo Jürgensmann
Modified: 2023-06-20 10:19 CEST (History)
7 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.457
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2023030121000446
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Jürgensmann univentionstaff 2023-04-13 15:28:50 CEST
Customer installed Keycloak App and configured the settings to have an external domain to expose Keycloak from Internet via a haproxy setup. 

The configuration dialogue presents the admin a text field to enter the FQDN for keycloak: "Defines the fqdn of the identity provider of this UCS domain."

This customer then assumes that a FQDN other than ucs-sso-ng.{domainname} can be used. But the FQDN is somewhat hardcoded in /usr/sbin/univention-keycloak (searching for domainname): 

    672     ldap_base = ucr.get("ldap/base")
    673     domainname = ucr.get("domainname")
    674     host_fqdn = "%s.%s" % (ucr.get("hostname"), ucr.get("domainname"))
    675     keycloak_fqdn = ucr.get("keycloak/server/sso/fqdn", f"ucs-sso-ng.{domainname}")
    676     no_ucr_available = not (ucr and ldap_base)
...
    737     init_parser.add_argument("--domainname", required=no_ucr_available, default=domainname)
...
   1340     data = {"loginTitleHtml": f"Login at {opt.domainname}", "loginTitle": "Univention Corporate Server Single-Sign On"}
   1343     # german
   1345     data = {"loginTitleHtml": f"Anmelden bei {opt.domainname}", "loginTitle": "Univention Corporate Server Single-Sign On"}

Many customers are using internal domains for setting up UCS and external domains for Internet facing purposes, but as the $domainname is hardcoded, the use of external domains will not work and give many other issues. 

This has been discussed partly internally with development already, but this bug is intended for keeping track of the issue. Development signalled that this might be resolved in Q2/23.
Comment 2 Dirk Wiesenthal univentionstaff 2023-06-20 10:19:17 CEST
Sorry, we did not keep track of the issue in this bug. We fixed it in many small steps with App updates and improvements in univention-keycloak. I hope it works for you now.