🔒 Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901 aws-aif-c01
Guided DP-420 Domain 5
Domain 5 — Module 3 of 7 43%
24 of 28 overall

DP-420 Study Guide

Domain 1: Design and Implement Data Models

  • Cosmos DB — The Big Picture Free
  • Designing Your Data Model Free
  • Partition Key Strategy Free
  • Synthetic and Hierarchical Partition Keys Free
  • Relationships — Embedding vs Referencing Free
  • SDK Connectivity and Client Configuration Free
  • SDK CRUD Operations and Transactions Free
  • SQL Queries in Cosmos DB Free
  • SDK Query Pagination and LINQ Free
  • Server-Side Programming Free
  • Transactions in Practice Free

Domain 2: Design and Implement Data Distribution

  • Global Replication and Failover
  • Consistency Levels: Five Choices, Real Trade-Offs
  • Multi-Region Writes and Conflict Resolution

Domain 3: Integrate and Move Data

  • Change Feed with Azure Functions and Processors
  • Analytical Workloads: Synapse Link and Fabric Mirroring
  • Data Movement: ADF, Kafka, and Spark Connectors

Domain 4: Optimize Query and Operation Performance

  • Indexing Policies: Range, Spatial, and Composite
  • Request Units and Query Cost Optimization
  • Integrated Cache and Dedicated Gateway
  • Change Feed Patterns: Materialized Views and Estimator

Domain 5: Maintain an Azure Cosmos DB Solution

  • Monitoring: Metrics, Logs, and Alerts
  • Backup and Restore: Periodic vs Continuous
  • Network Security: Firewalls, VNets, and Private Endpoints
  • Data Security: Encryption, Keys, and RBAC
  • Cost Optimization: Throughput Modes and RU Strategy
  • DevOps: Infrastructure as Code and Deployments
  • Exam Strategy and Cross-Domain Review

DP-420 Study Guide

Domain 1: Design and Implement Data Models

  • Cosmos DB — The Big Picture Free
  • Designing Your Data Model Free
  • Partition Key Strategy Free
  • Synthetic and Hierarchical Partition Keys Free
  • Relationships — Embedding vs Referencing Free
  • SDK Connectivity and Client Configuration Free
  • SDK CRUD Operations and Transactions Free
  • SQL Queries in Cosmos DB Free
  • SDK Query Pagination and LINQ Free
  • Server-Side Programming Free
  • Transactions in Practice Free

Domain 2: Design and Implement Data Distribution

  • Global Replication and Failover
  • Consistency Levels: Five Choices, Real Trade-Offs
  • Multi-Region Writes and Conflict Resolution

Domain 3: Integrate and Move Data

  • Change Feed with Azure Functions and Processors
  • Analytical Workloads: Synapse Link and Fabric Mirroring
  • Data Movement: ADF, Kafka, and Spark Connectors

Domain 4: Optimize Query and Operation Performance

  • Indexing Policies: Range, Spatial, and Composite
  • Request Units and Query Cost Optimization
  • Integrated Cache and Dedicated Gateway
  • Change Feed Patterns: Materialized Views and Estimator

Domain 5: Maintain an Azure Cosmos DB Solution

  • Monitoring: Metrics, Logs, and Alerts
  • Backup and Restore: Periodic vs Continuous
  • Network Security: Firewalls, VNets, and Private Endpoints
  • Data Security: Encryption, Keys, and RBAC
  • Cost Optimization: Throughput Modes and RU Strategy
  • DevOps: Infrastructure as Code and Deployments
  • Exam Strategy and Cross-Domain Review
Domain 5: Maintain an Azure Cosmos DB Solution Premium ⏱ ~14 min read

Network Security: Firewalls, VNets, and Private Endpoints

Secure Cosmos DB network access with IP firewall rules, VNet service endpoints, Private Link/private endpoints, and CORS configuration — including when to use each approach.

Securing the front door

☕ Simple explanation

Think of network security as the locks on your database’s front door. IP firewall is a guest list — only listed IP addresses can enter. VNet service endpoints keep traffic on Microsoft’s private highway. Private endpoints bring the door inside your own building — no one on the internet can even see it exists.

Cosmos DB provides multiple layers of network security, each offering different levels of isolation:

  • IP firewall: Allow/deny access based on source IP addresses.
  • VNet service endpoints: Restrict access to specific Azure Virtual Networks.
  • Private endpoints: Access Cosmos DB via a private IP address within your VNet — no public internet exposure.
  • CORS: Control which web domains can make browser-based API calls.

Marcus’s security requirements

⚙️ Marcus at FinSecure must meet SOC 2 security controls:

  • Production databases accessible only from the application VNet (no public internet)
  • Development databases accessible from the office IP range
  • Azure portal access for emergency troubleshooting
  • No direct browser access to production data

IP firewall rules

The simplest network restriction — allow specific IP addresses or ranges:

# Allow office IP range and Azure portal
az cosmosdb update --name finsecure-dev \
  --resource-group rg-finsecure \
  --ip-range-filter "203.0.113.0/24,104.42.195.92"
SettingDescription
Empty IP filterAll public IPs allowed (default)
Specific IPs/rangesOnly listed IPs can connect
104.42.195.92Legacy Azure portal IP (use “Add Azure Portal Middleware IPs” instead)
0.0.0.0Accept connections from within Azure datacentres
💡 Exam tip: Azure portal access exception

