π Azure PostgreSQL Single Server Enforce SSL Connection is not set enabled π’
- Contextual name: π Single Server Enforce SSL Connection is not set enabled π’
- ID:
/ce/ca/azure/postgresql-database/single-server-enforce-ssl-connection
- Located in: π Azure PostgreSQL Database
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Cloud Conformity
- Internal
dec-x-995424b7
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-995424b7 | 2 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
Enable
SSL connection
onPostgreSQL
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.Auditβ
From Azure Portalβ
- 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, ensureEnforce SSL connection
is set toENABLED
.From Azure CLIβ
Ensure the output of the below command returns
Enabled
:az postgres server show --resource-group myresourcegroup --name <resourceGroupName> --query sslEnforcement
From PowerShellβ
Ensure the output of the below command returns Enabled:
Get-AzPostgreSqlServer -ResourceGroupName <ResourceGroupName > -ServerName <ServerName> | Select-Object SslEnforcement
... [see more](description.md)
Remediationβ
Remediationβ
From Azure Portalβ
- 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 onENABLED
to enforce SSL connections.- Click
Save
.From Azure CLIβ
Use the below command to
enforce ssl connection
forPostgreSQL
Database:az postgres server update --resource-group <resourceGroupName> --name <serverName> --ssl-enforcement Enabled
From PowerShellβ
Update-AzPostgreSqlServer -ResourceGroupName <ResourceGroupName > -ServerName <ServerName> -SslEnforcement Enabled