Check ID: cosmosdb_account_use_private_endpoints
Provider: Azure
Service: cosmosdb
Severity: HIGH
Categories: internet-exposed, trust-boundaries
Resource type: microsoft.documentdb/databaseaccounts

What this check verifies

Azure Cosmos DB accounts are assessed for private endpoint connections that keep data-plane traffic on private IPs within authorized virtual networks.

Risk

Without private endpoints, access may use public endpoints or broad IP rules, enabling:
  • interception and credential replay
  • unauthorized queries and data exfiltration
  • lateral movement via exposed paths
This degrades confidentiality and can impact availability under abusive traffic.

Recommendation

Adopt Azure Private Link for Cosmos DB:
  • Create private endpoints for required subresources
  • Link a private DNS zone so clients resolve to private IPs
  • Set PublicNetworkAccess=Disabled; keep tight firewall rules
  • Allow only needed VNets/subnets; apply NSGs
  • Enforce least privilege and monitor access patterns

Remediation

az network private-endpoint create —name <example_resource_name> —resource-group <example_resource_name> —vnet-name <example_resource_name> —subnet <example_resource_name> —private-connection-resource-id /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<example_resource_name>/providers/Microsoft.DocumentDB/databaseAccounts/<example_resource_name> —group-ids Sql —connection-name <example_resource_name>

References

Where this check fires

This check runs on every scheduled scan against your Azure account. Findings appear at Cloud Security → Findings filterable by Check ID = cosmosdb_account_use_private_endpoints. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to Azure checks