Azure WAF Whitelist requesturi

Michael Broadhead 21 Reputation points
2022-01-07T11:46:24.993+00:00

Hello,

I have been monitoring the Azure WAF logs using the Azure Log Analytics Workspace.
Frequently I see many false positives that I need to prevent, such requests are needed to ensure my app works.
Currently the only solution I have found is to disable the associated OWASP Rule.

I would however like to find a way of re-enabling these OWASP rules and whitelisting the affected requests.

All affected requests show the received requesturi.

My question is how do I whitelist a requesturi? for example /ABCDEFG/Appfolder/SaveGroup.

Thank you

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,217 questions
0 comments No comments
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 50,096 Reputation points Microsoft Employee Moderator
    2022-01-07T12:13:42.987+00:00

    Hello @Anonymous ,

    If you use Azure Application Gateway Web Application Firewall (WAF) v2 SKU, then you can make use of custom rules to achieve your requirement. Custom rules allow you to create your own rules that are evaluated for each request that passes through the WAF. Custom rules in WAF v2 will allow you to block RequestUri variables.

    For more details, please refer the below docs:
    https://learn.microsoft.com/en-gb/azure/web-application-firewall/ag/custom-waf-rules-overview
    https://learn.microsoft.com/en-gb/azure/web-application-firewall/ag/create-custom-waf-rules#example-6

    If you use Azure Application Gateway Web Application Firewall (WAF) SKU, you can opt for WAF exclusion lists. WAF exclusion lists allow you to omit certain request attributes from a WAF evaluation. Once an attribute is added to the WAF exclusion list, it isn't considered by any configured and active WAF rule. Exclusion lists are global in scope. And this is helpful in excluding attributes which may trigger a false positive from the WAF rules. The exclusion lists remove inspection of the field's value and some of them are as below:
    Request Headers, Request Cookies, Form field name, JSON entity & URL query string args.

    For more details, please refer the below docs: https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/application-gateway-waf-configuration#waf-exclusion-lists
    https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/web-application-firewall-troubleshoot#fixing-false-positives

    In case you are using WAF v1 SKU and the exclusion list feature doesn't help you achieve your requirement, you may try migrating to WAF v2 and use custom rules. If you want to migrate from v1 to v2 SKU, follow the steps in the below article:
    https://learn.microsoft.com/en-us/azure/application-gateway/migrate-v1-v2

    Kindly let us know if the above helps or you need further assistance on this issue.

    ----------------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.