Search code examples
securityssltomcattomcat8

Does Tomcat have default cipher suite list


I have configured my Tomcat 8.5 cipher suites as below

    <Connector
      ....
      sslEnabledProtocols="TLSv1.2" 
      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"
    ... />

While testing the site with www.ssllabs.com I find strange result in Server Supported Cipher Suites section. The list is as below :

    TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384  ....   OK
    TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384  ....   WEAK
    TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA     ....   WEAK
    TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256  ....   OK
    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256  ....   WEAK
    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA     ....   WEAK

Where are the TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 and TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 come from, I have not configure them in ‍server.xml ?!

Is it any default list of cipher suites in tomcat ?!


Solution

  • When you specify ciphers, no additional ciphers will be made available, regardless of the capabilities of the cryptographic provider being used (e.g. JSSE, OpenSSL, etc.).

    If you are seeing a different set of cipher suites being negotiated, I would check two things:

    1. Your configuration is actually being used. Try adding a syntactic error to your XML configuration file to see if Tomcat still starts. Tomcat should refuse to start if the file is not well-formed, confirming that you are in fact changing the right configuration file.

    2. If you are not directly connecting to Tomcat, you may be negotiating your TLS handshake with another network component such as a reverse proxy which is terminating TLS. If that's the case, the configuration of Tomcat is not relevant; the client is really talking to the reverse proxy and not to Tomcat, so the list of ciphers will be different as far as the client can tell. You will need to reconfigure the reverse proxy in this situation. The cipher suites list in Tomcat is still important, as you want to be using a secure cipher suite even "inside" your own network.