-
Notifications
You must be signed in to change notification settings - Fork 76
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
Introduce min-tls and ciphers-suite application options for webhook server #556
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Hi @arsenalzp. Thanks for your PR. I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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-sigs/prow repository. |
@arsenalzp, thanks for working on this. Could you take a look at how this is implemented in cert-manager? We would prefer a similar construct, at least the same defaults, descriptions etc. And the PR also needs to be rebased. 😺 |
I did as requested by you. |
/ok-to-test |
@arsenalzp: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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-sigs/prow repository. |
/ok-to-test |
bfae5b6
to
136f5f1
Compare
Try running |
Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> fix typos Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> add test of TLS configuration Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> improve parameters naming, add k8s TLS untils Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> Delete deploy/charts/trust-manager/values.schema.json Signed-off-by: Oleksandr Krutko <46520164+arsenalzp@users.noreply.github.com> add boilerplate in test file Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> fix test file boilerplate, generate Help files Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> add values schema Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com> fix linter warnings Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>
Thank you! |
Colleagues, any decision on this PR? Can we merge it? |
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.
Few comments, what do you think? Thanks for this!
if err != nil { | ||
return | ||
} | ||
defer resp.Body.Close() |
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.
suggestion: the defer will never get called if we return here; the order should be different. Does that sound right to you?
Also since this doesn't call t.Error
this test won't ever fail.
if err != nil { | |
return | |
} | |
defer resp.Body.Close() | |
defer resp.Body.Close() | |
if err == nil { | |
t.Error("expected an error from talking to a server with an unsupported cipher suite but got none") | |
return | |
} |
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.
Hello,
Yes, looks good! Thank you!
resp, err := client.Get(fmt.Sprintf("https://%s", net.JoinHostPort("localhost", "6443"))) //nolint: noctx | ||
if err != nil { | ||
t.Fatalf("error to connect to webhook server, %s\n", err) | ||
} | ||
resp.Body.Close() |
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.
suggestion: If we call Fatalf
the Body will never be closed - as far as I know at least!
resp, err := client.Get(fmt.Sprintf("https://%s", net.JoinHostPort("localhost", "6443"))) //nolint: noctx | |
if err != nil { | |
t.Fatalf("error to connect to webhook server, %s\n", err) | |
} | |
resp.Body.Close() | |
resp, err := client.Get(fmt.Sprintf("https://%s", net.JoinHostPort("localhost", "6443"))) //nolint: noctx | |
defer resp.Body.Close() | |
if err != nil { | |
t.Fatalf("error to connect to webhook server, %s\n", err) | |
} |
"--webhook-host=0.0.0.0", | ||
"--webhook-port=6443", |
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.
suggestion: Do we need to listen on 0.0.0.0
here? Could we listen on 127.0.0.1
to make it a little safer?
This PR is introducing Minimum TLS version and Ciphers Suite feature which were requested in issue #528.