Storage account allows insecure transfer

Require HTTPS for storage REST requests and verify client and protocol-specific transport protection.

Description

In Bicep, set the storage account’s properties.supportsHttpsTrafficOnly to true to require HTTPS for REST requests.

Potential impact

Files and SAS tokens sent over HTTP travel in plaintext. HTTP-only clients lose access when the account requires secure transfer.

Remediation

First configure apps, backup tools and scripts to use HTTPS from the first request and validate the server certificate. After applying, verify that a normal HTTPS request succeeds and a credential-free HTTP request is rejected for insecure transfer. For SMB or NFS, check the service’s transport encryption and client compatibility. Manage encryption at rest and data permissions separately.

Examples

Both declarations refer to the same storage account. Supply a globally unique name, location, SKU and account kind in your deployment.

Before

bicep
resource storageaccount1 'Microsoft.Storage/storageAccounts@2021-02-01' = {
  name: 'storageaccount1'
  properties: {
    supportsHttpsTrafficOnly: false
  }
}

After

bicep
resource storageaccount1Negative1 'Microsoft.Storage/storageAccounts@2021-02-01' = {
  name: 'storageaccount1'
  properties: {
    supportsHttpsTrafficOnly: true
  }
}

References