Skip to content

Commit 45f5b71

Browse files
committed
added cert verify
1 parent 9c622b9 commit 45f5b71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sagemaker_studio_docker_cli/commands.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def ping_host(home, instance_type, instance_id, dns, port, retry=True):
1919
"""
2020
try:
2121
log.info(f"Pinging {dns}")
22-
path_to_cert = f"{home}/.sagemaker_studio_docker_cli/{instance_type}_{instance_id}/certs/client/"
23-
cert=(path_to_cert + "cert.pem", path_to_cert + "key.pem")
24-
response = json.loads(requests.get(f"https://{dns}:{port}/version", cert=cert, verify=False).content.decode("utf-8"))
22+
path_to_cert = f"{home}/.sagemaker_studio_docker_cli/{instance_type}_{instance_id}/certs/"
23+
cert=(path_to_cert + "client/cert.pem", path_to_cert + "client/key.pem")
24+
response = json.loads(requests.get(f"https://{dns}:{port}/version", cert=cert, verify=path_to_cert + "ca/cert.pem").content.decode("utf-8"))
2525
log.info(f"DockerHost {dns} is healthy!")
2626
return (True, None)
2727
except Exception as error:

0 commit comments

Comments
 (0)