-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix(dgraph): giving users the option to control tls versions #6820
Conversation
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.
Reviewed 2 of 2 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @manishrjain and @vvbalaji-dgraph)
d9ecc72
to
98b2fbb
Compare
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.
1 issues found. 4 rules errored during the review.
@@ -99,7 +114,7 @@ func LoadClientTLSConfigForInternalPort(v *viper.Viper) (*tls.Config, error) { | |||
} | |||
|
|||
// LoadServerTLSConfigForInternalPort loads the TLS config for the internal ports of the cluster | |||
func LoadServerTLSConfigForInternalPort(tlsEnabled bool, tlsDir string) (*tls.Config, error) { | |||
func LoadServerTLSConfigForInternalPort(tlsEnabled bool, tlsDir, tlsMinVersion string) (*tls.Config, error) { |
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.
Boolean arguments can indicate low cohesion. Consider refactoring LoadServerTLSConfigForInternalPort by using a separate function for each case and helper functions for repeated code. This will make each function clearer and more modular, leading to easier maintainability.
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.
1 issues found. 4 rules errored during the review.
x/tls_helper.go
Outdated
MinVersion string | ||
} | ||
|
||
// RegisterClientTLSFlags registers the required flags to set up a TLS client. |
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.
Every exported function in a program should have a doc comment. The first sentence should be a summary that starts with the name (RegisterServerTLSFlags) being declared.
From effective go.
Fixes DGRAPH-2469 for patch release 20.07.
Currently Dgraph supports both tls v1.1 and tls v1.2 which introduces security concerns. This PR limits the min version to v1.2 and also enables only selected cipher suites which are more secure.
This change is
Docs Preview: