🔒 Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided AZ-104 Domain 2
Domain 2 — Module 2 of 5 40%
8 of 27 overall

AZ-104 Study Guide

Domain 1: Manage Azure Identities and Governance

  • Microsoft Entra ID: Your Identity Foundation Free
  • Users, Groups & Licenses Free
  • RBAC: Who Can Do What in Azure Free
  • Subscriptions, Resource Groups & Management Groups Free
  • Azure Policy & Resource Locks Free
  • Tags, Cost Management & Azure Advisor Free

Domain 2: Implement and Manage Storage

  • Storage Accounts & Redundancy
  • Securing Storage: Keys, SAS & Firewalls
  • Blob Containers & Storage Tiers
  • Blob Lifecycle, Versioning & Soft Delete
  • Azure Files: Shares, Snapshots & Recovery

Domain 3: Deploy and Manage Azure Compute Resources

  • ARM Templates & Bicep: Infrastructure as Code
  • Virtual Machines: Create & Configure Free
  • VM Disks, Encryption & Migration
  • Availability Sets, Zones & Scale Sets
  • Containers: ACR, ACI & Container Apps
  • App Service Plans & Scaling
  • App Service: Slots, Certificates & Networking

Domain 4: Implement and Manage Virtual Networking

  • Virtual Networks & Subnets
  • VNet Peering & User-Defined Routes
  • NSGs & Application Security Groups
  • Azure Bastion, Service & Private Endpoints
  • Azure DNS & Load Balancers

Domain 5: Monitor and Maintain Azure Resources

  • Azure Monitor: Metrics & Logs
  • Alerts, Insights & Network Watcher
  • Azure Backup & Vaults
  • Azure Site Recovery & Disaster Recovery

AZ-104 Study Guide

Domain 1: Manage Azure Identities and Governance

  • Microsoft Entra ID: Your Identity Foundation Free
  • Users, Groups & Licenses Free
  • RBAC: Who Can Do What in Azure Free
  • Subscriptions, Resource Groups & Management Groups Free
  • Azure Policy & Resource Locks Free
  • Tags, Cost Management & Azure Advisor Free

Domain 2: Implement and Manage Storage

  • Storage Accounts & Redundancy
  • Securing Storage: Keys, SAS & Firewalls
  • Blob Containers & Storage Tiers
  • Blob Lifecycle, Versioning & Soft Delete
  • Azure Files: Shares, Snapshots & Recovery

Domain 3: Deploy and Manage Azure Compute Resources

  • ARM Templates & Bicep: Infrastructure as Code
  • Virtual Machines: Create & Configure Free
  • VM Disks, Encryption & Migration
  • Availability Sets, Zones & Scale Sets
  • Containers: ACR, ACI & Container Apps
  • App Service Plans & Scaling
  • App Service: Slots, Certificates & Networking

Domain 4: Implement and Manage Virtual Networking

  • Virtual Networks & Subnets
  • VNet Peering & User-Defined Routes
  • NSGs & Application Security Groups
  • Azure Bastion, Service & Private Endpoints
  • Azure DNS & Load Balancers

Domain 5: Monitor and Maintain Azure Resources

  • Azure Monitor: Metrics & Logs
  • Alerts, Insights & Network Watcher
  • Azure Backup & Vaults
  • Azure Site Recovery & Disaster Recovery
Domain 2: Implement and Manage Storage Premium ⏱ ~13 min read

Securing Storage: Keys, SAS & Firewalls

Storage accounts hold your most valuable data. Learn the five ways to control access — account keys, SAS tokens, stored access policies, firewalls, and identity-based access — and when to use each.

How storage access works

☕ Simple explanation

Securing a storage account is like securing a bank vault with multiple layers.

Layer 1: Account keys — the master key. Anyone with it has full access. Keep it secret. Layer 2: SAS tokens — temporary, limited-access passes. Like giving a courier a time-limited pass to pick up one specific package. Layer 3: Firewalls — only allow access from specific networks or IP addresses. Layer 4: Identity-based access — use Entra ID to grant specific permissions to specific people (most secure).

Azure Storage supports multiple authorisation mechanisms, each suited to different scenarios. Shared Key (account key) provides full access and is suitable for backend services but is the least secure option if compromised. Shared Access Signatures (SAS) delegate limited access with time and permission constraints. Entra ID RBAC provides identity-based access with granular permissions. Network rules restrict which networks can reach the storage endpoints.

Microsoft recommends using Entra ID RBAC as the primary access method and eliminating shared key access where possible.

Access methods compared

Five ways to secure Azure Storage
MethodScopeBest For
Account keyFull access to everythingBackend services, legacy apps
SAS tokenSpecific resource, time-limited, permission-limitedTemporary client access, external sharing
Stored access policyManages SAS tokens centrally (can revoke)Controlling SAS lifecycle at container/share level
Entra ID + RBACPer-user/group permissions via rolesProduction applications, human access
Storage firewallNetwork-level restrictionRestricting access to specific VNets/IPs

