π 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
- Located in: π Azure SQL Database
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Cloud Conformity
- Internal
dec-x-2fcb6d85
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-2fcb6d85 | 2 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
Enable Transparent Data Encryption on every SQL server.
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 encryption
is set toOn
.From Azure CLIβ
Ensure the output of the below command is
Enabled
:az sql db tde show --resource-group <resourceGroup> --server <dbServerName> --database <dbName> --query status
From PowerShellβ
Get a list of SQL Servers:
Get-AzSqlServer
For each server, list the databases:
Get-AzSqlDatabase -ServerName <SQL Server Name> -ResourceGroupName <Resource Group Name>
For each database not listed as a
Master
database, 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 encryption
toOn
.- Click
Save
.From Azure CLIβ
Use the below command to enable
Transparent data encryption
for SQL DB instance:az sql db tde set --resource-group <resourceGroup> --server <dbServerName> --database <dbName> --status Enabled
From PowerShellβ
Use the below command to enable Transparent data encryption for SQL DB instance:
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.