Skip to content

Commit

Permalink
Support only TLS 1.2,1.3 and secure ciphersuites (#1321)
Browse files Browse the repository at this point in the history
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
  • Loading branch information
Alevsk authored Oct 26, 2022
1 parent 2763c24 commit 19069be
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/controller/cluster/main-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,18 @@ func (c *Controller) Start(threadiness int, stopCh <-chan struct{}) error {
}
serverCertsManager = certsManager
c.ws.TLSConfig = &tls.Config{
PreferServerCipherSuites: true,
CurvePreferences: []tls.CurveID{tls.CurveP256},
NextProtos: []string{"h2", "http/1.1"},
MinVersion: tls.VersionTLS12,
CipherSuites: []uint16{
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
},
GetCertificate: certsManager.GetCertificate,
}
if err := c.ws.ListenAndServeTLS("", ""); err != http.ErrServerClosed {
Expand Down

0 comments on commit 19069be

Please sign in to comment.