Description:
This check verifies that Azure Cosmos DB accounts use Private Endpoints to provide secure connectivity over the Azure Private Link service. Private Endpoints assign a private IP address from a virtual network (VNet), allowing access to Cosmos DB without exposing traffic to the public internet.
Rationale:
By default, Azure Cosmos DB can be accessed through public endpoints. Although access can be controlled using firewalls and network rules, public endpoints still increase the attack surface. Private Endpoints provide secure, private connectivity between Azure resources and Cosmos DB over Microsoft's backbone network, reducing the risk of unauthorized access and data exposure.
Impact:
Reduces exposure of Cosmos DB accounts to the public internet.
Minimizes the risk of unauthorized access and data exfiltration.
Enhances network security through private connectivity.
Supports compliance requirements for data protection and network isolation.
Improves security posture by eliminating dependency on public IP-based access controls.
Default Value:
By default, Azure Cosmos DB accounts are accessible through public endpoints. Private Endpoints must be explicitly configured and associated with a Virtual Network.
Remediation:
Test Plan:
Using Azure Portal:
Sign in to the Azure Portal.
Navigate to Azure Cosmos DB.
Select the Cosmos DB account.
Under Settings, select Networking.
Review the Public network access configuration.
Select the Private Endpoint Connections tab.
Verify whether one or more approved private endpoints exist.
Confirm that applications access Cosmos DB through the private endpoint.
Implementation steps:
Using Azure Portal:
Sign in to the Azure Portal.
Navigate to Azure Cosmos DB.
Select the affected Cosmos DB account.
Select Networking.
Under Private Endpoint Connections, click + Private Endpoint.
Configure:
Subscription
Resource Group
Virtual Network
Subnet
Review and create the Private Endpoint.
Approve the connection if required.
Validate DNS resolution using Azure Private DNS Zones.
Once connectivity is confirmed, disable public network access if business requirements allow.
Disable Public Access (Recommended)
Navigate to Networking.
Under Public Network Access, select Disabled.
Save changes.
Validate application connectivity through the Private Endpoint.
Backout Plan:
Using Azure Portal:
Navigate to the Cosmos DB account.
Select Networking.
Re-enable Public Network Access if application connectivity is impacted.
Remove or disconnect the Private Endpoint if required.
Validate application access and functionality.
References: