-
Notifications
You must be signed in to change notification settings - Fork 119
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
gRPC connector that allows self-signed certs #2273
base: mvtx-adapt
Are you sure you want to change the base?
Conversation
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
} | ||
|
||
cer, err := sharedtls.GenerateX509KeyPair() | ||
if err != nil { | ||
return fmt.Errorf("failed to generate cert: %w", err) | ||
} | ||
|
||
tlsConfig := &tls.Config{Certificates: []tls.Certificate{*cer}, MinVersion: tls.VersionTLS12} | ||
tlsConfig := &tls.Config{Certificates: []tls.Certificate{*cer}, MinVersion: tls.VersionTLS12, NextProtos: []string{"h2", "http/1.1"}} |
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.
do not make this change.
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.
i am moving this PR to draft state.
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.
do not make this change.
Removed.
Signed-off-by: Sreekanth <[email protected]>
When we specify Currently, this PR would only be adding a utility hyper client for future use with gRPC servers that use self-signed certs. |
This approach works on Mac with Golang gRPC server listening on https (self-signed certs). But it failing in k8s with below error:
This may be because of ALPN seanmonstar/reqwest#2350 (comment)However, the unit tests shows ALPN protocols are set when we use
enable_http2()
method.It seems hyper's client pool is http1 and tonic is trying to send http2 request https://docs.rs/hyper-util/0.1.10/src/hyper_util/client/legacy/client.rs.html#289
UPDATE:
This was because of golang/go#46602 and golang/go#14619