Skip to content

Commit cf01b54

Browse files
Merge pull request #191031 from johndowns/waf-appgw-limits
Application Gateway WAF - Split limits into its own doc
2 parents 1813fbb + 330931f commit cf01b54

File tree

9 files changed

+74
-37
lines changed

9 files changed

+74
-37
lines changed
Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
---
2-
title: Web application firewall request size limits and exclusion lists in Azure Application Gateway - Azure portal
3-
description: This article provides information on Web Application Firewall request size limits and exclusion lists configuration in Application Gateway with the Azure portal.
2+
title: Web application firewall exclusion lists in Azure Application Gateway - Azure portal
3+
description: This article provides information on Web Application Firewall exclusion lists configuration in Application Gateway with the Azure portal.
44
services: web-application-firewall
55
author: vhorne
66
ms.service: web-application-firewall
7-
ms.date: 02/10/2022
7+
ms.date: 03/08/2022
88
ms.author: victorh
99
ms.topic: conceptual
1010
ms.custom: devx-track-azurepowershell
1111
---
1212

13-
# Web Application Firewall request size limits and exclusion lists
13+
# Web Application Firewall exclusion lists
1414

15-
The Azure Application Gateway Web Application Firewall (WAF) provides protection for web applications. This article describes WAF request size limits and exclusion lists configuration. These settings are located in the WAF Policy associated to your Application Gateway. To learn more about WAF Policies, see [Azure Web Application Firewall on Azure Application Gateway](ag-overview.md) and [Create Web Application Firewall policies for Application Gateway](create-waf-policy-ag.md)
16-
17-
## WAF exclusion lists
18-
19-
![Request size limits](../media/application-gateway-waf-configuration/waf-policy.png)
15+
The Azure Application Gateway Web Application Firewall (WAF) provides protection for web applications. This article describes the configuration for WAF exclusion lists. These settings are located in the WAF Policy associated to your Application Gateway. To learn more about WAF Policies, see [Azure Web Application Firewall on Azure Application Gateway](ag-overview.md) and [Create Web Application Firewall policies for Application Gateway](create-waf-policy-ag.md)
2016

2117
Sometimes Web Application Firewall (WAF) might block a request that you want to allow for your application. WAF exclusion lists allow you to omit certain request attributes from a WAF evaluation. The rest of the request is evaluated as normal.
2218

2319
For example, Active Directory inserts tokens that are used for authentication. When used in a request header, these tokens can contain special characters that may trigger a false positive from the WAF rules. By adding the header to an exclusion list, you can configure WAF to ignore the header, but WAF still evaluates the rest of the request.
2420

2521
Exclusion lists are global in scope.
2622

23+
To set exclusion lists in the Azure portal, configure **Exclusions** in the WAF policy resource's **Policy settings** page:
24+
25+
![Screenshot of the Azure portal that shows the exclusions configuration for the W A F policy.](../media/application-gateway-waf-configuration/waf-policy-exclusions.png)
26+
27+
## Attributes
28+
2729
The following attributes can be added to exclusion lists by name. The values of the chosen field aren't evaluated against WAF rules, but their names still are (see Example 1 below, the value of the User-Agent header is excluded from WAF evaluation). The exclusion lists remove inspection of the field's value.
2830

2931
* Request Headers
@@ -49,13 +51,13 @@ In all cases matching is case insensitive and regular expression aren't allowed
4951
> [!NOTE]
5052
> For more information and troubleshooting help, see [WAF troubleshooting](web-application-firewall-troubleshoot.md).
5153
52-
### Examples
54+
## Examples
5355

5456
[!INCLUDE [updated-for-az](../../../includes/updated-for-az.md)]
5557

5658
The following examples demonstrate the use of exclusions.
5759

58-
#### Example 1
60+
### Example 1
5961

6062
In this example, you want to exclude the user-agent header. The user-agent request header contains a characteristic string that allows the network protocol peers to identify the application type, operating system, software vendor, or software version of the requesting software user agent. For more information, see [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent).
6163

