| name | cis-azure-database-3.6 |
| description | Ensure the firewall does not allow all network traffic |
| category | cis-azure-database |
| version | 2.0.0 |
| author | cyberstrike-official |
| tags | ["cis","azure","cosmos-db","nosql"] |
| cis_id | 3.6 |
| cis_benchmark | CIS Microsoft Azure Database Services Benchmark v2.0.0 |
| tech_stack | ["azure"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
3.6 Ensure the firewall does not allow all network traffic (Automated)
Profile Applicability
Description
Do not allow all network traffic. Restrict access to specific IP addresses or ranges.
Rationale
Allowing all network traffic limits the effectiveness of a firewall.
Impact
Administrative effort to identify and maintain the list of IP addresses and ranges requiring access to the account.
Audit Procedure
Audit from Azure Portal
- Go to
Azure Cosmos DB.
- Select the name of an Azure Cosmos DB account.
- Under Settings, select Networking.
- Under
Public access, if Public network access is set to Selected networks, ensure 0.0.0.0 is not listed under Firewall > IPs.
- Repeat steps 1-4 for each account.
Audit from Azure CLI
Run the following command to list Azure Cosmos DB accounts:
az cosmosdb list
For each account, run the following command to get the list of allowed IP addresses:
az cosmosdb show --resource-group <resource-group> --name <cosmos-db> --query ipRules
Ensure that the response does not contain "0.0.0.0".
Audit from PowerShell
Run the following command to get Azure Cosmos DB accounts for a given resource group:
Get-AzCosmosDBAccount -ResourceGroupName <resource-group>
Run the following command to get the account with a given name:
$cosmosdb = Get-AzCosmosDBAccount -ResourceGroupName <resource-group> -Name <cosmos-db>
Run the following command to get the list of allowed IP addresses:
$cosmosdb.IpRules
Ensure that the response does not contain 0.0.0.0.
Repeat for each account.
Audit from Azure Policy
- Policy ID:
12339a85-a25c-4f17-9f82-4766f13f5c4c - Name: 'Azure Cosmos DB accounts should not allow traffic from all Azure data centers'
Expected Result
The IP rules should not contain , which would allow all network traffic.