Skip to content

Commit

Permalink
also force TlsRequired when cluster_url is https scheme
Browse files Browse the repository at this point in the history
Signed-off-by: clux <[email protected]>
  • Loading branch information
clux committed Sep 7, 2023
1 parent 4654655 commit 90040bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kube-client/src/client/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ impl TryFrom<Config> for ClientBuilder<BoxService<Request<hyper::Body>, Response
#[cfg(all(not(feature = "rustls-tls"), feature = "openssl-tls"))]
let connector = config.openssl_https_connector_with_connector(connector)?;
#[cfg(all(not(feature = "rustls-tls"), not(feature = "openssl-tls")))]
if auth_layer.is_none() {
// no tls stack situation only works on anonymous auth
if auth_layer.is_none() || config.cluster_url.scheme() == Some(&http::uri::Scheme::HTTPS) {
// no tls stack situation only works on anonymous auth with http scheme
return Err(Error::TlsRequired);
}

Expand Down

0 comments on commit 90040bd

Please sign in to comment.