| name | cis-azure-database-3.1 |
| description | Ensure That 'Firewalls & Networks' Is Limited to Use Selected Networks Instead of All Networks |
| category | cis-azure-database |
| version | 2.0.0 |
| author | cyberstrike-official |
| tags | ["cis","azure","cosmos-db","nosql"] |
| cis_id | 3.1 |
| cis_benchmark | CIS Microsoft Azure Database Services Benchmark v2.0.0 |
| tech_stack | ["azure"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
3.1 Ensure That 'Firewalls & Networks' Is Limited to Use Selected Networks Instead of All Networks (Automated)
Profile Applicability
Description
Limiting your Cosmos DB to only communicate on whitelisted networks lowers its attack footprint.
Rationale
Selecting certain networks for your Cosmos DB to communicate restricts the number of networks including the internet that can interact with what is stored within the database.
Impact
WARNING: Failure to whitelist the correct networks will result in a connection loss. If using NoSQL / Table / Graph APIs for Cosmos DB Data Explorer end user IPs must be allowed. Other APIs are proxied and shouldn't require end user IPs.
WARNING: Changes to Cosmos DB firewalls may take up to 15 minutes to apply. Ensure that sufficient time is planned for remediation or changes to avoid disruption.
Audit Procedure
Audit From Azure Portal
- Open the portal menu.
- Select the Azure Cosmos DB blade
- Select a Cosmos DB to audit.
- Select Networking.
- Under
Public network access, ensure Selected networks is selected.
- Under
Virtual networks, ensure appropriate virtual networks are configured.
Audit From Azure CLI
Retrieve a list of all CosmosDB database names:
az cosmosdb list
For each database listed, run the following command:
az cosmosdb show <database id>
For each database, ensure that isVirtualNetworkFilterEnabled is set to true.
Audit From Azure Policy
- Policy ID:
862e97cf-49fc-4a5c-9de4-40d4e2e7c8eb - Name: 'Azure Cosmos DB accounts should have firewall rules'
Expected Result
isVirtualNetworkFilterEnabled should be set to true and Public network access should be set to Selected networks with appropriate virtual networks configured.
Remediation
Remediate From Azure Portal
- Open the portal menu.
- Select the Azure Cosmos DB blade.
- Select a Cosmos DB account to audit.