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.
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
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
- In the Azure portal, go to SQL servers > select <server>
- Under Security, open Transparent data encryption
- Select Customer-managed key and choose the key from Azure Key Vault, then Save
- For each database on this server: go to SQL databases > select <database> > Transparent data encryption
- Set Status to On and Save
Source Code
Resource Type
microsoft.sql/servers
References
- https://www.trendmicro.com/cloudoneconformity-staging/knowledge-base/azure/Sql/use-byok-for-transparent-data-encryption.html#
- https://learn.microsoft.com/en-us/azure/azure-sql/database/transparent-data-encryption-byok-overview?view=azuresql
- https://learn.microsoft.com/en-us/azure/azure-sql/database/transparent-data-encryption-byok-overview?view=azuresql&tabs=azurekeyvault%2Cazurekeyvaultrequirements%2Cazurekeyvaultrecommendations