-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
credentials: Add experimental credentials that don't enforce ALPN #7980
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7980 +/- ##
==========================================
+ Coverage 82.05% 82.10% +0.05%
==========================================
Files 381 384 +3
Lines 38539 38692 +153
==========================================
+ Hits 31622 31768 +146
- Misses 5602 5605 +3
- Partials 1315 1319 +4
|
4626aff
to
1d71903
Compare
1d71903
to
78c4cbf
Compare
@@ -32,6 +32,8 @@ import ( | |||
"google.golang.org/grpc/internal/envconfig" | |||
) | |||
|
|||
const alpnFailureHelpMessage = "If you upgraded from a grpc-go version earlier than 1.67, your TLS connections may stopped working due to ALPN enforcement. For more details, see: https://github.com/grpc/grpc-go/issues/434. To disable ALPN enforcement, set the environment variable GRPC_ENFORCE_ALPN_ENABLED to false, or use the experimental credentials available under experimental/credentials. Note that these workarounds are intended for migration purposes and will be removed in future grpc-go versions." |
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.
Nit: "may have stopped working"
Also I think I'd remove everything after "see 434". The rest of the explanation can be in there.
@@ -0,0 +1,252 @@ | |||
/* | |||
* | |||
* Copyright 2016 gRPC authors. |
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.
Update please
* | ||
*/ | ||
|
||
// Package credentials contains experimental TLS credentials. |
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.
This should have a big scary comment about how these credentials should only be used to maintain compatibility for people relying upon interoperability with clients violating the HTTP/2 specification, and that it will be deleted, so users should not use it directly. Instead they either need to vendor gRPC or copy these credentials.
@@ -0,0 +1,393 @@ | |||
/* | |||
* | |||
* Copyright 2023 gRPC authors. |
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.
Date
Fixes: #7922
Related Issue: #434
This change copies the existing TLS credentials, removing the code for ALPN enforcement. These credentials will be removed in a couple of releases and users who still need to disable ALPN can copy the credentials as is. Changes made:
credentials/tls.go
toexperimental/credentials/tls.go
. Add suffixWithALPNDisabled
to constructors.internal/credentials
toexperimental/credentials/internal
.RELEASE NOTES: