-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Support tls-server-name
field of the kubeconfig cluster configuration
#991
Comments
This is (afaikt) a feature for authentication for If I understand it right, it involves extending our I can see some light uses of it in client-go but it doesn't really explain. Help would be appreciated with this one. |
IIUC, this setting should be somehow propagated to the TLS library in use (rustls / openssl). Maybe, these links will help. |
As I see, client-go passes tls-server-name to the underlying TLS layer here: Documentation for This specific field is documented as follows:
|
@MikailBag yep, you are right, it's and server name to provide to TLS layer, when it connects to the server. And so it can perform necessary checks and SNI can be used correctly 👍 |
This is now supported for rustls via #1104 thanks to @MikailBag 's initial PR and it's released in 0.77.0. Unfortunately, it is not done for openssl yet (where the upstream pr in hyper-openssl is not responded to) and I couldn't find a way to do it directly . |
That crate doesn't seem to be very active, is forking hyper-openssl an option until that PR is merged? 🤔 |
Someone would have to step up to do that type of slog though. As a potential alternative; we just closed all the rustls issues on |
I'll give it a go, I recall seeing some caveats on README which made me pick openssl instead. |
Hello, is there some news on this front? |
Context on bug since this is old. This is supported on The openssl support is missing and help is still welcome on this front from anyone actually using this stack. |
854: build: bump kube from v0.85.0 to v0.87.2 and k8s-openapi from v0.19.0 to v0.20.0 r=michaelbeaumont a=michaelbeaumont This switches to the `rustls` backend, it's the default for the first time in this version, and thus fixes openebs/mayastor#1729 by way of the rustls-only fix of kube-rs/kube#991 This is the minimum change necessary to _just_ fix the above issue. Probably this and other dependencies should be updated in addition to this PR. Closes openebs/mayastor#1729 This also bumps the minimum k8s version to v1.22 Co-authored-by: Mike Beaumont <mjboamail@gmail.com>
Would you like to work on this feature?
maybe
What problem are you trying to solve?
Currently
kube-rs
doesn't supporttls-server-name
for the cluster definition in the kubeconfig and just ignores it. That doesn't allow to specify correct host for the SNI. We felt it when usingkubectl-view-allocation
k8s plugin with Teleport (issue there: gravitational/teleport#15106 ), where correct server name in the SNI is required to reach right endpoint, since multiple services are multiplexed on one port.Describe the solution you'd like
Support
tls-server-name
field as per k8s docs - it should be transferred as part of SNI during TSL handshake.Describe alternatives you've considered
Documentation, Adoption, Migration Strategy
https://kubernetes.io/docs/reference/config-api/client-authentication.v1/
Target crate for feature
kube-client
The text was updated successfully, but these errors were encountered: