Skip to content

Commit

Permalink
ssl: update default cipher suites. (envoyproxy#752)
Browse files Browse the repository at this point in the history
While there, link to cipher suite configuration docs from BoringSSL.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
  • Loading branch information
PiotrSikora authored and mattklein123 committed Apr 14, 2017
1 parent fa579bf commit 1875a0d
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 15 deletions.
24 changes: 22 additions & 2 deletions docs/configuration/cluster_manager/cluster_ssl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,28 @@ verify_subject_alt_name
that the server certificate's subject alt name matches one of the specified values.

cipher_suites
*(optional, string)* If specified, the TLS connection will only support the specified cipher list.
If not specified, a default list will be used.
*(optional, string)* If specified, the TLS connection will only support the specified `cipher list
<https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#Cipher-suite-configuration>`_.
If not specified, the default list:

.. code-block:: none
[ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305]
[ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305]
ECDHE-ECDSA-AES128-SHA256
ECDHE-RSA-AES128-SHA256
AES128-GCM-SHA256
AES128-SHA256
AES128-SHA
ECDHE-ECDSA-AES256-GCM-SHA384
ECDHE-RSA-AES256-GCM-SHA384
ECDHE-ECDSA-AES256-SHA384
ECDHE-RSA-AES256-SHA384
AES256-GCM-SHA384
AES256-SHA256
AES256-SHA
will be used.

sni
*(optional, string)* If specified, the string will be presented as the SNI during the TLS
Expand Down
24 changes: 22 additions & 2 deletions docs/configuration/listeners/ssl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,25 @@ verify_subject_alt_name
that the server certificate's subject alt name matches one of the specified values.

cipher_suites
*(optional, string)* If specified, the TLS listener will only support the specified cipher list.
If not specified, a default list will be used.
*(optional, string)* If specified, the TLS listener will only support the specified `cipher list
<https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#Cipher-suite-configuration>`_.
If not specified, the default list:

.. code-block:: none
[ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305]
[ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305]
ECDHE-ECDSA-AES128-SHA256
ECDHE-RSA-AES128-SHA256
AES128-GCM-SHA256
AES128-SHA256
AES128-SHA
ECDHE-ECDSA-AES256-GCM-SHA384
ECDHE-RSA-AES256-GCM-SHA384
ECDHE-ECDSA-AES256-SHA384
ECDHE-RSA-AES256-SHA384
AES256-GCM-SHA384
AES256-SHA256
AES256-SHA
will be used.
1 change: 1 addition & 0 deletions source/common/ssl/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ envoy_cc_library(
name = "context_config_lib",
srcs = ["context_config_impl.cc"],
hdrs = ["context_config_impl.h"],
external_deps = ["ssl"],
deps = [
"//include/envoy/ssl:context_config_interface",
"//source/common/json:json_loader_lib",
Expand Down
33 changes: 22 additions & 11 deletions source/common/ssl/context_config_impl.cc
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
#include "common/ssl/context_config_impl.h"

#include "openssl/ssl.h"

namespace Ssl {

const std::string ContextConfigImpl::DEFAULT_CIPHER_SUITES = "ECDHE-RSA-AES128-GCM-SHA256:"
"ECDHE-RSA-AES128-SHA256:"
"ECDHE-RSA-AES128-SHA:"
"ECDHE-RSA-AES256-GCM-SHA384:"
"ECDHE-RSA-AES256-SHA384:"
"ECDHE-RSA-AES256-SHA:"
"AES128-GCM-SHA256:"
"AES256-GCM-SHA384:"
"AES128-SHA256:"
"AES256-SHA:"
"AES128-SHA";
const std::string ContextConfigImpl::DEFAULT_CIPHER_SUITES =
#ifdef OPENSSL_IS_BORINGSSL
"[ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305]:"
"[ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305]:"
#else
"ECDHE-ECDSA-AES128-GCM-SHA256:"
"ECDHE-RSA-AES128-GCM-SHA256:"
#endif
"ECDHE-ECDSA-AES128-SHA256:"
"ECDHE-RSA-AES128-SHA256:"
"AES128-GCM-SHA256:"
"AES128-SHA256:"
"AES128-SHA:"
"ECDHE-ECDSA-AES256-GCM-SHA384:"
"ECDHE-RSA-AES256-GCM-SHA384:"
"ECDHE-ECDSA-AES256-SHA384:"
"ECDHE-RSA-AES256-SHA384:"
"AES256-GCM-SHA384:"
"AES256-SHA256:"
"AES256-SHA";

ContextConfigImpl::ContextConfigImpl(const Json::Object& config) {
alpn_protocols_ = config.getString("alpn_protocols", "");
Expand Down

0 comments on commit 1875a0d

Please sign in to comment.