Why can't I connect to my Postgres server in Azure if SSL is not enabled in my application?

I get a connection failure when I try to connect to my postgres server in Azure from my application / client that does not have SSL.

Unable to connect to server: FATAL: SSL connection required. Specify SSL parameters and try again.

Is this a strong requirement? Is there a way I can get around this requirement?

+7
postgresql azure azure-database-postgresql
source share
2 answers

By default, the Azure database for PostgreSQL provides SSL connections between your server and your client applications to protect against MITM attacks (the man in the middle). This is to ensure the most reliable connection to your server.

Although not recommended, you can disable the SSL requirement to connect to your server if your client application does not support SSL. For more details, please check How to configure an SSL connection for your Postgres server in Azure. You can disable the required SSL connections from the portal or using the CLI. Please note that Azure does not recommend disabling SSL connectivity when connecting to your server.

+6
source share

Instead of circumventing this error and simply disabling SSL, you can also try simply enabling SSL by selecting a connection string:

"Server=SERVERNAME.postgres.database.azure.com; Port=5432;Database=DBNAME; User Id=DBUSER@SERVERNAME ; Password=PASSWORD; SslMode=Require"; 

Notice the SslMode=Require suffix at the end? This also works with Npgsql (assuming you use C #) to connect to the Azure database for Postgresql.

0
source share

All Articles