Skip to content

Commit

Permalink
fix: skip_tls authentication functionality
Browse files Browse the repository at this point in the history
Signed-off-by: Bobbins228 <[email protected]>
  • Loading branch information
Bobbins228 authored and openshift-merge-bot[bot] committed Oct 7, 2024
1 parent 0d445fe commit 73b8cb7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/codeflare_sdk/common/kubernetes_cluster/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,15 @@ def login(self) -> str:
configuration.host = self.server
configuration.api_key["authorization"] = self.token

api_client = client.ApiClient(configuration)
if not self.skip_tls:
_client_with_cert(api_client, self.ca_cert_path)
else:
if self.skip_tls:
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
print("Insecure request warnings have been disabled")
configuration.verify_ssl = False

api_client = client.ApiClient(configuration)
if not self.skip_tls:
_client_with_cert(api_client, self.ca_cert_path)

client.AuthenticationApi(api_client).get_api_group()
config_path = None
return "Logged into %s" % self.server
Expand Down

0 comments on commit 73b8cb7

Please sign in to comment.