-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
✨ : (go/v3,go/v4) Disable HTTP2 for webhook server and metrics in order to address CVE-2023-39325 HTTP/2 rapid reset can cause excessive work in net/http #3734
Conversation
Signed-off-by: everettraven <[email protected]>
6d7a127
to
4526fcf
Compare
Go/v3 is deprecated but in this case shows fine add the change on it. I added some nits / questions. Otherwise, /approved |
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.") | ||
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.") | ||
flag.BoolVar(&enableLeaderElection, "leader-elect", false, | ||
"Enable leader election for controller manager. "+ | ||
"Enabling this will ensure there is only one active controller manager.") | ||
flag.BoolVar(&secureMetrics, "metrics-secure", false, | ||
"Whether or not the metrics endpoint should be served securely") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we try to following the standard of the other commets
Something more like
If set enable the ... or Enable ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 2375fa3
@@ -85,9 +93,28 @@ func main() { | |||
|
|||
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) | |||
|
|||
disableHTTP2 := func(c *tls.Config) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a comment explained why it has been made?
Have we any other option?
Would that mean that we cannot use HTTP2 at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 2375fa3
Signed-off-by: everettraven <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: everettraven, Kavinjsir, varshaprasad96 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(not tagging since already merged)
Description
This PR updates the
go/v4
andgo/v3
default scaffolding to include some new flags for disabling HTTP/2 on metric (go/v4) and webhook servers. This helps to ensure that new projects don't have to go through manual steps to disable http/2 support to address:Motivation
Ensure that new projects don't have to go through manual steps to disable http/2 support to address: