All systems operational System status

Azure 23 Sep 2026 10 min read

Azure Storage Security: Common Configuration Mistakes

Learn how to secure Azure Storage Accounts by avoiding common configuration mistakes involving public access, shared keys, SAS tokens, RBAC, networking, encryption, HTTPS, logging and data protection.


Azure Storage is widely used for storing application data, backups, logs, media files, documents and other business-critical information. Because storage accounts often contain sensitive or valuable data, an incorrect configuration can create unnecessary security exposure.

Many Azure Storage security problems are not caused by sophisticated attacks. They are caused by simple configuration mistakes such as unnecessary public access, excessive permissions, leaked access keys, overly broad SAS tokens or missing network restrictions.

This guide explains common Azure Storage security mistakes and practical ways to reduce the risk.

Azure Storage Security Architecture


                    Users / Applications
                            |
                            v
                    Azure Storage Account
                            |
          +-----------------+-----------------+
          |                 |                 |
          v                 v                 v
       Identity          Network          Data
       Security          Security         Protection
          |                 |                 |
        RBAC              Firewall       Encryption
        Managed ID        Private EP      Versioning
        SAS               VNet            Soft Delete
  

A secure storage architecture should consider identity, network access, data protection and monitoring together.

1. Allowing Anonymous Public Access Unnecessarily

One of the most important Azure Storage security settings is whether anonymous public access is permitted for blob data.

If an application does not require anonymous access, allowing it creates unnecessary exposure.

A common mistake is assuming that because the storage account itself is private, every object inside it is automatically inaccessible publicly. Storage account and container-level settings must be reviewed carefully.

Recommended Approach

  • Disable anonymous access when it is not required.
  • Review container access settings.
  • Use authenticated access for private application data.
  • Regularly audit publicly accessible storage.

2. Making a Blob Container Public for Convenience

Developers sometimes make a container public because an application needs to serve images, documents or other files.

This can be acceptable for genuinely public content, but it should not be used for private or sensitive data.


Bad Pattern

Application
     |
     v
Public Container
     |
     v
Sensitive Files
  

Before making a container public, determine whether the data is intentionally public and whether the requirement can instead be satisfied using authenticated access or another controlled delivery mechanism.

3. Using Storage Account Access Keys Everywhere

Storage accounts provide access keys that can be used for authentication. A common operational problem is using these keys directly in application code, scripts, CI/CD pipelines and configuration files.


Application
     |
     +---- Hard-coded Storage Key
     |
     v
Storage Account
  

If the key is accidentally exposed, anyone who obtains it may be able to access the storage account according to the permissions associated with that key.

Better Approach

Where supported by the application architecture, prefer Microsoft Entra ID-based authentication and managed identities instead of distributing long-lived storage account keys.

4. Hard-Coding Secrets in Source Code

Never treat storage credentials as ordinary application configuration.

A dangerous pattern looks like:


STORAGE_ACCOUNT_KEY="very-secret-value"
  

Source code can be copied, backed up, logged or accidentally committed to a public repository.

Use appropriate secret-management and identity mechanisms instead of placing credentials directly inside source code.

5. Giving Applications More Permissions Than They Need

Another common mistake is granting broad permissions when an application only needs a small subset of storage operations.

For example, an application that only needs to read blobs should not automatically receive permissions to delete or modify unrelated data.

Follow Least Privilege


Application
    |
    v
Required Storage Permission
    |
    +---- Read
    |
    +---- Write
    |
    +---- Delete
    |
    +---- Other Operations
  

Assign only the permissions required for the workload.

6. Using Broad RBAC Assignments

Azure role-based access control allows administrators to control access to Azure resources.

A common mistake is assigning a highly privileged role at a broad scope simply because it makes the application or administrator work immediately.

Instead:

  • Choose the least-privileged suitable role.
  • Use the narrowest practical scope.
  • Review inherited permissions.
  • Remove unused role assignments.
  • Audit privileged identities regularly.

7. Using SAS Tokens Without Restrictions

Shared Access Signatures, or SAS tokens, provide delegated access to Azure Storage resources.

SAS is powerful, but poorly configured tokens can create unnecessary exposure.

