SSL/TLS Deployment Best Practices v1.3
ssllabs.com
ssllabs.com
If you want the short version for Apache, Nginx and OpenSSL: http://blog.ivanristic.com/2013/08/configuring-apache-nginx-...
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS"
For those who don't give a shit if Windows XP / IE can establish an SSL connection with you, here's a cipher string without RC4.
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4"
More details, including the configurations for SSL/TLS protocol versions, can be found at the link above.
I'd like to see the minimal strings needed for a) only tls 1.2 with RSA keys, b) like a, with DSA -- with only forward secrecy enabled -- and a' and b' with fall back to no forward secrecy.
I don't suppose there's any reason to allow eg: EECDH+ECDSA+AESGCM if you only have certificates based on RSA?
Further, people often want to deploy something that's just slightly different -- like your request to use only RSA keys, then DSA, and so on. I've come to realise that the only way to make everyone happy is to teach them to write configuration strings for themselves. That's how OpenSSL Cookbook (my free ebook) came about.
In addition, my blog (referenced above) has many specialist posts; I write them as I research stuff for my book.
To your last question: no, there's no reason to use ECDSA anywhere if you only have RSA keys... but I prefer to use the same configuration string everywhere. It makes maintenance much easier.
I have no control over who can access it there. I'm not running the data center. I'm not hiring the staff. I'm not deciding on any monitoring. I basically just throw that key over the fence hoping the hoster will keep it secured.
And then I turn around and tell my users, trust me, only me and you can see the data we're exchanging. Isn't that one big lie? How do I handle this in a less haphazard way?
Hosting providers are for those small php sites that depend on AdWords for their income.
Why cant Netflix?
Also, Google's revenue is more than 10 times that of Netflix, and they have highly custom software and hardware.
If you follow all the recommendations from the guide -- which is not that hard, in my opinion -- your (TLS) security will be among, say, 0.1% of the sites out there, or better.
Going back to the key protection: for the rest of us, the best you can do is always use a password with your key. That won't protect it on the web server, but it will protect it when you back it up independently.
Then, find a CA that allows unlimited key/certificate regeneration and rotate your private key (and revoke the previous certificate) every month, and every time your staff changes.
I will edit this post with a link if I can find it again.
I run a small number of servers, so I've password-protected my private keys.
A great innovation would be to have web server fork a special process that will only handle private keys. That other process would be running under a different username. Bonus points if a separate process can be deployed for each key. (It's possible to achieve a similar effect by running decryption in a separate proxy layer.)
Especially for virtual machines which almost everybody is running on these days. An attacker can simply read the disk from under the OS.
Although I can understand why you might think it's not significant enough. I do agree that storing private keys in a separate user's process can help with security.
This is the link to the TaoBao Tengine doc describing the feature: http://tengine.taobao.org/document/http_ssl.html
My memory was faulty: they have a way to get the passphrase, not the key itself. But wrt security, both are equivalent.
ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:RC4-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK
[1] https://www.ssllabs.com/ssltest/analyze.html?d=news.ycombina...
Although, ironically, their web site does not seem to use TLS properly, not enforcing encryption on login and using mixed content.
Yesterday I found one that would only work on port 443, but it was a simple matter of creating two iptables rules: one to permit incoming IP packets to 443/TCP and the other to redirect them to 993/TCP.
He also has a book that is coming out and will presumably be excellent, but you can get the OpenSSL Cookbook now for free: https://www.feistyduck.com/books/bulletproof-ssl-tls-and-pki...
(Not affiliated with Ivan or the book, just a fan)
Such a config would be heavily commented and include links to the source advisory notices and explain why.
This way we would have something we could easily implement from a config perspective, have notifications when the advisory changes, and also be educated about what various things in the config would do.
Weakening SSL/TLS is surprisingly easy with the wrong options, and instead it should be really easy to get it right.
I don't know how good it is because I have not looked.
This is why I'd like the SSLLabs + Mozilla + other parties to work together to produce a single set of configs that reflect the combined best practise. To ensure that this is a complete thing.
This quote is from "Mozilla Developer Network" [1]:
"The HTTP Strict Transport Security feature lets a web site inform the browser that it should never load the site using HTTP, and should automatically convert all attempts to access the site using HTTP to HTTPS requests instead."
Does this mean that the browser stores somewhere that the site foo.com must be opened only in HTTPS mode? And what if I don't want the browser to keep any information about any site - its favicon, its cookies, local storage, indexed databases or HSTS information, nothing, how can I achieve this? Does the private mode in Firefox do this?
[1] https://developer.mozilla.org/en-US/docs/Security/HTTP_Stric...
However, Google and Mozilla are also pre-loading HSTS information. There was a blog post from Mozilla some months ago, describing how they have a crawler that detects long-term HSTS configuration in popular sites and then ships that information with browser releases. In this case, HSTS will work as intended even in private mode.
Too bad CentOS is still stuck on TLS 1.0 and apparently will be for quite some time.
1: http://developerblog.redhat.com/2013/09/17/shared-dev-rhscl/
Perhaps on a vanilla install, but it is not impossible or even difficult to build OpenSSL 1.0.1e+ for RHEL(s). Either build yourself or use Avixo[1]. Granted it's a pain in the ass/maybe not permitted in some environments, but doable.
If you're using Apache, you can compile your own from source, using static linking against OpenSSL. That way, you can have the latest versions of both.
I have a blog post that describes the process:
http://blog.ivanristic.com/2013/08/compiling-apache-with-sta...
While you're there, you might also want to patch Apache to support configurable DH parameters:
http://blog.ivanristic.com/2013/08/increasing-dhe-strength-o...