Skip to content

Commit 2ce3286

Browse files
authored
Merge pull request #107402 from teresayao/cdnwaf
Cdnwaf
2 parents 646a801 + 76d16f0 commit 2ce3286

File tree

14 files changed

+216
-13
lines changed

14 files changed

+216
-13
lines changed

articles/web-application-firewall/afds/waf-front-door-create-portal.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: 'Tutorial: Create Web Application Firewall (WAF) policy for Azure Front Door - Azure portal'
3-
description: In this tutorial, you learn how to create a WAF policy by using the Azure portal.
2+
title: 'Tutorial: Create WAF policy for Azure Front Door - Azure portal'
3+
description: In this tutorial, you learn how to create a Web Application Firewall (WAF) policy by using the Azure portal.
44
author: vhorne
55
ms.service: web-application-firewall
66
services: web-application-firewall
@@ -11,7 +11,7 @@ ms.author: victorh
1111

1212
# Tutorial: Create a Web Application Firewall policy on Azure Front Door using the Azure portal
1313

14-
This tutorial shows you how to create a basic Azure Web Application Firewall (WAF) policy, and apply the policy to a front-end host at Azure Front Door.
14+
This tutorial show you how to create a basic Azure Web Application Firewall (WAF) policy and apply it to a front-end host at Azure Front Door.
1515

1616
In this tutorial, you learn how to:
1717

@@ -22,18 +22,17 @@ In this tutorial, you learn how to:
2222
2323
## Prerequisites
2424

25-
Create a Front Door profile by following the instructions described in [Quickstart: Create a Front Door profile](../../frontdoor/quickstart-create-front-door.md).
25+
Create a Front Door profile by following the instructions described in [Quickstart: Create a Front Door profile](../../frontdoor/quickstart-create-front-door.md).
2626

2727
## Create a Web Application Firewall policy
2828

29-
First, create a basic WAF policy with managed Default Rule Set (DRS) by using the portal.
29+
First, create a basic WAF policy with managed Default Rule Set (DRS) by using the portal.
3030

31-
1. On the top left-hand side of the screen, select **Create a resource**>search for **WAF**>select **Web application firewall ** > select **Create**.
31+
1. On the top left-hand side of the screen, select **Create a resource**>search for **WAF**>select **Web application firewall (Preview)** > select **Create**.
3232
2. In the **Basics** tab of the **Create a WAF policy** page, enter or select the following information, accept the defaults for the remaining settings, and then select **Review + create**:
3333

3434
| Setting | Value |
3535
| --- | --- |
36-
| Policy for |Select Global WAF (Front Door).|
3736
| Subscription |Select your Front Door subscription name.|
3837
| Resource group |Select your Front Door resource group name.|
3938
| Policy name |Enter a unique name for your WAF policy.|

articles/web-application-firewall/afds/waf-front-door-geo-filtering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ By default, Azure Front Door Service responds to user requests regardless of the
1616

1717
A WAF policy usually includes a set of custom rules. A rule consists of match conditions, an action, and a priority. In match condition, you define a match variable, operator, and match value. For geo filtering rule, match variable is REMOTE_ADDR, operator is GeoMatch, value is the two letter country code of interest. You may combine a GeoMatch condition and a REQUEST_URI string match condition to create a path-based geo-filtering rule.
1818

