# Ensure 'Allowed Protocols' for Shared Access Signature (SAS) Tokens Are Restricted to HTTPS Only for Secrets and Keys

- Source: https://support.icompaas.com/support/solutions/articles/62000234810-ensure-allowed-protocols-for-shared-access-signature-sas-tokens-are-restricted-to-https-only-for-
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [Azure Storage Services Benchmark v1.0.0](https://support.icompaas.com/support/solutions/62000112694) › [Azure Storage Services Benchmark](https://support.icompaas.com/support/solutions/folders/62000169262)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

**Profile Applicability:** Level 1

**Description:**  
Shared access signatures (SAS) provide limited access to Azure Storage resources. When generating a SAS token, it is possible to specify the allowed protocols for requests made with the SAS. It is recommended to restrict access to HTTPS only to ensure secure transmission.

**Rationale:**  
Allowing SAS tokens over HTTP exposes them to interception by man-in-the-middle attacks, where an attacker can capture the token and misuse it to access or modify sensitive data. Enforcing HTTPS only mitigates this risk by encrypting the communication channel.

**Impact:** Pros:

-   Enhances security by ensuring encrypted transmission of SAS tokens.  
    
-   Reduces risk of token interception and misuse.  
    

Cons:

-   May require updates to existing clients or services to support HTTPS if they currently use HTTP.  
    

**Default Value:** By default, when generating a SAS, the allowed protocols setting is set to HTTPS only.

**Pre-requisites:** None specifically required beyond the ability to configure SAS token generation.

### **Remediation**

**Test Plan:**

**Using Azure Portal:**

1.  Open the Azure Portal at [https://portal.azure.com](https://portal.azure.com/).  
    
2.  Navigate to the Azure Storage account.  
    
3.  Review SAS token generation settings to verify that "Allowed protocols" is set to HTTPS only.  
    

**Using Azure CLI:**

1.  Use the following command to generate or inspect SAS tokens ensuring the flag is set when applicable.  
    
    \--https-only
    

### **Implementation Plan**

**Using Azure Portal:**

1.  While generating a SAS token, ensure the "Allowed protocols" option is set to HTTPS only.  
    
2.  Save and distribute the SAS token with this restriction.  
    

**Using Azure CLI:**

1.  Use commands with the  parameter to generate SAS tokens restricted to HTTPS.
    
    \--https-only
    
      
    

### **Backout Plan**

**Using Azure Portal:**

1.  If HTTPS only causes issues, you may modify the SAS token settings to allow HTTP temporarily, but this is not recommended.  
    

**Using Azure CLI:**

1.  Regenerate SAS tokens without the flag if necessary, understanding the security risks.  
    
    \--https-only 
    

**References:**

1.  [https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview  
    ](https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview)
    
2.  [https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
