Skip to content

Commit ca1086f

Browse files
authored
Merge pull request #3318 from johngmyers/tls-vers
Allow TLS 1.2 with restricted ciphers for webhooks
2 parents 573e023 + 7902e2a commit ca1086f

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

pkg/config/runtime_config.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package config
22

33
import (
4+
"crypto/tls"
45
"time"
56

67
"github.com/spf13/pflag"
@@ -131,5 +132,19 @@ func BuildRuntimeOptions(rtCfg RuntimeConfig, scheme *runtime.Scheme) ctrl.Optio
131132
func ConfigureWebhookServer(rtCfg RuntimeConfig, mgr ctrl.Manager) {
132133
mgr.GetWebhookServer().CertName = rtCfg.WebhookCertName
133134
mgr.GetWebhookServer().KeyName = rtCfg.WebhookKeyName
134-
mgr.GetWebhookServer().TLSMinVersion = "1.3"
135+
mgr.GetWebhookServer().TLSOpts = []func(config *tls.Config){
136+
func(config *tls.Config) {
137+
config.MinVersion = tls.VersionTLS12
138+
config.CipherSuites = []uint16{
139+
// AEADs w/ ECDHE
140+
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
141+
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
142+
tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
143+
144+
// AEADs w/o ECDHE
145+
tls.TLS_RSA_WITH_AES_128_GCM_SHA256,
146+
tls.TLS_RSA_WITH_AES_256_GCM_SHA384,
147+
}
148+
},
149+
}
135150
}

0 commit comments

Comments
 (0)