Skip to content

Commit a1ee0b4

Browse files
Update application-gateway-waf-request-size-limits.md
1 parent 149b8c9 commit a1ee0b4

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

articles/web-application-firewall/ag/application-gateway-waf-request-size-limits.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,73 +11,73 @@ ms.topic: conceptual
1111

1212
# Web Application Firewall request and file upload size limits
1313

14-
Web Application Firewall allows you to configure request size limits within a lower and upper boundary. Application Gateways WAFs running CRS 3.2 or later have additional request and file upload size controls, including the ability to disable max size enforcement for requests and/or file uploads.
14+
Web Application Firewall allows you to configure request size limits within a lower and upper boundary. Application Gateways Web Application Firewalls running Core Rule Set 3.2 or later have additional request and file upload size controls, including the ability to disable max size enforcement for requests and/or file uploads.
1515

1616

1717
> [!IMPORTANT]
18-
> We are in the process of deploying a new feature for Application Gateway v2 WAFs running Core Rule Set (CRS) 3.2 or later that allows for greater control of your request body size, file upload size, and request body inspection. If you are running Application Gateway v2 WAF with CRS 3.2 or later, and you notice requests getting rejected (or not getting rejected) for a size limit please refer to the troubleshooting steps at the bottom of this page.
18+
> We are in the process of deploying a new feature for Application Gateway v2 Web Application Firewalls running Core Rule Set 3.2 or later that allows for greater control of your request body size, file upload size, and request body inspection. If you are running Application Gateway v2 Web Application Firewall with Core Rule Set 3.2 or later, and you notice requests getting rejected (or not getting rejected) for a size limit please refer to the troubleshooting steps at the bottom of this page.
1919
2020

2121
## Limits
2222

23-
The request body size field and the file upload size limit are both configurable within the WAF. 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).
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).
2424

25-
For Application Gateway v2 WAFs 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 WAF 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 WAF the maximum size allowable is determined by Application Gateway's limits. 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 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 the maximum size allowable is determined by Application Gateway's limits. For more information, see [Application Gateway limits](../../azure-resource-manager/management/azure-subscription-service-limits.md#application-gateway-limits).
2626

2727
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.
2828

2929

3030
>[!NOTE]
31-
>If you are running CRS 3.2 or later, and you have a high priority custom rule that takes action based on the content of a request's headers, cookies, or URI, this will take precedence over any max request size, or max file upload size, limits. This optimization let's the WAF run high priority custom rules that don't require reading and/or measuring the full WAF request (or file upload) first before performing the full request inspection.
31+
>If you are running Core Rule Set 3.2 or later, and you have a high priority custom rule that takes action based on the content of a request's headers, cookies, or URI, this will take precedence over any max request size, or max file upload size, limits. This optimization let's the Web Application Firewall run high priority custom rules that don't require reading and/or measuring the full Web Application Firewall request (or file upload) first before performing the full request inspection.
3232
>
33-
>Example: If you have a custom rule with priority 0 (the highest priority) set to approve a request with the header xyz, even if the request's size is larger than your maximum request size limit, it will get approved. This is because the WAF will attempt to run all high priority custom rules that don't require reading the request body before enforcing any rules or size constraints that require reading the full request body.
33+
>Example: If you have a custom rule with priority 0 (the highest priority) set to approve a request with the header xyz, even if the request's size is larger than your maximum request size limit, it will get approved. This is because the Web Application Firewall will attempt to run all high priority custom rules that don't require reading the request body before enforcing any rules or size constraints that require reading the full request body.
3434
3535

3636
## Request body inspection
3737

38-
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. In WAFs running CRS 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+
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.
3939

40-
For Policy WAFs running CRS 3.2 (or newer) request body inspection can be enabled/disabled independently of request body size enforcement and file upload size limits. Additionally, policy WAFs running CRS 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 WAF how deep into a request it should inspect and apply rules; setting a lower value for this field can improve WAF performance but may allow for uninspected malicious content to pass through your WAF.
40+
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.
4141

42-
For older WAFs running CRS 3.1 (or lower) 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. For Policy WAFs running CRS 3.2 (or newer) you can achieve the same outcome by disabling maximum request body limit.
42+
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.
4343

44-
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.
45-
- When your WAF policy is in prevention mode, WAF logs and blocks requests and file uploads that are over the size limits.
46-
- When your WAF policy is in detection mode, WAF inspects the body up to the limit specified and ignores the rest. If the `Content-Length` header is present and is greater than the file upload limit, WAF ignores the entire body and logs the request.
44+
When your Web Application Firewall receives a request that's over the size limit, the behavior depends on the mode of your Web Application Firewall and the version of the managed ruleset you use.
45+
- When your Web Application Firewall policy is in prevention mode, Web Application Firewall logs and blocks requests and file uploads that are over the size limits.
46+
- When your Web Application Firewall policy is in detection mode, Web Application Firewall inspects the body up to the limit specified and ignores the rest. If the `Content-Length` header is present and is greater than the file upload limit, Web Application Firewall ignores the entire body and logs the request.
4747

4848
## Trouble Shooting
4949

50-
If you are an Application Gateway v2 WAF customer running CRS 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. You can do this by using PowerShell or the Azure Command Line Interface to verify what each value is set to, and update any values as needed.
50+
If you are 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. You can do this by using PowerShell or the Azure Command Line Interface to verify what each value is set to, and update any values as needed.
5151

5252
**Enforce request body inspection**
5353
- PS: "RequestBodyCheck"
5454
- CLI: "request_body_check"
55-
- Controls if your WAF will inspect the request body and apply managed and custom rules to the request body traffic per your WAF policy’s settings.
55+
- 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.
5656

5757
**Maximum request body inspection limit (KB)**
5858
- PS: "RequestBodyInspectLimitInKB"
5959
- CLI: "request_body_inspect_limit_in_kb"
60-
- Controls how deep into a request body the WAF 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.
60+
- 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.
6161

6262
**Enforce maximum request body limit**
6363
- PS: "RequestBodyEnforcement"
6464
- CLI: "request_body_enforcement"
65-
- Control if your WAF will enforce a max size limit on request bodies; when turned off it will not reject any requests for being too large.
65+
- 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.
6666

6767
**Maximum request body size (KB)**
6868
- PS: "MaxRequestBodySizeInKB"
6969
- CLI: "max_request_body_size_in_kb"
70-
- Controls how large a request body can be before the WAF rejects it for exceeding the max size setting.
70+
- Controls how large a request body can be before the Web Application Firewall rejects it for exceeding the max size setting.
7171

7272
**Enforce maxium file upload limit**
7373
- PS: "FileUploadEnforcement"
7474
- CLI: "file_upload_enforcement"
75-
- Controls if your WAF will enforce a max size limit on file uploads; when turned off it will not reject any file uploads for being too large.
75+
- 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.
7676

7777
**Maximum file upload size (MB)**
7878
- PS: "FileUploadLimitInMB"
7979
- CLI: file_upload_limit_in_mb
80-
- Controls how large a file upload can be before the WAF rejects it for exceeding the max size setting.
80+
- Controls how large a file upload can be before the Web Application Firewall rejects it for exceeding the max size setting.
8181

8282
>[!NOTE]
8383
>**"Inspect request body"** previously controlled if the request body was inspected and rules applied as well as if a maximum size limit was enforced on request bodies. Now this is handled by two separate fields that can be turned ON/OFF independently.
@@ -99,7 +99,7 @@ $plcy.PolicySettings.RequestBodyEnforcement=false
9999
Set-AzApplicationGatewayFirewallPolicy -InputObject $plcy
100100
```
101101

102-
- [Get WAF Policy](/powershell/module/az.network/get-azapplicationgatewayfirewallpolicy)
102+
- [Get Web Application Firewall Policy](/powershell/module/az.network/get-azapplicationgatewayfirewallpolicy)
103103
- [Policy Settings Properties](/dotnet/api/microsoft.azure.commands.network.models.psapplicationgatewaywebapplicationfirewallpolicy.policysettings)
104104
- [Policy Settings Class](/dotnet/api/microsoft.azure.commands.network.models.psapplicationgatewayfirewallpolicysettings)
105105
- [New Policy Settings](/powershell/module/az.network/new-azapplicationgatewayfirewallpolicysetting)
@@ -121,6 +121,6 @@ True 3500 2000 Detect
121121

122122
## Next steps
123123

124-
- 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).
124+
- After you configure your Web Application Firewall settings, you can learn how to view your Web Application Firewall logs. For more information, see [Application Gateway diagnostics](../../application-gateway/application-gateway-diagnostics.md#diagnostic-logging).
125125
- [Learn more about Azure network security](../../networking/security/index.yml)
126126

0 commit comments

Comments
 (0)