Ensure that public access from Microsoft Azure cloud services to Azure PostgreSQL flexible database servers is disabled in order to secure access to your PostgreSQL databases.
Enabling access from Microsoft Azure cloud services in the firewall configuration of the PostgreSQL flexible server allows connections from all Azure cloud resources, including those from other subscriptions. While this configuration may be suitable in certain scenarios it is generally not recommended as it may pose security risks. To implement more granular access controls, you can set up up firewall rules that permit connections only from specific network ranges or by implementing VNet rules to allow access from designated virtual networks.
Audit
To determine if public access from Azure services to your PostgreSQL flexible database servers is disabled, perform the following operations:
Remediation / Resolution
To disable public access from Microsoft Azure services to your PostgreSQL flexible database servers, perform the following operations:
References
- Azure Official Documentation
- Firewall rules in Azure Database for PostgreSQL - Flexible Server
- Networking
- Security Control: Network security
- Azure Command Line Interface (CLI) Documentation
- az postgres flexible-server list
- az postgres flexible-server firewall-rule list
- az postgres flexible-server firewall-rule delete