@@ -69,7 +71,7 @@ $exclusion1 = New-AzApplicationGatewayFirewallExclusionConfig `
6971
-SelectorMatchOperator "Equals" `
7072
-Selector "User-Agent"
7173
```
72-
#### Example 2
74+
### Example 2
7375

7476
This example excludes the value in the *user* parameter that is passed in the request via the URL. For example, say it’s common in your environment for the user field to contain a string that the WAF views as malicious content, so it blocks it. You can exclude the user parameter in this case so that the WAF doesn't evaluate anything in the field.
7577

@@ -83,28 +85,6 @@ $exclusion2 = New-AzApplicationGatewayFirewallExclusionConfig `
8385
```
8486
So if the URL `http://www.contoso.com/?user%281%29=fdafdasfda` is passed to the WAF, it won't evaluate the string **fdafdasfda**, but it will still evaluate the parameter name **user%281%29**.
8587

86-
## WAF request size limits
87-
88-
89-
90-
Web Application Firewall allows you to configure request size limits within lower and upper bounds. The following two size limits configurations are available:
91-
92-
- The maximum request body size field is specified in kilobytes and controls overall request size limit excluding any file uploads. This field has a minimum value of 8 KB and a maximum value of 128 KB. The default value for request body size is 128 KB.
93-
- The file upload limit field is specified in MB and it governs the maximum allowed file upload size. This field can have a minimum value of 1 MB and the following maximums:
94-
95-
- 100 MB for v1 Medium WAF gateways
96-
- 500 MB for v1 Large WAF gateways
97-
- 750 MB for v2 WAF gateways
98-
99-
The default value for file upload limit is 100 MB.
100-
101-
For CRS 3.2 (on the WAF_v2 SKU) and newer, these limits are as follows when using a WAF Policy for Appplication Gateway:
102-
103-
- 2MB request body size limit
104-
- 4GB file upload limit
105-
106-
WAF also offers a configurable knob to turn the request body inspection on or off. By default, the request body inspection is enabled. If the request body inspection is turned off, WAF doesn't evaluate the contents of HTTP message body. In such cases, WAF continues to enforce WAF rules on headers, cookies, and URI. If the request body inspection is turned off, then maximum request body size field isn't applicable and can't be set. Turning off the request body inspection allows for messages larger than 128 KB to be sent to WAF, but the message body isn't inspected for vulnerabilities.
107-
10888
## Next steps
10989

