You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that I've verified that (prior to copy into the Docker image) my "key.jks" file contains the certificates I expect to be there using the Java keytool, as well as successfully using this keystore file when running open-liberty directly on my local desktop. However, when I try to run my application under open-liberty in a Docker container, outbound calls to a service requiring cert-auth fail with...
[ERROR ] CWPKI0022E: SSL HANDSHAKE FAILURE: A signer with SubjectDN CN=somesubdomain.somedomain.com, OU=Some Certificate, OU=Some Sub-Organization, O=Some Organization, L=Some Location, ST=Some State, C=US was sent from the target host. The signer might need to be added to local trust store /opt/ol/wlp/output/defaultServer/resources/security/key.jks, located in SSL configuration alias defaultSSLConfig. The extended error message from the SSL handshake exception is: PKIX path building failed: java.security.cert.CertPathBuilderException: PKIXCertPathBuilderImpl could not build a valid CertPath.; internal cause is:
java.security.cert.CertPathValidatorException: The certificate issued by OU=Some Intermediate Certificate, O=Some Organization, L=Some Location, ST=Some State, C=US is not trusted; internal cause is:
java.security.cert.CertPathValidatorException: Certificate chaining error
Upon open-liberty startup under Docker, I see the following log output that I don't ever see when running open-liberty directly on my local desktop...
[AUDIT ] CWWKS4104A: LTPA keys created in 1.527 seconds. LTPA key file: /opt/ol/wlp/output/defaultServer/resources/security/ltpa.keys
[AUDIT ] CWPKI0803A: SSL certificate created in 6.658 seconds. SSL key file: /opt/ol/wlp/output/defaultServer/resources/security/key.jks
When I run a bash shell, within Docker, to check the keystore contents of "key.jks", I see that my original keystore contents have been wiped out, though the file maintains the password that I set in my keystore.xml config...
Other than this keystore issue, everything else seems to work fine in open-liberty under Docker. But this issue is so fundamental to the working of my application, that it's blocking my ability to use open-liberty under Docker. What perplexes me is how this would not already have been reported by someone else? Does no one else running open-liberty under Docker use cert-auth (thus haven't fully exercised this feature) or am I incorrectly applying my keystore configuration? That my keystore configuration works fine when running open-liberty directly on my local desktop indicates to me that it should be valid.
So, is this a bug or am I doing something wrong here?
The text was updated successfully, but these errors were encountered:
hey @jkjome - in the Docker image the output_dir is different than the config_dir (see this line) so it seems you are copying your key into the config dir, but your XML snippet points to the output dir..which causes OL to create a key for you.
Thanks @arthurdm. It works now. Now I realize that my local desktop installation of open-liberty must set "WLP_OUTPUT_DIR" to the same as the config dir (or leave it unspecified). That's why it works there. I guess I'll start referencing ${server.config.dir} for both docker and non-docker config files to maintain consistency.
My Dockerfile is pretty simple...
I build/run using...
Among the config copied into the open-liberty Docker image, the following is most relevant to the current issue....
My keystore.xml file looks like...
Note that I've verified that (prior to copy into the Docker image) my "key.jks" file contains the certificates I expect to be there using the Java keytool, as well as successfully using this keystore file when running open-liberty directly on my local desktop. However, when I try to run my application under open-liberty in a Docker container, outbound calls to a service requiring cert-auth fail with...
Upon open-liberty startup under Docker, I see the following log output that I don't ever see when running open-liberty directly on my local desktop...
When I run a bash shell, within Docker, to check the keystore contents of "key.jks", I see that my original keystore contents have been wiped out, though the file maintains the password that I set in my keystore.xml config...
Other than this keystore issue, everything else seems to work fine in open-liberty under Docker. But this issue is so fundamental to the working of my application, that it's blocking my ability to use open-liberty under Docker. What perplexes me is how this would not already have been reported by someone else? Does no one else running open-liberty under Docker use cert-auth (thus haven't fully exercised this feature) or am I incorrectly applying my keystore configuration? That my keystore configuration works fine when running open-liberty directly on my local desktop indicates to me that it should be valid.
So, is this a bug or am I doing something wrong here?
The text was updated successfully, but these errors were encountered: