π Azure Diagnostic Setting Logs export to Storage Account not encrypted with Customer-managed key π’
- Contextual name: π Diagnostic Setting Logs export to Storage Account not encrypted with Customer-managed key π’
- ID:
/ce/ca/azure/monitor/diagnostic-logs-export-to-storage-without-cmk
- Located in: π Azure Monitor
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Internal
dec-x-5c3c2067
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-5c3c2067 | 1 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
Storage accounts with the activity log exports can be configured to use Customer Managed Keys (CMK).
Rationaleβ
Configuring the storage account with the activity log export container to use CMKs provides additional confidentiality controls on log data, as a given user must have read permission on the corresponding storage account and must be granted decrypt permission by the CMK.
Impactβ
NOTE: You must have your key vault setup to utilize this. All Audit Logs will be encrypted with a key you provide. You will need to set up customer managed keys separately, and you will select which key to use via the instructions here. You will be responsible for the lifecycle of the keys, and will need to manually replace them at your own determined intervals to keep the data secure.
Auditβ
This policy flags an Azure Subscription Diagnostic Setting as
INCOMPLIANT
if the associatedStorage Account
, the logs being sent to, is not encrypted by a customer-managed key. This is detected when theEncryption Key Source
field is not set to Microsoft.Keyvault, indicating that the storage account relies on a Microsoftβmanaged key.... see more
Remediationβ
Remediationβ
From Azure Portalβ
- Go to
Monitor
.- Select
Activity log
.- Select
Export Activity Logs
.- Select a
Subscription
.- Note the name of the
Storage Account
for the diagnostic setting.- Navigate to
Storage accounts
.- Click on the storage account.
- Under
Security + networking
, clickEncryption
.- Next to
Encryption type
, selectCustomer-managed keys
.- Complete the steps to configure a customer-managed key for encryption of the storage account.
From Azure CLIβ
az storage account update --name <name of the storage account> --resource-group <resource group for a storage account> --encryption-key-source=Microsoft.Keyvault --encryption-key-vault <Key Vault URI> --encryption-key-name <KeyName> --encryption-key-version <Key Version>
From PowerShellβ
Set-AzStorageAccount -ResourceGroupName <resource group name> -Name <storage account name> -KeyvaultEncryption -KeyVaultUri <key vault URI> -KeyName <key name>