vscode-postgres icon indicating copy to clipboard operation
vscode-postgres copied to clipboard

When using "Show all databases" option, SSL setting is not honored.

Open ooobii opened this issue 1 year ago • 2 comments

Hello! I have a server connection configured that is set to "Show all databases", with the ssl property set to true.

  • When I try to expand into one of the databases, I receive an error saying there is no hba entry for the connection with "ssl: off".
  • If I update my connection to point to a specific database (instead of empty in the configuration JSON), I am able to open the database that failed to open in the previous step.

Can we have an update to make sure that SSL settings when "Show all databases" is being used is honored, or maybe am I doing something incorrectly?

Cheers! 😃

ooobii avatar Aug 16 '23 16:08 ooobii

The same here: SSL connection is required. Please specify SSL options and retry. However, in the connection setting there is "ssl": true.

KubaSzostak avatar Sep 05 '23 15:09 KubaSzostak

There is no difference to the plugin in how it creates the connection to the database - the only thing different would be which database it's connecting to.

When you specify the database, that will be part of the connection string... for the show all, it still needs to connect to a database, so it connects to the default postgres database where it gets the list from.

The pg_hba.conf file can restrict based off of how, who, and what you are connecting to. So likely there is not an entry in there that allows you to connect to the postgres database itself.

Borvik avatar Sep 05 '23 15:09 Borvik