If you leave your front door unlocked, someone can walk in and take your belongings. The same is true for data in the cloud: failing to secure it at rest (when stored) or in transit (when moving) leads directly to data breaches, regulatory fines, and loss of customer trust. For the DP-203 exam, you need to know exactly which Azure tools lock the door and which ones seal the envelope, and when to use each.
Jump to a section
A simple way to picture Secure Data at Rest and in Transit
12 filing cabinets sit in a locked office, each storing sensitive client contracts. The office itself sits inside a building with a security guard at the front desk, and the building is on a street with a police patrol car that passes every hour. That is "data at rest" — information stored somewhere, protected by layers of physical security.
Now, take one of those contracts and put it into a sealed, tamper-proof envelope. Hand it to a courier who carries it across town to a second locked office. The courier checks the recipient's ID before handing over the envelope, and the recipient signs a receipt. That is "data in transit" — information moving from one place to another, protected by encryption (the sealed envelope), identity verification (the ID check), and an audit trail (the receipt).
In the IT world, data at rest refers to files stored on a hard drive, a database, or cloud storage. Data in transit refers to that same data travelling across a network, such as when a user uploads a file from their laptop to a cloud server. The security guard, the locked office, and the patrol car map to access controls, encryption algorithms, and monitoring tools. The sealed envelope, ID check, and receipt map to network encryption protocols, authentication mechanisms, and logging. Without both kinds of protection, your data is vulnerable either while sitting still or while moving — and attackers will exploit whichever side you neglect.
Data security in Azure has two fundamental modes: protecting data at rest and protecting data in transit. Data at rest means any data stored persistently — on a disk, in a database, in a backup, or in a file share. Data in transit means data actively moving across a network — between a user's browser and a web server, between two Azure services, or between an on-premises data centre and the cloud.
Azure secures data at rest primarily through encryption. Encryption is the process of scrambling data using a secret key so that only someone with the correct key can read it. Think of it like a lockbox: you put the data in, turn the key, and the lockbox becomes unreadable gibberish to anyone else. Azure offers two types of encryption keys: platform-managed keys (PMKs), where Microsoft manages the lockbox for you automatically, and customer-managed keys (CMKs), where you control the key yourself, often using a hardware security module (HSM) — a dedicated physical device that stores keys in a tamper-proof enclosure.
Azure Storage Service Encryption (SSE) encrypts data at rest automatically for Azure Blob Storage, Azure Files, Azure Queue Storage, and Azure Table Storage. SSE uses 256-bit Advanced Encryption Standard (AES-256), which is the same encryption standard used by banks and governments. Azure SQL Database also encrypts data at rest through Transparent Data Encryption (TDE), which encrypts the entire database file on disk without requiring changes to the application. TDE can use a service-managed key or a customer-managed key stored in Azure Key Vault.
Azure Key Vault is a central cloud service for storing and managing secrets like encryption keys, passwords, and certificates. It integrates with other Azure services to handle key rotation (regularly replacing old keys with new ones), key expiration, and access auditing. For DP-203, you should know that Key Vault supports two tiers: Standard (software-protected keys) and Premium (hardware-protected keys using HSMs).
Data in transit is protected using different encryption protocols. Transport Layer Security (TLS) is the primary protocol for encrypting data moving over the internet or internal networks. When you visit a website using HTTPS, your browser and the web server negotiate a TLS session, exchanging digital certificates to verify each other's identity, then encrypt all data exchanged. Azure enforces TLS 1.2 or later for all communications between its services and clients. Internet Protocol Security (IPsec) is another protocol used for site-to-site VPN connections between an on-premises network and Azure. IPsec encrypts the entire IP packet, wrapping it in a secure tunnel.
Azure also provides encryption at the network layer using Virtual Network encryption and Azure ExpressRoute. ExpressRoute is a private, dedicated network connection from your on-premises data centre to Azure that bypasses the public internet entirely. Even though ExpressRoute avoids the internet, Microsoft still recommends enabling encryption over the connection, because private circuits can still be physically tapped.
Beyond encryption, access control is a critical part of securing data at rest and in transit. Azure uses Role-Based Access Control (RBAC) to define who can read, write, or delete data. RBAC is like a door key system: you assign roles (like "Storage Blob Data Reader") to users or groups, and those roles determine which data they can access. Managed identities are another important concept: they give an Azure service (like a virtual machine or an Azure Function) an automatically managed identity in Microsoft Entra ID, so the service can authenticate to other Azure services without storing credentials.
Firewalls and network security groups (NSGs) add another layer. A firewall is like a bouncer at a club: it checks every incoming request and only allows traffic from approved IP addresses or networks. NSGs are simpler filters that control traffic between Azure resources inside a virtual network. For example, you can create an NSG rule that says "only allow traffic from the corporate VPN IP range to the SQL database."
Finally, Azure Policy and Microsoft Defender for Cloud help enforce and monitor security configurations. Azure Policy can automatically apply encryption requirements to all new storage accounts, so no one can accidentally create an unencrypted resource. Microsoft Defender for Cloud scans your environment, detects misconfigurations (like a storage account with public access enabled), and alerts you to threats like unusual access patterns or potential data exfiltration.
For DP-203, you need to understand the difference between encryption at rest (always on by default for most Azure storage) and encryption in transit (often optional, but must be enabled explicitly for some services). You also need to know how to choose between platform-managed and customer-managed keys, and when to use Azure Key Vault, RBAC, firewalls, and NSGs together to create a defence-in-depth strategy — that is, multiple layers of security so that if one layer fails, another still protects the data.
Assess the data classification
Identify whether the data is sensitive (e.g., personal data, financial records) or public. This determines whether you need customer-managed keys, which provide more control but require operational overhead, or if platform-managed keys suffice.
Choose encryption key management method
Decide between platform-managed keys (default, Microsoft rotates keys) and customer-managed keys (you create and rotate keys in Azure Key Vault). For compliance requiring FIPS 140-2 Level 3, select Azure Key Vault Premium with HSM-backed keys.
Enable encryption at rest for each data store
For Azure Storage, encryption is automatic. For Azure SQL Database, you must enable Transparent Data Encryption (TDE) manually. For Azure Synapse Analytics, enable TDE on the dedicated SQL pool. Use the Azure portal, PowerShell, or Azure CLI.
Configure encryption in transit for all connections
Set the minimum TLS version to 1.2 on Azure Storage accounts, Azure SQL logical servers, and Azure Synapse workspaces. If using custom applications, ensure they connect using HTTPS with TLS 1.2. For site-to-site VPN, configure IPsec with strong ciphers.
Implement access control with RBAC and managed identities
Assign the appropriate built-in data plane roles (e.g., Storage Blob Data Contributor) to users or managed identities. Use system-assigned managed identities for Azure services to avoid hard-coding keys or passwords. Restrict network access using storage firewalls and service endpoints.
Monitor and audit security configuration
Enable diagnostic settings to send access logs from Storage, Key Vault, and SQL Database to Log Analytics. Use Microsoft Defender for Cloud to receive alerts on misconfigurations (e.g., storage account with public access) and enable automatic remediation with Azure Policy.
Imagine you are a data engineer at a healthcare company migrating patient records to Azure. The compliance team insists that all Protected Health Information (PHI) must be encrypted both at rest and in transit, and access must be logged. You set up the following architecture.
First, you create an Azure Storage account to store the patient data. By default, Azure Storage Service Encryption (SSE) with Microsoft-managed keys encrypts all data at rest. But the compliance requirement demands customer-managed keys, so you create an Azure Key Vault instance with the Premium tier, generate a key using a hardware security module (HSM), and configure the storage account to use that key. You also enable key rotation — every 90 days, Key Vault automatically creates a new key to replace the old one.
Next, you configure encryption in transit. The application that writes patient data runs on an Azure Virtual Machine. You ensure that the application uses HTTPS (TLS 1.2 minimum) when connecting to the storage account. You also set up a firewall on the storage account that only allows traffic from the virtual machine's private IP address inside the virtual network. To be even more restrictive, you add a service endpoint — a secure connection from the virtual network directly to the storage account, bypassing the public internet entirely.
For the database, you migrate the patient records to Azure SQL Database. You enable Transparent Data Encryption (TDE) with customer-managed keys from the same Key Vault. You also configure a server-level firewall rule that blocks all traffic except from the application tier's IP range. To encrypt connections to the database, you enforce TLS 1.2 by setting the "Minimum TLS version" property on the Azure SQL logical server.
Now, access control. You create a managed identity for the virtual machine and grant it the "Storage Blob Data Contributor" role on the storage account. This means the VM can read and write blobs without any stored passwords — the identity automatically authenticates through Microsoft Entra ID. You assign the "SQL DB Contributor" role to the same identity so it can query the database. You also set up an Azure Policy called "Require encryption at rest for storage accounts" and apply it to the entire subscription. Any new storage account created in the future will automatically get encryption enabled, preventing accidental misconfiguration.
Finally, you enable Azure Monitor and Microsoft Defender for Cloud. Defender for Cloud alerts you if someone tries to access the storage account from an unexpected location, or if a key in Key Vault is nearing expiration. You set up an action group that sends an email to the security team when such an alert fires. You also configure diagnostic settings to send all access logs for the storage account, Key Vault, and SQL database to a Log Analytics workspace for audit review.
A typical day: a senior developer asks for read-only access to the patient data for a research query. You do not give them the storage account key or the database password. Instead, you assign their Microsoft Entra ID user account the "Storage Blob Data Reader" role and the "DB Datareader" role. They authenticate via Azure CLI, and all their actions are logged. Six months later, during a compliance audit, you can show the auditor exactly who accessed what, when, and from which IP address.
DP-203 exam objective 3.1 — "Secure, monitor, and optimize data storage and processing" — includes questions on encryption at rest and in transit, access control, and monitoring for security. The exam expects you to know exactly which Azure service provides each type of protection and when to use customer-managed keys versus platform-managed keys.
The exam frequently tests these specific topics:
Storage Service Encryption (SSE) is enabled by default for all Azure Storage accounts (Blob, Files, Queue, Table). There is no way to disable it. This is a common trick: the exam may present a scenario where encryption is not configured, but you must know it is always on.
Transparent Data Encryption (TDE) for Azure SQL Database and Azure Synapse Analytics is not enabled by default for older databases. You must explicitly enable it. This is another trick: the question may describe a database that is unencrypted, and the correct answer is to enable TDE.
Azure Key Vault supports both software-protected keys (Standard tier) and hardware-protected keys (Premium tier with HSM). The exam may ask which tier to use for regulatory compliance requiring FIPS 140-2 Level 2 or Level 3 validation.
Encryption in transit: the exam expects you to enforce TLS 1.2 or higher for all connections to Azure Storage, Azure SQL Database, and Azure Synapse. You configure this in the "Minimum TLS version" setting on the resource. If a question mentions a security concern with older clients using TLS 1.0, the answer is to set the minimum TLS version to 1.2.
Role-Based Access Control (RBAC) for data plane operations: you need the built-in roles "Storage Blob Data Reader", "Storage Blob Data Contributor", "SQL DB Datareader", and "SQL DB Datawriter". The exam may ask which role to assign for a developer who needs to read data but not modify it.
Managed identities: the exam loves questions where a service (like Azure Data Factory or an Azure VM) needs to access secure storage without storing credentials. The correct answer is to enable a system-assigned managed identity and grant it the appropriate RBAC role.
Firewalls and virtual network service endpoints: the exam tests when to use a storage account firewall (restrict by IP) versus a service endpoint (restrict to a virtual network). A service endpoint is more secure because it uses the Azure backbone network instead of the public internet.
Azure Policy: the exam may ask how to enforce encryption company-wide. The answer is to create a policy that audits or denies storage accounts without encryption. It may also ask how to automatically remediate — that is, deploy a policy with a remediation task that turns on encryption for non-compliant resources.
Common traps in the exam:
Questions that ask for "the most secure option" often expect customer-managed keys with a firewall and managed identity, not just the default settings.
Questions that say "all traffic must be encrypted in transit" — if the scenario includes an ExpressRoute connection, the trap is that ExpressRoute does not automatically encrypt traffic. You must still enable encryption (like using IPsec over the ExpressRoute circuit).
Questions about encryption key rotation: the exam may ask who is responsible for rotating customer-managed keys. The answer is the customer (you), not Microsoft. For platform-managed keys, Microsoft handles rotation automatically.
Questions that mix up encryption at rest and in transit: read the question carefully. If the data is "being uploaded from a client application", that is in transit. If the data is "stored in a database", that is at rest. The exam will deliberately use ambiguous language to trip you up.
Azure Storage Service Encryption (SSE) encrypts all data at rest automatically using AES-256, and it cannot be disabled.
You control encryption keys for data at rest by choosing platform-managed keys (Microsoft handles them) or customer-managed keys (you manage them in Azure Key Vault).
Data in transit is protected by enforcing TLS 1.2 or higher on Azure Storage, Azure SQL Database, and Azure Synapse connections.
ExpressRoute does not automatically encrypt data; you must enable IPsec or MACsec over the dedicated circuit for full protection.
Role-Based Access Control (RBAC) for data plane operations uses specific roles like 'Storage Blob Data Reader' and 'SQL DB Datareader'.
Managed identities let Azure services authenticate to other Azure services without storing any credentials, drastically reducing credential theft risk.
These come up on the exam all the time. Here's how to tell them apart.
Platform-Managed Key (PMK)
Microsoft automatically rotates keys
No operational overhead for key management
Suitable for standard compliance requirements
Customer-Managed Key (CMK)
You control key lifecycle, rotation, and access
Requires manual processes or automation scripts
Needed for regulatory standards like HIPAA or GDPR when key separation is mandated
Storage Service Encryption (SSE)
Applies to Azure Blob, Files, Queue, and Table storage
Always on by default, cannot be disabled
Encrypts at the page/blob level
Transparent Data Encryption (TDE)
Applies to Azure SQL Database and Azure Synapse Analytics
Must be manually enabled (not default)
Encrypts the entire database file on disk
Service Endpoint
Exposes Azure service to a virtual network via public IP
Traffic travels over the Azure backbone network
Less expensive, simpler configuration
Private Endpoint
Gives Azure resource a private IP inside your virtual network
Traffic never touches the public internet
More secure, recommended for sensitive data
System-Assigned Managed Identity
Tied directly to a single Azure resource lifecycle
Deleted automatically when the resource is deleted
One identity per resource, simple for single-service scenarios
User-Assigned Managed Identity
Independent Azure resource that can be shared across multiple services
Persists even if associated resources are deleted
Useful for complex architectures where multiple services need the same identity
TLS 1.2
Used for encrypting application-layer traffic (e.g., HTTPS, SQL connections)
Operates between client and server applications
Standard for internet and internal network communications
IPsec
Used for encrypting entire IP packets in site-to-site VPN tunnels
Operates at the network layer between gateways
Commonly used for on-premises to Azure VPN connections
Azure Policy
Enforces compliance rules on resource configuration
Can deny creation of non-compliant resources (e.g., storage without encryption)
Operates at the resource management plane
RBAC
Controls access to actions and data after resources exist
Assigns specific roles (e.g., Reader, Contributor) to users or services
Operates at both management and data plane
Mistake
Once I enable encryption at rest, my data is completely secure — I don't need any other security measures.
Correct
Encryption at rest alone does not protect against unauthorised access to the decryption keys, weak access controls, or threats like SQL injection that expose the data while the database is running. You still need RBAC, firewalls, and monitoring.
Beginners often treat encryption as a single magic bullet, not realising that if an attacker gains access to the decryption key or credentials, the encryption becomes useless.
Mistake
Azure Storage encryption at rest is optional, so I must remember to enable it manually.
Correct
Azure Storage Service Encryption (SSE) is enabled by default for all new and existing storage accounts. You cannot turn it off. However, you can choose between Microsoft-managed and customer-managed keys.
This misconception comes from experience with on-premises systems, where encryption is often a manual step. Azure defaults are different, and exam questions deliberately test this.
Mistake
If I use ExpressRoute, I don't need to encrypt data in transit because the connection is private.
Correct
ExpressRoute uses a private dedicated circuit, but the circuit itself can still be physically intercepted. Microsoft recommends enabling encryption (such as IPsec or MACsec) over ExpressRoute to protect against physical layer attacks.
People confuse 'private network' with 'secure network'. Privacy means no one else is on the same circuit; security means the data is scrambled even if someone taps the wire.
Mistake
Using the same key for encryption at rest and encryption in transit simplifies management and is just as secure.
Correct
Encryption at rest and encryption in transit use different protocols and keys. At rest uses AES-256 with keys stored in Key Vault; in transit uses TLS with a separate certificate or pre-shared key. Reusing keys increases attack surface because compromising one key exposes both states.
Newcomers think 'more encryption is better' without understanding that separating keys for different purposes (key separation) is a security best practice.
Mistake
Managed identities are the same as service principals — I can create one manually and assign it to a service.
Correct
Managed identities are automatically managed by Azure in Microsoft Entra ID and cannot be created manually. A service principal must be manually created and credentials managed. Managed identities are simpler and more secure because Azure rotates the credential automatically.
The terminology is confusing: both are identities used by services, but the management model differs. The exam tests the distinction between 'system-assigned managed identity', 'user-assigned managed identity', and 'service principal'.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Azure Storage Service Encryption (SSE) is automatically enabled for all Azure Storage accounts. You cannot disable it. You can optionally change from platform-managed keys to customer-managed keys.
The Standard tier uses software-protected keys stored in Key Vault. The Premium tier uses hardware security modules (HSMs) to store keys, providing FIPS 140-2 Level 2 validated key protection. Premium is required for compliance scenarios demanding hardware-based key isolation.
Yes. ExpressRoute provides a private circuit but does not automatically encrypt the data. You must configure IPsec or MACsec encryption over the ExpressRoute connection if you need data in transit encryption.
Enable a system-assigned managed identity on the virtual machine, then assign the Storage Blob Data Reader (or needed) RBAC role to that managed identity on the storage account. The VM authenticates automatically through Microsoft Entra ID without any stored secrets.
Yes. You can use a customer-managed key stored in Azure Key Vault for TDE. Enable TDE on the database, then configure the SQL logical server to use a key from Key Vault. You are responsible for rotating and managing that key.
Azure Policy can enforce encryption at rest across all resources in a subscription. For example, you can create a policy to deny creation of storage accounts without encryption, or to audit existing storage accounts and trigger remediation to enable encryption automatically.
You've finished Secure Data at Rest and in Transit. Continue through the DP-203 study guide to build a complete picture of the exam.
Done with this chapter?