Skip to main content

More Info:

Ensure that infrastructure double encryption is enabled for your Azure PostgreSQL database servers in order to add a second layer of encryption for your PostgreSQL databases using a different encryption algorithm which provides enhanced data protection.

Risk Level

Medium

Address

Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS AZURE
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • Cloudanix Best Practice
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • GDPR
  • HITRUST CSF
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST CSF
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • PCI
  • Reserve Bank of India (RBI) Cyber Security Framework
  • SOC2
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

To remediate the misconfiguration “Enable Infrastructure Double Encryption” in Azure using Azure Console, follow the below steps:
  1. Login to the Azure Portal (https://portal.azure.com/)
  2. Click on the “Virtual machines” option from the left-hand menu.
  3. Select the virtual machine that you want to remediate.
  4. Click on the “Disks” option from the left-hand menu.
  5. Select the disk that you want to remediate.
  6. Click on the “Disk Encryption” option from the left-hand menu.
  7. Click on the “Enable encryption” button.
  8. Select the key vault that you want to use for encryption.
  9. Click on the “Save” button to enable encryption.
By following these steps, you can remediate the misconfiguration “Enable Infrastructure Double Encryption” in Azure using Azure Console.

To remediate the misconfiguration of enabling infrastructure double encryption in AZURE using AZURE CLI, please follow the below steps:
  1. Open the AZURE CLI in your terminal or command prompt.
  2. Login to your AZURE account using the command “az login”.
  3. Select the subscription in which the infrastructure needs to be double encrypted using the command az account set --subscription <subscription-id>
  4. Enable the infrastructure double encryption by creating a new storage account with encryption enabled using the command az storage account create --name <storage-account-name> --resource-group <resource-group-name> --location <location> --sku Standard_LRS --encryption-services blob --encryption blob.
  5. Verify that the infrastructure double encryption is enabled by checking the encryption status of the storage account using the command az storage account show --name <storage-account-name> --resource-group <resource-group-name> --query "encryption.services.blob.enabled".
By doing the above steps, you have successfully remediated the misconfiguration of enabling infrastructure double encryption in AZURE using AZURE CLI.
To enable Infrastructure Double Encryption in Azure using Python, you can follow these steps:
  1. Install the Azure SDK for Python using pip:
  2. Import the necessary modules:
  3. Set up the Azure credentials:
  4. Create a StorageManagementClient object:
  5. Get the storage account that you want to enable Infrastructure Double Encryption for:
  6. Create an Encryption object with the necessary properties:
  7. Create a StorageAccountUpdateParameters object with the Encryption object:
  8. Update the storage account with the StorageAccountUpdateParameters object:
These steps will enable Infrastructure Double Encryption for the specified storage account in Azure using Python.
Replace POSTGRES_SERVER_NAME, POSTGRES_ADMIN_USERNAME, and POSTGRES_ADMIN_PASSWORD with your values, and wire the resource group as appropriate.Note: infrastructure_encryption_enabled can only be set at creation time; enabling it on an existing azurerm_postgresql_server forces replacement of the server (and thus a brief outage and data migration requirement). Plan this change accordingly.To verify, terraform plan should show a + create for a new azurerm_postgresql_server (and -/+ or - destroy for the old one if it already exists) with infrastructure_encryption_enabled: "false" => "true".