Skip to content

webhook: new flag to configure the webhook server's minimum TLS version #3313

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

Conversation

alebedev87
Copy link
Contributor

@alebedev87 alebedev87 commented Aug 7, 2023

Issue

N/A

Description

The goal of this PR is to support environments where TLS versions other than 1.3 are still used, mainly FIPS enabled systems. The boringcrypto enabled builds check for the maximum FIPS TLS version which is set to TLS1.2.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: alebedev87
Once this PR has been reviewed and has the lgtm label, please assign m00nf1sh for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 7, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @alebedev87!

It looks like this is your first PR to kubernetes-sigs/aws-load-balancer-controller 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/aws-load-balancer-controller has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 7, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @alebedev87. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 7, 2023
Comment on lines 55 to 56
"1.0": {},
"1.1": {},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely shouldn't support 1.0 or 1.1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, these ones are too outdated for now. I added them since the controller-runtime still supports them. I'm fine to remove them along with "" as it turns into 1.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.0, 1.1 removed.

@johngmyers
Copy link
Contributor

I think we should revert #2457 and make 1.2 the minimum version across the board. @oliviassss ?

@johngmyers
Copy link
Contributor

My opinion is that we should not be exposing this as configuration; administrators should not have to bother with this kind of stuff.

On the other hand, we probably should cater somewhat for people who are constrained to work within the idiotic FIPS-140 stuff.

If there are problematic ciphers in the Go's default TLS 1.2 support (I would suggest we check) then we can just hardcode-disable those.

@oliviassss
Copy link
Collaborator

oliviassss commented Aug 7, 2023

@johngmyers, yeah I agree 1.0 and 1.1 are outdated, AWS is also deprecating the 1.0 and 1.1 for the API endpoints: https://aws.amazon.com/blogs/security/tls-1-2-required-for-aws-endpoints/. And we could make 1.2 the minimum.

But I'm just a bit concerned about the 1.2 compatibility with k8s 1.22+ (since we are supporting k8s 1.22+). By checking the changelogs, seems like TLS 1.2 is the min supported version since k8s 1.3?

@alebedev87
Copy link
Contributor Author

alebedev87 commented Aug 7, 2023

But I'm just a bit concerned about the 1.2 compatibility with k8s 1.22+ (since we are supporting k8s 1.22+). By checking the changelogs, seems like TLS 1.2 is the min supported version since k8s 1.3?

Looking at KubeleConfiguration, the minimum TLS version is set to "" by default in 1.27 (API ref) which is later turn into TLS1.2 thanks to kubernetes/component-base/cli/flag#TLSVersion used by kubelet here. Which explains why I didn't see any problems with other controller-runtime based workloads which don't set TLSMinVersion on the latest Kubernetes releases.

So, TLS1.2 seems to be a safe default however it's indeed only intermediate security TLS profile. Maybe it still makes some sense to be in the modern profile by default (TLS1.3) and let some exotic environments like FIPS set TLS1.2. I don't have a strong opinion though, a revert to 1.2 by default would do the thing for me too.

@alebedev87 alebedev87 force-pushed the webhook-tls-min-version-kube branch from 2b49a09 to 34819fe Compare August 7, 2023 21:59
@alebedev87
Copy link
Contributor Author

alebedev87 commented Aug 7, 2023

"", 1.0, 1.1 versions removed, just in case we would decide to move on with the configurable approach.

@oliviassss
Copy link
Collaborator

@alebedev87, thanks, I think it's better to set TLS default version as 1.2, so it fits all the environments including FIPS, and allow the configuration for 1.3 for users who want stricter TLS version.

@alebedev87
Copy link
Contributor Author

@oliviassss : so this PR still makes sense. You would like me to change the default version to TLS1.2?

@johngmyers
Copy link
Contributor

Filed #3318

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 9, 2023
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@alebedev87
Copy link
Contributor Author

Closing since #3318 reset the minimum TLS version to 1.2.

@alebedev87 alebedev87 closed this Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants