Skip to content
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

rustls support #114

Merged
merged 11 commits into from
Feb 1, 2020
Merged

rustls support #114

merged 11 commits into from
Feb 1, 2020

Conversation

clux
Copy link
Member

@clux clux commented Jan 30, 2020

for #66 - trying to learn the crypto stuff to do this properly.

if anyone's reading this and see any obvious mistakes, please call out :-)

@clux
Copy link
Member Author

clux commented Jan 30, 2020

Ok. I'm definitely doing client certs wrong. Not sure how to convert the client cert + client key data (from kube config) into a reqwest::Identity atm. But we are pretty close - despite having commented out a few non-standard features.

@clux
Copy link
Member Author

clux commented Jan 31, 2020

or, maybe I am. but something is definitely not working. getting 403s across the board.

been debugging with:

NAMESPACE=dev cargo run --example pod_informer --no-default-features --features=openapi,native-tls
NAMESPACE=dev cargo run --example pod_informer --no-default-features --features=openapi,rustls-tls

with

diff --git examples/pod_informer.rs examples/pod_informer.rs
index d5aef09e..9719cfd3 100644
--- examples/pod_informer.rs
+++ examples/pod_informer.rs
@@ -12,7 +12,7 @@ type Pod = Object<PodSpec, PodStatus>;
 
 #[tokio::main]
 async fn main() -> anyhow::Result<()> {
-    env::set_var("RUST_LOG", "info,kube=trace");
+    env::set_var("RUST_LOG", "debug,reqwest=trace,kube=trace");
     env_logger::init();
     let config = config::load_kube_config().await?;
     let client = APIClient::new(config);

and seeing how far it gets.. so far 403 on first GET response in the Informer.

@clux
Copy link
Member Author

clux commented Jan 31, 2020

Did a merge with master, then noticed this...
55c8feb

..This branch actually works after the one-line change in Cargo.toml

@clux clux changed the title rustls support wip rustls support Jan 31, 2020
@clux
Copy link
Member Author

clux commented Feb 1, 2020

basic support is there - works with my clusters, but probably some dragons in here.
also, have commented out the oauth2 module, because i would rather have the initial support in here. will raise a separate issue for it while I merge this.

@clux clux merged commit 5d56e59 into master Feb 1, 2020
@clux clux deleted the rustls branch February 1, 2020 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant