Anyone use commandbox and lucee, I'm really struggling with some http calls to my local machine and can't get past some
Unknown host: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
errors
f
foundeo
05/17/2024, 6:46 PM
That error indicates HTTPS calls, not HTTP - maybe that is the problem?
s
sknowlton
05/17/2024, 6:47 PM
means Lucee can't handle the SSL cert, probably because it's locally signed.
solution 1: install the cert in lucee admin (or programatically);
solution 2: it's localhost, don't use https
solution 3: use a front end like nginx and have it handle SSL termination rather than commandbox
solution 4: probably some commandbox-y thing where it can handle the self-signed SSL if you tell it about the cert but idk what that is.
we do #3
e
emergence
05/17/2024, 6:50 PM
I've used the SSL Certificates area in admin, but doesn't seem to do anything for the local cert that I made with mkcert
I'm have the cert installed in IIS as the front end
was trying to find an option in java or commandbox that would ignore ssl validation... but no luck
s
sknowlton
05/17/2024, 6:51 PM
the way to ignore it is to just use http instead of https.
if you have IIS on the front end, it sounds like you're proxying connections to Lucee from IIS, in which case you especially don't need HTTPS there because you've already got it on the front end.
@foundeo I was trying to make it by a little more dynamic so i was calling sslcertificateinstall if the https call returned the PKIX error
but no luck...
I'll mess around with IIS and see if i can do the bindings to go to http instead of https
f
foundeo
05/17/2024, 7:04 PM
yeah, I think you might need to add it to the JVM’s cacerts file… in the past lucee used to have its own cacerts file, but this was kind of a bad idea from a security perspective, so at some version they do no longer do that
foundeo
05/17/2024, 7:04 PM
I think it still supports having a cacerts file bundled managed by lucee, might need to turn it on with an env variable or something, in that case the sslCertificateInstall function might start working
b
bdw429s
05/19/2024, 12:25 AM
You have to restart after installing the cert. Did you do that?