Created
May 2, 2021 21:00
-
-
Save alanta/2020ce6fb35b058148c9cc4d80c8d354 to your computer and use it in GitHub Desktop.
Disable specific built-in firewall rules that are causing excessive blocking on an Azure Application Gateway.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": {}, | |
"variables": { | |
"publicSitePolicy": "my-wafpolicy-for-public-sites", | |
"htmlOwaspRuleOverrides": [ | |
{ | |
"ruleGroupName": "REQUEST-932-APPLICATION-ATTACK-RCE", | |
"rules": [ | |
{ | |
"ruleId": "932150", | |
"state": "Disabled" | |
} | |
] | |
}, | |
{ | |
"ruleGroupName": "REQUEST-942-APPLICATION-ATTACK-SQLI", | |
"rules": [ | |
{ | |
"ruleId": "942370", | |
"state": "Disabled" | |
}, | |
{ | |
"ruleId": "942210", | |
"state": "Disabled" | |
}, | |
{ | |
"ruleId": "942430", | |
"state": "Disabled" | |
}, | |
{ | |
"ruleId": "942440", | |
"state": "Disabled" | |
}, | |
{ | |
"ruleId": "942450", | |
"state": "Disabled" | |
} | |
] | |
} | |
] | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "2019-09-01", | |
"type": "Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies", | |
"name": "[variables('publicSitePolicy')]", | |
"location": "[resourceGroup().location]", | |
"tags": {}, | |
"properties": { | |
"customRules": [], | |
"policySettings": { | |
"fileUploadLimitInMb": 20, | |
"maxRequestBodySizeInKb": 128, | |
"mode": "Prevention", | |
"requestBodyCheck": false, | |
"state": "Enabled" | |
}, | |
"managedRules": { | |
"exclusions": [], | |
"managedRuleSets": [ | |
{ | |
"ruleSetType": "OWASP", | |
"ruleSetVersion": "3.1", | |
"ruleGroupOverrides": "[variables('htmlOwaspRuleOverrides')]" | |
} | |
] | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment