fix(policy): remove duplicate WAF-on-AppGw built in Enforce-Guardrails-Network_20250326#2171
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Enforce-Guardrails-Network_20250326 custom policy initiative by removing a duplicate reference to the built-in “WAF should be enabled for Application Gateway” policy and deleting the now-unused appGwWaf initiative parameter, keeping the remaining WAF-on-AppGw enforcement via the existing Deny-Waf-Fw-rules reference.
Changes:
- Removed the
appGwWafinitiative parameter (previously only used by the duplicate reference). - Removed the duplicate policy reference block
Deny-AppGw-Without-Waffor built-in policy564feb30-bf6a-4854-b4bb-0d2d2d1e6c66.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "Disabled" | ||
| ] | ||
| }, | ||
| "vnetModifyDdos": { |
… duplicate WAF-on-AppGw reference The built-in policy 564feb30-bf6a-4854-b4bb-0d2d2d1e6c66 (WAF should be enabled for Application Gateway) was referenced twice in Enforce-Guardrails-Network_20250326: as Deny-Waf-Fw-rules (param wafFwRules) and Deny-AppGw-Without-Waf (param appGwWaf). Following the breaking-change process: the existing initiative is deprecated as-published and superseded by a new dated initiative Enforce-Guardrails-Network_20260714 without the duplicate reference or the redundant appGwWaf parameter. The default network guardrails assignment and portal tooltip now target the new initiative, and initiatives.json was regenerated from Bicep. BREAKING CHANGE: Enforce-Guardrails-Network_20250326 is deprecated and replaced by Enforce-Guardrails-Network_20260714 (removes the appGwWaf parameter).
0071a58 to
8ad7730
Compare
|
@pratyushverma63 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Summary
The
Enforce-Guardrails-Network_20250326initiative referenced the built-in policy564feb30-bf6a-4854-b4bb-0d2d2d1e6c66("Web Application Firewall (WAF) should be enabled forApplication Gateway") twice:
|
Deny-Waf-Fw-rules|wafFwRules||
Deny-AppGw-Without-Waf(duplicate) |appGwWaf|The
Deny-AppGw-Without-Wafentry is redundant — the same built-in is already enforced viaDeny-Waf-Fw-rules. This PR removes the duplicate reference and its now-unusedappGwWafparameter.Removing a parameter (
appGwWaf) from a published initiative can adversely impact any existingassignment that sets it. Per the breaking-change process,
the fix is delivered as a new dated initiative rather than an in-place edit.
Changes
Enforce-Guardrails-Network_20250326— kept as-published, with[Deprecated]:displayName,version: 2.0.0-deprecated,deprecated: true, andsupersededBy: Enforce-Guardrails-Network_20260714.Enforce-Guardrails-Network_20260714— identical content removed the duplicatereference and
appGwWafparameter;replacesPolicy: Enforce-Guardrails-Network_20250326;version: 2.1.0._20260714. (The default assignment does not setappGwWaf, so no assignment parameters change.)_20260714.Files changed (6)
src/resources/Microsoft.Authorization/policySetDefinitions/Enforce-Guardrails-Network_20250326.jsonsrc/resources/Microsoft.Authorization/policySetDefinitions/Enforce-Guardrails-Network_20260714.json(new)src/templates/initiatives.bicepeslzArm/managementGroupTemplates/policyDefinitions/initiatives.jsoneslzArm/managementGroupTemplates/policyAssignments/ENFORCE-GuardrailsNetworkPolicyAssignment.jsoneslzArm/eslz-portal.jsonTesting
tested that policy is shown in the portal https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyDetail.ReactView/id/%2Fproviders%2Fmicrosoft.authorization%2Fpolicydefinitions%2F564feb30-bf6a-4854-b4bb-0d2d2d1e6c66/version/2.0.0/scopes~/%5B%22%2Fsubscriptions%2F1a32a88c-076d-45a5-87c7-978346609b5a%22%5D
Related docs PR
Deprecation notice added in Azure/Azure-Landing-Zones: Azure/Azure-Landing-Zones#4211
BREAKING CHANGE:
Enforce-Guardrails-Network_20250326is deprecated and replaced byEnforce-Guardrails-Network_20260714(removes theappGwWafparameter).