0

Based on recommendations, we recently attempted to harden our Nginx SSL configuration against BEAST/CRIME/BREACH attacks with the following stanza:

ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:RC4-SHA;

We happen to use AWS Cloudfront to distribute static assets, and use our Nginx to serve the files as a Custom Origin. However, since restricting the allowed ciphers, Cloudfront's edge locations were suddenly unable to negotiate secure connections with Nginx.

While I can't find anywhere that AWS documents their preferred ciphers, a discussion in the AWS forums suggests that enabling the MD5 cipher will address the issue.

Not being a subject matter expert, I'm not entirely sure how to integrate what works for AWS with what works for a secure configuration! It's my understanding that MD5 is "weak sauce" as ciphers go. Would it be acceptable to enable the MD5 cipher for the static resource locations that Cloudfront needs, and use the hardened ssl_ciphers stanza for everything else, or does that open up a chink in the armor?

Also, what would the correct formulation of the ssl_ciphers stanza be?

3 Answers 3

4

As of today (August 2013), known weaknesses of MD5 have no impact whatsoever on the security of SSL/TLS. Issues with MD5 may induce problems with X.509 certificates, but this is a CA business and is unrelated to your choice of cipher suites.

In that respect, RC4 is actually weaker than MD5. RC4 induces measurable biases, which very rarely have any importance, but at least are real.

If I understand your problem correctly, Cloudfront will connect to your server as a SSL client; then, it suffices to run on your server a network monitor tool (e.g. Wireshark) to capture a connection attempt from Cloudfront's machine; the first SSL message from that machine, the ClientHello, will list the protocol versions and cipher suites that the Cloudfront machine supports. If you want to know what your server actually supports (i.e. the effect of your configuration), try this tool, or that one if your server can be contacted "from the Internet". Compare the lists, find what is missing.

3

The Amazon Cloudfront documentation says that they only support the AES128-SHA1 and RC4-MD5 ciphers. Try enabling AES128-SHA1 - while not as good as AES256, it's better than RC4.

http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html

1

For what it's worth, John Hardin's answer was correct when written, but there has been some good news. In August 2014, AWS announced support for new AES cipher suites, including the nice ECDHE ones used in the question. That configuration should now work perfectly with CloudFront.

The cipher suite documentation linked above includes the new list.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .