latitude icon indicating copy to clipboard operation
latitude copied to clipboard

Review connection and result parsing in all connectors

Open geclos opened this issue 11 months ago • 3 comments

TODO

  • Review / implement SSL support
  • QA with real data
  • Review and fix the docs

Progress

  • [x] postgres
  • [x] mysql
  • [x] athena
  • [x] bigquery
  • [x] clickhouse @samulatitude
  • [ ] databricks @samulatitude
  • [x] duckdb
  • [x] redshift @samulatitude
  • [x] snowflake @geclos
  • [x] sqlite @geclos
  • [ ] trino

geclos avatar Mar 15 '24 11:03 geclos

I have tested a connection to a postgres DB from Heroku (hosted in AWS), and I am getting this error:

Screenshot 2024-03-25 at 21 16 02

source -not real db name, user, pwd - Screenshot 2024-03-25 at 21 16 27

works fine with Postico and other PG clients from local

PolGuixe avatar Mar 25 '24 20:03 PolGuixe

Hey @PolGuixe ,

TL;DR

Do this:

ssl:
   rejectUnauthorized: false

Long explanation

Your case should already be supported by our Postgres connector.

What is happening is that the default self-signed SSL certificates the postgres connector is using are not supported by your DB. A quick and easy way to fix this is to replace ssl: true with the following:

ssl:
   rejectUnauthorized: false

This will maintain the SSL encryption but will tell your db to not check the certificate validity, which is fine in cases like yours where you control the db and is what most clients do under the hood to simplify configuration for the user. If you want to be more strict and have the db confirm the certificate authority for your SSL connection you can include your OS's CA root store, like so:

ssl:
  ca: /etc/ssl/cert.pem # this path will depend on your operating system

You can check a list of OSs and their CA paths in our docs.

A third solution involves using custom keys and certificates provided by your DB provider but I don't think it's worth getting into it since it's almost surely not your case.

geclos avatar Mar 25 '24 20:03 geclos

@geclos thanks! This has resolved the issue. 🎉

PolGuixe avatar Mar 25 '24 21:03 PolGuixe