3.5 Ensure critical data is encrypted with customer-managed keys (CMK) (Manual)
Profile Applicability
- Level 2
Description
Customer-managed keys introduce additional depth to security by providing control over encryption keys. Where required, and organizational capacity allows, sensitive data at rest can be encrypted using customer-managed keys.
While it is possible to automate the assessment of this recommendation, the assessment status remains "Manual" due to ideally limited scope. The scope of application should be carefully considered to account for organizational capacity, and targeted to workloads with specific need for CMK.
Rationale
Customer-managed keys provide greater control over the creation, rotation, and revocation of encryption keys, supporting strict security and compliance requirements.
Impact
Implementing customer-managed keys introduces additional administrative effort to create, rotate, monitor, and secure encryption keys.
Audit Procedure
Audit from Azure Portal
- Go to
Azure Cosmos DB. - Select the name of an Azure Cosmos DB account.
- Under Settings, select Data Encryption.
- Ensure
Encryption Key Typeis set toCustomer-managed key. - Repeat steps 1-4 for each account.
Audit from Azure CLI
Run the following command to list Azure Cosmos DB accounts:
az cosmosdb list
For each account, run the following command to get the Key Vault key URI:
az cosmosdb show --resource-group <resource-group> --name <cosmos-db> --query keyVaultKeyUri
Ensure an Azure Key Vault key URI is returned.
Audit from PowerShell
Run the following command to get Azure Cosmos DB accounts for a given resource group:
Get-AzCosmosDBAccount -ResourceGroupName <resource-group>
Run the following command to get the account with a given name:
$cosmosdb = Get-AzCosmosDBAccount -ResourceGroupName <resource-group> -Name <cosmos-db>
Run the following command to get the Key Vault key URI:
$cosmosdb.KeyVaultKeyUri
Ensure an Azure Key Vault key URI is returned.
Repeat for each account.
Audit from Azure Policy
- Policy ID:
1f905d99-2ab7-462c-a6b0-f709acca6c8f- Name: 'Azure Cosmos DB accounts should use customer-managed keys to encrypt data at rest'
Expected Result
Encryption Key Type should be set to Customer-managed key, or a Key Vault key URI should be returned from CLI/PowerShell.
Remediation
Remediate from Azure Portal
- Go to
Azure Cosmos DB. - Select the name of an Azure Cosmos DB account.
- Under Settings, select Data Encryption.
- Set
Encryption Key TypetoCustomer-managed key. - Provide a key URI.
- Select Save.
- Repeat steps 1-6 for each account requiring remediation.
Default Value
By default, Azure Cosmos DB accounts are encrypted using service-managed keys.
References
CIS Controls
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 3.11 Encrypt Sensitive Data at Rest | X | X | |
| v7 | 14.8 Encrypt Sensitive Information at Rest | X |
MITRE ATT&CK Mappings
| Techniques / Sub-techniques | Tactics | Mitigations |
|---|---|---|
| T1530 | TA0009 | M1041 |