19-
You can configure a geo-filtering policy for your Front Door using the Azure portal, [Azure PowerShell](waf-front-door-tutorial-geo-filtering.md) or our [quickstart template](https://github.com/Azure/azure-quickstart-templates/tree/master/101-front-door-geo-filtering).
19+
You can configure a geo-filtering policy for your Front Door by either using [Azure PowerShell](waf-front-door-tutorial-geo-filtering.md) or by using our [quickstart template](https://github.com/Azure/azure-quickstart-templates/tree/master/101-front-door-geo-filtering).
2020

2121
## Country code reference
2222

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
title: What is Azure web application firewall on Azure CDN?
3+
description: Learn how Azure web application firewall on Azure CDN service protects your web applications from malicious attacks.
4+
services: web-application-firewall
5+
author: vhorne
6+
ms.service: web-application-firewall
7+
ms.topic: overview
8+
ms.date: 03/18/2020
9+
ms.author: victorh
10+
---
11+
12+
# Azure Web Application Firewall on Azure Content Delivery Network
13+
14+
Azure Web Application Firewall (WAF) on Azure Content Delivery Network (CDN) provides centralized protection for your web content. WAF defends your web services against common exploits and vulnerabilities. It keeps your service highly available for your users and helps you meet compliance requirements.
15+
16+
> [!IMPORTANT]
17+
> WAF on Azure CDN is currently in public preview and is provided with a preview service level agreement. Certain features may not be supported or may have constrained capabilities. See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for details.
18+
19+
WAF on Azure CDN is a global and centralized solution. It's deployed on Azure network edge locations around the globe. WAF stops malicious attacks close to the attack sources, before they reach your origin. You get global protection at scale without sacrificing performance.
20+
21+
A WAF policy easily links to any CDN endpoint in your subscription. New rules can be deployed within minutes, so you can respond quickly to changing threat patterns.
22+
23+
![Azure web application firewall](../media/cdn-overview/waf-cdn-overview.png)
24+
25+
## WAF policy and rules
26+
27+
You can configure a WAF policy and associate that policy to one or more CDN endpoints for protection. A WAF policy consists of two types of security rules:
28+
29+
- custom rules that you can create.
30+
31+
- managed rule sets that are a collection of Azure managed pre-configured rules.
32+
33+
When both are present, custom rules are processed before processing the rules in a managed rule set. A rule is made of a match condition, a priority, and an action. Action types supported are: *ALLOW*, *BLOCK*, *LOG*, and *REDIRECT*. You can create a fully customized policy that meets your specific application protection requirements by combining managed and custom rules.
34+
35+
Rules within a policy are processed in a priority order. Priority is a unique number that defines the order of rules to process. Smaller numbers are a higher priority and those rules are evaluated before rules with a larger value. Once a rule is matched, the corresponding action that was defined in the rule is applied to the request. Once such a match is processed, rules with lower priorities aren't processed further.
36+
37+
A web application hosted on Azure CDN can have only one WAF policy associated with it at a time. However, you can have a CDN endpoint without any WAF policies associated with it. If a WAF policy is present, it's replicated to all of our edge locations to ensure consistent security policies across the world.
38+
39+
## WAF modes
40+
41+
WAF policy can be configured to run in the following two modes:
42+
43+
- *Detection mode*: When run in detection mode, WAF doesn't take any other actions other than monitors and logs the request and its matched WAF rule to WAF logs. You can turn on logging diagnostics for Front Door. When you use the portal, go to the **Diagnostics** section.
44+
45+
- *Prevention mode*: In prevention mode, WAF takes the specified action if a request matches a rule. If a match is found, no further rules with a lower priority are evaluated. Any matched requests are also logged in the WAF logs.
46+
47+
## WAF actions
48+
49+
You can choose one of the following actions when a request matches a rule's conditions:
50+
51+
- *Allow*: The request passes through the WAF and is forwarded to back-end. No further lower priority rules can block this request.
52+
- *Block*: The request is blocked and WAF sends a response to the client without forwarding the request to the back-end.
53+
- *Log*: The request is logged in the WAF logs and WAF continues evaluating lower priority rules.
54+
- *Redirect*: WAF redirects the request to the specified URI. The URI specified is a policy level setting. Once configured, all requests that match the *Redirect* action is sent to that URI.
55+
56+
## WAF rules
57+
58+
A WAF policy can consist of two types of security rules:
59+
60+
- *custom rules*: rules you create yourself
61+
- *managed rule sets*: Azure managed pre-configured set of rules
62+
63+
### Custom rules
64+
65+
Custom rules can have match rules and rate control rules.
66+
67+
You can configure the following custom match rules:
68+
69+
- *IP allow list and block list*: You can control access to your web applications based on a list of client IP addresses or IP address ranges. Both IPv4 and IPv6 address types are supported. This list can be configured to either block or allow those requests where the source IP matches an IP in the list.
70+
71+
- *Geographic based access control*: You can control access to your web applications based on the country code that's associated with a client's IP address.
72+
73+
- *HTTP parameters-based access control*: You can base rules on string matches in HTTP/HTTPS request parameters. For example, query strings, POST args, Request URI, Request Header, and Request Body.
74+
75+
- *Request method-based access control*: You base rules on the HTTP request method of the request. For example, GET, PUT, or HEAD.
76+
77+
- *Size constraint*: You can base rules on the lengths of specific parts of a request such as query string, Uri, or request body.
78+
79+
A rate control rule limits abnormally high traffic from any client IP address.
80+
81+
- *Rate limiting rules*: You can configure a threshold on the number of web requests allowed from a client IP address during a one-minute duration. This rule is distinct from an IP list-based allow/block custom rule that either allows all or blocks all request from a client IP address. Rate limits can be combined with additional match conditions such as HTTP(S) parameter matches for granular rate control.
82+
83+
### Azure-managed rule sets
84+
85+
Azure-managed rule sets provide an easy way to deploy protection against a common set of security threats. Since these rulesets are managed by Azure, the rules are updated as needed to protect against new attack signatures. The Azure managed Default Rule Set includes rules against the following threat categories:
86+
87+
- Cross-site scripting
88+
- Java attacks
89+
- Local file inclusion
90+
- PHP injection attacks
91+
- Remote command execution
92+
- Remote file inclusion
93+
- Session fixation
94+
- SQL injection protection
95+
- Protocol attackers
96+
97+
The version number of the Default Rule Set increments when new attack signatures are added to the rule set.
98+
The Default Rule Set is enabled by default in *Detection* mode in your WAF policies. You can disable or enable individual rules within the Default Rule Set to meet your application requirements. You can also set specific actions (ALLOW/BLOCK/REDIRECT/LOG) per rule. The default action for the managed Default Rule Set is *Block*.
99+
100+
Custom rules are always applied before rules in the Default Rule Set are evaluated. If a request matches a custom rule, the corresponding rule action is applied. The request is either blocked or passed through to the back-end. No other custom rules or the rules in the Default Rule Set are processed. You can also remove the Default Rule Set from your WAF policies.
101+
102+
## Configuration
103+
104+
You can configure and deploy all WAF rule types using the Azure portal, REST APIs, Azure Resource Manager templates, and Azure PowerShell.
105+
106+
## Monitoring
107+
108+
Monitoring for WAF with CDN is integrated with Azure Monitor to track alerts and easily monitor traffic trends.
109+
110+
## Next steps
111+
112+
- [Tutorial: Create a WAF policy with Azure CDN using the Azure portal](waf-cdn-create-portal.md)
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: 'Tutorial: Create WAF policy for Azure CDN - Azure portal'
3+
description: In this tutorial, you learn how to create a Web Application Firewall (WAF) policy on Azure CDN using the Azure portal.
4+
author: vhorne
5+
ms.service: web-application-firewall
6+
services: web-application-firewall
7+
ms.topic: tutorial
8+
ms.date: 03/18/2020
9+
ms.author: victorh
10+
---
11+
12+
# Tutorial: Create a WAF policy on Azure CDN using the Azure portal
13+
14+
This tutorial shows you how to create a basic Azure Web Application Firewall (WAF) policy and apply it to an endpoint on Azure Content Delivery Network (CDN).
15+
16+
In this tutorial, you learn how to:
17+
18+
> [!div class="checklist"]
19+
> * Create a WAF policy
20+
> * Associate it with a CDN endpoint
21+
> * Configure WAF rules
22+
23+
## Prerequisites
24+
25+
Create an Azure CDN profile and endpoint by following the instructions in [Quickstart: Create an Azure CDN profile and endpoint](../../cdn/cdn-create-new-endpoint.md).
26+
27+
## Create a Web Application Firewall policy
28+
29+
First, create a basic WAF policy with a managed Default Rule Set (DRS) using the portal.
30+
31+
1. On the top left-hand side of the screen, select **Create a resource**>search for **WAF**>select **Web application firewall** > select **Create**.
32+
2. In the **Basics** tab of the **Create a WAF policy** page, enter or select the following information, accept the defaults for the remaining settings, and then select **Review + create**:
33+
34+
| Setting | Value |
35+
| --- | --- |
36+
| Policy For |Select Azure CDN (Preview).|
37+
| Subscription |Select your Front Door subscription name.|
38+
| Resource group |Select your Front Door resource group name.|
39+
| Policy name |Enter a unique name for your WAF policy.|
40+
41+
![Create a WAF policy](../media/waf-cdn-create-portal/basic.png)
42+
43+
3. In the **Association** tab of the **Create a WAF policy** page, select **Add CDN Endpoint**, enter the following settings, and then select **Add**:
44+
45+
| Setting | Value |
46+
| --- | --- |
47+
| CDN Profile | Select your CDN profile name.|
48+
| Endpoint | Select the name of your endpoint, then select **Add**.|
49+
50+
> [!NOTE]
51+
> If the endpoint is associated with a WAF policy, it is shown grayed out. You must first remove the Endpoint from the associated policy, and then re-associate the endpoint to a new WAF policy.
52+
1. Select **Review + create**, then select **Create**.
53+
54+
## Configure Web Application Firewall policy (optional)
55+
56+
### Change mode
57+
58+
By default WAF policy is in *Detection* mode when you create a WAF policy. In *Detection* mode, WAF doesn't block any requests. Instead, requests matching the WAF rules are logged at WAF logs.
59+
60+
To see WAF in action, you can change the mode settings from *Detection* to *Prevention*. In *Prevention* mode, requests that match rules that are defined in Default Rule Set (DRS) are blocked and logged at WAF logs.
61+
62+
![Change WAF policy mode](../media/waf-cdn-create-portal/policy.png)
63+
64+
### Custom rules
65+
66+
To create a custom rule, select **Add custom rule** under the **Custom rules** section. This opens the custom rule configuration page. There are two types of custom rules: **match rule** and **rate limit** rule.
67+
68+
The following screenshot shows a custom match rule to block a request if the query string contains the value **blockme**.
69+
70+
![Change WAF policy mode](../media/waf-cdn-create-portal/custommatch.png)
71+
72+
Rate limit rules require two additional fields: **Rate limit duration** and **Rate limit threshold (requests)** as shown in the following example:
73+
74+
![Change WAF policy mode](../media/waf-cdn-create-portal/customrate.png)
75+
76+
### Default Rule Set (DRS)
77+
78+
The Azure managed Default Rule Set is enabled by default. To disable an individual rule within a rule group, expand the rules within that rule group, select the check box in front of the rule number, and select **Disable** on the tab above. To change actions types for individual rules within the rule set, select the check box in front of the rule number, and then select the **Change action** tab above.
79+
80+
![Change WAF Rule Set](../media/waf-cdn-create-portal/managed2.png)
81+
82+
## Next steps
83+
84+
> [!div class="nextstepaction"]
85+
> [Learn about Azure Web Application Firewall](../overview.md)
35.1 KB
Loading
66.5 KB
Loading
26.2 KB
Loading
26.8 KB
Loading
72.7 KB
Loading
10.5 KB
Loading

0 commit comments

Comments
 (0)