Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set minimum TLS version of webhook to 1.3 #188

Merged
merged 1 commit into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changes/unreleased/Changed-20220325-102922.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: Changed
body: Set the minimum TLS version of the webhook to TLS 1.3
time: 2022-03-25T10:29:22.620758589-03:00
custom:
Issue: "188"
9 changes: 9 additions & 0 deletions cmd/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,15 @@ func main() {
}

if getIsWebhookEnabled() {
// Set the minimum TLS version for the webhook. By default it will use
// TLS 1.0, which has a lot of security flaws. This is a hacky way to
// set this and should be removed once there is a supported way.
// There are numerous proposals to allow this to be configured from
// Manager -- based on most recent activity this one looks promising:
// https://github.com/kubernetes-sigs/controller-runtime/issues/852
webhookServer := mgr.GetWebhookServer()
webhookServer.TLSMinVersion = "1.3"

if err = (&verticacomv1beta1.VerticaDB{}).SetupWebhookWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create webhook", "webhook", "VerticaDB")
os.Exit(1)
Expand Down