Skip to content

Commit 1db160d

Browse files
Merge pull request #235746 from vhorne/waf-upgrade
add upgrade waf policy
2 parents 4727ead + 496f10a commit 1db160d

File tree

4 files changed

+93
-16
lines changed

4 files changed

+93
-16
lines changed

articles/web-application-firewall/ag/create-waf-policy-ag.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If your Application Gateway has an associated policy, and then you associated a
2020
> [!NOTE]
2121
> Once a Firewall Policy is associated to a WAF, there must always be a policy associated to that WAF. You may overwrite that policy, but disassociating a policy from the WAF entirely isn't supported.
2222
23-
All new Web Application Firewall's WAF settings (custom rules, managed ruleset configurations, exclusions, etc.) live inside of a WAF Policy. If you have an existing WAF, these settings may still exist in your WAF config. For steps on how to move to the new WAF Policy, see [Migrate your WAF Config to a WAF Policy](#migrate) later in this article.
23+
All new Web Application Firewall's WAF settings (custom rules, managed ruleset configurations, exclusions, etc.) live inside of a WAF Policy. If you have an existing WAF, these settings may still exist in your WAF config. For steps on how to move to the new WAF Policy, see [Upgrade your WAF Config to a WAF Policy](#upgrade) later in this article.
2424

2525
## Create a policy
2626

@@ -65,7 +65,7 @@ To create a custom rule, select **Add custom rule** under the **Custom rules** t
6565

