We had been using java standard keystore ($JAVA_HOME/jre/lib/security/cacerts) as the trusted store for tomcat. And that tomcat server would communicate with some other server. A recent OS(AIX) upgrade apparently over-wrote the file at $JAVA_HOME/jre/lib/security/cacerts and that resulted in lost certificates and lot of issues with application hosted in tomcat.
Looking at this is it a bad practice to relay up on $JAVA_HOME/jre/lib/security/cacerts ?
What are the alternate (better|standard) ways to tackle this scenario?
In terms of what is in the
cacertsfile, it’s not necessarily worse practice than relying on the default CA certificates installed in your OS or your browser, but that doesn’t mean it’s great.Sun/Oracle have a little “important note” somewhere in the middle of the JSSE Reference Guide about this:
In terms of configuration, for specific applications where I’ve had to install “local” CA certificates, I find it more stable to use a local trust store (for example, specified with
javax.net.ssl.trustStore).