Failed to connect to Azure PostgreSQL with SSL enabled from AzureDataStudio

MS Techie 2,701 Reputation points
2020-10-01T15:27:55.08+00:00

When i try to connect to Azure PostgreSQL with SSL enabled using AzureDataStudio , with SSL Mode=Verfiy-full, i get below error

root certificate file "C:\Users\mstechie\AppData\Roaming/postgresql/root.crt" does not exist
Either provide the file or change sslmode to disable server certificate verification.

i dont want to disable SSL mode , but want to connect using SSL enabled.

Please help
29690-postgres-ssl.png

Azure Database for PostgreSQL
0 comments No comments
{count} votes

Accepted answer
  1. MS Techie 2,701 Reputation points
    2020-10-02T13:35:37.95+00:00

    In case of database being Azure PostgreSQL PaaS and if we choose SSL mode = disable , it throws an error saying SSL required , since SSL is enabled by default on server. Of course we can disable it , but not recommended.

    if we choose the SSL mode = Allow ,(instead of Verify-full) , it does not ask for certificate.

    if we choose SSL mode = Require or SSL mode = Prefer , then also it does not ask for certificate and connects properly.

    if we choose SSL mode = Verify-CA or SSL mode = Verify-full , then it requires certificate and we have to give the local drive path of the BaltimoreCyberTrustRoot.crt.pem , downloaded from https://www.digicert.com/CACerts/BaltimoreCyberTrustRoot.crt.pem

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.