I am a bit confused. We have configured our v7 Tomcat server to communicate with connecting browsers using only TSLv1.2 and we have specified a restricted set of ciphers. Using a firefox browser (v60.3.0esr 64 bit). We are able to establish a connection but what is odd is after I have connected to the site I noticed that the agreed upon cipher is one that is not in the list of configured tomcat ciphers.
I was under the impression that when configuring the http connection object that the server as part of the hello connection negations would limit the connection to the list of available ciphers? What am I missing? If the ciphers parameter is missing then the list of available cipher will be limited to the cipher configured on the JVM (this is my understanding). As such, do I need to also limit the ciphers in the JVM to the same set that I am specifying in the http connector element?
DETAILS: Tomcat (v 7.0.77 java 1.8.0_151)
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true" allowTrace="false"
clientAuth="false" sslProtocols="TLS" sslEnabledProtocols="TLSv1.2"
keystoreFile="/etc/tomcat/tomcat.keystore" keystorePass="XXXX"
ciphers="TLS_RSA_WITH_AES_256_CBC_SHA256,
TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
TLS_RSA_WITH_AES_128_CBC_SHA256,
TLS_RSA_WITH_AES_128_CBC_SHA,
TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
TLS_RSA_WITH_AES_256_GCM_SHA384,
TLS_RSA_WITH_AES_128_GCM_SHA256,
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384" />
I don't have anything specific defined in my tomcat.config
JAVA_HOME="/usr/lib/jvm/jre"
CATALINA_BASE="/usr/share/tomcat"
CATALINE_HOME="/usr/share/tomcat"
JASPER_HOME="/usr/share/tomcat"
CATALINE_TMPDIR="/var/cache/tomcat/temp"
TOMCAT_USER="tomcat"
SECURITY_MANAGER="false"
SHUTDOWN_WAIT="30"
SHUTDOWN_VERBOSE="false"
CATALINA_PID="/var/run/tomcat.pid
After I made the connection I right clicked in the browser window, selected Inspect Element and selected the Network tag and clicked on the client request. I then selected the security tab (for the request) and it displayed:
Protocol verson: TLSv1.2
Cipher suite: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
Key Exchange group: None
...
I did notice that our certificate had expired ( I received a security exception when I initially made the connection).
Can someone please explain why the negotiated cipher is not one of the ciphers in the tomcat cipher list? What does one need to do to limit the set of available ciphers supported by the server? Thanks in advance.
FINDINGS: So with logging enable, it appears that the server did select a cipher on our connection cipher list. However, when I examine fire-fox browse security settings, the browser indicates that it's agreed upon cipher is TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256. Questions:
- Regarding initialization of the protocol handler, why am I getting so many protocols unavailable? Is this Tomcat looking into the JVM and for some reason, the JVM doesn't have these protocol set. Are we not including a required library?
- I can see in the log the client/server hello message exchange and the agreed upon cipher. Yet the browser indicate a different cipher, how is that changing? Is something intercepting this exchange? Confused to say the least. Any idea?