I am unable to out.println or system.out.println the apache JKEnvVar SSL_SESSION_ID and SSL_CLIENT_DN to java code, or javascript. I want to add it to each session in my webapp, then print it to string.
Setup Apache properly with SSL_mods and set the variables to be available from tomcat.
Example of my httpd.conf
<virtual host>
SSLOptions +StdEnvVars +ExportCertData
JKMount /*.jsp ajp13
JKMount /Servlet ajp13`
JKEnvVar SSL_CLIENT_CERT
JKEnvVar SSL_CLIENT_DN
JKEnvVar SSL_CLIENT_V_START
I expect to be able to leverage these variables in my tomcat web application. But I do not know how.
HERE IS WHAT I TRIED: I have tried several ways: I tried making an interface that defined the variables as strings then out printing (request.getAttribute(SSL_CLIENT_DN)); and I have also tried HTTPServletRequest a= (HttpServletRequest) request; javax.servlet.http.HttpSession ahttpsession = a.getSession(); then httpSession.getAttribute(SSL_CLIENT_DN);
These return null value, I also tried: printing headers as Enumeration headerNames=request.getHeaderNames();
This returns this String "SSL_CLIENT_DN". I need the DYNAMIC DATA, the dynamic variable that SSL_CLIENT_DN produces. The clients actual DN as a String.