Skip to content

Commit 8454cf9

Browse files
authored
Merge pull request #290031 from MicrosoftDocs/main
11/6/2024 PM Publish
2 parents f78c994 + 8afc72d commit 8454cf9

File tree

68 files changed

+925
-529
lines changed

Some content is hidden

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

68 files changed

+925
-529
lines changed

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

articles/batch/monitor-application-insights.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to instrument an Azure Batch .NET application using the A
44
ms.topic: how-to
55
ms.devlang: csharp
66
ms.custom: devx-track-csharp, devx-track-dotnet
7-
ms.date: 06/13/2024
7+
ms.date: 11/06/2024
88
---
99

1010
# Monitor and debug an Azure Batch .NET application with Application Insights
@@ -15,16 +15,13 @@ This article shows how to add and configure the Application Insights library int
1515

1616
A sample C# solution with code to accompany this article is available on [GitHub](https://github.com/Azure/azure-batch-samples/tree/master/CSharp/ArticleProjects/ApplicationInsights). This example adds Application Insights instrumentation code to the [TopNWords](https://github.com/Azure/azure-batch-samples/tree/master/CSharp/TopNWords) example. If you're not familiar with that example, try building and running TopNWords first. Doing this will help you understand a basic Batch workflow of processing a set of input blobs in parallel on multiple compute nodes.
1717

18-
> [!TIP]
19-
> As an alternative, configure your Batch solution to display Application Insights data such as VM performance counters in Batch Explorer. [Batch Explorer](https://github.com/Azure/BatchExplorer) is a free, rich-featured, standalone client tool to help create, debug, and monitor Azure Batch applications. Download an [installation package](https://azure.github.io/BatchExplorer/) for Mac, Linux, or Windows. See the [batch-insights repo](https://github.com/Azure/batch-insights) for quick steps to enable Application Insights data in Batch Explorer.
20-
2118
## Prerequisites
2219

2320
- [Visual Studio 2017 or later](https://www.visualstudio.com/vs)
2421
- [Batch account and linked storage account](batch-account-create-portal.md)
2522
- [Application Insights resource](/previous-versions/azure/azure-monitor/app/create-new-resource). Use the Azure portal to create an Application Insights *resource*. Select the *General* **Application type**.
2623
- Copy the [instrumentation key](/previous-versions/azure/azure-monitor/app/create-new-resource#copy-the-instrumentation-key) from the Azure portal. You'll need this value later.
27-
24+
2825
> [!NOTE]
2926
> You may be [charged](https://azure.microsoft.com/pricing/details/application-insights/) for data stored in Application Insights. This includes the diagnostic and monitoring data discussed in this article.
3027
@@ -186,7 +183,7 @@ private static readonly List<string> AIFilesToUpload = new List<string>()
186183
"Microsoft.AI.PerfCounterCollector.dll",
187184
"Microsoft.AI.ServerTelemetryChannel.dll",
188185
"Microsoft.AI.WindowsServer.dll",
189-
186+
190187
// custom telemetry initializer assemblies
191188
"Microsoft.Azure.Batch.Samples.TelemetryInitializer.dll",
192189
};
@@ -230,7 +227,7 @@ for (int i = 1; i <= topNWordsConfiguration.NumberOfTasks; i++)
230227
accountSettings.StorageAccountName,
231228
accountSettings.StorageAccountKey));
232229

233-
//This is the list of files to stage to a container -- for each job, one container is created and
230+
//This is the list of files to stage to a container -- for each job, one container is created and
234231
//files all resolve to Azure Blobs by their name (so two tasks with the same named file will create just 1 blob in
235232
//the container).
236233
task.FilesToStage = new List<IFileStagingProvider>
@@ -242,7 +239,7 @@ for (int i = 1; i <= topNWordsConfiguration.NumberOfTasks; i++)
242239
foreach (FileToStage stagedFile in aiStagedFiles)
243240
{
244241
task.FilesToStage.Add(stagedFile);
245-
}
242+
}
246243
task.RunElevated = false;
247244
tasksToRun.Add(task);
248245
}
@@ -260,7 +257,7 @@ To view trace logs in your Applications Insights resource, click **Live Stream**
260257

261258
### View trace logs
262259

263-
To view trace logs in your Applications Insights resource, click **Search**. This view shows a list of diagnostic data captured by Application Insights including traces, events, and exceptions.
260+
To view trace logs in your Applications Insights resource, click **Search**. This view shows a list of diagnostic data captured by Application Insights including traces, events, and exceptions.
264261

265262
The following screenshot shows how a single trace for a task is logged and later queried for debugging purposes.
266263

@@ -292,7 +289,7 @@ To create a sample chart:
292289
## Monitor compute nodes continuously
293290

294291
You may have noticed that all metrics, including performance counters, are only logged when the tasks are running. This behavior is useful because it limits the amount of
295-
data that Application Insights logs. However, there are cases when you would always like to monitor the compute nodes. For example, they might be running background work which is not scheduled via the Batch service. In this case, set up a monitoring process to run for the life of the compute node.
292+
data that Application Insights logs. However, there are cases when you would always like to monitor the compute nodes. For example, they might be running background work which is not scheduled via the Batch service. In this case, set up a monitoring process to run for the life of the compute node.
296293

297294
One way to achieve this behavior is to spawn a process that loads the Application Insights library and runs in the background. In the example, the start task loads the binaries on the machine and keeps a process running indefinitely. Configure the Application Insights configuration file for this process to emit additional data you're interested in, such as performance counters.
298295

0 commit comments

Comments
 (0)