From bb6b696b34d6e668988ed98987cc393324e29aaa Mon Sep 17 00:00:00 2001 From: SteveDMurphy Date: Mon, 26 Jun 2023 22:03:26 +0100 Subject: [PATCH] feat: update default connect_args for ssh only --- src/fides/api/service/connectors/sql_connector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fides/api/service/connectors/sql_connector.py b/src/fides/api/service/connectors/sql_connector.py index 2a0bb6552f..602cbcc439 100644 --- a/src/fides/api/service/connectors/sql_connector.py +++ b/src/fides/api/service/connectors/sql_connector.py @@ -371,12 +371,14 @@ def create_client(self) -> Engine: self.create_ssh_tunnel(host=config.host, port=config.port) self.ssh_server.start() uri = self.build_ssh_uri(local_address=self.ssh_server.local_bind_address) + connect_args = {"sslmode": "prefer"} else: uri = config.url or self.build_uri() return create_engine( uri, hide_parameters=self.hide_parameters, echo=not self.hide_parameters, + connect_args=connect_args or None, ) def set_schema(self, connection: Connection) -> None: