Skip to content

Commit 3cbb46f

Browse files
author
gitName
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into apiccop
2 parents 860e364 + 52784f7 commit 3cbb46f

File tree

74 files changed

+1452
-709
lines changed

Some content is hidden

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

74 files changed

+1452
-709
lines changed

articles/api-center/set-up-api-center-azure-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: dlepow
55
ms.service: azure-api-center
66
ms.custom: devx-track-azurecli
77
ms.topic: quickstart
8-
ms.daate: 06/27/2024
8+
ms.date: 06/27/2024
99
ms.author: danlep
1010
---
1111

articles/api-management/import-soap-api.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: dlepow
55
ms.service: azure-api-management
66
ms.custom: devx-track-azurepowershell, devx-track-azurecli
77
ms.topic: how-to
8-
ms.date: 10/26/2022
8+
ms.date: 11/05/2024
99
ms.author: danlep
1010
---
1111
# Import SOAP API to API Management
@@ -120,7 +120,11 @@ To define a wildcard SOAP action:
120120
1. In the portal, select the API you created in the previous step.
121121
1. In the **Design** tab, select **+ Add Operation**.
122122
1. Enter a **Display name** for the operation.
123-
1. In the URL, select `POST` and enter `/soapAction={any}` in the resource. The template parameter inside the curly brackets is arbitrary and doesn't affect the execution.
123+
1. In the URL, select `POST` and enter `/?soapAction={any}` in the resource. The template parameter inside the curly brackets is arbitrary and doesn't affect the execution.
124+
125+
> [!NOTE]
126+
> Don't use the **OpenAPI specification** editor in the **Design** tab to modify a SOAP API.
127+
124128

125129

