I need to log in if SSL handshaking fails while the REST client is trying to connect to my application. The application is built using Spring Boot and Java 8 and deployed to Tomcat 8.
In the SSL communication failure scenario, since the TLS connection does not work, the registration requirement must be fulfilled at the Tomcat or Java level, because Tomcat uses the basic JVM certificate to verify the SSL certificate in my case.
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true" scheme="https" secure="true" keystoreFile="keyStore-1.jks" keystorePass="password" keystoreType="jks" truststoreFile="TrustStore.jks" truststorePass="passwrd" truststoreType="jks" clientAuth="want" sslProtocol="TLSv1.2" />
I know to enable debug level logging.
-Djavax.net.debug = SSL
But this logs a lot of information and slows down the process. And register the success of SSL valdiations. Is there a way to include failure cases alone with minimal logs at the Java or Tomcat level.
I DO NOT look at this from a debugging perspective, as SSL debug logs are very good for this. This requirement is more related to the goals of logging and auditing, and the inclusion of debug logs is not possible. A mechanism that only logs errors originating from SSL, and not all hex / cert data.
java security ssl tomcat
Manu
source share