Ensure public access is disabled for Azure PostgreSQL Server

MEDIUM

Description

Allowing unrestricted, public access to cloud services could open an application up to external attack. Disallowing this access is typically considered best practice.

Remediation

In Azure Console -

  1. Open the Azure Portal and go to Azure Database for PostgreSQL servers.
  2. Choose the PostgreSQL server you wish to edit.
  3. Under Networking, set Connectivity method to Public access (allowed IP addresses).
  4. Select save.

In Terraform -

  1. In the azurerm_postgresql_configuration resource, set public_network_access_enabled to false.

References:
https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/quickstart-create-server-portal
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_server

Policy Details

Rule Reference ID: AC_AZURE_0404
CSP: Azure
Remediation Available: Yes
Resource Category: Database
Resource Type: PostgreSQL

Frameworks