From 882af9ef2c2374ed4b09eb8b8f8689e9346d41fe Mon Sep 17 00:00:00 2001 From: Adrian Clay Date: Mon, 2 Sep 2024 15:02:48 +0100 Subject: [PATCH] Switch from PyMongo ssl config to tls config (#190) PyMongo 4 changed how this config should be specified. https://pymongo.readthedocs.io/en/4.8.0/examples/tls.html --- common/persistence/mongo_persistence_adaptor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/persistence/mongo_persistence_adaptor.py b/common/persistence/mongo_persistence_adaptor.py index 647640c72..dd790a2a4 100644 --- a/common/persistence/mongo_persistence_adaptor.py +++ b/common/persistence/mongo_persistence_adaptor.py @@ -48,8 +48,8 @@ def _build_client(): with open(_CERT_FILE_PATH, "w") as cert_file: cert_file.write(cert) kwargs = { - 'ssl': True, - 'ssl_ca_certs': _CERT_FILE_PATH + 'tls': True, + 'tlsCAFile': _CERT_FILE_PATH } return AsyncIOMotorClient(config.get_config('DB_ENDPOINT_URL'), **kwargs)