5
5
*/}}
6
6
{{- define "conf/haproxy.config" }}
7
7
{{- $workingDir := .WorkingDir }}
8
- {{- $routerCiphers := env "ROUTER_CIPHERS" "intermediate" }}
8
+ {{- $routerCiphers := env "ROUTER_CIPHERS" }}
9
9
{{- $routerCiphersuites := env "ROUTER_CIPHERSUITES" }}
10
10
{{- $defaultDestinationCA := .DefaultDestinationCA }}
11
11
{{- $dynamicConfigManager := .DynamicConfigManager }}
90
90
ssl-default-bind-options ssl-min-ver {{ env "SSL_MIN_VERSION" "TLSv1.2" }}
91
91
{{- if ne (env "SSL_MAX_VERSION" "") "" }} ssl-max-ver {{env "SSL_MAX_VERSION" }}{{ end }}
92
92
93
- # The default cipher suite can be selected from the three sets recommended by https://wiki.mozilla.org/Security/Server_Side_TLS,
94
- # or the user can provide one using the ROUTER_CIPHERS environment variable.
95
- # By default when a cipher set is not provided, intermediate is used .
93
+ # The default cipher suite can be selected from the three sets recommended by https://wiki.mozilla.org/Security/Server_Side_TLS,
94
+ # or the user can provide one using the ROUTER_CIPHERS environment variable.
95
+ # ROUTER_CIPHERS may be empty, in which case TLSv1.2 and earlier are not allowed .
96
96
{{- if eq $routerCiphers "modern" }}
97
97
# Modern cipher suite (no legacy browser support) from https://wiki.mozilla.org/Security/Server_Side_TLS
98
98
tune.ssl.default-dh-param 2048
@@ -106,19 +106,20 @@ global
106
106
tune.ssl.default-dh-param 1024
107
107
ssl-default-bind-ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256: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-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:DES-CBC3-SHA:HIGH:SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!SRP
108
108
{{- else }}
109
- # user provided list of ciphers (Colon separated list as seen above)
110
- # the env default is not used here since we can't get here with empty ROUTER_CIPHERS
109
+ # User-provided list of ciphers (colon-separated list as seen above).
111
110
tune.ssl.default-dh-param 2048
112
- ssl-default-bind-ciphers {{ env "ROUTER_CIPHERS" "ECDHE-ECDSA-CHACHA20-POLY1305" }}
111
+ ssl-default-bind-ciphers " {{ $routerCiphers }}"
113
112
{{- end }}
114
113
{{/*
115
114
The ssl-default-bind-ciphers option above configures ciphers for TLSv1.0,
116
115
TLSv1.1, and TLSv1.2; for TLSv1.3, cipher suites are configured using the
117
116
ssl-default-bind-ciphersuites option below.
118
117
*/}}
119
- {{- with $routerCiphersuites }}
120
- ssl-default-bind-ciphersuites {{ $routerCiphersuites }}
121
- {{- end }}
118
+ # The TLSv1.3 cipher suites are configured separately
119
+ # using the ROUTER_CIPHERSUITES environment variable.
120
+ # This list may be empty, in which case TLSv1.3 is not allowed.
121
+ ssl-default-bind-ciphersuites "{{ $routerCiphersuites }}"
122
+
122
123
{{- with $captureCookie := .CaptureHTTPCookie }}
123
124
{{- if (gt $captureCookie.MaxLength 63) }}
124
125
tune.http.cookielen {{ $captureCookie.MaxLength }}
0 commit comments