Overview
Private endpoints limit network traffic to approved sources.
Rationale
For sensitive data, private endpoints allow granular control of which services can communicate with Cosmos DB and ensure that this network traffic is private. You set this up on a case by case basis for each service you wish to be connected.
Impact
Only whitelisted services will have access to communicate with the Cosmos DB.
Default Value
By default, Cosmos DB does not have private endpoints.
Remediation guidance
Remediate from Azure Portal
- Open the Cosmos DB account using the
Open in Azurebutton. - Select
Networking. - Select
Private access. - Click
+ Private Endpoint. - Provide a Name.
- Click
Next. - From the Resource type drop down, select
Microsoft.AzureCosmosDB/databaseAccounts. - From the Resource drop down, select the Cosmos DB account.
- Click
Next. - Provide appropriate Virtual Network details.
- Click
Next. - Provide appropriate DNS details.
- Click
Next. - Optionally provide Tags.
- Click
Next : Review + create. - Click
Create.
Service-wide remediation
Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.
Azure
Use management group or subscription Azure Policy assignments, remediation tasks where supported, landing-zone standards, and IaC modules so drift is prevented at scale.
Operational rollout
- Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
- Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
- Re-scan and track approved exceptions with an owner and expiry date.
Query logic
These are the stored checks tied to this control.
Azure Cosmos DB accounts without private endpoints
Connectors
Covered asset types
Expected check: eq []
{
cosmosDbAccounts(where: { privateEndpoints_SOME: null }) {
...AssetFragment
}
}
Microsoft Azure