Skip to content

Commit 384bf88

Browse files
authored
Merge pull request #214371 from halkazwini/fd-headers
Front Door: Freshness: Tutorial: Add Security headers with Rules Engine
2 parents 5db0c34 + 20b8b59 commit 384bf88

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

articles/frontdoor/front-door-security-headers.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
title: 'Tutorial: Add security headers with Rules Engine - Azure Front Door'
33
description: This tutorial teaches you how to configure a security header via Rules Engine on Azure Front Door
44
services: frontdoor
5-
documentationcenter: ''
65
author: duongau
7-
editor: ''
86
ms.service: frontdoor
97
ms.topic: tutorial
108
ms.tgt_pltfrm: na
119
ms.workload: infrastructure-services
12-
ms.date: 09/14/2020
10+
ms.date: 10/12/2022
1311
ms.author: duau
1412
# Customer intent: As an IT admin, I want to learn about Front Door and how to configure a security header via Rules Engine.
1513
---
@@ -26,32 +24,38 @@ In this tutorial, you learn how to:
2624
2725
## Prerequisites
2826

29-
* Before you can complete the steps in this tutorial, you must first create a Front Door. For more information, see [Quickstart: Create a Front Door](quickstart-create-front-door.md).
30-
* If this is your first time using the Rules Engine feature, see how to [Set up a Rules Engine](front-door-tutorial-rules-engine.md).
27+
* An Azure subscription.
28+
* An Azure Front Door. To complete the steps in this tutorial, you must have a Front Door configured with rules engine. For more information, see [Quickstart: Create a Front Door](quickstart-create-front-door.md) and [Configure your Rules Engine](front-door-tutorial-rules-engine.md).
3129

3230
## Add a Content-Security-Policy header in Azure portal
3331

34-
1. Click **Add** to add a new rule. Provide the rule a name and then click **Add an Action** > **Response Header**.
32+
1. Within your Front door resource, select **Rules engine configuration** under **Settings**, and then select the rules engine that you want to add the security header to.
3533

36-
1. Set the Operator to be **Append** to add this header as a response to all of the incoming requests to this route.
34+
:::image type="content" source="media/front-door-security-headers/front-door-rules-engine-configuration.png" alt-text="Screenshot showing rules engine configuration page of Azure Front Door.":::
3735

38-
1. Add the header name: **Content-Security-Policy** and define the values this header should accept. In this scenario, we choose *"script-src 'self' https://apiphany.portal.azure-api.net."*
36+
2. Select **Add rule** to add a new rule. Provide the rule a name and then select **Add an Action** > **Response Header**.
37+
38+
3. Set the Operator to **Append** to add this header as a response to all of the incoming requests to this route.
39+
40+
4. Add the header name: *Content-Security-Policy* and define the values this header should accept, then select **Save**. In this scenario, we choose *`script-src 'self' https://apiphany.portal.azure-api.net`*.
41+
42+
:::image type="content" source="./media/front-door-security-headers/front-door-security-header.png" alt-text="Screenshot showing the added security header under.":::
3943

4044
> [!NOTE]
4145
> Header values are limited to 640 characters.
4246
43-
1. Once you've added all of the rules you'd like to your configuration, don't forget to go to your preferred route and associate your Rules Engine configuration to your Route Rule. This step is required to enable the rule to work.
47+
5. Once you've added all of the rules you'd like to your configuration, don't forget to go to your preferred route and associate your Rules engine configuration to the Route Rule. This step is required to enable the rule to work.
4448

45-
![portal sample](./media/front-door-rules-engine/rules-engine-security-header-example.png)
49+
:::image type="content" source="./media/front-door-security-headers/front-door-associate-routing-rule.png" alt-text="Screenshot showing how to associate a routing rule.":::
4650

4751
> [!NOTE]
4852
> In this scenario, we did not add [match conditions](front-door-rules-engine-match-conditions.md) to the rule. All incoming requests that match the path defined in the Route Rule will have this rule applied. If you would like it to only apply to a subset of those requests, be sure to add your specific **match conditions** to this rule.
4953
5054
## Clean up resources
5155

52-
In the preceding steps, you configured Security headers with Rules Engine. If you no longer want the rule, you can remove it by clicking Delete rule.
56+
In the previous steps, you configured security headers with rules engine of your Front Door. If you no longer want the rule, you can remove it by selecting **Delete rule** within the rules engine.
5357

54-
:::image type="content" source="./media/front-door-rules-engine/rules-engine-delete-rule.png" alt-text="Delete rule":::
58+
:::image type="content" source="./media/front-door-security-headers/front-door-delete-security-header.png" alt-text="Screenshot showing how to delete the security rule.":::
5559

5660
## Next steps
5761

62.3 KB
Loading
47.2 KB
Loading
51.6 KB
Loading
47.2 KB
Loading

0 commit comments

Comments
 (0)