turbot/steampipe-mod-azure-compliance

Control: Azure Batch account should use customer-managed keys to encrypt data

Description

Use customer-managed keys to manage the encryption at rest of your Batch account's data. By default, customer data is encrypted 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.batch_account_encrypted_with_cmk

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
batch.id as resource,
case
when encryption ->> 'keySource' = 'Microsoft.KeyVault' then 'ok'
else 'alarm'
end as status,
case
when encryption ->> 'keySource' = 'Microsoft.KeyVault' then batch.name || ' encrypted with CMK.'
else batch.name || ' not encrypted with CMK.'
end as reason
, batch.resource_group as resource_group
, sub.display_name as subscription
from
azure_batch_account as batch,
azure_subscription as sub
where
sub.subscription_id = batch.subscription_id;

Tags