Search code examples
postgresql-11postgresql-12azure-postgresql

Connect to Azure PostgreSQL using Azure Data Studio with SSL enabled


When i try to connect to Azure PostgreSQL with SSL enabled using Azure Data Studio , 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 use SSL. enter image description herePlease help


Solution

  • 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 path of the certificate as shown below enter image description here