-
-
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
TLS auth with EcdsaP521 works with openssl but not with rustls #1562
Comments
If you have any more specifics or ideas, then investigation is be appreciated. i am comparing this to my own setup, and i am currently using rustls with perhaps this is a trust issue with your ca setup / mac or something judging by the |
I've reproduced with pure tokio_rustls using the parsed Both ways are working with the openssl command, with verification OK. I wonder if I use an unsupported something. Here what
I'll check further later, but I wanted to share tonight's results :) |
it's now very likely that it's a compatibility issue:
Here's the fixed code: use k8s_openapi::api::core::v1::Pod;
use kube::{
api::{Api, ListParams},
Client,
};
#[tokio::main]
async fn main() -> eyre::Result<()> {
rustls::crypto::aws_lc_rs::default_provider()
.install_default()
.unwrap();
let cfg = kube::Config::infer().await?;
let client: Client = cfg.try_into()?;
let pods: Api<Pod> = Api::default_namespaced(client);
println!(
"found {} pods",
pods.list(&ListParams::default()).await?.items.len()
);
Ok(())
} I think I can do some support work in |
TDLR; many dependencies issues where specific to me wandering around and the Cargo.toml that works with the above code is actually simple: [package]
name = "test-kube"
version = "0.1.0"
edition = "2021"
[dependencies]
eyre = "0.6.12"
k8s-openapi = { version = "0.22.0", features = ["v1_24"] }
kube = "0.93.1"
rustls = "0.23.12"
tokio = { version = "1.40.0", features = ["macros", "rt-multi-thread"] } The need for installing the |
Thanks for investigating this! We have originally kept that feature disabled on our end, as not to force the dependency on people who can't build it. Maybe this should be changed if the need is widespread. At the very least we should documented that people might need to opt into the |
I still think it's the way to go:
|
PR #1568 created for review of this change proposal. |
This is now released in kube 0.94. Have edited the PR title here a bit to make the backlink from the release a bit better. |
Yes, this PR fixes the issue :) |
Current and expected behavior
with a cluster definition like that in kubeconfig:
and the following program:
(a) with the rustls feature:
(b) with the openssl feature:
Possible solution
Using openssl is a solution but from issue search I found it does not support
tls-server-name
.I can live with it as I can setup the name resolution as I need it.
I can put a few hours on this and on #991 to see if I can find solutions.
Additional context
No response
Environment
$ kubectl version
Server Version: v1.28.6
Configuration and features
and
Affected crates
kube-client
Would you like to work on fixing this bug?
yes
The text was updated successfully, but these errors were encountered: