In Keycloak server console > User Federation > Ldap
I successfully Test connection to Windows Active Directory server - Ok
But keep receive error message on Test Authentication
Server console output: ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I have generated keystore.jks file with jdk keytool utility and try to put it in c:\Program Files\Java\jdk1.8.0_241\lib\security\cacerts\
But still, have the same error.
Any suggestion on what may cause this error and how to fix it?
Here we all are, faced with figuring out this configuration ... again. Seems to change everytime I get to do it. Here are some learnings I'd like to pass along.
keycloak will not work with ldaps by default, the certificate authority public key must be added to the truststore.
This has worked for me perfectly in the past, and though I didn't add a section to my configuration file yet, I have not yet had success and I think it may be that keycloak is now using a different jks file specified in the configuration file called https-keystore.jks. I can see the file but don't have the password to see if adding the cert there will get things working.
If I figure it out I'll try to remember to update this posting. In anycase, I'm working towards switching to a kubernetes style installation which has a technique to make this work correctly once and for all ... but, it doesn't. I currently have a ticket in for it and I suspect it used to work, but then something changed, and it broke there too ... just like the latest docker image which I'm currently using.
Here's hoping this configuration becomes a part of keycloak and not something left up to folks to figure out on their own as I believe this tends to push away potential Windows AD users. Good luck out there everyone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With