Account keys

Every storage account has two access keys (Key1 and Key2). Either key grants full access to the entire storage account.

Why two keys? For key rotation without downtime:

  1. Apps use Key1
  2. Regenerate Key2 (it changes)
  3. Update apps to use Key2
  4. Regenerate Key1
  5. Now both keys are new, and there was zero downtime
💡 Exam tip: Key rotation best practices

The exam tests whether you understand key rotation. Two keys exist specifically so you can rotate without downtime. If a question says “regenerate key1 while applications are using key1” — the answer is “applications will break until they’re updated to use the new key.” Always switch apps to key2 FIRST, then regenerate key1.

Also: consider disabling shared key access entirely and using Entra ID authentication instead. You can do this in the storage account’s Configuration settings.

Shared Access Signatures (SAS)

A SAS token is a URI that grants restricted access rights to storage resources. It specifies what can be accessed, what operations are allowed, and when the access expires.

Three types of SAS:

SAS TypeScopeKey It Uses
Account SASEntire storage account (services, containers, objects)Account key
Service SASSpecific service (blob, file, table, or queue)Account key
User delegation SASBlob and container onlyEntra ID credentials (most secure)

SAS parameters:

  • sv — storage service version
  • ss — services (blob, file, table, queue)
  • srt — resource types (service, container, object)
  • sp — permissions (read, write, delete, list, etc.)
  • se — expiry time
  • st — start time
  • sig — signature (cryptographic hash)
💡 Exam tip: User delegation SAS is the most secure

When the exam asks for the “most secure” SAS option, the answer is usually User delegation SAS. It uses Entra ID credentials instead of the account key, meaning you don’t risk exposing the master key. However, it only works for Blob Storage.

Stored access policies

A stored access policy provides additional control over SAS tokens. Instead of embedding all constraints in the SAS URI, you create a policy on the container (or share, table, queue) and link the SAS to it.

Key benefit: You can revoke a stored access policy, which immediately invalidates all SAS tokens linked to it. Without a stored access policy, the only way to revoke a SAS is to regenerate the account key (which breaks everything else using that key).

Without Stored Access PolicyWith Stored Access Policy
SAS constraints baked into the URIConstraints defined in the policy
Cannot revoke individual SASCan revoke by deleting/modifying the policy
Must regenerate account key to revokeGranular revocation

Storage firewalls and virtual networks

The storage firewall controls which networks can access the storage account endpoints.

Options:

  • Allow access from all networks (default — least secure)
  • Allow access from selected virtual networks and IP addresses — VNet rules + IP rules
  • Disable public access — only private endpoints can reach it

VNet service endpoints allow VNet subnets to access storage over the Azure backbone (not the public internet). The storage firewall references the VNet/subnet to allow access.

Real-world: Meridian Financial's storage security

Meridian Financial’s production storage accounts use:

  • Shared key access: Disabled (Entra ID only)
  • Firewall: Selected networks only (production VNet subnets)
  • Data access: Entra ID RBAC roles (Storage Blob Data Reader/Contributor)
  • Temporary external access: User delegation SAS with stored access policies
  • All requests require HTTPS (HTTP disabled)

This layered approach means even if someone gets the storage account name, they can’t access it without being on the right network AND having the right Entra ID permissions.

Identity-based access for Azure Files

Azure Files supports identity-based authentication for SMB file shares using:

  • On-prem AD DS (via Entra Connect)
  • Microsoft Entra Domain Services (managed domain service)
  • Microsoft Entra Kerberos (for hybrid identities)

This means users can mount Azure File shares with their existing AD credentials — just like on-prem file servers.

Question

Why does every Azure storage account have two access keys?

Click or press Enter to reveal answer

Answer

To enable key rotation without downtime. You switch applications to Key2, regenerate Key1, then switch back. This ensures you always have a working key during rotation.

Click to flip back

Question

What is the most secure type of SAS token?

Click or press Enter to reveal answer

Answer

User delegation SAS. It uses Entra ID credentials instead of the account key, so the master key is never exposed. However, it only supports Blob Storage (not Files, Tables, or Queues).

Click to flip back

Question

How can you revoke a SAS token without regenerating the account key?

Click or press Enter to reveal answer

Answer

Use a stored access policy. Link the SAS token to a stored access policy on the container. To revoke access, delete or modify the stored access policy. All SAS tokens linked to that policy are immediately invalidated.

Click to flip back

Knowledge check

Knowledge Check

TechCorp Solutions needs to give a third-party analytics vendor temporary read-only access to blobs in a specific container for 7 days. The security team requires the ability to revoke access immediately if needed. What should Alex configure?

Knowledge Check

Meridian Financial wants to ensure their production storage account can ONLY be accessed from VMs running in their production VNet. What should they configure?

🎬 Video coming soon

← Previous

Storage Accounts & Redundancy

Next →

Blob Containers & Storage Tiers

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.