Home › Studies › SC-500 › Storage, Databases & Networking › Storage Security

Storage Security

Secure transfer & TLS · encryption keys · firewall & private endpoints · Shared Key, SAS & stored access policies · Defender for Storage

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Account-level settings

SettingDefaultWhat it does
Secure transfer requiredEnabled when you create the accountRejects any REST request made over HTTP. Built-in Azure Policy can enforce it. The page's applicability note lists Azure Files as not covered; for Azure Files see its encryption-in-transit setting, which interacts with this one.
Minimum TLS versionPortal-created account: TLS 1.2. Created with PowerShell, CLI or template: not set (accepts TLS 1.0 or later)Requests that use an older version fail. Valid values: TLS1_0, TLS1_1, TLS1_2. TLS 1.3 is supported but can't be enforced as the minimum.
Encryption at restOn for every account; can't be disabledMicrosoft-managed keys by default. Customer-managed keys live in Key Vault or Managed HSM.
Infrastructure encryptionOffEncrypts data twice (service level and infrastructure level) with two algorithms and two keys.
Immutable storage (WORM)OffTime-based retention or legal hold on blob data; no modify or delete while it applies.

Customer-managed keys

Immutable storage

PolicyBehavior
Time-based retentionObjects can be created and read, not modified or deleted. After the interval ends, objects can be deleted but not overwritten. Interval: 1 day to 146,000 days. Starts unlocked for testing; a locked policy can't be deleted and its period can be extended but not shortened.
Legal holdSame protection until the hold is explicitly cleared. Use it when the retention time is unknown.

A time-based retention policy must be locked for the blobs to be in a compliant immutable state for SEC 17a-4(f) and similar rules. Container-level WORM sets policies at the container only; version-level WORM works at account, container or version level (needs versioning).

Storage firewall and private endpoints

By default a storage account accepts connections from any network. Network rules only take effect on the public endpoint, and a request from an allowed source must still meet the account's authorization requirements.

Rule typeUse it forDetails
Virtual network ruleA subnet in an Azure virtual networkUp to 400 per account. Needs a service endpoint on the subnet (Microsoft.Storage = same region, Microsoft.Storage.Global = any region; only one of the two per subnet). The portal creates the endpoint for you; CLI and PowerShell don't.
IP network rulePublic IP ranges (for example on-premises, or the NAT addresses of ExpressRoute Microsoft peering)Up to 400 per account. CIDR or single IPv4 only; no RFC 1918 private ranges; no /31 or /32 prefixes; no effect on same-region requests.
Resource instance ruleAn Azure resource that can't be isolated by VNet or IP rulesThe resource must be in the same tenant. The rule opens the public endpoint only; the resource's managed identity still needs an Azure role for data access.
Trusted service exceptionAzure services outside your network boundary (for example Azure Backup for unmanaged disks, Azure Monitor, Event Grid)Trusted services take the highest precedence over other network restrictions. Services under trusted access for resources registered in your tenant must be registered in a subscription in the same Entra tenant.

Private endpoints

Authorization and access keys

Every request to Azure Storage must be authorized. Microsoft recommends Microsoft Entra ID with managed identities wherever possible.

OptionNotes
Microsoft Entra ID + Azure RBACBlob, queue and table data. A new account gives you no data access until you assign a data role (scope: subscription, resource group, account or container). To read blobs in the portal with Entra credentials you also need at least the Resource Manager Reader role.
Shared Key (account key)Full access to the account's data and can sign SAS tokens. Two 512-bit keys; rotate them (Key Vault recommended). Rotation revokes account and service SAS tokens, not user delegation SAS.
Shared access signatureUser delegation SAS (Entra credentials), service SAS and account SAS (account key).
Anonymous read accessBlob only; not recommended.
Storage local usersSFTP for blobs, SMB for files.

Disallow Shared Key

Anonymous access

Two settings apply: the account's AllowBlobPublicAccess and each container's access level. The account setting overrides the container.

Container = PrivateContainer = ContainerContainer = Blob
Account disallows anonymousNo accessNo accessNo access
Account allows anonymousNo accessContainer and its blobsBlobs only, not the container itself

SAS and stored access policies

SAS typeSigned withWith stored access policy?
User delegation SASMicrosoft Entra credentials (user delegation key)No, ad hoc only
Service SASAccount keyYes
Account SASAccount keyNo, ad hoc only

SAS expiration policy

Stored access policy

Defender for Storage

Agentless plan in Defender for Cloud. Enable it at the subscription (all existing and new accounts; you can exclude accounts) or at a single storage account. Microsoft recommends enabling by Azure built-in policy for scale, which can also cover management groups. No diagnostic logs are needed for its analysis.

FeatureNotes
Activity monitoringAnalyzes data plane and control plane telemetry for anomalies, including entities without identities that use overly permissive or leaked SAS.
Sensitive data threat detectionConfigurable; can be turned on or off at no extra cost.
Malware scanningOn-upload and on-demand scans with Microsoft Defender Antivirus. Priced per GB scanned; a configurable feature of the new plan. Default monthly cap 10,000 GB of uploaded blobs per account; two alerts at 75% and when the cap is reached.
Hash reputation analysisAvailable in all plans. Doesn't cover SMB file shares or blobs created with Put Block / Put Block List.
Event-driven responseEvent Grid integration for Functions or Logic Apps.

Responding to malware

CLI and PowerShell

