Skip to main content

More Info:

Enable Storage Blob Encryption recommendations for virtual machines.

Risk Level

Low

Address

Operational Maturity, Security

Compliance Standards

  • HIPAA
  • ISO 27001
  • Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework

Triage and Remediation

Remediation

Using Console

To remediate the “Monitor Storage Blob Encryption setting is not enabled” misconfiguration in Azure using the Azure console, follow the below steps:
  1. Log in to the Azure portal (https://portal.azure.com/).
  2. Navigate to the “Storage accounts” service.
  3. Select the storage account that you want to remediate.
  4. In the left-hand menu, click on “Encryption” under the “Security + networking” section.
  5. In the “Encryption” blade, ensure that the “Storage Service Encryption” toggle is set to “On”.
  6. Scroll down to the “Advanced” section and ensure that the “Monitor Storage Blob Encryption setting” toggle is also set to “On”.
  7. Click “Save” to apply the changes.
By following the above steps, you have successfully remediated the “Monitor Storage Blob Encryption setting is not enabled” misconfiguration in Azure using the Azure console.

To remediate the “Monitor Storage Blob Encryption setting is not enabled” misconfiguration in AZURE using AZURE CLI, follow these steps:
  1. Open the AZURE CLI on your local machine or in the AZURE portal.
  2. Log in to AZURE using the command “az login”.
  3. Check if you have the necessary permissions to remediate this misconfiguration by running the command “az role assignment list —assignee <your email address or object ID>”. If you don’t have the necessary permissions, contact your administrator.
  4. Enable the “Monitor Storage Blob Encryption” setting using the command “az monitor diagnostic-settings create”. Here is an example command:
Note: Replace the placeholders <subscriptionId>, <resourceGroupName>, <storageAccountName>, <workspaceName>, and <encryptionScopeName> with the correct values for your environment.
  1. Verify that the “Monitor Storage Blob Encryption” setting is enabled by running the command “az monitor diagnostic-settings show”. Here is an example command:
If the output shows that the setting is enabled, then the misconfiguration has been remediated successfully.
To remediate the “Monitor Storage Blob Encryption setting is not enabled” misconfiguration in Azure using Python, you can follow the below steps:
  1. Import the required libraries:
  1. Authenticate and create the clients:
  1. Get the list of storage accounts:
  1. Loop through the storage accounts and check if the “Monitor Storage Blob Encryption” setting is enabled:
  1. If the “Monitor Storage Blob Encryption” setting is not enabled, update the storage account to enable it:
  1. Once the setting is enabled, you can also create an alert to monitor it:
By following these steps, you can remediate the “Monitor Storage Blob Encryption setting is not enabled” misconfiguration in Azure using Python.
This creates a policy assignment at subscription scope so Azure Security Center (Defender for Cloud) evaluates Storage accounts for the “Monitor Storage Blob Encryption” recommendation. No existing compute or storage resources are replaced; this only adds a policy assignment.To verify, terraform plan should show a single + create for azurerm_subscription_policy_assignment.monitor_storage_blob_encryption with the expected policy_definition_id and parameters (if applicable to that policy).