Skip to content

Update google.golang.org/grpc to 1.68.0#49712

Merged
espadolini merged 4 commits intomasterfrom
espadolini/grpc-1.68.0
Dec 3, 2024
Merged

Update google.golang.org/grpc to 1.68.0#49712
espadolini merged 4 commits intomasterfrom
espadolini/grpc-1.68.0

Conversation

@espadolini
Copy link
Copy Markdown
Contributor

Starting from grpc-go 1.67, TLS transport credentials (on both server and client side) enforce the use of ALPN - however, the initial concern that led us to not upgrade to 1.67 immediately, i.e. the fact that we often use custom ALPN values, is not a problem here: as long as client and server negotiate some ALPN, the connection will still succeed even with the transport credentials implementation in grpc-go; moreover, starting from 1.68.0, grpc-go will actually correctly apply its modifications to the tls.Configs in use even when making use of GetConfigForClient (even though all of our uses of configs with GetConfigForClient should already be setting NextProtos correctly).

The go version in the API module is bumped from 1.22.0 to 1.22.7 to accomodate grpc-go's new minimum version.

@espadolini espadolini added the no-changelog Indicates that a PR does not require a changelog entry label Dec 3, 2024
@aws-amplify-us-west-2
Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-49712.d3pp5qlev8mo18.amplifyapp.com

Copy link
Copy Markdown
Contributor

@codingllama codingllama left a comment

Choose a reason for hiding this comment

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

Thanks, Edoardo.

No testing changes needed? I vaguely remember something breaking.

Copy link
Copy Markdown
Contributor

@tigrato tigrato left a comment

Choose a reason for hiding this comment

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

Thanks!

The credentials.NewTLS call will add the h2 NextProto if missing, but in
some tests we create a tls.Config and use it to connect to the test
server directly, so it's cleaner to just create the tls.Config with the
correct NextProto in the first place.
// this would be done by the grpc TransportCredential in the client
clientTLSConf := test.clientTLSConf
if !slices.Contains(clientTLSConf.NextProtos, "h2") {
clientTLSConf = clientTLSConf.Clone()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need the Clone call?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Seems rude not to?

Comment thread lib/auth/transport_credentials_test.go Outdated
Comment thread lib/teleterm/grpccredentials.go Outdated
@espadolini espadolini added this pull request to the merge queue Dec 3, 2024
Merged via the queue into master with commit 04bd48c Dec 3, 2024
@espadolini espadolini deleted the espadolini/grpc-1.68.0 branch December 3, 2024 19:23
carloscastrojumo pushed a commit to carloscastrojumo/teleport that referenced this pull request Feb 19, 2025
* Update google.golang.org/grpc to 1.68.0

* Fix TestTransportCredentials_ServerHandshake

* Fix TestStart

The credentials.NewTLS call will add the h2 NextProto if missing, but in
some tests we create a tls.Config and use it to connect to the test
server directly, so it's cleaner to just create the tls.Config with the
correct NextProto in the first place.

* Tweaks to address review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants