If you are on Windows and want to use Kerberos (from Active Directory) to log in to a PostgreSQL database, you need to configure the DbVisualizer connection to handle this.

Set up a driver

  • Start DbVisualizer
  • Go to Tools->Driver Manager
  • Click on [+] in the upper left corner to create a new driver
  • Double click on PostgreSQL and set a suitable name, for example "PostgreSQL - SSO"
  • In the Driver artifacts and jar files list, click on [+] and select "Add Artifact..."
  • Set Group Id to "com.github.waffle" and Artifact Id to "waffle-jna", and then select the latest version (3.4.0 at the time of writing). Check Download dependencies and click OK.

  • Now open the Properties and set the gsslib parameter to "sspi"

Please note that there are many settings that can be changed for Kerberos. This article only gives the basics, read the PostgreSQL JDBC driver documentation for more information.

Set up a database connection

After we have created the driver we can create a connection using the new driver.

  • Click on [+] in the Databases tree and choose Create Database Connection
  • In the dialog that appears select the new driver, "PostgreSQL - SSO"
  • Fill in the database properties for Database Server and Database Port

Try to connect to see if the connection works.