Skip to content
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

spdyroundtripper: don't need to verify server hostname twice #109750

Merged
merged 2 commits into from May 5, 2022

Conversation

aojea
Copy link
Member

@aojea aojea commented May 2, 2022

/kind cleanup

NONE

tls.HandshakeContext() already validates the hostname, no need to do it twice

playground https://gist.github.com/aojea/4e172d7f3835cd3ffc6ea4f83eea6608

xref https://groups.google.com/g/golang-nuts/c/4vnt7NdLvVU/m/b1SJ4u0ikb0J

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label May 2, 2022
@k8s-ci-robot
Copy link
Contributor

Please note that we're already in Test Freeze for the release-1.24 branch. This means every merged PR has to be cherry-picked into the release branch to be part of the upcoming v1.24.0 release.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels May 2, 2022
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 2, 2022
@aojea
Copy link
Member Author

aojea commented May 2, 2022

/assign @liggitt

kindly pinging @FiloSottile for confirmation

@aojea aojea force-pushed the spdy_tls branch 2 times, most recently from 02dec3a to 4251cfc Compare May 2, 2022 10:57
@FiloSottile
Copy link

/assign @liggitt

kindly pinging @FiloSottile for confirmation

Yeah, these look redundant, without InsecureSkipVerify the client will already do a VerifyHostname for the Config.ServerName.

@ash2k
Copy link
Member

ash2k commented May 2, 2022

@aojea I think you are right. I found one more place that does a redundant verify:

if err := tlsConn.VerifyHostname(host); err != nil {

Here verify needs to only happen in one of the if branches (where tls.Client is used), not always. Perhaps it's worth addressing in this PR too.

@aojea
Copy link
Member Author

aojea commented May 3, 2022

/test pull-kubernetes-e2e-kind-ipv6

Kubernetes e2e suite: [sig-api-machinery] ResourceQuota should verify ResourceQuota with cross namespace pod affinity scope using scope-selectors. expand_more

@aojea
Copy link
Member Author

aojea commented May 3, 2022

Kubernetes e2e suite: [sig-storage] EmptyDir volumes should support (root,0777,tmpfs) [LinuxOnly] [NodeConformance]
[Conformance] expand_more 10s
Kubernetes e2e suite: [sig-node] Pods should run through the lifecycle of Pods and PodStatus [Conformance] expand_more

/test pull-kubernetes-e2e-kind

@liggitt
Copy link
Member

liggitt commented May 3, 2022

/lgtm
/approve
/milestone v1.25

@k8s-ci-robot k8s-ci-robot added this to the v1.25 milestone May 3, 2022
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 3, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea, liggitt

The full list of commands accepted by this bot can be found here.

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 3, 2022
@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

@fedebongio
Copy link
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 3, 2022
@k8s-ci-robot k8s-ci-robot merged commit 4357588 into kubernetes:master May 5, 2022
ash2k added a commit to ash2k/kubernetes that referenced this pull request May 16, 2022
Handshake() is still needed for tls.Client() code path. See kubernetes#109750
k8s-publishing-bot pushed a commit to kubernetes/apimachinery that referenced this pull request May 16, 2022
Handshake() is still needed for tls.Client() code path. See kubernetes/kubernetes#109750

Kubernetes-commit: 29dc50c149a85eba490bbaf3df9758fd371ece12
muyangren2 pushed a commit to muyangren2/kubernetes that referenced this pull request Jul 14, 2022
Handshake() is still needed for tls.Client() code path. See kubernetes#109750
jkh52 pushed a commit to jkh52/kubernetes that referenced this pull request Nov 11, 2022
Handshake() is still needed for tls.Client() code path. See kubernetes#109750
k8s-publishing-bot pushed a commit to kubernetes/apimachinery that referenced this pull request Nov 14, 2022
Handshake() is still needed for tls.Client() code path. See kubernetes/kubernetes#109750

Kubernetes-commit: 8a7c74bda5d84347e1dbe866264ad6f58bff0ff3
jkh52 pushed a commit to jkh52/kubernetes that referenced this pull request Jan 12, 2023
Handshake() is still needed for tls.Client() code path. See kubernetes#109750
k8s-publishing-bot pushed a commit to kubernetes/apimachinery that referenced this pull request Jan 20, 2023
Handshake() is still needed for tls.Client() code path. See kubernetes/kubernetes#109750

Kubernetes-commit: f99efc598c3a8a0c00ff2b29e19ee36d962353a3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants