Ensure access to Azure SQL Servers is restricted within Azure Infrastructure via Azure SQL Firewall Rule

HIGH

Description

Allowing unrestricted, public access to cloud services creates a significant vulnerability, as it opens up the application to external attacks. When public access is enabled, without the implementation of proper firewall rules, your Azure SQL Servers are left exposed and unsecured, making them highly susceptible to unauthorized access, data breaches, and other malicious activities.

Remediation

In Azure Console -

  1. Open the Azure Portal and go to SQL servers.
  2. Choose the SQL server you wish to edit.
  3. Under Networking, Set Firewall rules for Public network access.
  4. Select Save

In Terraform -

  1. In the azurerm_mssql_firewall_rule resource, set start_ip_address and end_ip_address.

References:
https://learn.microsoft.com/en-us/azure/azure-sql/database/firewall-configure?view=azuresql
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_firewall_rule

Policy Details

Rule Reference ID: AC_AZURE_0580
CSP: Azure
Remediation Available: No
Resource Category: Database
Resource Type: SQL Server

Frameworks