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

add tls min/max version to grpc proxy #18816

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Conversation

tjungblu
Copy link
Contributor

This adds the min and max TLS version support from #13506 and #15156 to the grpc proxy.

Fixes #13506

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 6.45161% with 29 lines in your changes missing coverage. Please review.

Project coverage is 68.74%. Comparing base (7ab7612) to head (fac1dfb).

Current head fac1dfb differs from pull request most recent head 617f357

Please upload reports for the commit 617f357 to get more accurate results.

Files with missing lines Patch % Lines
server/etcdmain/grpc_proxy.go 6.45% 29 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
Files with missing lines Coverage Δ
server/etcdmain/grpc_proxy.go 14.52% <6.45%> (-0.53%) ⬇️

... and 22 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #18816      +/-   ##
==========================================
+ Coverage   68.72%   68.74%   +0.02%     
==========================================
  Files         420      420              
  Lines       35532    35558      +26     
==========================================
+ Hits        24418    24444      +26     
  Misses       9681     9681              
  Partials     1433     1433              

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ab7612...617f357. Read the comment docs.

Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM

The change looks good, but unfortunately there is no test cases.

@tjungblu
Copy link
Contributor Author

tjungblu commented Nov 1, 2024

happy to add some in a separate PR, because for grpc proxy we have almost nothing 🙀

@tjungblu
Copy link
Contributor Author

tjungblu commented Nov 4, 2024

just added a basic e2e that those flags work for starting the proxy process

@tjungblu
Copy link
Contributor Author

tjungblu commented Nov 4, 2024

/retest

2 similar comments
@jmhbnz
Copy link
Member

jmhbnz commented Nov 7, 2024

/retest

@ivanvc
Copy link
Member

ivanvc commented Nov 9, 2024

/retest

@ivanvc
Copy link
Member

ivanvc commented Nov 9, 2024

Tests are green, @ahrtr, do you want to take a look at @tjungblu's e2e tests?

@ivanvc ivanvc mentioned this pull request Nov 10, 2024
2 tasks
Copy link
Member

@jmhbnz jmhbnz left a comment

Choose a reason for hiding this comment

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

LGTM - Thanks for addressing this gap @tjungblu

Would be great to get some additional test scenario coverage added in follow-up.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, jmhbnz, tjungblu

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

@@ -90,6 +90,44 @@ func TestGrpcProxyAutoSync(t *testing.T) {
assert.Equal(t, []testutils.KV{{Key: "k1", Val: "v1"}}, kvs)
}

func TestGrpcProxyTlsVersions(t *testing.T) {
Copy link
Member

@ivanvc ivanvc Nov 11, 2024

Choose a reason for hiding this comment

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

Minor nit: this should be named TestGRPCProxyTLSVersions

Suggested change
func TestGrpcProxyTlsVersions(t *testing.T) {
func TestGRPCProxyTLSVersions(t *testing.T) {

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. But unfortunately it isn't detected by the linters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

scratch my previous comments, the linter doesn't seem to run on the e2e folder?

Copy link
Member

Choose a reason for hiding this comment

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

The tests is already in the list. Anyway, could anyone raise a followup task and get it sorted out? thx

echo "api pkg client/pkg client/internal/v2 client/v3 server etcdutl etcdctl tests tools/mod tools/rw-heatmaps tools/testgrid-analysis ."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed the naming manually now. I'm not able to even run the linter locally without OOMing my 64gig machine LOL

[tjungblu ~/git/etcd/tests]$ golangci-lint run --config /home/tjungblu/git/etcd/tools/.golangci.yaml
Killed

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I was checking this and forgot to finish my reply. I'm unsure why golangci-lint is getting OOMKilled in your machine. It works for me. However, for some reason, it does not pick up the names of the functions inside test files. I'll follow up this on an issue soon.

Copy link
Member

Choose a reason for hiding this comment

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

Raised mgechev/revive#1124. The issue seems to be in the revive linter.

Copy link
Member

Choose a reason for hiding this comment

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

Heads up: The linter won't check test file functions, as mentioned in mgechev/revive#1124 (comment), and there doesn't seem an interest by the maintainers to support them. I raised PR mgechev/revive#1134 to document this behavior (already merged).

This adds the min and max TLS version support from etcd-io#13506 and etcd-io#15156 to the grpc proxy.

Fixes etcd-io#13506

Signed-off-by: Thomas Jungblut <[email protected]>
@tjungblu
Copy link
Contributor Author

@ivanvc / @jmhbnz / @ahrtr all good here? any other concerns?

Copy link
Member

@ivanvc ivanvc left a comment

Choose a reason for hiding this comment

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

This LGTM from the code point of view. I'm not an expert in this area. Thanks, Thomas.

@ahrtr ahrtr merged commit be5982a into etcd-io:main Nov 14, 2024
32 checks passed
@tjungblu
Copy link
Contributor Author

Thank you both, I'd like to point you to the 3.5 backport as well:
#18829

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

TLS1.3 support
6 participants