6666
[ ![Edit custom rule](../media/create-waf-policy-ag/edit-custom-rule.png) ](../media/create-waf-policy-ag/edit-custom-rule-lrg.png#lightbox)
6767

68-
## <a name="migrate"></a>Migrate your WAF Config to a WAF Policy
68+
## <a name="upgrade"></a>Upgrade your WAF Config to a WAF Policy
6969

7070
If you have an existing WAF, you may have noticed some changes in the portal. First you need to identify what kind of Policy you've enabled on your WAF. There are three potential states:
7171

@@ -85,15 +85,15 @@ If it also shows Policy Settings and Managed Rules, then it's a full Web Applica
8585

8686
![WAF policy settings](../media/create-waf-policy-ag/waf-policy-settings.png)
8787

88-
## Migrate to WAF Policy
88+
## Upgrade to WAF Policy
8989

9090
If you have a Custom Rules only WAF Policy, then you may want to move to the new WAF Policy. Going forward, the firewall policy will support WAF policy settings, managed rulesets, exclusions, and disabled rule-groups. Essentially, all the WAF configurations that were previously done inside the Application Gateway are now done through the WAF Policy.
9191

92-
Edits to the custom rule only WAF policy are disabled. To edit any WAF settings such as disabling rules, adding exclusions, etc. you have to migrate to a new top-level firewall policy resource.
92+
Edits to the custom rule only WAF policy are disabled. To edit any WAF settings such as disabling rules, adding exclusions, etc. you have to upgrade to a new top-level firewall policy resource.
9393

9494
To do so, create a *Web Application Firewall Policy* and associate it to your Application Gateway(s) and listener(s) of choice. This new Policy must be exactly the same as the current WAF config, meaning every custom rule, exclusion, disabled rule, etc. must be copied into the new Policy you're creating. Once you have a Policy associated with your Application Gateway, then you can continue to make changes to your WAF rules and settings. You can also do this with Azure PowerShell. For more information, see [Associate a WAF policy with an existing Application Gateway](associate-waf-policy-existing-gateway.md).
9595

96-
Optionally, you can use a migration script to migrate to a WAF policy. For more information, see [Migrate Web Application Firewall policies using Azure PowerShell](migrate-policy.md).
96+
Optionally, you can use a migration script to upgrade to a WAF policy. For more information, see [Upgrade Web Application Firewall policies using Azure PowerShell](migrate-policy.md).
9797

9898
## Force mode
9999

articles/web-application-firewall/ag/migrate-policy.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Migrate WAF policies for Azure Application Gateway
3-
description: Learn how to migrate Azure Web Application Firewall policies using Azure PowerShell.
2+
title: Upgrade WAF policies for Azure Application Gateway
3+
description: Learn how to upgrade Azure Web Application Firewall policies using Azure PowerShell.
44
services: web-application-firewall
55
ms.topic: how-to
66
author: vhorne
@@ -10,13 +10,13 @@ ms.author: victorh
1010
ms.custom: devx-track-azurepowershell
1111
---
1212

13-
# Migrate Web Application Firewall policies using Azure PowerShell
13+
# Upgrade Web Application Firewall policies using Azure PowerShell
1414

15-
This script makes it easy to transition from a WAF config or a custom rules-only WAF policy to a full WAF policy. You may see a warning in the portal that says *migrate to WAF policy*, or you may want the new WAF features such as Geomatch custom rules, per-site WAF policy, and per-URI WAF policy (preview), or the bot mitigation ruleset. To use any of these features, you need a full WAF policy associated to your application gateway.
15+
This script makes it easy to transition from a WAF config or a custom rules-only WAF policy to a full WAF policy. You may see a warning in the portal that says *upgrade to WAF policy*, or you may want the new WAF features such as Geomatch custom rules, per-site WAF policy, and per-URI WAF policy, or the bot mitigation ruleset. To use any of these features, you need a full WAF policy associated to your application gateway.
1616

17-
For more information about creating a new WAF policy, see [Create Web Application Firewall policies for Application Gateway](create-waf-policy-ag.md). For information about migrating, see [Migrate to WAF policy](create-waf-policy-ag.md#migrate-to-waf-policy).
17+
For more information about creating a new WAF policy, see [Create Web Application Firewall policies for Application Gateway](create-waf-policy-ag.md). For information about migrating, see [upgrade to WAF policy](create-waf-policy-ag.md#upgrade-to-waf-policy).
1818

19-
## To migrate to WAF policy using the migration script
19+
## To upgrade to WAF policy using the migration script
2020

2121
Use the following steps to run the migration script:
2222

@@ -35,7 +35,7 @@ Use the following steps to run the migration script:
3535
```azurepowershell-interactive
3636
<#PSScriptInfo
3737
.DESCRIPTION
38-
Will be used to migrate to the application-gateway to a top level waf policy experience.
38+
Will be used to upgrade to the application-gateway to a top level waf policy experience.
3939
4040
.VERSION 1.0
4141
@@ -90,7 +90,7 @@ function ValidateInput ($appgwName, $resourceGroupName) {
9090
foreach ($disabled in $appgw.WebApplicationFirewallConfiguration.DisabledRuleGroups) {
9191
if ($disabled.Rules.Count -eq 0) {
9292
$ruleGroupName = $disabled.RuleGroupName
93-
Write-Error "The ruleGroup '$ruleGroupName' is disabled. Currently we can't migrate to a firewall policy when an entire ruleGroup is disabled. This feature will be delivered shortly. To continue, kindly ensure the entire rulegroups are not disabled. "
93+
Write-Error "The ruleGroup '$ruleGroupName' is disabled. Currently we can't upgrade to a firewall policy when an entire ruleGroup is disabled. This feature will be delivered shortly. To continue, kindly ensure the entire rulegroups are not disabled. "
9494
return $false
9595
}
9696
}
@@ -100,7 +100,7 @@ function ValidateInput ($appgwName, $resourceGroupName) {
100100
if ($appgw.WebApplicationFirewallConfiguration.Exclusions) {
101101
foreach ($excl in $appgw.WebApplicationFirewallConfiguration.Exclusions) {
102102
if ($null -ne $excl.MatchVariable -and $null -eq $excl.SelectorMatchOperator -and $null -eq $excl.Selector) {
103-
Write-Error " You have an exclusion entry(s) with the 'Equals any' operator. Currently we can't migrate to a firewall policy with 'Equals Any' operator. This feature will be delivered shortly. To continue, kindly ensure exclusion entries with 'Equals Any' operator is not present. "
103+
Write-Error " You have an exclusion entry(s) with the 'Equals any' operator. Currently we can't upgrade to a firewall policy with 'Equals Any' operator. This feature will be delivered shortly. To continue, kindly ensure exclusion entries with 'Equals Any' operator is not present. "
104104
return $false
105105
}
106106
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: Upgrade to Azure Application Gateway WAF policy
3+
description: Learn how to upgrade Azure Application Gateway WAF policy.
4+
services: web-application-firewall
5+
ms.topic: how-to
6+
author: vhorne
7+
ms.service: web-application-firewall
8+
ms.date: 04/25/2023
9+
ms.author: lunowak
10+
ms.custom: devx-track-azurepowershell
11+
---
12+
13+
# Upgrade to Azure Application Gateway WAF policy
14+
15+
Azure Web Application Firewall (WAF) provides centralized protection of your web applications from common exploits and vulnerabilities. Web Application Firewall Policies contain all the WAF settings and configurations. This includes exclusions, custom rules, managed rules, and so on. These policies are then associated with an application gateway (global), a listener (per-site), or a path-based rule (per-URI) for them to take effect.
16+
17+
Azure Application Gateway WAF v2 natively supports WAF policy. You should upgrade your legacy WAF configuration to WAF policies.
18+
19+
- Policies offer a richer set of advanced features. This includes newer managed rule sets, custom rules, per rule exclusions, bot protection, and the next generation of WAF engine. These advanced features are available to you at no extra cost.
20+
- WAF policies provide higher scale and better performance.
21+
- Unlike legacy WAF configuration, WAF policies can be defined once and shared across multiple gateways, listeners, and URL paths. This simplifies the management and deployment experience.
22+
- The latest features and future enhancements are only available via WAF policies.
23+
24+
> [!IMPORTANT]
25+
> No further investments will be made on legacy WAF configuration. You are strongly encouraged to upgrade from legacy WAF configuration to WAF Policy for easier management, better scale, and a richer feature set at no additional cost.
26+
27+
## Upgrade Application Gateway Standard v2 to Application Gateway WAF v2
28+
29+
1. Locate the Application Gateway in the Azure portal. Select the Application Gateway and the select **Configuration** from the **Settings** menu on the left side.
30+
1. Under **Tier**, select **WAF V2**.
31+
1. Select **Save** to complete the upgrade from Application Gateway Standard to Application Gateway WAF.
32+
33+
## Upgrade WAF v2 with legacy WAF configuration to WAF policy
34+
35+
You can upgrade existing Application Gateways with WAF v2 from WAF legacy configuration to WAF policy directly without any downtime. You can upgrade using either using the portal, Firewall Manager, or Azure PowerShell.
36+
37+
# [Portal](#tab/portal)
38+
39+
1. Sign in to the Azure portal and select the Application Gateway WAF v2 that has a legacy WAF configuration.
40+
1. Select **Web Application Firewall** from the left menu, then select **Upgrade from WAF configuration**.
41+
1. Provide a name for the new WAF Policy and then select **Upgrade**. This creates a new WAF Policy based on the WAF configuration. You can also choose to associate a pre-existing WAF Policy instead of creating a new one.
42+
1. When the upgrade finishes, a new WAF Policy incorporating the previous WAF configuration and rules is created.
43+
44+
# [Firewall Manager](#tab/fwm)
45+
46+
See [Configure WAF policies using Azure Firewall Manager](../shared/manage-policies.md).
47+
48+
# [PowerShell](#tab/powershell)
49+
50+
See [Upgrade Web Application Firewall policies using Azure PowerShell](migrate-policy.md).
51+
52+
---
53+
54+
## Upgrade Application Gateway v1 to WAF v2 with WAF policy
55+
56+
Application Gateway v1 doesn't support WAF policy. Upgrading to WAF policy is a two step process:
57+
58+
- Upgrade Application Gateway v1 to v2 version.
59+
- Upgrade legacy WAF configuration to WAF policy.
60+
61+
1. Upgrade from v1 to v2 Application Gateway.
62+
63+
For more information, see [Upgrade Azure Application Gateway and Web Application Firewall from v1 to v2](../../application-gateway/migrate-v1-v2.md).
64+
65+
When you complete the upgrade of v1 to v2, the Application Gateway v2 has a legacy WAF configuration.
66+
2. Upgrade to Application Gateway WAF v2 with WAF Policy.
67+
68+
- If in Step 1 you upgraded from Application Gateway Standard v1 to v2, see the previous section [Upgrade Application Gateway Standard v2 to Application Gateway WAF v2](#upgrade-application-gateway-standard-v2-to-application-gateway-waf-v2).
69+
- If in Step 1, you upgraded from Application Gateway WAF v1 to Application Gateway WAF v2 with legacy configuration, see the previous section [Upgrade WAF v2 with legacy WAF configuration to WAF policy](#upgrade-waf-v2-with-legacy-waf-configuration-to-waf-policy) to migrate to Application Gateway WAF v2 SKU with WAF policy.
70+
71+
## Next steps
72+
73+
For more information about WAF on Application Gateway policy, see [Azure Web Application Firewall (WAF) policy overview](policy-overview.md).

articles/web-application-firewall/toc.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,14 @@
114114
href: ./ag/tutorial-restrict-web-traffic-powershell.md
115115
- name: Azure CLI
116116
href: ./ag/tutorial-restrict-web-traffic-cli.md
117+
- name: Upgrade WAF
118+
items:
119+
- name: Upgrade to WAF policy
120+
href: ./ag/upgrade-ag-waf-policy.md
121+
- name: Upgrade using PowerShell
122+
href: ./ag/migrate-policy.md
117123
- name: Per-site policies
118124
href: ./ag/per-site-policies.md
119-
- name: Migrate WAF policy
120-
href: ./ag/migrate-policy.md
121125
- name: Customize WAF rules
122126
items:
123127
- name: Azure portal

0 commit comments

Comments
 (0)