-
Notifications
You must be signed in to change notification settings - Fork 139
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
address Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server #735
Conversation
Signed-off-by: cpanato <[email protected]>
@cpanato Is there an equivalent setting for the gRPC handler? |
i'm not aware, but we can check. UPDATE: i'm not sure, did not find anything, but I dont have much experience with grpc :/ |
cmd/app/serve.go
Outdated
@@ -80,6 +80,7 @@ func newServeCmd() *cobra.Command { | |||
cmd.Flags().String("grpc-host", "0.0.0.0", "The host on which to serve requests for GRPC") | |||
cmd.Flags().String("grpc-port", "8081", "The port on which to serve requests for GRPC") | |||
cmd.Flags().String("metrics-port", "2112", "The port on which to serve prometheus metrics endpoint") | |||
cmd.Flags().Duration("read-header-timeout", 60*time.Second, "The time allowed to read the headers of the requests in seconds") |
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.
Is this too long, should it be ~10 seconds or less (not much in the headers besides an auth token)? I assume we have request timeouts that would trigger before this, though I'm not sure where those are configured (k8s?).
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.
nginx uses 60s by default
i will reduce that to 10
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.
done
we need to check what is the value we are setting on the nginx side (client_header_timeout
)
…onfigured in the http.Server Signed-off-by: cpanato <[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.
thanks!
Summary
Release Note