When you enable IP firewall rules, you may lose Azure portal access to your Cosmos DB account’s Data Explorer. To keep portal access, either:

  1. Use the “Add Azure Portal Middleware IPs” option in the portal (recommended — adds the current required IPs automatically), or
  2. Check the “Allow access from Azure portal” checkbox in the portal UI

Note: The old portal IP 104.42.195.92 is now legacy. The portal has transitioned to new Middleware IP addresses. The exam tests the concept — “after enabling IP firewall, the developer can no longer browse data in the portal” → add the portal exception.

VNet service endpoints

Restrict access to specific Azure Virtual Networks — traffic stays on Microsoft’s backbone:

# Enable service endpoint on the subnet
az network vnet subnet update \
  --resource-group rg-finsecure \
  --vnet-name vnet-production \
  --name subnet-apps \
  --service-endpoints "Microsoft.AzureCosmosDB"

# Configure Cosmos DB to accept from this subnet
az cosmosdb network-rule add \
  --name finsecure-cosmos \
  --resource-group rg-finsecure \
  --vnet-name vnet-production \
  --subnet subnet-apps

Key characteristics:

  • Traffic stays on Microsoft’s backbone network (not the public internet)
  • The Cosmos DB public endpoint is still used, but only from allowed subnets
  • Quick to set up — no DNS changes needed
  • Cannot extend to on-premises networks

Private endpoints (Private Link)

The most secure option — Cosmos DB gets a private IP address inside your VNet:

# Create a private endpoint
az network private-endpoint create \
  --name pe-cosmos-prod \
  --resource-group rg-finsecure \
  --vnet-name vnet-production \
  --subnet subnet-data \
  --private-connection-resource-id "/subscriptions/.../databaseAccounts/finsecure-cosmos" \
  --group-ids "Sql" \
  --connection-name "cosmos-connection"

Key characteristics:

  • Cosmos DB accessible via a private IP (e.g., 10.0.1.5) inside your VNet
  • Public endpoint can be disabled entirely
  • Works with on-premises via VPN/ExpressRoute
  • Requires DNS configuration (private DNS zone or custom DNS)

Network isolation comparison

FeatureIP FirewallVNet Service EndpointsPrivate Endpoints
Traffic pathPublic internet (filtered)Microsoft backbonePrivate network only
Public endpointUsed (filtered by IP)Used (filtered by subnet)Can be disabled entirely
On-premises access✅ Via public IP❌ Azure VNets only✅ Via VPN/ExpressRoute
DNS changesNoneNoneRequired (private DNS zone)
Setup complexityLowMediumHigh
Security levelBasicMediumHighest
CostFreeFreePer-hour + data processing

CORS (Cross-Origin Resource Sharing)

CORS controls which web domains can make direct browser-to-Cosmos-DB API calls:

# Allow a specific web app to call Cosmos DB from the browser
az cosmosdb update --name finsecure-cosmos \
  --resource-group rg-finsecure \
  --cors "https://app.finsecure.com"

When CORS matters: Only for browser-based applications that call the Cosmos DB REST API directly. Server-side applications (APIs, Functions) don’t need CORS.

💡 Exam tip: combine multiple layers

In production, you typically combine multiple layers:

  • Private endpoints for application access (highest security)
  • IP firewall with portal exception for emergency admin access
  • Disable public endpoint when private endpoints are the only access method

The exam may present a scenario requiring both private endpoint access for apps AND portal access for admins — the answer is private endpoints + IP firewall exception for the portal.

🎬 Video walkthrough

🎬 Video coming soon

Network Security — DP-420 Module 24

Network Security — DP-420 Module 24

~14 min

Flashcards

Question

What is the difference between VNet service endpoints and private endpoints?

Click or press Enter to reveal answer

Answer

Service endpoints: traffic stays on Microsoft backbone but uses the public endpoint (filtered by subnet). Private endpoints: Cosmos DB gets a private IP inside your VNet, public endpoint can be disabled entirely. Private endpoints are more secure and work with on-premises via VPN/ExpressRoute.

Click to flip back

Question

What happens to Azure portal Data Explorer access when you enable IP firewall?

Click or press Enter to reveal answer

Answer

Portal access may be blocked unless you add the portal Middleware IPs (use the 'Add Azure Portal Middleware IPs' button) or enable 'Allow access from Azure portal'. The legacy IP 104.42.195.92 has been replaced by new Middleware addresses.

Click to flip back

Question

Can private endpoints work with on-premises networks?

Click or press Enter to reveal answer

Answer

Yes — private endpoints assign a private IP inside your VNet. On-premises networks can reach this IP via VPN or ExpressRoute. VNet service endpoints cannot reach on-premises — they only work within Azure VNets.

Click to flip back

Knowledge Check

Knowledge Check

Marcus needs to ensure FinSecure's production Cosmos DB is only accessible from the application VNet with no public internet exposure. Which approach should he use?

Knowledge Check

After enabling IP firewall on the dev Cosmos DB account, a developer can no longer access Data Explorer in the Azure portal. What's the fix?


Next up: Data Security — encryption at rest, customer-managed keys, RBAC, resource tokens, and Always Encrypted for protecting your data.

← Previous

Backup and Restore: Periodic vs Continuous

Next →

Data Security: Encryption, Keys, and RBAC

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.