Skill 2 · 25–30%

Secure storage, databases, and networking

The heaviest domain on the exam at 25–30%, and the broadest. It is really three syllabuses stapled together — storage, databases and networking — so treat it as three study sessions rather than one.

Two ideas run through everything here. Close the public path — private endpoints, disabled public network access, firewalls that default to deny. And stop using shared secrets — Microsoft Entra authorisation instead of account keys, managed identities instead of connection strings, user delegation SAS instead of account SAS. When two answers both technically work, the one that does one of those two things is the keyed one.

2.1 Securing storage accounts

Encryption, which is mostly already done for you

  • Storage Service Encryption is always on, 256-bit AES, and cannot be disabled.
  • Customer-managed keys (CMK) in Key Vault or Managed HSM replace the Microsoft-managed key for blobs and files. They require the vault to have soft delete and purge protection enabled, and the storage account to have an identity with key permissions.
  • Infrastructure encryption adds a second, independent 256-bit AES layer beneath the first — "double encryption". It can only be chosen when the account is created, never afterwards.
  • Encryption scopes apply a different key to an individual container or blob within the same account.

Authorising access — the part that is actually tested

MethodHow it worksRevoked by
Microsoft Entra ID preferredAzure RBAC data roles — Storage Blob Data Reader / Contributor / Owner, Storage Queue Data Reader, and so on. Works with managed identities, PIM and Conditional Access.Removing the role assignment
Shared keyOne of the two 512-bit account keys. Full control of the entire account, with no identity attached and nothing useful in the logs.Rotating the key — which breaks every other consumer of it
User delegation SASA SAS signed with a Microsoft Entra user delegation key rather than the account key. Blob service only. Maximum lifetime 7 days.Revoking the user delegation key — immediate, and does not touch account keys
Service SASSigned with an account key, scoped to one service. Can be bound to a stored access policy on the container.Deleting or editing the stored access policy, or rotating the key
Account SASSigned with an account key, can span services and includes service-level operations. The broadest and riskiest.Rotating the account key. Nothing else.
Anonymous public readContainer or blob level, if allowBlobPublicAccess is true.Setting allowBlobPublicAccess to false at the account level — which overrides every container setting at once
azure cli
# A user delegation SAS: signed with Microsoft Entra credentials, not the
# account key, so it can be revoked without rotating anything.
az storage blob generate-sas \
  --account-name contosodata \
  --container-name reports --name q3.pdf \
  --permissions r \
  --expiry 2026-09-20T18:00Z \
  --auth-mode login --as-user \
  --https-only --full-uri

# Turn shared key authorisation off entirely so account keys — and every
# service and account SAS derived from them — stop working.
az storage account update \
  --name contosodata --resource-group rg-data \
  --allow-shared-key-access false

The three SAS questions that keep coming back

"A SAS was leaked and must be invalidated immediately, without disrupting other applications." If it is a service SAS tied to a stored access policy, delete the policy. If it is a user delegation SAS, revoke the user delegation key. If it is an account SAS, your only option is to rotate the account key — which is exactly why the exam wants you to avoid account SAS in the first place.

"Make the SAS auditable." User delegation SAS, because the signing identity is recorded.

"Stop anyone using account keys at all." Set allowSharedKeyAccess to false. That single switch also kills every service and account SAS, because both are signed with the account key.

Network controls

ControlNotes
Public network accessEnabled from all networks / Enabled from selected virtual networks and IP addresses / Disabled. Selecting "selected networks" flips the default to deny.
Firewall rulesPublic IPv4 addresses and CIDR ranges. Private ranges such as 10.0.0.0/8 are rejected — use a service endpoint or private endpoint instead.
Virtual network rulesSubnets with the Microsoft.Storage service endpoint enabled.
Resource instancesAllow one named Azure resource — a specific Synapse workspace or Data Factory — through the firewall by its managed identity, rather than opening a whole service tag.
Exceptions"Allow Azure services on the trusted services list", and "allow read access to storage logging and metrics". Both are checkboxes that quietly widen access.
Private endpointsOne per sub-resource — blob, file, queue, table, web, dfs. A private endpoint for blob does nothing for file shares.
Secure transfer requiredHTTPS only. On by default for new accounts.
Minimum TLS versionSet to 1.2 at least.