A SAS should be restricted according to the actual requirement.

  • Limit permissions.
  • Limit the resource scope.
  • Set an appropriate expiration time.
  • Restrict allowed protocols where applicable.
  • Restrict source IP ranges when practical.

8. Creating Long-Lived SAS Tokens

A long-lived SAS token increases the period during which a leaked token could potentially be used.

For temporary access, use a short validity period that matches the actual business requirement.


User Request
     |
     v
Short-Lived SAS
     |
     v
Required Blob
     |
     v
Token Expires
  

Avoid creating tokens that remain valid indefinitely simply for convenience.

9. Ignoring SAS Leakage

SAS tokens often appear inside URLs, which means they can accidentally end up in browser history, logs, screenshots, monitoring systems or chat messages.

Treat a SAS URL as sensitive information when it grants access to protected data.

10. Not Restricting Storage Network Access

Azure Storage supports network access controls that can reduce exposure to unwanted sources.

Depending on the architecture, consider:

  • Storage firewall rules.
  • Virtual network integration where supported.
  • Private Endpoints.
  • Trusted network access.
  • Appropriate public network access settings.

11. Using Public Network Access When It Is Not Required

If a storage account is intended to be accessed only through private network paths, leaving unnecessary public network access enabled can increase the attack surface.


Application VNet
       |
       v
Private Endpoint
       |
       v
Azure Storage
  

For workloads that require private connectivity, Private Endpoints can provide a private IP-based path into supported Azure services.

12. Misunderstanding Private Endpoints

A Private Endpoint provides private connectivity to an Azure service through a private IP address in a virtual network.

However, deploying a Private Endpoint does not automatically mean that every public access path has been eliminated.

Review the storage account's network configuration and determine whether public network access should remain enabled.

13. Forgetting DNS Configuration With Private Endpoints

Private Endpoint deployments can involve DNS configuration.

A common troubleshooting scenario is:


Application
     |
     v
Storage hostname
     |
     v
Wrong DNS resolution
     |
     v
Connection failure
  

If a private endpoint is used, verify that DNS resolution directs clients to the expected private address.

14. Not Enforcing HTTPS

Storage traffic should use encrypted transport.

Review the storage account configuration and ensure that secure transfer requirements are enabled according to the workload's requirements.


Application
     |
     | HTTPS
     v
Azure Storage
  

Avoid sending sensitive storage requests over unencrypted HTTP.

15. Ignoring Encryption Settings

Azure Storage provides encryption for data at rest. Organizations with specific compliance or security requirements may also need to consider customer-managed keys and key-management practices.

Encryption should be considered together with:

  • Identity management.
  • Key management.
  • Network controls.
  • Access logging.
  • Data retention.

16. Poor Key Management

Using customer-managed encryption keys can introduce additional operational responsibilities.

If your organization uses customer-managed keys, establish procedures for:

  • Key rotation.
  • Access control.
  • Monitoring.
  • Backup and recovery.
  • Key expiration management.

A storage security architecture is only as reliable as the operational processes around its keys.

17. Not Enabling Blob Soft Delete

Accidental deletion is a major operational risk for important storage data.

Blob soft delete can help recover deleted blob data within the configured retention period.


Blob
 |
 +---- Deleted
        |
        v
   Soft Deleted
        |
        v
   Recovery Window
  

Configure retention according to the application's recovery requirements.

18. Not Using Container Soft Delete Where Appropriate

If containers are important to the application, consider the appropriate data-protection capabilities available for the storage account.

Data recovery requirements should be considered separately from access-control requirements.

19. Ignoring Blob Versioning

Blob versioning can help preserve previous versions of blob data when supported and appropriately configured.


Document v1
    |
    v2
    |
    v3
    |
Current Version
  

This can be useful for recovery from accidental modifications or overwrites.

20. Confusing Security With Backup

Features such as soft delete and versioning improve recoverability, but they should not automatically be treated as a complete backup strategy.

Critical data should have a recovery strategy appropriate to the workload, including consideration of retention, recovery objectives and disaster scenarios.

21. Not Monitoring Storage Activity

Security controls are much more effective when suspicious or unexpected activity can be detected.

Depending on the environment, monitor relevant:

  • Authentication activity.
  • Authorization changes.
  • Data access.
  • Configuration changes.
  • Network access.
  • Administrative activity.

22. Ignoring Diagnostic Logs

