I am trying to include client certificate information in the tomcat access log file.
I looked at this post: https://serverfault.com/questions/624790/tomcat-log-the-equivalent-of-ssl-client-s-dn , but this only returns a certificate link, and I cannot extract any- either properties.
My log template is as follows:
pattern="... [%{javax.servlet.request.X509Certificate}r]"
This returns: [[Ljava.security.cert.X509Certificate; @ 667a078]
Is there a way to access certificate properties, for example:
pattern="... [%{javax.servlet.request.X509Certificate.SubjectName}r]"
I would like to be able to retrieve certificate information without changing the code.
logging ssl tomcat apache client-certificates
Eric Longstreet
source share