11090
After you configure your WAF settings, you can learn how to view your WAF logs. For more information, see [Application Gateway diagnostics](../../application-gateway/application-gateway-diagnostics.md#diagnostic-logging).
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Web application firewall request size limits in Azure Application Gateway - Azure portal
3+
description: This article provides information on Web Application Firewall request size limits in Application Gateway with the Azure portal.
4+
services: web-application-firewall
5+
author: vhorne
6+
ms.service: web-application-firewall
7+
ms.date: 03/08/2022
8+
ms.author: victorh
9+
ms.topic: conceptual
10+
ms.custom: devx-track-azurepowershell
11+
---
12+
13+
# Web Application Firewall request size limits
14+
15+
Web Application Firewall allows you to configure request size limits within lower and upper bounds.
16+
17+
Request size limits are global in scope.
18+
19+
## Limits
20+
21+
The following two size limits configurations are available:
22+
23+
- The maximum request body size field is specified in kilobytes and controls overall request size limit excluding any file uploads. This field has a minimum value of 8 KB and a maximum value of 128 KB. The default value for request body size is 128 KB.
24+
- The file upload limit field is specified in MB and it governs the maximum allowed file upload size. This field can have a minimum value of 1 MB and the following maximums:
25+
26+
- 100 MB for v1 Medium WAF gateways
27+
- 500 MB for v1 Large WAF gateways
28+
- 750 MB for v2 WAF gateways
29+
30+
The default value for file upload limit is 100 MB.
31+
32+
For CRS 3.2 (on the WAF_v2 SKU) and newer, these limits are as follows when using a WAF policy for Appplication Gateway:
33+
34+
- 2MB request body size limit
35+
- 4GB file upload limit
36+
37+
To set request size limits in the Azure portal, configure **Global parameters** in the WAF policy resource's **Policy settings** page:
38+
39+
![Screenshot of the Azure portal that shows the request size limits configuration for the W A F policy.](../media/application-gateway-waf-request-size-limits/waf-policy-limits.png)
40+
41+
## Request body inspection
42+
43+
WAF offers a configuration setting to enable or disable the request body inspection. By default, the request body inspection is enabled. If the request body inspection is disabled, WAF doesn't evaluate the contents of an HTTP message's body. In such cases, WAF continues to enforce WAF rules on headers, cookies, and URI. If the request body inspection is turned off, then maximum request body size field isn't applicable and can't be set.
44+
45+
Turning off the request body inspection allows for messages larger than 128 KB to be sent to WAF, but the message body isn't inspected for vulnerabilities.
46+
47+
When your WAF receives a request that's over the size limit, the behavior depends on the mode of your WAF and the version of the managed ruleset you use.
48+
- When your WAF policy is in prevention mode, WAF blocks requests that are over the size limit.
49+
- When your WAF policy is in detection mode:
50+
- If you use CRS 3.2 or newer, WAF inspects the body up to the limit specified and ignores the rest.
51+
- If you use CRS 3.1 or earlier, WAF inspects the entire message.
52+
53+
## Next steps
54+
55+
After you configure your WAF settings, you can learn how to view your WAF logs. For more information, see [Application Gateway diagnostics](../../application-gateway/application-gateway-diagnostics.md#diagnostic-logging).

articles/web-application-firewall/ag/web-application-firewall-troubleshoot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ With this information, and the knowledge that rule 942130 is the one that matche
136136

137137
- Use an Exclusion List
138138

139-
See [WAF configuration](application-gateway-waf-configuration.md#waf-exclusion-lists) for more information about exclusion lists.
139+
See [WAF configuration](application-gateway-waf-configuration.md) for more information about exclusion lists.
140140
- Disable the rule.
141141

142142
### Using an exclusion list
@@ -171,7 +171,7 @@ In this example, you can see that the field where the *1=1* string was entered i
171171

172172
:::image type="content" source="../media/web-application-firewall-troubleshoot/fiddler-1.png" alt-text="Screenshot of the Progress Telerik Fiddler Web Debugger. In the Raw tab, 1 = 1 is visible after the name text1." border="false":::
173173

174-
This is a field you can exclude. To learn more about exclusion lists, See [Web application firewall request size limits and exclusion lists](application-gateway-waf-configuration.md#waf-exclusion-lists). You can exclude the evaluation in this case by configuring the following exclusion:
174+
This is a field you can exclude. To learn more about exclusion lists, See [Web application firewall exclusion lists](application-gateway-waf-configuration.md). You can exclude the evaluation in this case by configuring the following exclusion:
175175

176176
![WAF exclusion](../media/web-application-firewall-troubleshoot/waf-exclusion-02.png)
177177

110 KB
Loading
110 KB
Loading

articles/web-application-firewall/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@
5757
href: ./ag/custom-waf-rules-overview.md
5858
- name: Geomatch custom rules
5959
href: ./ag/geomatch-custom-rules.md
60-
- name: Request size limits and exclusion lists
60+
- name: Exclusion lists
6161
href: ./ag/application-gateway-waf-configuration.md
62+
- name: Request size limits
63+
href: ./ag/application-gateway-waf-request-size-limits.md
6264
- name: WAF Policy overview
6365
href: ./ag/policy-overview.md
6466
- name: Bot protection overview

0 commit comments

Comments
 (0)