-
Notifications
You must be signed in to change notification settings - Fork 130
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
TLS1.3 support #1364
base: master
Are you sure you want to change the base?
TLS1.3 support #1364
Conversation
sanchezl
commented
Oct 31, 2024
- bump library-go
- use new NewStaticPodOperatorClient signature
- add ETCD_TLS_MIN_VERSION env to etcd pods
- add listen-tls-min-version flag to readyz cmd
- do not start etcd with --cipher-suites with tls1.3
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sanchezl The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
var tlsMinVersion uint16 | ||
switch r.tlsMinVersion { | ||
case "TLS1.3": | ||
tlsMinVersion = tls.VersionTLS13 | ||
case "TLS1.2": | ||
tlsMinVersion = tls.VersionTLS12 | ||
} |
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.
feel free to use "go.etcd.io/etcd/client/pkg/v3/tlsutil" here too
@@ -304,6 +308,33 @@ func getCipherSuites(envVarContext envVarContext) (map[string]string, error) { | |||
}, nil | |||
} | |||
|
|||
func getTLSMinVersion(envVarContext envVarContext) (map[string]string, 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.
given your extraordinary gotpl skills, I'm wondering whether we should just check this inside of the cipher suite function above in conjunction.
That way we can enable/disable the suites depending on the TLS version. I'm mostly curious about how we can surface this back to a user somehow. I know some (especially FIPS) customers run compliance scanners that will alert them on not setting those ciphers.
@@ -173,7 +174,7 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle | |||
// we keep the default behavior of exiting the controller once a gate changes | |||
featureGateAccessor.SetChangeHandler(featuregates.ForceExit) | |||
|
|||
operatorClient, dynamicInformers, err := genericoperatorclient.NewStaticPodOperatorClient(controllerContext.KubeConfig, operatorv1.GroupVersion.WithResource("etcds"), operatorv1.GroupVersion.WithKind("Etcd"), ExtractStaticPodOperatorSpec, ExtractStaticPodOperatorStatus) | |||
operatorClient, dynamicInformers, err := genericoperatorclient.NewStaticPodOperatorClient(clock.RealClock{}, controllerContext.KubeConfig, operatorv1.GroupVersion.WithResource("etcds"), operatorv1.GroupVersion.WithKind("Etcd"), ExtractStaticPodOperatorSpec, ExtractStaticPodOperatorStatus) |
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.
do you mind to split out the library-go update into a separate PR? we can merge that earlier, I see there is a bunch of static pod changes there too, which we might want to separate out - just in case they mess up CI somehow.
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.
oh you already got #1365 - resolved :) thanks!