π‘οΈ Azure SQL Database Transparent Data Encryption is not enabledπ’
- Contextual name: π‘οΈ Database Transparent Data Encryption is not enabledπ’
- ID:
/ce/ca/azure/sql-database/database-transparent-data-encryption - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
- Cloud Conformity: Use Microsoft Entra Admin for SQL Authentication
- Internal:
dec-x-2fcb6d85
Similar Internal Rulesβ
| Rule | Policies | Flags |
|---|---|---|
| βοΈ dec-x-2fcb6d85 | 2 |
Descriptionβ
Descriptionβ
Enable Transparent Data Encryption on every SQL Database.
Rationaleβ
Azure SQL Database transparent data encryption helps protect against the threat of malicious activity by performing real-time encryption and decryption of the database, associated backups, and transaction log files at rest without requiring changes to the application.
Auditβ
From Azure Portalβ
- Go to
SQL databases.- For each DB instance, under
Security, clickData Encryption.- Under
Transparent data encryption, ensure thatData encryptionis set toOn.From Azure CLIβ
Ensure the output of the following command is
Enabled:az sql db tde show \
--resource-group {{resource-group-name}} \
--server {{server-name}} \
--database {{database-name}} \
--query statusFrom PowerShellβ
Get a list of SQL Servers:
Get-AzSqlServerFor each server, list the databases:
Get-AzSqlDatabase `
-ServerName {{sql-server-name}} `
-ResourceGroupName {{resource-group-name}}For each database not listed as a
Masterdatabase, check for Transparent Data Encryption:... see more
Remediationβ
Remediationβ
From Azure Portalβ
- Go to
SQL databases.- For each DB instance, under
Security, clickData Encryption.- Under
Transparent data encryption, setData encryptiontoOn.- Click
Save.From Azure CLIβ
Use the following command to enable
Transparent data encryptionfor a SQL database:az sql db tde set \
--resource-group {{resource-group-name}} \
--server {{server-name}} \
--database {{database-name}} \
--status EnabledFrom PowerShellβ
Use the following command to enable Transparent data encryption for a SQL database:
Set-AzSqlDatabaseTransparentDataEncryption `
-ResourceGroupName {{resource-group-name}} `
-ServerName {{sql-server-name}} `
-DatabaseName {{database-name}} `
-State "Enabled"Note:
- TDE cannot be used to encrypt the logical master database in SQL Database. The master database contains objects that are needed to perform the TDE operations on the user databases.
- Azure Portal does not show master databases per SQL server. However, CLI/API responses will show master databases.