0

Configured Azure Application Gateway with WAF enabled, trying to remove waf managed rule exclusion using az network application-gateway waf-policy managed-rule exclusion rule-set remove command. Command executed successfully. But when try to validate managed rule not removed.

Ref: Microsoft link - az network application-gateway waf-policy managed-rule exclusion rule-set remove

Rajakumar Babu
  • 117
  • 2
  • 9

2 Answers2

0

• The command that you have used to delete the application gateway WAF managed rule exclusion set is incorrect. It should be as follows: -

  az network application-gateway waf-policy managed-rule exclusion rule-set remove -g MyResourceGroup --policy-name MyPolicy --match-variable RequestHeaderNames --match-operator StartsWith --selector Bing --type OWASP --version 3.2 --group-name MyRuleGroup

Similarly, when I tried the same in my environment, I was able to delete the same successfully as shown below with the command as given above by changing the required information in it: -

AGW managed ruleset exclusion

I have already created managed ruleset exclusion as seen above in the application gateway policy. Further, I executed the command as shown below and ensured that the managed ruleset exclusion gets deleted.

Powershell command for deletion

Command executed by me: -

 az network application-gateway waf-policy managed-rule exclusion rule-set remove -g <resource_group_name> --policy-name AGW1Policy --match-variable RequestHeaderNames --match-operator Equals --selector https://login.microsoftonline.com --type OWASP --version 3.0

Output: -

Azure AGW exclusion deletion

Thus, executing the command as said above does the job for me. Accordingly, ensure to execute the Azure CLI cmdlets accordingly.

For more information regarding this, please refer to the below links accordingly: -

https://learn.microsoft.com/en-us/cli/azure/network/application-gateway/waf-policy/managed-rule/exclusion/rule-set?view=azure-cli-latest

Kartik Bhiwapurkar
  • 4,550
  • 2
  • 4
  • 9
0

This issue is being tracked in https://github.com/Azure/azure-cli/pull/24322 Please wait until Azure CLI 2.42.0 is released in 11/01, it should be fixed by then

Kapil Ananth
  • 126
  • 3