Data protection and immutability

  • Soft delete for blobs, containers and file shares — a recovery window before data is really gone.
  • Versioning and point-in-time restore for block blobs.
  • Immutability policies (WORM) — time-based retention holds data for a fixed period; a legal hold holds it indefinitely until the tag is cleared. Set at container scope or version scope. A time-based policy can be locked, after which retention can only be extended, never shortened.

Microsoft Defender for Storage

CapabilityWhat it does
Activity monitoringBehavioural detection over control and data telemetry — unusual access, suspicious IPs and Tor exit nodes, data exfiltration patterns, and access from misconfigured or leaked SAS tokens.
Sensitive data threat detectionUses sensitive data discovery to raise the severity of alerts on containers that actually hold sensitive information.
Malware scanningNear real-time on-upload scanning of blobs with Microsoft Defender Antivirus, plus on-demand scans. Billed per GB with a default cap of 10,000 GB per storage account per month; when the cap is hit, scanning stops.
Hash reputation analysisCompares hashes against Microsoft Defender Threat Intelligence. Available in every plan, but it does not cover SMB file shares or blobs written with Put Block / Put Block List.
Event-driven responseScan results publish to Azure Event Grid, so a Function or Logic App can delete, quarantine or tag a malicious blob automatically.

Enable it agentlessly at the subscription level (all current and future accounts, with exclusions) or per storage account. No diagnostic logs need to be turned on.

2.2 Securing databases

Authentication

  • Set a Microsoft Entra admin on the logical server, then create contained database users mapped to Entra principals — including managed identities.
  • Turn on Microsoft Entra-only authentication to disable SQL authentication entirely. This is the keyed answer to "prevent the use of SQL logins, including the server admin account".
  • Applications should connect with a managed identity, never a connection string containing a password.

Network

ControlScopeNotes
Server-level firewall rulesEvery database on the logical serverStored in the master database.
Database-level firewall rulesOne databaseCreated with T-SQL only, and evaluated before server rules — the more portable and more granular option.
"Allow Azure services and resources to access this server"ServerRule 0.0.0.0. It means any Azure subscription, including someone else's. Turn it off.
Private endpointServerCombine with public network access disabled.
Connection policyServerRedirect is lowest latency but needs ports 11000–11999 open; Proxy uses 1433 only and is the safe answer when a restrictive firewall sits in the path.

Protecting the data itself

FeatureProtects againstKey detail
Transparent Data Encryption (TDE)Someone stealing the files or backupsOn by default. Service-managed key, or a customer-managed key in Key Vault (BYOK). Data is encrypted at rest only — anyone who can query sees plaintext.
Always EncryptedThe database administrator, and anyone with a privileged server roleEncryption and decryption happen in the client driver; the engine never sees the keys. With secure enclaves, rich computations and in-place encryption become possible.
Dynamic data maskingCasual over-exposure in query resultsPresentation-layer only — the data is not encrypted and a determined user can infer it. Not a security boundary.
Row-level securityUsers seeing rows that are not theirsA predicate function plus a security policy, enforced by the engine on every query.
LedgerUndetected tamperingCryptographically verifiable history, with digests that can be published to immutable storage.

TDE or Always Encrypted?

If the threat is physical media, backups or a stolen file, it is TDE. If the threat is a highly privileged user inside the database — a DBA who must administer but must not read salaries — it is Always Encrypted. If the requirement is merely that call-centre staff see only the last four digits, it is dynamic data masking.

Auditing

  • Configure at server level (applies to every database, current and future — the usual answer) or at database level. Enabling both produces duplicate logs.
  • Three destinations: Log Analytics workspace (the one that feeds Microsoft Sentinel), Event Hubs, and a storage account.
  • Microsoft support operations auditing separately records what Microsoft support engineers do in your database during a support request.
  • For SQL Managed Instance, auditing can also be configured with T-SQL server audit specifications.

Microsoft Defender for Databases

An umbrella plan covering four database families, each enabled separately:

  • Azure SQL Database servers
  • SQL servers on machines — SQL Server on Azure VMs and on Arc-enabled servers
  • Open-source relational databases — Azure Database for MySQL, PostgreSQL and MariaDB
  • Azure Cosmos DB