126130
[!INCLUDE [api-management-navigate-to-instance.md](../../includes/api-management-append-apis.md)]
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: Use header rewrite to add HSTS header in portal - Azure Application Gateway
3+
description: Learn how to use the Azure portal to configure an Azure Application Gateway with HSTS Policy
4+
services: application-gateway
5+
author: reyjordi
6+
ms.service: azure-application-gateway
7+
ms.topic: how-to
8+
ms.date: 11/06/2024
9+
ms.author: reyjordi
10+
ms.custom: mvc
11+
---
12+
# Add HSTS headers with Azure Application Gateway - Azure portal
13+
14+
This article describes how to use the [Header Rewrite](./rewrite-http-headers-url.md) in [Application Gateway v2 SKU](./application-gateway-autoscaling-zone-redundant.md) to add HTTP Strict-Transport-Security (HSTS) response header to better secure traffic through Application Gateway.
15+
16+
HSTS policy helps protect or minimize your sites against man-in-the-middle, cookie-hijacking, and protocol downgrade attacks. After a client has established the first successful HTTPS connection with your HSTS-enabled website, HSTS header ensures going forward the client can access only through HTTPS.
17+
18+
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
19+
20+
## Before you begin
21+
22+
You need to have an Application Gateway v2 SKU deployment to complete the steps in this article. Rewriting headers isn't supported in the v1 SKU. If you don't have the v2 SKU, create an [Application Gateway v2 SKU](./tutorial-autoscale-ps.md) deployment before you begin.
23+
24+
## Sign in to Azure
25+
26+
Sign in to the [Azure portal](https://portal.azure.com/) with your Azure account.
27+
28+
## Create required objects
29+
30+
To configure HSTS policy, you must first complete these steps:
31+
32+
1. Create the objects that are required for adding an HSTS header:
33+
34+
- **HTTP Listener**: Create a basic or multisite HTTP listener. This listener must listen on port 80, and the protocol must be set to HTTP.
35+
36+
- **HTTPS Listener**: Create a basic or multisite HTTPS listener. This listener must listen on port 443, have the protocol set to HTTPS, and contain a certificate.
37+
38+
2. Create a routing rule that redirects all the traffic from the HTTP listener to the HTTPS listener.
39+
40+
To learn more about how to set up http to https redirection, see [HTTP to HTTPS Redirection](./redirect-http-to-https-portal.md).
41+
42+
## Configure HSTS policy
43+
44+
In this example, we will add the Strict Transport Security (STS) response header, using the rewrite rules of application gateway.
45+
46+
1. Select **All resources**, and then select your application gateway.
47+
48+
2. Select **Rewrites** in the left pane.
49+
50+
3. Select **Rewrite set**:
51+
52+
:::image type="content" source="./media/hsts-http-headers-portal/add-rewrite-set.png" alt-text="Screenshot that shows how to add a rewrite set." lightbox="./media/hsts-http-headers-portal/add-rewrite-set.png":::
53+
54+
4. Provide a name for the rewrite set and associate it with a routing rule:
55+
56+
- Enter the name for the rewrite set in the **Name** box.
57+
- Select one or more of the rules listed in the **Associated routing rules** list. You can select only rules that haven't been associated with other rewrite sets. The rules that have already been associated with other rewrite sets are dimmed.
58+
- Select **Next**.
59+
60+
:::image type="content" source="./media/hsts-http-headers-portal/name-and-association.png" alt-text="Screenshot that shows how to add the name and association for a rewrite set.":::
61+
62+
5. Create a rewrite rule:
63+
64+
- Select **Add rewrite rule**.
65+
66+
:::image type="content" source="./media/hsts-http-headers-portal/add-rewrite-rule.png" alt-text="Screenshot that shows how to add a rewrite rule.":::
67+
68+
- Enter a name for the rewrite rule in the **Rewrite rule name** box. Enter a number in the **Rule sequence** box.
69+
70+
:::image type="content" source="./media/hsts-http-headers-portal/rule-name.png" alt-text="Screenshot that shows how to add a rewrite rule name.":::
71+
72+
6. Add an action to rewrite the response header:
73+
74+
- In the **Rewrite type** list, select **Response Header**.
75+
76+
- In the **Action type** list, select **Set**.
77+
78+
- Under **Header name**, select **Common header**.
79+
80+
- In the **Common header** list, select **Strict-Transport-Security**.
81+
82+
- Enter the header value. In this example, we'll use `max-age=31536000; includeSubdomains; preload` as the header value.
83+
84+
- Select **OK**.
85+
86+
:::image type="content" source="./media/hsts-http-headers-portal/action.png" alt-text="Screenshot that shows how to add an action.":::
87+
88+
7. Select **Create** to create the rewrite set:
89+
90+
:::image type="content" source="./media/hsts-http-headers-portal/create-rewrite-set.png" alt-text="Screenshot that shows how to click create." lightbox="./media/hsts-http-headers-portal/create-rewrite-set.png":::
91+
92+
## Limitations and Recommendations
93+
94+
- In order to maximize security, you must show HSTS policy as soon as possible when users begin an HTTPS session. In order to enforce HTTPS for a given domain, the browser only needs to observe the STS header once. Hence, it should be added to home pages and critical pages of a site. However, that is not sufficient, it is best practice to cover as much of the URL space as possible and prioritize non-cacheable content.
95+
96+
- In this example, the response header Strict-Transport-Security is set to `max-age=31536000; includeSubdomains; preload`. However, users can also set the header to equal `max-age=31536000; includeSubdomains`, removing the preload. Preloading helps strengthen HSTS by ensuring clients always access the site using HTTPS, even if it is their first time accessing it. You must submit your domain and subdomains to https://hstspreload.org/ in order to ensure that users will never access the site using HTTP. Although the preload list is hosted by Google, all major browsers use this list.
97+
98+
- HSTS Policy will not prevent attacks against TLS itself or attacks on the servers.
99+
100+
## Next steps
101+
102+
To learn more about directives, please visit https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
103+
104+
To learn more about how to set up some common header rewrite use cases, see [common header rewrite scenarios](./rewrite-http-headers-url.md).
13.2 KB
Loading
19.8 KB
Loading
60.1 KB
Loading
47.6 KB
Loading
35 KB
Loading
18.7 KB
Loading

articles/application-gateway/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@
277277
items:
278278
- name: Azure portal
279279
href: parameter-based-path-selection-portal.md
280+
- name: HSTS Policy
281+
items:
282+
- name: Azure portal
283+
href: hsts-http-headers-portal.md
280284
- name: Configure custom probes
281285
items:
282286
- name: Portal

0 commit comments

Comments
 (0)