Control: 4.3.1 Ensure 'Enforce SSL connection' is set to 'ENABLED' for PostgreSQL Database Server
Description
It is recommended to enable SSL connection on PostgreSQL Servers. 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 attacks by encrypting the data stream between the server and application.
Remediation
From Console
- Login to Azure console and navigate to PostgreSQL Servers.
- For each database, go to
Settings
section from left pane. - Click on
Connection security
and go toSSL settings
. - For
Enforce SSL connection
, click on ENABLED.
From Command Line
Enable enforce ssl connection
for PostgreSQL Database
az postgres server update --resource-group <resourceGroupName> --name <serverName> --ssl-enforcement Enabled
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.cis_v140_4_3_1
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.cis_v140_4_3_1 --share
SQL
This control uses a named query:
postgres_sql_ssl_enabled