Skip to content

Add support for connecting to Postgres with a certificate. #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dalemccrory opened this issue Nov 18, 2022 · 1 comment
Open

Add support for connecting to Postgres with a certificate. #44

dalemccrory opened this issue Nov 18, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@dalemccrory
Copy link

Here is what is an example from Beekeeper studio:
image

We are looking at requiring a certificate for logging into our data warehouse.
Thanks!

@eirikbakke
Copy link
Contributor

eirikbakke commented Nov 18, 2022

Thank you for this suggestion! Looks like Ultorg's connection dialog will require some extra bells and whistles to help configure different kinds authentication.

Meanwhile it should be possible to connect via SSL from Ultorg by adding the following "Connect Properties" in Ultorg's New Connection wizard:

  • sslmode: verify-ca
  • sslfactory: org.postgresql.ssl.NonValidatingFactory

And the following three properties can be omitted if the files are in their default location (see further below):

  • sslrootcert: Path to root (CA) certificate file, ending .crt
  • sslcert: Path to certificate file, ending .crt
  • sslkey: Path to key file, ending .pk8 or pfx

(From this PostgreSQL documentation page.)

E.g. something like this:

sslConnection

If you put the root.crt, postgresql.crt, and postgresql.pk8 files in their default directories, shown above for Windows (substitute your own username instead of "ebakke"), or /Users/username/.postgresql/ on MacOS, then you should be able to omit the sslrootcert, sslcert, and sslkey properties. The PostgreSQL documentation suggests testing that you can log in via SSL with the standalone "psql" command first.

(Curious to hear if you can make this work; I don't have an SSL-configured server to test this with at the moment.)

@eirikbakke eirikbakke added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants