Azure Storage Security and Access: Entra ID, SAS Tokens, Firewalls, Private Endpoints, Encryption and Azure Files

Microsoft Azure Architect Technologies AZ 300 60 min min read Updated: Nov 17, 2026 Intermediate
Azure Storage Security and Access: Entra ID, SAS Tokens, Firewalls, Private Endpoints, Encryption and Azure Files
Intermediate Topic 2 of 3

Ways to Authorize Access

MethodNotesAdvice
Microsoft Entra ID + RBACRoles like Storage Blob Data Reader. Supports managed identities and conditional accessBest choice
User delegation SASA signed URL created with Entra credentialsBest for temporary sharing
Service SAS / Account SASSigned with the account keyUse short expiry and stored access policies
Shared Key (account keys)Full control for anyone with the keyDisable if possible (--allow-shared-key-access false) and rotate keys
Anonymous public readPublic containersAvoid. Disable at account level
bash # Disable shared key and public access, force Entra ID az storage account update -n stshopprod482 -g rg-data --allow-shared-key-access false --allow-blob-public-access false az role assignment create --assignee <group-id> --role "Storage Blob Data Contributor" --scope $(az storage account show -n stshopprod482 -g rg-data --query id -o tsv) # User delegation SAS: a link that works 1 hour for one blob az storage blob generate-sas --account-name stshopprod482 -c reports -n 2026/report.pdf --permissions r \ --expiry $(date -u -d "+1 hour" +%Y-%m-%dT%H:%MZ) --auth-mode login --as-user --full-uri

SAS Best Practices

  • Use HTTPS only, minimum permissions, short expiry
  • Prefer user delegation SAS over account-key SAS
  • Use stored access policies to revoke service SAS tokens
  • Treat a SAS like a password: do not post it publicly

Network Protection

ControlHow it works
Storage firewallAllow only chosen VNets/subnets (service endpoints), IP ranges or trusted Azure services. Default action Deny
Private endpointA private IP for the storage account in your VNet. Add the privatelink DNS zone, then disable public network access
Resource instance rulesAllow specific Azure resources such as a Synapse workspace
Secure transfer requiredHTTPS only. Set minimum TLS 1.2
bash az network private-endpoint create -g rg-data -n pe-st-blob --vnet-name vnet-app --subnet data \ --private-connection-resource-id $(az storage account show -n stshopprod482 -g rg-data --query id -o tsv) --group-id blob --connection-name pe-conn az network private-dns zone create -g rg-data -n privatelink.blob.core.windows.net az network private-dns link vnet create -g rg-data -n link-app --zone-name privatelink.blob.core.windows.net --virtual-network vnet-app --registration-enabled false az storage account update -n stshopprod482 -g rg-data --public-network-access Disabled

Encryption

  • At rest: always encrypted with AES-256. Keys are Microsoft-managed by default or customer-managed (CMK) in Key Vault or Managed HSM
  • Infrastructure encryption adds a second layer
  • In transit: TLS. Azure Files SMB 3 supports encryption in transit

Azure Files

FeatureDescription
SMB sharesWindows, Linux and macOS clients. Mount from Azure or on-premises (port 445 must be open)
NFS sharesLinux workloads (Premium)
Identity-based accessEntra Kerberos, AD DS or Entra Domain Services for NTFS-style permissions
TiersPremium (SSD), Transaction optimized, Hot, Cool
Snapshots and backupShare snapshots and Azure Backup
Azure File SyncCache a cloud share on Windows Servers on-premises with cloud tiering of cold files
bash az storage share-rm create -g rg-data --storage-account stshopprod482 -n teamshare --quota 1024 --access-tier TransactionOptimized # Linux mount sudo mount -t cifs //stshopprod482.file.core.windows.net/teamshare /mnt/team -o username=stshopprod482,password=<key>,serverino,vers=3.0

Monitoring and Compliance

  • Turn on diagnostic settings to Log Analytics for read, write and delete logs
  • Use Microsoft Defender for Storage to detect malware uploads and unusual access
  • Use Azure Policy to require private endpoints, HTTPS and no public access

Practice

  1. Disable shared key access and use an Entra role instead
  2. Create a user delegation SAS valid for one hour
  3. Add a private endpoint, private DNS zone and disable public access
  4. Create an Azure Files share and mount it on a VM

Conclusion

Secure storage with Entra ID and RBAC, short-lived user delegation SAS, disabled shared keys and public access, firewalls and private endpoints, and customer-managed keys when needed. Azure Files gives SMB and NFS shares with File Sync for hybrid use.

Quick Summary: authorization; SAS; network; encryption; Azure Files; monitoring.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators