title: Forwarding Client Certifcate from Apache to Tomcat
body: <p>I am trying to pass a x509 client certificate (I have a test cert installed on my browser) from the Apache web server (SSL) to the Tomcat application.  The way I have it configured right now, the certificate is not being found (hence not forwarded) by the application's spring security. </p>
  
  <pre><code>DEBUG: [http-8080-1]  org.springframework.security.web.authentication.preauth.x509.X509AuthenticationFilter - No client certificate found in request.
  </code></pre>
  
  <p>The Apache server <code>ssl.conf</code> file is configured like this (I have omitted the irrelevant parts):</p>
  
  <pre><code>LoadModule ssl_module modules/mod_ssl.so
  
  Listen 443
  
  AddType application/x-x509-ca-cert .crt
  AddType application/x-pkcs7-crl    .crl
  
  NameVirtualHost *:443
  
  &lt;VirtualHost *:443&gt;
  
      ...
  
      SSLVerifyClient require
      SSLVerifyDepth 2
  
      ...
  
      # initialize the SSL headers to a blank value to avoid http header forgeries
      RequestHeader set SSL_CLIENT_CERT ""
      RequestHeader set SSL_CLIENT_VERIFY ""
  
      # add whatever SSL_* variables needed to pass to web application
      RequestHeader set SSL_CLIENT_CERT "%{SSL_CLIENT_CERT}s"
      RequestHeader set SSL_CLIENT_VERIFY "%{SSL_CLIENT_VERIFY}s"
  
      RequestHeader add X-Forwarded-Scheme https
  
      ProxyPass /testcert http://127.0.0.1:8080/testcert
      ProxyPassReverse /testcert http://127.0.0.1:8080/testcert
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Is there any way to configure this in Apache where the entire certificate gets forwarded to the Tomcat server?  I know I could use <code>ajp</code> but was trying to get it done without that method. </p>