Skip to content

Commit 377a935

Browse files
committed
Enforce the minimum TLS version to 1.3
Based on the QPC analysis tool we should enforce the minimum version of TLS to 1.3 as older TLS versions are vulnerable to quantum attacks. Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
1 parent 37f1651 commit 377a935

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

cmd/main.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ func main() {
9090
// Rapid Reset CVEs. For more information see:
9191
// - https://github.com/advisories/GHSA-qppj-fm5r-hxr3
9292
// - https://github.com/advisories/GHSA-4374-p667-p6c8
93-
disableHTTP2 := func(c *tls.Config) {
94-
setupLog.Info("disabling http/2")
95-
c.NextProtos = []string{"http/1.1"}
96-
}
97-
98-
if !enableHTTP2 {
99-
tlsOpts = append(tlsOpts, disableHTTP2)
100-
}
93+
tlsOpts = append(tlsOpts, func(c *tls.Config) {
94+
setupLog.Info("enforcing minimum TLS version 1.3")
95+
c.MinVersion = tls.VersionTLS13
96+
if !enableHTTP2 {
97+
setupLog.Info("disabling http/2")
98+
c.NextProtos = []string{"http/1.1"}
99+
}
100+
})
101101

102102
webhookServer := webhook.NewServer(webhook.Options{
103103
TLSOpts: tlsOpts,

0 commit comments

Comments
 (0)