turbot/steampipe-mod-azure-compliance

Control: Azure Cosmos DB accounts should use customer-managed keys to encrypt data at rest

Description

Use customer-managed keys to manage the encryption at rest of your Azure Cosmos DB. By default, the data is encrypted at rest with service-managed keys, but customer-managed keys are commonly required to meet regulatory compliance standards. Customer-managed keys enable the data to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management.

Usage

Run the control in your terminal:

powerpipe control run azure_compliance.control.cosmosdb_account_encryption_at_rest_using_cmk

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run azure_compliance.control.cosmosdb_account_encryption_at_rest_using_cmk --share

SQL

This control uses a named query:

select
a.id as resource,
case
when key_vault_key_uri is not null then 'ok'
else 'alarm'
end as status,
case
when key_vault_key_uri is not null then a.name || ' encrypted at rest using CMK.'
else a.name || ' not encrypted at rest using CMK.'
end as reason
, a.resource_group as resource_group
, sub.display_name as subscription
from
azure_cosmosdb_account as a,
azure_subscription as sub
where
sub.subscription_id = a.subscription_id;

Tags