Information
Enable SSL connection on PostgreSQL Servers.
Rationale:
SSL connectivity helps to provide a new layer of security, by connecting database server to client applications using Secure Sockets Layer (SSL). Enforcing SSL connections between database server and client applications helps protect against 'man in the middle' attacks by encrypting the data stream between the server and application.
Solution
From Azure Console
Login to Azure Portal using https://portal.azure.com
Go to Azure Database for PostgreSQL server
For each database, click on Connection security
In SSL settings.
Click on ENABLED to Enforce SSL connection
Using Azure Command Line Interface 2.0
Use the below command to enforce ssl connection for PostgreSQL Database.
az postgres server update --resource-group <resourceGroupName> --name <serverName> --ssl-enforcement Enabled