Secure Socket Layer, or SSL, certificates are frequently used to confirm the identity of a server before consuming its services and to secure communications with the server. Typically, when an Apache web server is used to load balance requests to one or more Apache Tomcat servers (including VMware’s commercial version, tc Server), the SSL encryption and certificate authentication is terminated at the web server. Communication between the Apache web server and Tomcat is then trusted and in clear text.
However, there are organizational security policies and B2B scenarios that could mandate secure communication between Apache web server and Tomcat. Furthermore, it could be important to restrict access to Tomcat to known instances of Apache web server.
This tutorial will provide details for a configuration option that enables SSL communication and client certificate authentication between Apache Web Server and Tomcat.
At a high level, this tutorial provides instructions to
keytool -genkey -alias tomcat -keyalg RSA -keystore $CATALINA_BASE/conf/tomcat.keystore
< Connector SSLEnabled="true"
acceptCount="100"
connectionTimeout="20000"
executor="tomcatThreadPool"
keyAlias="tomcat"
keystoreFile="${catalina.base}/conf/tomcat.keystore"
keystorePass="changeme"
maxKeepAliveRequests="15"
port="8443"
protocol="org.apache.coyote.http11.Http11Protocol"
redirectPort="8443"
scheme="https"
secure="true"/>If you are using tc Server, you can streamline the previous steps by creating a new tc Server instance utilizing the bio-ssl template. This includes the required configurations in server.xml and a pre-generated tcserver.keystore file.
tcruntime-instance.sh create myNewInstance -t bio-ssl
openssl genrsa -out ca.key 1024 openssl req -new -key ca.key -out ca.csr openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt
keytool -import -keystore cacerts.jks -storepass changeme -alias my_ca –file ca.crt
< Connector SSLEnabled="true"
clientAuth="true"
truststoreFile="${catalina.base}/conf/cacerts.jks"
acceptCount="100"
connectionTimeout="20000"
executor="tomcatThreadPool"
keyAlias="tomcat"
keystoreFile="${catalina.base}/conf/tomcat.keystore"
keystorePass="changeme"
maxKeepAliveRequests="15"
port="${bio-ssl.https.port}"
protocol="org.apache.coyote.http11.Http11Protocol"
redirectPort="${bio-ssl.https.port}"
scheme="https"
secure="true"/>
openssl genrsa -out client.key 1024 openssl req -new -key client.key -out client.csr -config <your openssl.cnf=""> openssl x509 -req -days 365 -CA ca.crt -CAkey ca.key -CAcreateserial -in client.csr –out client.crt </your>
cat client.crt client.key > client.crtkey
LoadModule proxy_http_module /opt/vfabric-web-server/httpd-2.2/modules/mod_proxy_http.so <proxy balancer:="" lbalancer=""> BalancerMember https://default:8443 route=node1 loadfactor=50 ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid </proxy> ProxyPass /myApp balancer://lbalancer/myApp ProxyPassReverse /myApp https://default:8443/myApp <location balancer-manager=""> SetHandler balancer-manager Allow from all </location>
SSLProxyMachineCertificateFile "ssl/client.crtkey"
SSLProxyEngine on
Popular Links
Comments
Apache httpd binaries not avaialable on apache site
I was wondering by seeing no reason for making httpd 64 bit binaries not available on Apache site.Clever enough though quoted "the compiled binaries are provided by volunteers"? looks like major fund flow from Microsoft to Apache foundation started this politics ?. Now people are depending on other contributors, which eventually a good reason to adopt iis on enterprise world ?
Post new comment