Ensure that your Azure Cosmos DB accounts are encrypted using Customer-Managed Keys (CMKs) instead of Microsoft-managed keys (i.e. default keys used by Microsoft Azure for encryption at rest) in order to have a more granular control over your data encryption and decryption process.
Microsoft Azure automatically encrypts Azure Cosmos DB account data at rest. The encryption protects your data and assists in fulfilling your organization's security and compliance requirements. By default, the encryption process uses Microsoft-managed keys, also known as service-managed keys. However, you can bring your own keys (i.e. Customer-Managed Keys) to fully control who can use the encryption keys and access the encrypted data. Using Customer-Managed Keys (CMKs) also allows you to automatically update the key version used for storage encryption whenever a new version is available.
Audit
To determine if your Azure Cosmos DB accounts are using Customer-Managed Keys (CMKs) for encryption, perform the following operations:
Getting the encryption configuration for Azure Cosmos DB accounts using Microsoft Azure Portal is not currently supported.Remediation / Resolution
To enable encryption at rest for existing Azure Cosmos DB accounts using Customer-Managed Keys (CMKs), perform the following operations:
Enabling encryption with Customer-Managed Keys (CMKs) for Azure Cosmos DB accounts using Microsoft Azure Portal is not currently supported.References
- Azure Official Documentation
- Configure customer-managed keys for your Azure Cosmos DB account with Azure Key Vault
- Configure customer-managed keys for your existing Azure Cosmos DB account with Azure Key Vault
- Azure Command Line Interface (CLI) Documentation
- az account list
- az account set
- az cosmosdb list
- az cosmosdb show
- az cosmosdb update
- az identity create
- az keyvault create
- az keyvault set-policy
- az keyvault key create