From f45bf1302d844f5a0e7f10f90ed8a54235dae21e Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Fri, 23 Feb 2024 18:19:58 +0200 Subject: [PATCH] Disable verification of server TLS certificates for mgmt-api --- medusa/service/snapshot/management_api_snapshot_service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/medusa/service/snapshot/management_api_snapshot_service.py b/medusa/service/snapshot/management_api_snapshot_service.py index 62bb47aa..aa9a0515 100644 --- a/medusa/service/snapshot/management_api_snapshot_service.py +++ b/medusa/service/snapshot/management_api_snapshot_service.py @@ -24,8 +24,11 @@ def __init__(self, config): self.config = config self.session = requests.Session() if self.config.tls_cert is not None and len(self.config.tls_cert) > 0: - self.session.verify = self.config.ca_cert + # self.session.verify = self.config.ca_cert + self.session.verify = False self.session.cert = (self.config.tls_cert, self.config.tls_key) + if self.config.cassandra_url.startswith('http://'): + self.config.cassandra_url = self.config.cassandra_url.replace('http://', 'https://') def create_snapshot(self, *, tag): # get the Cassandra URL to POST the request