Azure provides diagnostic capabilities that can help organizations understand activity and troubleshoot access problems.

Centralizing relevant logs can make it easier to investigate:

  • Unexpected data access.
  • Authentication failures.
  • Configuration changes.
  • Network connection issues.
  • Potential security incidents.

23. Storing Secrets Inside Blob Storage

Blob storage should not become a replacement for a dedicated secret-management system.

Avoid storing items such as:

  • API keys.
  • Passwords.
  • Private keys.
  • Database credentials.
  • Cloud access credentials.

Use an appropriate secret-management service for sensitive credentials.

24. Overly Broad Storage Firewall Rules

Network restrictions can become ineffective when administrators allow large address ranges simply to make connectivity work.

Prefer narrowly scoped network access whenever the application architecture permits it.

25. Allowing Every Azure Service Without Reviewing the Requirement

Network configuration options that allow access from broad Azure service categories should be reviewed carefully.

The correct configuration depends on which services actually need to communicate with the storage account.

26. Forgetting Cross-Tenant or External Access

Applications sometimes need to share storage data with external organizations or users.

External access should be explicitly designed rather than accidentally created through broad permissions or publicly accessible storage.

Use controlled identity-based or delegated-access mechanisms where appropriate.

27. Not Reviewing CORS Configuration

Cross-Origin Resource Sharing, or CORS, controls which web origins can make browser-based requests to supported storage services.

A common mistake is allowing broad origins when the application only needs access from a small number of trusted domains.


Browser
   |
   v
Allowed Origin
   |
   v
Azure Storage
  

Review allowed origins and methods according to the actual application requirement.

28. Treating Storage URLs as Secrets

A normal storage endpoint URL is not necessarily a secret.

What matters is the access mechanism associated with the URL.

A URL containing a sensitive SAS token should be treated differently from a public endpoint without privileged credentials.

29. Not Rotating Credentials After Exposure

If a storage account key or other sensitive credential is exposed, simply deleting the leaked file may not be sufficient.

Follow your incident-response process and rotate or revoke the affected credential where appropriate.

Also investigate where the credential was exposed and whether additional systems may contain copies.

30. No Regular Storage Security Review

Storage configuration changes over time. A secure configuration today can become insecure after a new application, user, automation workflow or network requirement is introduced.

Perform periodic reviews of:

  • Public access settings.
  • RBAC assignments.
  • Access keys.
  • SAS usage.
  • Network restrictions.
  • Private endpoints.
  • Encryption configuration.
  • Data-protection settings.
  • Logging and monitoring.

Azure Storage Security Checklist

Security Area What to Check
Public Access Disable unnecessary anonymous access
Identity Use least-privilege RBAC where appropriate
Access Keys Avoid unnecessary distribution and exposure
SAS Limit scope, permissions and lifetime
Network Restrict unnecessary public access
Private Endpoint Use where private connectivity is required
HTTPS Require secure transfer
Encryption Review encryption and key-management requirements
Recovery Consider soft delete and versioning where appropriate
Monitoring Enable appropriate diagnostics and monitoring
CORS Allow only required web origins
Review Regularly audit configuration and permissions

Secure Azure Storage Architecture


                    Users
                      |
                      v
               Identity / RBAC
                      |
                      v
                Application
                      |
              +-------+-------+
              |               |
              v               v
        Private Network     Managed Identity
              |               |
              +-------+-------+
                      |
                      v
                Azure Storage
                      |
       +--------------+--------------+
       |              |              |
       v              v              v
   Encryption     Soft Delete     Monitoring
       |              |              |
       +--------------+--------------+
                      |
                      v
                 Recovery
  

Final Thoughts

Azure Storage security is not just about turning on encryption. A secure storage environment requires multiple layers of protection covering identity, access, networking, credentials, data protection and monitoring.

The most common problems are usually caused by excessive permissions, unnecessary public access, long-lived credentials, overly broad SAS tokens and insufficient network restrictions.

Start with least privilege, keep private data private, restrict network access where appropriate, prefer modern identity-based authentication, protect credentials and regularly review the storage configuration.

These practices can significantly reduce the chance that a simple configuration mistake turns into a serious cloud security incident.

Official Microsoft Azure Resources

← All resources Get technical support →