I'm packaging a liberty application which works with Db2. When we run locally, we configure certificates to secure the connection from app to db.
Now I'm trying to package the same application for use with the Db2 on Cloud service, and I'm having trouble with the SSL configuration.
I think I could create a truststore and add the digicert root CA to it and package that with the app, but instead I was leaning toward just using the JDK's built-in cacerts (because we also have restrictive firewall rules preventing outbound connections to other hosts).
I found extremely relevant discussion at https://github.com/OpenLiberty/open-liberty/issues/4377, but I can't seem to find a nice way to specify the path to the JDK's cacert store in a portable way.
I tried setting it as follows:
<keyStore id="defaultKeyStore" location="${env.JAVA_HOME}/jre/lib/security/cacerts"/>
But for some reason it doesn't resolve the environment variable. Why?
Additionally, this will only work when the JAVA_HOME is set to a JDK (like in development). In our containers, we don't have that and so we don't want the jre
part in the path.
Whats the simplest/easiest way to tell Liberty just to use the JDK's default truststore (in a portable way)?