Skip to content

Commit 8777856

Browse files
authored
Merge pull request #296809 from halkazwini/waf-screenshots
[BULK] WAF screenshots reduction
2 parents 607f8c3 + a6bfa25 commit 8777856

File tree

62 files changed

+31
-125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+31
-125
lines changed

articles/web-application-firewall/afds/automated-detection-response-with-sentinel.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ You install a Sentinel playbook named *Block-IPAzureWAF* from a template on GitH
2828
You install the playbook from a template on GitHub.
2929
1. Go to the [GitHub repository](https://github.com/Azure/Azure-Network-Security/tree/master/Azure%20WAF/Playbook%20-%20WAF%20Sentinel%20Playbook%20Block%20IP%20-%20New) and select **Deploy to Azure** to launch the template.
3030
1. Fill in the required parameters. You can get your Front Door ID from the Azure portal. The Front Door ID is the resource ID of the Front Door resource.
31-
:::image type="content" source="../media/automated-detection-response-with-sentinel/playbook-template.png" alt-text="Screenshot showing the playbook template.":::
3231
1. Select **Review + create** and then **Create**.
3332

3433
## Authorize the API connection
@@ -41,8 +40,6 @@ An API connection named *azuresentinel-Block-IPAzureWAF* is created as part of t
4140
1. Select **Authorize**.
4241
1. Select **Save**.
4342

44-
:::image type="content" source="../media/automated-detection-response-with-sentinel/authorize-api.png" alt-text="Screenshot showing the API authorization screen."lightbox="../media/automated-detection-response-with-sentinel/authorize-api.png":::
45-
4643
## Configure the Contributor role assignment
4744

4845
The playbook must have the necessary permissions to query and modify the existing WAF policy via the REST API. You can assign the playbook a system-assigned Managed Identity with Contributor permissions on the Front Door resource along with their associated WAF policies. You can assign permissions only if your account has been assigned Owner or User Access Administrator roles to the underlying resource.

articles/web-application-firewall/afds/protect-api-hosted-apim-by-waf.md

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Protect APIs hosted in APIM using Azure Web Application Firewall with Azure Front Door
2+
title: Protect APIs hosted in APIM using Azure WAF with Azure Front Door
33
description: This article guides you through a process of creating an API in APIM and protects it from a web application attack using Azure Web Application Firewall integrated with Azure Front Door.
44
author: halkazwini
55
ms.author: halkazwini
@@ -18,28 +18,19 @@ This article describes how to use [Azure Web Application Firewall on Azure Front
1818

1919
## Create an APIM instance and publish an API in APIM that generates a mock API response
2020

21-
1. Create an APIM instance
22-
23-
[Quickstart: Create a new Azure API Management service instance by using the Azure portal](../../api-management/get-started-create-service-instance.md)
21+
1. Create an APIM instance. For more information, see [Quickstart: Create a new Azure API Management service instance by using the Azure portal](../../api-management/get-started-create-service-instance.md).
2422

2523
The following screenshot shows that an APIM instance called **contoso-afd-apim-resource** has been created. It can take up to 30 to 40 minutes to create and activate an API Management service.
2624

2725
:::image type="content" source="../media/protect-api-hosted-in-apim-by-waf/contoso-main-page.png" alt-text="A screenshot showing the APIM instance created." lightbox="../media/protect-api-hosted-in-apim-by-waf/contoso-main-page.png":::
2826

2927

30-
2. Create an API and generate mock API responses
31-
32-
[Tutorial: Mock API responses](../../api-management/mock-api-responses.md#add-an-operation-to-the-test-api)
28+
2. Create an API and generate mock API responses. For more information, see [Tutorial: Mock API responses](../../api-management/mock-api-responses.md#add-an-operation-to-the-test-api).
3329

3430
Replace the name of API from **Test API** given in the above tutorial with **Book API**.
3531

3632
The Book API does a GET operation for `_/test_` as the URL path for the API. You can see the response for the API is set as **200 OK** with content type as application/json with text as `{“Book”:” $100”}`.
3733

38-
:::image type="content" source="../media/protect-api-hosted-in-apim-by-waf/apim-get-test.png" alt-text="A screenshot showing the GET operation defined in APIM." lightbox="../media/protect-api-hosted-in-apim-by-waf/apim-get-test.png":::
39-
40-
:::image type="content" source="../media/protect-api-hosted-in-apim-by-waf/apim-200-ok.png" alt-text="A screenshot showing the mock response created." lightbox="../media/protect-api-hosted-in-apim-by-waf/apim-200-ok.png":::
41-
42-
4334
3. Deselect **Subscription required** check box under the API settings tab and select **Save**.
4435

4536
4. Test the mock responses from the APIM interface. You should receive a **200 OK** response.
@@ -85,34 +76,24 @@ Requests routed through the Front Door include headers specific to your Front Do
8576

8677
1. Copy the Front Door ID from the AFD overview page.
8778

88-
:::image type="content" source="../media/protect-api-hosted-in-apim-by-waf/afd-endpoint-fd-id.png" alt-text="A screenshot showing the AFD ID." lightbox="../media/protect-api-hosted-in-apim-by-waf/afd-endpoint-fd-id.png":::
89-
90-
9179
2. Access the APIM API page, select the Book API, select **Design** and **All operations**. In the Inbound policy, select **+ Add policy**.
9280

9381
:::image type="content" source="../media/protect-api-hosted-in-apim-by-waf/apim-inbound-policy.png" alt-text="A screenshot showing how to add an inbound policy." lightbox="../media/protect-api-hosted-in-apim-by-waf/apim-inbound-policy.png":::
9482

9583
3. Select Other policies
9684

97-
:::image type="content" source="../media/protect-api-hosted-in-apim-by-waf/apim-other-policies.png" alt-text="A screenshot showing other policies selected." lightbox="../media/protect-api-hosted-in-apim-by-waf/apim-other-policies.png":::
98-
9985
4. Select “Show snippets" and select **Check HTTP header**.
10086

101-
:::image type="content" source="../media/protect-api-hosted-in-apim-by-waf/apim-check-http-header.png" alt-text="A screenshot showing check header selected." lightbox="../media/protect-api-hosted-in-apim-by-waf/apim-check-http-header.png":::
102-
10387
Add the following code to the inbound policy for HTTP header `X-Azure-FDID`. Replace the `{FrontDoorId}` with the AFD ID copied in the first step of this section.
10488

105-
10689
```
10790
<check-header name="X-Azure-FDID" failed-check-httpcode="403" failed-check-error-message="Invalid request" ignore-case="false">
10891
<value>{FrontDoorId}</value>
10992
</check-header>
11093
11194
```
11295

113-
:::image type="content" source="../media/protect-api-hosted-in-apim-by-waf/apim-final-check-header.png" alt-text="A screenshot showing the final policy configuration." lightbox="../media/protect-api-hosted-in-apim-by-waf/apim-final-check-header.png":::
114-
115-
Select **Save**.
96+
5. Select **Save**.
11697

11798
At this point, APIM access is restricted to the Azure Front Door endpoint only.
11899

@@ -128,8 +109,6 @@ Requests routed through the Front Door include headers specific to your Front Do
128109

129110
4. Select **bookwafpolicy** and verify that the **bookwafpolicy** has Managed rules provisioned. The latest versions of Microsoft_DefaultRueSet and Microsoft_BotManagerRuleSet is provisioned which protects the origin against OWASP top 10 vulnerabilities and malicious bot attacks.
130111

131-
:::image type="content" source="../media/protect-api-hosted-in-apim-by-waf/book-waf-policy.png" alt-text="A screenshot showing the WAF policy for managed rules." lightbox="../media/protect-api-hosted-in-apim-by-waf/book-waf-policy.png":::
132-
133112
At this point, the end-to-end call is set up, and the API is protected by Azure Web Application Firewall.
134113

135114
## Verify the setup

articles/web-application-firewall/afds/protect-azure-open-ai.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,14 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
2222

2323

2424
## Create Azure OpenAI instance using the gpt-35-turbo model
25-
First, create an OpenAI instance.
2625

26+
First, create an OpenAI instance.
2727

2828
1. Create an Azure OpenAI instance and deploy a gpt-35-turbo model using [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource).
2929
1. Identify the Azure OpenAI endpoint and the API key.
3030

3131
Open the Azure OpenAI service in the Azure AI Foundry portal and open the **Chat** option under **Playground**.
3232
Use the **View code** option to display the endpoint and the API key.
33-
:::image type="content" source="../media/protect-azure-open-ai/view-code.png" alt-text="Screenshot showing the Azure AI Foundry portal Chat playground." lightbox="../media/protect-azure-open-ai/view-code.png":::
34-
<br>
3533

3634
:::image type="content" source="../media/protect-azure-open-ai/sample-code.png" alt-text="Screenshot showing Azure OpenAI sample code with Endpoint and Key.":::
3735

@@ -51,9 +49,8 @@ First, create an OpenAI instance.
5149
}
5250

5351
```
54-
:::image type="content" source="../media/protect-azure-open-ai/post-body.png" alt-text="Screenshot showing the post body." lightbox="../media/protect-azure-open-ai/post-body.png":::
55-
1. In response to the POST, you should receive a *200 OK*:
56-
:::image type="content" source="../media/protect-azure-open-ai/post-200-ok.png" alt-text="Screenshot showing the POST 200 OK." lightbox="../media/protect-azure-open-ai/post-200-ok.png":::
52+
53+
1. In response to the POST, you should receive a *200 OK*.
5754

5855
The Azure OpenAI also generates a response using the GPT model.
5956

@@ -73,17 +70,18 @@ Now use the Azure portal to create an Azure Front Door instance with Azure WAF.
7370

7471
Enable the WAF policy in prevention mode and ensure **Microsoft_DefaultRuleSet_2.1** and **Microsoft_BotManagerRuleSet_1.0** are enabled.
7572

76-
:::image type="content" source="../media/protect-azure-open-ai/web-application-firewall-policy.png" alt-text="Screenshot showing a WAF policy." lightbox="../media/protect-azure-open-ai/web-application-firewall-policy.png":::
77-
7873
## Verify access to Azure OpenAI via Azure Front Door endpoint
7974

8075
Now verify your Azure Front Door endpoint.
8176

8277
1. Retrieve the Azure Front Door endpoint from the Front Door Manager.
8378

8479
:::image type="content" source="../media/protect-azure-open-ai/front-door-endpoint.png" alt-text="Screenshot showing the Azure Front Door endpoint." lightbox="../media/protect-azure-open-ai/front-door-endpoint.png":::
80+
8581
2. Use your favorite API test method, such as [Visual Studio](/aspnet/core/test/http-files) or [Insomnia](https://insomnia.rest/) to send a POST request to the Azure Front Door endpoint.
86-
1. Replace the Azure OpenAI endpoint with the AFD endpoint in the POST request.
82+
83+
3. Replace the Azure OpenAI endpoint with the AFD endpoint in the POST request.
84+
8785
:::image type="content" source="../media/protect-azure-open-ai/test-final.png" alt-text="Screenshot showing the final POST." lightbox="../media/protect-azure-open-ai/test-final.png":::
8886

8987
Azure OpenAI also generates a response using the GPT model.

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ First, create a basic WAF policy with the managed Default Rule Set (DRS) by usin
4848
| --- | --- |
4949
| Front door profile | Select your Azure Front Door profile name. |
5050
| Domains | Select the domains you want to associate the WAF policy to and then select **Add**. |
51-
52-
:::image type="content" source="../media/waf-front-door-create-portal/associate-profile.png" alt-text="Screenshot that shows the Associate a Front door profile page.":::
5351

5452
> [!NOTE]
5553
> If the domain is associated to a WAF policy, it's shown as grayed out. You must first remove the domain from the associated policy and then re-associate the domain to a new WAF policy.
@@ -75,16 +73,14 @@ To create a custom rule, under the **Custom rules** section, select **Add custom
7573

7674
The following example shows how to configure a custom rule to block a request if the query string contains **blockme**.
7775

78-
:::image type="content" source="../media/waf-front-door-create-portal/customquerystring2.png" alt-text="Screenshot that shows the custom rule configuration page showing settings for a rule that checks whether the QueryString variable contains the value blockme.":::
76+
:::image type="content" source="../media/waf-front-door-create-portal/customquerystring2.png" alt-text="Screenshot that shows how to add a custom rule.":::
7977

8078
### Default Rule Set
8179

8280
The Azure-managed Default Rule Set is enabled by default for the Premium and Classic tiers of Azure Front Door. The current DRS for the Premium tier of Azure Front Door is Microsoft_DefaultRuleSet_2.1. Microsoft_DefaultRuleSet_1.1 is the current DRS for the Classic tier of Azure Front Door. On the **Managed rules** page, select **Assign** to assign a different DRS.
8381

8482
To disable an individual rule, select the checkbox in front of the rule number and select **Disable** at the top of the page. To change action types for individual rules within the rule set, select the checkbox in front of the rule number and select **Change action** at the top of the page.
8583

86-
:::image type="content" source="../media/waf-front-door-create-portal/managed-rules.png" alt-text="Screenshot that shows the Managed rules page showing a rule set, rule groups, rules, and Enable, Disable, and Change Action buttons." lightbox="../media/waf-front-door-create-portal/managed-rules.png":::
87-
8884
> [!NOTE]
8985
> Managed rules are only supported in the Azure Front Door Premium tier and Azure Front Door Classic tier policies.
9086
@@ -95,5 +91,4 @@ When no longer needed, delete the resource group and all related resources.
9591
## Next steps
9692

9793
> [!div class="nextstepaction"]
98-
> - [Learn more about Azure Front Door](../../frontdoor/front-door-overview.md)
99-
> - [Learn more about Azure Front Door tiers](../../frontdoor/standard-premium/tier-comparison.md)
94+
> [Learn more about Azure Front Door tiers](../../frontdoor/standard-premium/tier-comparison.md)

articles/web-application-firewall/afds/waf-front-door-exclusion-configure.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,8 @@ You decide to create an exclusion to allow these legitimate requests to pass thr
3232

3333
1. Select **Managed rules** > **Manage exclusions**.
3434

35-
:::image type="content" source="../media/waf-front-door-exclusion-configure/managed-rules-exclusion.png" alt-text="Screenshot that shows the Azure portal showing the WAF policy's Managed rules page, with the Manage exclusions button highlighted." :::
36-
3735
1. Select **Add**.
3836

39-
:::image type="content" source="../media/waf-front-door-exclusion-configure/exclusion-add.png" alt-text="Screenshot that shows the Azure portal with the exclusion list Add button." :::
40-
4137
1. Configure the exclusion's **Applies to** section:
4238

4339
| Field | Value |

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,16 @@ The Azure Front Door WAF provides detailed reporting on each request and each th
5454

5555
Logs aren't enabled by default. You must explicitly enable logs. You can configure logs in the Azure portal by using the **Diagnostic settings** tab.
5656

57-
:::image type="content" source="../media/waf-frontdoor-monitor/waf-diagnostic-setting.png" alt-text="Screenshot that shows how to enable the WAF logs." lightbox="../media/waf-frontdoor-monitor/waf-diagnostic-setting.png":::
58-
5957
If logging is enabled and a WAF rule is triggered, any matching patterns are logged in plain text to help you analyze and debug the WAF policy behavior. You can use exclusions to fine-tune rules and exclude any data that you want to be excluded from the logs. For more information, see [Web application firewall exclusion lists in Azure Front Door](../afds/waf-front-door-exclusion.md).
6058

6159
You can enable three types of Azure Front Door logs:
6260

63-
6461
- WAF logs
6562
- Access logs
6663
- Health probe logs
6764

6865
Activity logs are enabled by default and provide visibility into the operations performed on your Azure resources, such as configuration changes to your Azure Front Door profile.
6966

70-
7167
### WAF logs
7268

7369
::: zone pivot="front-door-standard-premium"
@@ -188,6 +184,6 @@ The following snippet shows an example log entry, including the reason that the
188184

189185
For more information about the other Azure Front Door logs, see [Monitor metrics and logs in Azure Front Door](../../frontdoor/front-door-diagnostics.md#logs).
190186

191-
## Next steps
187+
## Next step
192188

193189
Learn more about [Azure Front Door](../../frontdoor/front-door-overview.md).

articles/web-application-firewall/afds/waf-front-door-rate-limit-configure.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,12 @@ You decide to create a rate-limit rule that restricts each source IP address to
3535

3636
1. In the Azure portal, select **Create a resource**.
3737

38-
:::image type="content" source="../media/waf-front-door-rate-limit-configure/create-resource.png" alt-text="Screenshot that shows the Create a resource button on the home page." :::
39-
4038
1. Search for **Front Door**, and select **Front Door and CDN profiles**.
4139

42-
:::image type="content" source="../media/waf-front-door-rate-limit-configure/create-front-door.png" alt-text="Screenshot that shows the marketplace, with Front Door highlighted." :::
43-
4440
1. Select **Create**.
4541

46-
:::image type="content" source="../media/waf-front-door-rate-limit-configure/create-front-door-2.png" alt-text="Screenshot that shows Front Door and CDN profiles, with the Create button highlighted." :::
47-
4842
1. Select **Continue to create a Front Door** to use the *quick create* portal creation process.
4943

50-
:::image type="content" source="../media/waf-front-door-rate-limit-configure/quick-create.png" alt-text="Screenshot that shows the Azure Front Door offerings, with the Quick create option selected and the Continue to create a Front Door button highlighted." :::
51-
5244
1. Enter the information required on the **Basics** page:
5345

5446
- **Resource group**: Select an existing resource group, or create a new resource group for the Azure Front Door and WAF resources.
@@ -63,12 +55,8 @@ You decide to create a rate-limit rule that restricts each source IP address to
6355

6456
1. Enter the name of a WAF policy and select **Create**.
6557

66-
:::image type="content" source="../media/waf-front-door-rate-limit-configure/waf-policy-create.png" alt-text="Screenshot that shows the WAF policy creation prompt, with the Create button highlighted." :::
67-
6858
1. Select **Review + create** > **Create**.
6959

70-
:::image type="content" source="../media/waf-front-door-rate-limit-configure/front-door-create.png" alt-text="Screenshot that shows the completed Azure Front Door profile configuration." :::
71-
7260
1. After the deployment is finished, select **Go to resource**.
7361

7462
## Create a rate-limit rule

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,6 @@ Disabling a rule is a global setting that applies to all front-end hosts associa
313313

314314
If you want to use Azure PowerShell to disable a managed rule, see the [`PSAzureManagedRuleOverride`](/powershell/module/az.frontdoor/new-azfrontdoorwafmanagedruleoverrideobject) object documentation. If you want to use the Azure CLI, see the [`az network front-door waf-policy managed-rules override`](/cli/azure/network/front-door/waf-policy/managed-rules/override) documentation.
315315

316-
![Screenshot that shows WAF rules.](../media/waf-front-door-tuning/waf-rules.png)
317-
318316
> [!TIP]
319317
> Document any changes you make to your WAF policy. Include example requests to illustrate the false positive detection. Explain why you added a custom rule, disabled a rule or rule set, or added an exception. If you redesign your application in the future, you might need to verify that your changes are still valid. Or you might be audited or need to justify why you reconfigured the WAF policy from its default settings.
320318

articles/web-application-firewall/ag/application-gateway-waf-metrics.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ WAF with Application Gateway log is integrated with [Azure Monitor](/azure/azure
2121

2222
WAF with Application Gateway provides detailed reporting on each threat it detects. Logging is integrated with Azure Diagnostics logs and alerts are recorded in a json format. These logs can be integrated with [Azure Monitor logs](/previous-versions/azure/azure-monitor/insights/azure-networking-analytics).
2323

24-
![WAFDiag](../media/waf-appgateway-metrics/waf-appgateway-diagnostic.png)
25-
2624
For more information about diagnostics logs, see [Application Gateway WAF resource logs](../ag/web-application-firewall-logs.md). If logging is enabled and a WAF rule is triggered, any matching patterns are logged in plain text to help you analyze and debug the WAF policy behavior. You can use exclusions to fine tune rules and exclude any data that you want to be excluded from the logs. For more information, see [Web application firewall exclusion lists in Azure Application Gateway](../ag/application-gateway-waf-configuration.md).
2725

2826

0 commit comments

Comments
 (0)