Skip to content

Commit

Permalink
feat: update default connect_args for ssh only
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveDMurphy committed Jun 26, 2023
1 parent 3a4798f commit bb6b696
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fides/api/service/connectors/sql_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bb6b696

Please sign in to comment.