Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Microsoft Azure Foundations v6.0.0 · 6.1.1.4

Azure Key Vault should send its audit logs to a diagnostic destination

  • Level 1
  • Management and Governance Services

This check looks at whether each Key Vault has a diagnostic setting that sends its audit events somewhere durable, such as a Log Analytics workspace. The safe setting is that every vault logs who reads, changes or deletes its keys, secrets and certificates.

Why it matters

A Key Vault holds the secrets that other systems trust: passwords, connection strings, encryption keys and certificates. If someone reads a secret they should not have, the vault is the only place that knows. Without diagnostic logging that knowledge is lost, and you cannot say which identity touched which secret or when.

Microsoft describes what the logs contain in Azure Key Vault logging. The audit events are not kept anywhere unless you route them with a diagnostic setting.

How to check it yourself

In the Azure portal open the Key Vault, then Monitoring, then Diagnostic settings. There should be at least one setting that has the audit logs category ticked and a destination chosen. This command only reads settings:

az keyvault list --query "[].id" -o tsv
az monitor diagnostic-settings list --resource VAULT_RESOURCE_ID \
  --query "value[].{name:name,logs:logs[?enabled].category}"

A vault with an empty result, or with no enabled audit category, fails the check. Run it with a Reader role on a test subscription first.

How to fix it

In the portal, open the vault, choose Diagnostic settings, then Add diagnostic setting. Tick the audit logs category, pick a destination (a Log Analytics workspace is the usual choice, a storage account or event hub also work), name the setting and save. Repeat for each vault.

Scripted version. It changes your subscription, so ConfigCobra never runs it for you:

az monitor diagnostic-settings create --name kv-audit \
  --resource VAULT_RESOURCE_ID \
  --workspace LOG_ANALYTICS_WORKSPACE_ID \
  --logs '[{"category":"AuditEvent","enabled":true}]'

To cover many vaults, an Azure Policy that deploys the setting automatically saves repeating this by hand.

What changes when you fix it

Applications that use the vault keep working: logging is a side channel and does not slow or block requests in a way anyone has to plan for. The people affected are the teams that own the destination and read the logs.

  • The workspace or storage account receives a new stream of events, so ingestion and retention settings apply to it.
  • Log entries show caller identities and the names of the secrets or keys they used, so limit who can read the destination.
  • Alert rules can now be written on the events, for example for a secret read from an unexpected identity.

Choose the destination, the retention period and the readers before you roll it out to every vault.

Included in

BenchmarkCIS IDProfile
CIS Microsoft Azure Foundations v6.0.06.1.1.4Level 1

Check this on your Microsoft Azure

ConfigCobra runs this check with every other control of the CIS Microsoft Azure Benchmarks, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial