You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/web-application-firewall/ag/application-gateway-waf-request-size-limits.md
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: This article provides information on Web Application Firewall reque
4
4
services: web-application-firewall
5
5
author: vhorne
6
6
ms.service: web-application-firewall
7
-
ms.date: 03/05/2024
7
+
ms.date: 07/16/2024
8
8
ms.author: victorh
9
9
ms.topic: concept-article
10
10
---
@@ -22,7 +22,7 @@ Web Application Firewall allows you to configure request size limits within a lo
22
22
23
23
The request body size field and the file upload size limit are both configurable within the Web Application Firewall. The maximum request body size field is specified in kilobytes and controls overall request size limit excluding any file uploads. The file upload limit field is specified in megabytes and it governs the maximum allowed file upload size. For the request size limits and file upload size limit, see [Application Gateway limits](../../azure-resource-manager/management/azure-subscription-service-limits.md#application-gateway-limits).
24
24
25
-
For Application Gateway v2 Web Application Firewalls running Core Rule Set 3.2, or newer, the maximum request body size enforcement and max file upload size enforcement can be disabled and the Web Application Firewall will no longer reject a request, or file upload, for being too large. When maximum request body size enforcement and max file upload size enforcement are disabled within the Web Application Firewall, Application Gateway's limits determine the maximum size allowable. For more information, see [Application Gateway limits](../../azure-resource-manager/management/azure-subscription-service-limits.md#application-gateway-limits).
25
+
For Application Gateway v2 Web Application Firewalls running Core Rule Set 3.2, or newer, the maximum request body size enforcement and max file upload size enforcement can be disabled and the Web Application Firewall no longer rejects a request, or file upload, for being too large. When maximum request body size enforcement and max file upload size enforcement are disabled within the Web Application Firewall, Application Gateway's limits determine the maximum size allowable. For more information, see [Application Gateway limits](../../azure-resource-manager/management/azure-subscription-service-limits.md#application-gateway-limits).
26
26
27
27
Only requests with Content-Type of *multipart/form-data* are considered for file uploads. For content to be considered as a file upload, it has to be a part of a multipart form with a *filename* header. For all other content types, the request body size limit applies.
28
28
@@ -36,7 +36,7 @@ Only requests with Content-Type of *multipart/form-data* are considered for file
36
36
37
37
Web Application Firewall 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, Web Application Firewall doesn't evaluate the contents of an HTTP message's body. In such cases, Web Application Firewall continues to enforce Web Application Firewall rules on headers, cookies, and URI. In Web Application Firewalls running Core Rule Set 3.1 (or lower), if the request body inspection is turned off, then maximum request body size field isn't applicable and can't be set.
38
38
39
-
For Policy Web Application Firewalls running Core Rule Set 3.2 (or newer), request body inspection can be enabled/disabled independently of request body size enforcement and file upload size limits. Additionally, policy Web Application Firewalls running Core Rule Set 3.2 (or newer) can set the maximum request body inspection limit independently of the maximum request body size. The maximum request body inspection limit tells the Web Application Firewall how deep into a request it should inspect and apply rules; setting a lower value for this field can improve Web Application Firewall performance but may allow for uninspected malicious content to pass through your Web Application Firewall.
39
+
For Policy Web Application Firewalls running Core Rule Set 3.2 (or newer), request body inspection can be enabled/disabled independently of request body size enforcement and file upload size limits. Additionally, policy Web Application Firewalls running Core Rule Set 3.2 (or newer) can set the maximum request body inspection limit independently of the maximum request body size. The maximum request body inspection limit tells the Web Application Firewall how deep into a request it should inspect and apply rules; setting a lower value for this field can improve Web Application Firewall performance but might allow for uninspected malicious content to pass through your Web Application Firewall.
40
40
41
41
For older Web Application Firewalls running Core Rule Set 3.1 (or lower), turning off the request body inspection allows for messages larger than 128 KB to be sent to Web Application Firewall, but the message body isn't inspected for vulnerabilities. For Policy Web Application Firewalls running Core Rule Set 3.2 (or newer), you can achieve the same outcome by disabling maximum request body limit.
42
42
@@ -46,35 +46,35 @@ When your Web Application Firewall receives a request that's over the size limit
46
46
47
47
## Troubleshooting
48
48
49
-
If you're an Application Gateway v2 Web Application Firewall customer running Core Rule Set 3.2 or later and you have issues with requests, or file uploads, getting rejected incorrectly for maximum size, or if you see requests not getting inspected fully, you may need to verify that all values are set correctly. Using PowerShell or the Azure Command Line Interface you can verify what each value is set to, and update any values as needed.
49
+
If you're an Application Gateway v2 Web Application Firewall customer running Core Rule Set 3.2 or later and you have issues with requests, or file uploads, getting rejected incorrectly for maximum size, or if you see requests not getting inspected fully, you might need to verify that all values are set correctly. Using PowerShell or the Azure Command Line Interface you can verify what each value is set to, and update any values as needed.
50
50
51
51
**Enforce request body inspection**
52
-
-PS: "RequestBodyCheck"
52
+
-PowerShell: "RequestBodyCheck"
53
53
- CLI: "request_body_check"
54
-
- Controls if your Web Application Firewall will inspect the request body and apply managed and custom rules to the request body traffic per your Web Application Firewall policy’s settings.
54
+
- Controls if your Web Application Firewall inspects the request body and apply managed and custom rules to the request body traffic per your Web Application Firewall policy’s settings.
55
55
56
56
**Maximum request body inspection limit (KB)**
57
-
-PS: "RequestBodyInspectLimitInKB"
57
+
-PowerShell: "RequestBodyInspectLimitInKB"
58
58
- CLI: "request_body_inspect_limit_in_kb"
59
-
- Controls how deep into a request body the Web Application Firewall will inspect and apply managed/custom rules. Generally speaking, you’d want to set this to the max possible setting, but some customers might want to set it to a lower value to improve performance.
59
+
- Controls how deep into a request body the Web Application Firewall inspects and applies managed/custom rules. Generally speaking, you’d want to set this to the max possible setting, but some customers might want to set it to a lower value to improve performance.
60
60
61
61
**Enforce maximum request body limit**
62
-
-PS: "RequestBodyEnforcement"
62
+
-PowerShell: "RequestBodyEnforcement"
63
63
- CLI: "request_body_enforcement"
64
-
- Control if your Web Application Firewall will enforce a max size limit on request bodies; when turned off it will not reject any requests for being too large.
64
+
- Control if your Web Application Firewall enforces a max size limit on request bodies; when turned off it does not reject any requests for being too large.
65
65
66
66
**Maximum request body size (KB)**
67
-
-PS: "MaxRequestBodySizeInKB"
67
+
-PowerShell: "MaxRequestBodySizeInKB"
68
68
- CLI: "max_request_body_size_in_kb"
69
69
- Controls how large a request body can be before the Web Application Firewall rejects it for exceeding the max size setting.
70
70
71
71
**Enforce maximum file upload limit**
72
-
-PS: "FileUploadEnforcement"
72
+
-PowerShell: "FileUploadEnforcement"
73
73
- CLI: "file_upload_enforcement"
74
-
- Controls if your Web Application Firewall will enforce a max size limit on file uploads; when turned off it will not reject any file uploads for being too large.
74
+
- Controls if your Web Application Firewall enforces a max size limit on file uploads; when turned off it does not reject any file uploads for being too large.
75
75
76
76
**Maximum file upload size (MB)**
77
-
-PS: "FileUploadLimitInMB"
77
+
-PowerShell: "FileUploadLimitInMB"
78
78
- CLI: file_upload_limit_in_mb
79
79
- Controls how large a file upload can be before the Web Application Firewall rejects it for exceeding the max size setting.
You can use these commands to update the policy settings to the desired values for inspection limit and max size limitation related fields. You can swap out 'RequestBodyEnforcement' in the example below for one of the other values that you want to update.
93
+
You can use these commands to update the policy settings to the desired values for inspection limit and max size limitation related fields. You can swap out 'RequestBodyEnforcement' in the following example for one of the other values that you want to update.
You can use Azure CLI to return the current values for these fields from your Azure policy settings and update the fields to the desired values using [these commands](/cli/azure/network/application-gateway/waf-policy/policy-setting).
0 commit comments