π Azure Diagnostic Setting for Azure Key Vault is not enabled π’
- Contextual name: π Diagnostic Setting for Azure Key Vault is not enabled π’
- ID:
/ce/ca/azure/monitor/diagnostic-setting-for-azure-key-vault
- Located in: π Azure Monitor
Flagsβ
- π’ Impossible policy
- π’ Policy with categories
- π’ Policy with type
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Cloud Conformity
- Internal
dec-x-b2ce0ca1
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-b2ce0ca1 | 1 |
Descriptionβ
Descriptionβ
Enable AuditEvent logging for key vault instances to ensure interactions with key vaults are logged and available.
Rationaleβ
Monitoring how and when key vaults are accessed, and by whom, enables an audit trail of interactions with confidential information, keys, and certificates managed by Azure Key Vault. Enabling logging for Key Vault saves information in a user provided destination of either an Azure storage account or Log Analytics workspace. The same destination can be used for collecting logs for multiple Key Vaults.
Auditβ
From Azure Portalβ
- Go to
Key vaults
.- For each Key vault, under
Monitoring
, go toDiagnostic settings
.- Click
Edit setting
next to a diagnostic setting.- Ensure that a destination is configured.
- Under
Category groups
, ensure thataudit
andallLogs
are checked.From Azure CLIβ
List all key vaults:
az keyvault list
For each keyvault
id
:az monitor diagnostic-settings list --resource <id>
Ensure that
storageAccountId
reflects your desired destination and thatcategoryGroup
andenabled
are set as follows in the sample outputs below:... see more
Remediationβ
Remediationβ
From Azure Portalβ
- Go to
Key vaults
.- Select a Key vault.
- Select
Diagnostic settings
.- Click
Edit setting
to update an existing diagnostic setting, orAdd diagnostic setting
to create a new one.- If creating a new diagnostic setting, provide a name.
- Configure an appropriate destination.
- Under
Category groups
, checkaudit
andallLogs
.- Click
Save
.From Azure CLIβ
To update an existing
Diagnostic Settings
:az monitor diagnostic-settings update --name "<diagnostic_setting_name>" --resource <key_vault_id>
To create a new Diagnostic Settings:
az monitor diagnostic-settings create --name "<diagnostic_setting_name>" --resource <key_vault_id> --logs "[{category:audit,enabled:true},{category:allLogs,enabled:true}]" --metrics "[{category:AllMetrics,enabled:true}]" --event-hub <event_hub_ID> --event-hub-rule <event_hub_auth_rule_ID> | --storage-account <storage_account_ID> |--workspace <log_analytics_workspace_ID> | --marketplace-partner-id <solution_resource_ID>
From PowerShellβ
... see more