Bug 55488 - Use start TLS as default for LDAP federation in Keycloak
Use start TLS as default for LDAP federation in Keycloak
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Keycloak
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-2-errata
Assigned To: Nikola Radovanovic
Arvid Requate
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-12-09 11:32 CET by Nikola Radovanovic
Modified: 2022-12-14 15:04 CET (History)
3 users (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):
Max CVSS v3 score:


Attachments
KC changes (2.32 KB, patch)
2022-12-12 12:02 CET, Nikola Radovanovic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikola Radovanovic univentionstaff 2022-12-09 11:32:24 CET
Make start TLS as default for LDAP federation in Keycloak.
Comment 1 Felix Botner univentionstaff 2022-12-12 09:27:58 CET
The package configures/uses TLS, but the container is missing the certificate -> we currently get 

"Could not negotiate TLS: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

"Uncaught server error: org.keycloak.models.ModelException: LDAP Query failed"

This should be fixed asap because it hinders development in the RAM project!
Comment 3 Felix Botner univentionstaff 2022-12-12 11:19:34 CET
Probably more a problem in our test environment, we use the unreleased version of univention-keycloak (errata-test) but the released version of the keycloak App.

Should we go with the keycloak app from the test appcenter?
Comment 4 Nikola Radovanovic univentionstaff 2022-12-12 12:02:03 CET
Created attachment 11017 [details]
KC changes
Comment 5 Nikola Radovanovic univentionstaff 2022-12-12 12:02:17 CET
I have just tested on tross: nradovanovic_kcm, reverted to clean state.

content of /etc/apt/sources.list:

deb     [trusted=yes]   http://192.168.0.10/build2/  ucs_5.0-0-errata5.0-2/all/
deb     [trusted=yes]   http://192.168.0.10/build2/  ucs_5.0-0-errata5.0-2/$(ARCH)/
deb-src [trusted=yes]   http://192.168.0.10/build2/  ucs_5.0-0-errata5.0-2/source/

# run upgrade
univention-upgrade

# install and activate dev appcenter
apt install univention-appcenter-dev
univention-app dev-use-test-appcenter

# install keycloak
univention-app install keycloak=19.0.1-ucs5

# check CA from console
univention-app shell keycloak -- ls -all /etc/pki/ca-trust/extracted/pem/ucsCAcert.pem
univention-app shell keycloak -- keytool -cacerts -list -storepass "changeit" -noprompt | grep ucsca

# visited KC web admin interface and tried "Test connection" button

So, I used 19.0.1-ucs5 (keycloak_20221128113924) since 19.0.1-ucs5-recaptcha (keycloak_20221207021304) does not have CA related changes merged - yet.

I dont know if this will help, but I attached KC related patch which is already pushed (maybe Docker image shall be rebuilt - in which case I cant help: don't have permissions)
Comment 6 Felix Botner univentionstaff 2022-12-12 12:10:25 CET
Thanks, we just disabled the "update to errata-test" in our test setup (no tls, but we can live witch that for now) and wait until both, the package and the app are released.
Comment 7 Arvid Requate univentionstaff 2022-12-12 21:55:43 CET
59729680f5 | Use start TLS as default for LDAP federation in Keycloak
13649f8aa3 | debian/changelog
bbe77bb161 | Advisory update

Verified:
* Functional test: Ok
  New installations with "univention-app install keycloak=19.0.1-ucs5"
  and the new debian package version in ucs_5.0-0-errata5.0-2
  work and are configured to use startTLS (against port 7389).
* LDAP connection test in Keycloak works, so the certificate
  check in the Java code of the container also works.
* Advisory: Ok