Skip to content
Cloud Governance Tools

Configure key vaults to enable the firewall

Configure key vaults to enable the firewall is an Azure guardrail written in Azure Policy. Turns on the key vault firewall at create or update so the vault is not reachable by default from public IPs. Copied from a licensed open source set and read on 10 Nov 2026.

More network perimeter guardrails ยท About Azure Policy

Built-in policy definition: Configure key vaults to enable firewall
Definition ID: ac673a9a-f77d-4846-b2d8-a57f8e1c01dc
Category: Key Vault
Supported effects: Modify, Disabled
policyRule (copied from the repository file):
{
    "if": {
      "allOf": [
        {
          "field": "type",
          "equals": "Microsoft.KeyVault/vaults"
        },
        {
          "field": "Microsoft.KeyVault/vaults/networkAcls.defaultAction",
          "notEquals": "Deny"
        }
      ]
    },
    "then": {
      "effect": "[parameters('effect')]",
      "details": {
        "conflictEffect": "audit",
        "roleDefinitionIds": [
          "/providers/Microsoft.Authorization/roleDefinitions/f25e0fa2-a7c8-4377-a976-54943a77a395"
        ],
        "operations": [
          {
            "operation": "addOrReplace",
            "field": "Microsoft.KeyVault/vaults/networkAcls.defaultAction",
            "value": "Deny"
          }
        ]
      }
    }
  }
Blocks
Turns on the key vault firewall at create or update so the vault is not reachable by default from public IPs.
Breaks
Modify changes the property during create or update instead of rejecting the request, and existing vaults change only through a remediation task. (source)
Test before applying
As for every Azure Policy guardrail: how to test before enforcing
Mechanism
Azure Policy (built-in definitions): Resources at the scope of the assignment (management group, subscription, resource group) and their children, except notScopes and exemptions
Taken from
open source set, MIT License, Azure/azure-policy repository, https://raw.githubusercontent.com/Azure/azure-policy/master/LICENSE

What the source says

"Enable the key vault firewall so that the key vault is not accessible by default to any public IPs." (read 10 Nov 2026).

What it breaks is documented for every guardrail of this mechanism: see Azure Policy.

Sources

  1. Configure key vaults to enable the firewall, read 10 Nov 2026
  2. What it breaks, read 10 Nov 2026
  3. How to test it first, read 10 Nov 2026

Last reviewed 16 Nov 2026.