It brings two things: Advanced Threat Protection alerts (SQL injection, brute-force attempts, access from an unusual location or principal, suspicious data exfiltration) and, for SQL, vulnerability assessment. The express vulnerability assessment configuration needs no storage account and is the modern default; the classic configuration writes scan results to a storage account you provide.

2.3 Network security groups and application security groups

An NSG is a stateful five-tuple filter — source, source port, destination, destination port, protocol — with a priority from 100 to 4096, evaluated lowest number first. The first match wins and evaluation stops. NSGs associate to subnets and to network interfaces.

Default rules, which cannot be deleted

PriorityRuleEffect
65000AllowVNetInBound / AllowVNetOutBoundAnything inside the virtual network, and peered networks, can talk
65001AllowAzureLoadBalancerInBoundHealth probes reach your VMs
65001AllowInternetOutBoundOutbound to the internet is permitted
65500DenyAllInBound / DenyAllOutBoundEverything else is dropped

Service tags (Internet, AzureCloud, Storage, Sql, AzureActiveDirectory, VirtualNetwork, AzureLoadBalancer) stand in for address ranges Microsoft keeps updated, and many accept a regional suffix such as Storage.WestEurope. Application security groups (ASGs) let a rule say "from asg-web to asg-db on 1433" instead of listing IP addresses — the NICs carry the membership, so rules survive scaling. Both NICs in a rule must be in the same virtual network.

flowchart TB
  P["An inbound packet heads for a VM in a virtual network"] --> SA{"Does a Virtual Network Manager<br/>security admin rule match?"}
  SA -->|"Deny"| D1["Dropped — NSG rules<br/>are never evaluated"]
  SA -->|"Always allow"| A1["Delivered straight to the VM —<br/>NSG rules are never evaluated"]
  SA -->|"Allow, or<br/>nothing matches"| SN{"NSG rules — subnet first,<br/>then network interface<br/>lowest priority number first,<br/>and both must allow"}
  SN -->|"Either NSG denies, or neither allows it"| D2["Dropped"]
  SN -->|"Both allow"| OK["Delivered to the virtual machine"]
Inbound evaluation order. A security admin rule set to Deny or Always allow ends the story; only Allow hands the packet on to the NSGs, and both NSGs must permit it.

Inbound and outbound are evaluated in opposite orders

For inbound traffic, the subnet NSG is evaluated first, then the NIC NSG. For outbound traffic it is the other way round: NIC first, then subnet. Either way both must allow the traffic, so the effective rule is the more restrictive of the two — which is why "we allowed it on the NIC but it still fails" is usually a subnet NSG.

2.4 Azure Virtual Network Manager

AVNM is the central-governance layer above NSGs. You scope a network manager to a management group or subscription, group virtual networks into network groups (static membership, or dynamic membership driven by an Azure Policy condition on tags or names), then deploy configurations to regions.

ConfigurationDelivers
ConnectivityHub-and-spoke or mesh topology across a network group, using connected groups rather than hand-built peerings.
Security adminRule collections of security admin rules that override NSGs.
RoutingCentrally managed user-defined routes.
IP address managementAddress pools that hand out non-overlapping CIDR blocks automatically.

Security admin rules, in detail

  • Applied at the virtual network level; NSGs apply at subnet and NIC level.
  • Priority 1 to 4096, lowest first, and always evaluated before NSGs.
  • Three actions: Allow (hand on to the NSGs), Always allow (deliver, skip the NSGs) and Deny (drop, skip the NSGs).
  • Only one security admin configuration can be deployed per region per network manager — use multiple rule collections inside it rather than multiple configurations.
  • They use an eventual consistency model, so newly created resources pick them up after a short delay.
  • Several subnets are exempt: Application Gateway, Azure Bastion, Azure Firewall, Route Server, VPN Gateway, Virtual WAN and ExpressRoute gateway subnets. They also do not apply to private endpoints in managed virtual networks.

The canonical scenario

"Block inbound SSH across every virtual network in the company, but let the platform team's two virtual networks keep it." That is one Deny security admin rule at a low priority number over a network group containing everything, plus an Allow rule at a lower number still over the exception network group — deliberately Allow, not Always allow, so the application teams' own NSGs still get to narrow it further. Doing this with NSGs alone would require touching every NSG and would leave each team free to undo it.

2.5 Azure Firewall

BasicStandardPremium
Intended forSmall business, under 250 MbpsThe general caseHighly sensitive and regulated environments
Network and application rules✅✅✅
Threat intelligenceAlert onlyAlert, or alert and denyAlert, or alert and deny
TLS inspection❌❌✅
IDPS (signature-based detection and prevention)❌❌✅
URL filtering (full path, not just FQDN)❌❌✅
Web categories❌Coarse, FQDN-basedFull category matching on the URL
flowchart TB
  T["Traffic reaches Azure Firewall"] --> TI{"Threat intelligence mode"}
  TI -->|"Alert and deny, and the address or domain<br/>is on a Microsoft threat feed"| DROP["Dropped before any rule is read"]
  TI -->|"Off, Alert only, or no match"| DNAT["1 · DNAT rules — translate inbound connections"]
  DNAT --> NET["2 · Network rules — layer 3 and 4, any protocol"]
  NET --> APP["3 · Application rules — FQDN, URL and web categories"]
  APP --> PREM["Premium only — IDPS and TLS inspection applied to the permitted flow"]
Rule processing is fixed: DNAT, then network, then application rules. Within a firewall policy, rule collection groups are ordered by priority and rule collections within them by priority.

Firewall Policy replaces classic rules

Classic rule collections live on the firewall resource itself. A firewall policy is a separate, reusable resource that can be inherited by child policies, which is how you keep an organisation-wide baseline while letting regions add their own rules. Premium features — IDPS, TLS inspection, URL filtering — are configured only in a policy, and a Premium policy cannot be attached to a Standard firewall. Azure Firewall Manager is where policies and secured hubs are administered centrally.

Two more behaviours worth knowing: DNS proxy makes the firewall the DNS server for the virtual network, which is what lets FQDN-based network rules resolve consistently; and forced tunnelling sends the firewall's own outbound traffic to an on-premises next hop, which requires a dedicated AzureFirewallManagementSubnet.

2.6 Virtual WAN and VPN

A Virtual WAN hub becomes a secured virtual hub the moment you deploy Azure Firewall or a supported partner NVA into it. Routing intent then declares, in one place, that internet traffic and/or private traffic must be inspected by that security appliance — replacing the fleet of user-defined routes you would otherwise maintain per spoke.

VPN typeAuthenticationNotes
Site-to-sitePre-shared key, or certificatesIKEv1/IKEv2 IPsec. Custom IPsec/IKE policies let you pin approved algorithms — the answer to "only AES-256 and SHA-384 may be used".
Point-to-siteAzure certificate, RADIUS, or Microsoft Entra IDEntra authentication requires the OpenVPN tunnel type, and is what lets Conditional Access and MFA apply to VPN sign-in.
ExpressRouten/a — private circuitAdd MACsec on the circuit, or IPsec over ExpressRoute, when encryption is mandated.

2.7 Microsoft Entra Private Access

Part of Global Secure Access, Microsoft's Security Service Edge. Private Access replaces the traditional VPN with per-application access: nothing is published to the internet, the user's client tunnels only the traffic that matches a profile, and Conditional Access is applied per application rather than once at the tunnel.

PieceJob
Private network connectorA lightweight Windows Server agent with line of sight to the resource. Grouped into connector groups for resilience and for reaching separate networks.
Traffic forwarding profileTells the Global Secure Access client what to tunnel — Private access, Microsoft traffic, or Internet access.
Quick AccessOne enterprise application publishing broad IP ranges and wildcard FQDNs — the VPN-replacement first step. Up to 500 application segments.
Per-app accessA separate Global Secure Access enterprise application per resource, so each gets its own assignments and Conditional Access. The Zero Trust destination.
Application segmentAn FQDN (wildcards allowed), IP address, CIDR range or IP-to-IP range, with ports and protocols.
Private DNSDNS suffixes tunnelled for private name resolution, so internal hostnames resolve without split-DNS hacks.
Application DiscoveryAnalyses what users actually reach through Quick Access so you can carve it into per-app applications with evidence.

Administering it needs the Global Secure Access Administrator role, plus Application Administrator to manage connector groups and enterprise applications.

