Skip to content

Commit 6f28612

Browse files
committed
BUG/MEDIUM: haproxy: stop overriding HAProxy default SSL bind options and ciphers
Do not set global SslOptions.DefaultBindOptions and DefaultBindCiphers anymore, letting HAProxy use its own built-in defaults instead. Enforcing a fixed cipher list and bind options was wrong: the default and permitted ciphers differ between the HAProxy flavors we ship (OpenSSL, AWS-LC and AWS-LC-FIPS). In particular the previously enforced list is incompatible with HAProxy running in FIPS mode, so overriding it would break the FIPS image derivative. Each HAProxy build already provides a sane default for its own SSL backend, which we should respect.
1 parent b1ba3bd commit 6f28612

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

pkg/haproxy/env/defaults.go

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,10 @@ func SetGlobal(global *models.Global, logTargets *models.LogTargets, env Env) {
3131
global.StatsTimeout = utils.PtrInt64(36000)
3232
}
3333

34-
// SSL options
35-
if global.SslOptions == nil {
36-
global.SslOptions = &models.SslOptions{}
37-
}
38-
if global.SslOptions.DefaultBindOptions == "" {
39-
global.SslOptions.DefaultBindOptions = "no-sslv3 no-tls-tickets no-tlsv10"
40-
}
41-
if global.SslOptions.DefaultBindCiphers == "" {
42-
//revive:disable-next-line:line-length-limit
43-
global.SslOptions.DefaultBindCiphers = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-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:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!3DES"
44-
}
34+
// SSL options: intentionally left untouched so HAProxy uses its own
35+
// built-in defaults. Overriding DefaultBindOptions/DefaultBindCiphers
36+
// broke across HAProxy flavors (OpenSSL, AWS-LC, AWS-LC-FIPS), each of
37+
// which has a different set of default/permitted ciphers.
4538

4639
// Tune options
4740
if global.TuneOptions == nil {

0 commit comments

Comments
 (0)