TaskAzure CLIPowerShell
Require secure transferaz storage account update -g {ResourceGroupName} -n {StorageAccountName} --https-only trueSet-AzStorageAccount -Name "{StorageAccountName}" -ResourceGroupName "{ResourceGroupName}" -EnableHttpsTrafficOnly $True
Default network action Denyaz storage account update --resource-group "myresourcegroup" --name "mystorageaccount" --default-action DenyUpdate-AzStorageAccountNetworkRuleSet -ResourceGroupName "myresourcegroup" -Name "mystorageaccount" -DefaultAction Deny
Block all public network accessaz storage account update --name MyStorageAccount --resource-group MyResourceGroup --public-network-access DisabledSet-AzStorageAccount -ResourceGroupName "myresourcegroup" -Name "mystorageaccount" -PublicNetworkAccess Disabled
Enable service endpoint on a subnetaz network vnet subnet update --resource-group "myresourcegroup" --vnet-name "myvnet" --name "mysubnet" --service-endpoints "Microsoft.Storage.Global"-
Add a virtual network ruleaz storage account network-rule add --resource-group "myresourcegroup" --account-name "mystorageaccount" --subnet $subnetidAdd-AzStorageAccountNetworkRule -ResourceGroupName "myresourcegroup" -Name "mystorageaccount" -VirtualNetworkResourceId $subnet.Id
Add an IP network ruleaz storage account network-rule add --resource-group "myresourcegroup" --account-name "mystorageaccount" --ip-address "16.17.18.0/24"Add-AzStorageAccountNetworkRule -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -IPAddressOrRange "16.17.18.0/24"
Set trusted service exceptionsaz storage account update --resource-group "myresourcegroup" --name "mystorageaccount" --bypass Logging Metrics AzureServicesUpdate-AzStorageAccountNetworkRuleSet -ResourceGroupName "myresourcegroup" -Name "mystorageaccount" -Bypass AzureServices,Metrics,Logging
Disallow Shared Key authorizationaz storage account update --name <storage-account> --resource-group <resource-group> --allow-shared-key-access falseSet-AzStorageAccount -ResourceGroupName <resource-group> -AccountName <storage-account> -AllowSharedKeyAccess $false
Disallow anonymous blob access (on create)az storage account create --name <storage-account> --resource-group <resource-group> --kind StorageV2 --location <location> --allow-blob-public-access falseNew-AzStorageAccount -ResourceGroupName $rgName -Name $accountName -Location $location -SkuName Standard_GRS -AllowBlobPublicAccess $false
List account access keysaz storage account keys list --resource-group <resource-group> --account-name <storage-account>(Get-AzStorageAccountKey -ResourceGroupName <resource-group> -Name <storage-account>).Value[0]

Exam Tips

Tick each tip once you can answer it without looking.

“Container set to public access but anonymous reads still fail” → Account-level AllowBlobPublicAccess is false and overrides the container setting. Trap: The container access level alone never wins when the account disallows anonymous access.

“Protect a storage account with Conditional Access” → Disallow Shared Key authorization (AllowSharedKeyAccess false). Trap: Secure transfer and TLS settings don't bring Entra Conditional Access into play.

“Shared Key disallowed; which SAS still works on blobs” → User delegation SAS. Trap: Service SAS and account SAS are signed with the account key and are denied.

“Revoke a service SAS without touching account keys” → Delete or change the stored access policy it uses (or set its expiry in the past). Trap: SAS expiration policy Block isn't supported for a service SAS bound to a stored access policy; user delegation SAS can't use policies.

“IP rule for a VM in the same region has no effect” → Use a virtual network rule plus service endpoint. Trap: IP rules don't affect same-region requests and can't contain RFC 1918 addresses.

“Private endpoint created, internet still reaches the account” → Set default action Deny or public network access Disabled. Trap: A private endpoint doesn't block the public endpoint by itself.

“Data Lake Create Directory fails with only a Blob private endpoint” → Add a private endpoint for the Data Lake Storage (DFS) sub-resource. Trap: One endpoint per storage service.

“Customer-managed key for a storage account” → Key Vault with soft delete and purge protection, RSA key, identity with wrapkey/unwrapkey/get. Trap: The vault can be in another tenant or region, so same-region isn't a requirement.

“WORM needed for SEC 17a-4(f)” → Time-based retention policy, locked. Trap: An unlocked policy can still be changed or deleted; a locked one can't be deleted or shortened.

“Retention period unknown, data must not change” → Legal hold. Trap: A time-based policy needs a fixed interval.

“Auto-quarantine a malicious blob with no extra automation” → Soft delete malicious blobs (Defender for Storage). Trap: It's off by default and works only for malicious blobs; retention defaults to 7 days.

“Enable Defender for Storage across many subscriptions consistently” → Azure built-in policy at management group scope. Trap: Per-subscription portal clicks don't keep new subscriptions covered.

“Event Grid topic for malware scan events” → Same region as the storage account, public network access. Trap: Cross-region delivery and private-endpoint-only topics aren't supported.

“User with a blob data role can't browse blobs in the portal” → Add the Resource Manager Reader role. Trap: The data role alone isn't enough for the portal with Entra credentials.

“Can't set a SAS expiration policy (setting greyed out)” → Rotate both account keys first. Trap: Only needed for account-key signed SAS; keyCreationTime must not be null.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Storage, Databases & Networking overviewDatabase Security →