title: How to set HTTPS SSL Cipher Suite Preference in Spring boot embedded tomcat
body: <p>I trying to set HTTPS SSL cipher suite preference according to server preference rather than auto select based on client &amp; server supported common cipher suite with highest strength.</p>
  
  <p>I like to let server choose for common between server &amp; client having "TLS_ECDHE..." in order to support Forward Secrecy.
  Now I tested in "www.ssllabs.com", client browser will prefer cipher having "TLS_RSA..." rather than "TLS_ECDHE"... </p>
  
  <p>I noticed java 8 support set cipher suite preference:
  <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#cipher_suite_preference" rel="noreferrer">http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#cipher_suite_preference</a></p>
  
  <p>I assume spring boot embedded Tomcat will call Java 8 function to choose cipher</p>
  
  <p>Here is what I done in spring boot application.properties file to set server support ciphers set:</p>
  
  <pre><code>server.ssl.ciphers=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_SHA256,TLS_ECDHE_RSA_WITH_AES_128_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_SHA,TLS_ECDHE_RSA_WITH_AES_256_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_SHA384,TLS_ECDHE_RSA_WITH_AES_256_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_SHA,TLS_DHE_RSA_WITH_AES_128_SHA256,TLS_DHE_RSA_WITH_AES_128_SHA,TLS_DHE_DSS_WITH_AES_128_SHA256,TLS_DHE_RSA_WITH_AES_256_SHA256,TLS_DHE_DSS_WITH_AES_256_SHA,TLS_DHE_RSA_WITH_AES_256_SHA
  </code></pre>
  
  <p>Hopefully someone can guide me how to override default choose cipher behaviour.</p>