Check provider logo

SQL server uses a customer-managed key for the TDE protector and all databases have TDE enabled

sqlserver_tde_encrypted_with_cmk

Severitycritical
Servicesqlserver
by Prowler

Azure SQL Server uses Transparent Data Encryption with a customer-managed key in Azure Key Vault, and each database has TDE Enabled

Risk

Without TDE with CMK, data at rest may be unencrypted or controlled by service keys, weakening confidentiality and key custody. Attackers or insiders could read backups, snapshots, or stolen disks, and you cannot enforce rotation, revocation, or separation of duties, raising compliance and incident response risks.

Run this check with Prowler CLI

prowler azure --checks sqlserver_tde_encrypted_with_cmk

Recommendation

Use a customer-managed TDE protector in Azure Key Vault or Managed HSM and ensure TDE is Enabled for every database.

  • Apply least privilege to key access
  • Enable rotation and monitor key use
  • Protect keys with soft-delete and purge protection
  • Enforce via policy and maintain key backups for restores

Remediation

CLI

az rest --method PUT --url "https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.Sql/servers/<SERVER_NAME>/encryptionProtector/current?api-version=2021-11-01" --body '{"properties":{"serverKeyType":"AzureKeyVault","serverKeyName":"<KEY_VAULT_NAME><KEY_NAME><KEY_VERSION>"}}' && az sql db tde set --resource-group <RESOURCE_GROUP> --server <SERVER_NAME> --database <DATABASE_NAME> --status Enabled

Native IaC
Terraform
Other
  1. In the Azure portal, go to SQL servers > select <server>
  2. Under Security, open Transparent data encryption
  3. Select Customer-managed key and choose the key from Azure Key Vault, then Save
  4. For each database on this server: go to SQL databases > select <database> > Transparent data encryption
  5. Set Status to On and Save

Source Code

Resource Type

microsoft.sql/servers

References