I've been trying to setup SSL/TLS handshake in Tomcat 8. I've successfully done all the configurations but there are some problems I'm facing with CRL/OCSP.
I need solution to: this
I've a couple of questions so kindly have some patience. Any help would be really appreciated.
- Does tomcat 8 allow us to cache the CRL file obtained from the CRL distribution point ? By cache I mean that if network isn't available and we start the server, I don't want tomcat to allow access to all users by default (which it does) because CRL distribution point wasn't available. I want it to cache the last available list and use that if CRL can't be downloaded now. If it can be downloaded then update the existing cache.
I've below configuration of connector in server.xml.
<Connector protocol="org.apache.coyote.http11.Http11NioProtocol"
port="8443" maxThreads="2000" clientAuth="want" scheme="https"
keepAliveTimeout="-1" connectionTimeout="900000" compression="on"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,text/css,text/javascript,image/jpg,image/ico,image/png,image/jpeg,image/tiff,image/tif"
secure="true" SSLEnabled="true" sslProtocol="TLS" sessionTimeout="30"
truststoreFile="D:\Certs\server.truststore" truststorePass="123456"
keystoreFile="D:\Certs\keystore.pkcs12" keystorePass="password" keystoreType="PKCS12"
crlFile="http://127.0.0.1:8600/getCRLFile/"
maxKeepAliveRequests="200" sslEnabledProtocols= "TLSv1,TLSv1.1,TLSv1.2"
maxHttpHeaderSize="65536" maxPostSize="4194304"
ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA"/>
Can I achieve this using any of the tomcat configuration ?
- I found a way to achieve the above task my manipulating a Java code found here!
Problem with this is that I'll have to send the certificates of client while handshaking to this java code and accept/reject the certificate based on reply from this code. I don't know how to do that. Any help will be of great use. The second reason is I would prefer to achieve task 1 using tomcat configurations rather than custom code because custom code might miss out on some aspects.
Can I dynamically pick an updated CRL from the CRL distribution URL without restarting the tomcat server ? The current scenario with above configuration picks the CRL file once when server is turned On and then it uses that copy only even if CRL list available on the URL has changed.
Can we have multiple CRL end-points configured in the connector ? Tomcat will check them all and accept/reject a client certificate based on combined list from all the URLs.
- If configured, can I cache OCSP responses in a similar way I want to cache CRL lists ?
Thanks in advance. Please feel free to ask any details I might have missed.