Why the exam likes this over a VPN

A VPN authenticates once and then the user is on the network. Private Access authenticates per application, so you can require phishing-resistant MFA for the finance system and a compliant device for the HR system, without building two VPNs. Whenever a scenario says "grant contractors access to one internal application without giving them network access", that is Entra Private Access with per-app access.

flowchart TB
  Q["You need a PaaS resource reached privately"] --> A{"Does it need a private IP inside your own address space?"}
  A -->|"Yes — on-premises, peered and cross-region<br/>networks must reach it too"| PE["Private endpoint — a network interface with a private IP in your subnet"]
  A -->|"No — you only need to stop everyone<br/>except a named subnet reaching it"| SE["Service endpoint — the subnet's identity is presented to the service,<br/>which keeps its public IP and firewall"]
  PE --> DNS["Add a private DNS zone, or clients still resolve and use the public address"]
  DNS --> OFF["Set public network access to Disabled, or the public path stays open beside it"]
  SE --> POL["Service endpoint policies can narrow the subnet to specific storage accounts"]
Private endpoint or service endpoint. The DNS step is the one people forget — without the private DNS zone the hostname still resolves to the public IP and the private endpoint is bypassed.
Service endpointPrivate endpoint
What it isA route and an identity: the subnet's identity is presented to the PaaS serviceA NIC with a private IP from your subnet, mapped to one sub-resource
Traffic pathStays on the Azure backbone, but the destination is still a public IPEntirely private
Reachable from on-premises❌✅ over VPN or ExpressRoute
Reachable from peered networks❌✅
GranularityThe whole service in a region (narrowed by service endpoint policies for storage)One specific resource, one sub-resource
DNS change neededNoYes — a private DNS zone such as privatelink.blob.core.windows.net
CostFreeCharged per endpoint and per GB

Azure Private Link service is the other side of the same coin: it is what you create to publish your own service — behind a Standard internal load balancer — so that consumers in other virtual networks and other tenants can reach it through their own private endpoints, with no peering and no overlapping-address problems. Approval of each connection is explicit, automatic or rejected, per your configuration.

2.9 Diagnosing it with Network Watcher

ToolAnswers
Effective security rules"What rules actually apply to this NIC?" — the flattened result of subnet and NIC NSGs together. The first stop for any "why is this blocked?" question.
NSG diagnostics"Would this specific flow be allowed?" — simulates a packet and names the rule that decides it.
IP flow verifyThe same idea for a single five-tuple, returning allow/deny and the deciding rule.
Next hop"Where does traffic to this address actually go?" — catches a missing or wrong user-defined route.
Connection troubleshootEnd-to-end reachability test including latency and the hop that fails.
Packet captureOn-demand capture to storage or local disk.
Flow logs and traffic analyticsRecorded flow records, visualised.

NSG flow logs are retiring

NSG flow logs retire on 30 September 2027, and new ones could no longer be created from 30 June 2025. Use virtual network flow logs instead: they cover all traffic in the virtual network including flows no NSG processes, they record the effect of Virtual Network Manager security admin rules and virtual network encryption, they are configured once at the virtual network rather than at both subnet and NIC, and they produce no duplicate records. Microsoft provides both a migration script and a built-in Azure Policy to move at scale.

Skill 2 checklist

  • Entra authorisation over shared key; user delegation SAS over account SAS; stored access policy is how you revoke a service SAS.
  • allowSharedKeyAccess = false kills account keys and every SAS signed with them.
  • Private endpoint is per sub-resource, needs a private DNS zone, and should be paired with public access disabled.
  • TDE for media, Always Encrypted for privileged insiders, masking for presentation only.
  • Server-level SQL auditing to a Log Analytics workspace is the Sentinel-friendly answer; database-level firewall rules are evaluated first.
  • Security admin rules beat NSGs; Deny and Always allow end evaluation, Allow does not.
  • Azure Firewall order is DNAT → network → application, with threat intelligence ahead of all three; IDPS, TLS inspection and URL filtering are Premium only.
  • Per-app access in Entra Private Access, not Quick Access, is the Zero Trust answer.
  • Virtual network flow logs, not NSG flow logs.

Next: Skill 3, which covers servers, containers, the application platform — and the AI workloads that make this exam what it is.