Skip to content

Commit 1785a83

Browse files
committed
Remaining ROPC updates for Functions
1 parent 8237e08 commit 1785a83

File tree

37 files changed

+276
-303
lines changed

37 files changed

+276
-303
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,11 @@
530530
"redirect_url": "./azure-resource-manager/management/deployment-models",
531531
"redirect_document_id": false
532532
},
533+
{
534+
"source_path_from_root": "/articles/azure-functions/functions-add-output-binding-storage-queue-java.md",
535+
"redirect_url": "/azure/azure-functions/functions-add-output-binding-storage-queue-cli?pivots=programming-language-java",
536+
"redirect_document_id": false
537+
},
533538
{
534539
"source_path_from_root": "/articles/azure-functions/create-first-function-arc-custom-container.md",
535540
"redirect_url": "/azure/azure-functions/functions-how-to-custom-container?pivots=azure-arc",

articles/azure-functions/durable/durable-functions-azure-storage-provider.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ The extra compression and blob operation steps for large messages can be expensi
106106

107107
The queues, tables, and blobs used by Durable Functions are created in a configured Azure Storage account. The account to use can be specified using the `durableTask/storageProvider/connectionStringName` setting (or `durableTask/azureStorageConnectionStringName` setting in Durable Functions 1.x) in the **host.json** file.
108108

109-
#### Durable Functions 2.x
109+
#### [Durable 2.x](#tab/durable-2x)
110110

111111
```json
112112
{
@@ -120,7 +120,7 @@ The queues, tables, and blobs used by Durable Functions are created in a configu
120120
}
121121
```
122122

123-
#### Durable Functions 1.x
123+
#### [Durable 1.x](#tab/durable-1x)
124124

125125
```json
126126
{
@@ -131,11 +131,15 @@ The queues, tables, and blobs used by Durable Functions are created in a configu
131131
}
132132
}
133133
```
134+
---
134135

135-
If not specified, the default `AzureWebJobsStorage` storage account is used. For performance-sensitive workloads, however, configuring a non-default storage account is recommended. Durable Functions uses Azure Storage heavily, and using a dedicated storage account isolates Durable Functions storage usage from the internal usage by the Azure Functions host.
136+
Keep in mind these considerations when choosing the storage account used by your Durable function app:
136137

137-
> [!NOTE]
138-
> Standard general purpose Azure Storage accounts are required when using the Azure Storage provider. All other storage account types are not supported. We highly recommend using legacy v1 general purpose storage accounts for Durable Functions. The newer v2 storage accounts can be significantly more expensive for Durable Functions workloads. For more information on Azure Storage account types, see the [Storage account overview](../../storage/common/storage-account-overview.md) documentation.
138+
+ When not specified, the default `AzureWebJobsStorage` storage account is used.
139+
+ When possible, you should use Microsoft Entra authentication with managed identities to secure your storage account connection. For more information, see [Connections](../functions-reference.md#connections).
140+
+ For performance-sensitive workloads, you should configure a storage account other than the default account (`AzureWebJobsStorage`). Durable Functions uses Azure Storage heavily, and using a dedicated storage account isolates Durable Functions storage usage from the internal usage by the Azure Functions host.
141+
+ Standard general purpose Azure Storage accounts are required when using the Azure Storage provider. All other storage account types aren't currently supported.
142+
+ We highly recommend using legacy v1 general purpose storage accounts for Durable Functions. The newer v2 storage accounts can be significantly more expensive for Durable Functions workloads. For more information on Azure Storage account types, see the [Storage account overview](../../storage/common/storage-account-overview.md) documentation.
139143

140144
### Orchestrator scale-out
141145

@@ -146,7 +150,7 @@ While activity functions can be scaled out infinitely by adding more VMs elastic
146150
147151
The number of control queues is defined in the **host.json** file. The following example host.json snippet sets the `durableTask/storageProvider/partitionCount` property (or `durableTask/partitionCount` in Durable Functions 1.x) to `3`. Note that there are as many control queues as there are partitions.
148152

149-
#### Durable Functions 2.x
153+
#### [Durable 2.x](#tab/durable-2x)
150154

151155
```json
152156
{
@@ -160,7 +164,7 @@ The number of control queues is defined in the **host.json** file. The following
160164
}
161165
```
162166

163-
#### Durable Functions 1.x
167+
#### [Durable 1.x](#tab/durable-1x)
164168

165169
```json
166170
{
@@ -171,6 +175,7 @@ The number of control queues is defined in the **host.json** file. The following
171175
}
172176
}
173177
```
178+
---
174179

175180
A task hub can be configured with between 1 and 16 partitions. If not specified, the default partition count is **4**.
176181

@@ -211,7 +216,7 @@ Extended sessions is a [caching mechanism](durable-functions-perf-and-scale.md#i
211216

212217
You can enable extended sessions by setting `durableTask/extendedSessionsEnabled` to `true` in the **host.json** file. The `durableTask/extendedSessionIdleTimeoutInSeconds` setting can be used to control how long an idle session will be held in memory:
213218

214-
**Functions 2.0**
219+
### [Functions 2.x](#tab/functions-2x)
215220
```json
216221
{
217222
"extensions": {

articles/azure-functions/durable/durable-functions-storage-providers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ The Azure Storage provider is the default storage provider and doesn't require a
8484

8585
The `connectionName` property in host.json is a reference to environment configuration which specifies how the app should connect to Azure Storage. It may specify:
8686

87-
- The name of an application setting containing a connection string. To obtain a connection string, follow the steps shown at [Manage storage account access keys](../../storage/common/storage-account-keys-manage.md).
88-
- The name of a shared prefix for multiple application settings, together defining an [identity-based connection](#identity-based-connections).
87+
- The name of a shared prefix for multiple application settings, together defining an [identity-based connection](#identity-based-connections). Managed identities use Microsoft Entra authentication to provide the most secure connection to your storage account.
88+
- The name of an application setting containing a connection string. To obtain a connection string, follow the steps shown at [Manage storage account access keys](../../storage/common/storage-account-keys-manage.md).
8989

90-
If the configured value is both an exact match for a single setting and a prefix match for other settings, the exact match is used. If no value is specified in host.json, the default value is "AzureWebJobsStorage".
90+
If the configured value is both an exact match for a single setting and a prefix match for other settings, the exact match is used. If no value is specified in host.json, the default value is `AzureWebJobsStorage`.
9191

9292
##### Identity-based connections
9393

articles/azure-functions/durable/durable-functions-webjobs-sdk.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The chaining Durable Functions sample is available in a WebJobs SDK 2.x version:
2020

2121
## Prerequisites
2222

23-
This article assumes you're familiar with the basics of the WebJobs SDK, C# class library development for Azure Functions, and Durable Functions. If you need an introduction to these topics, see the following resources:
23+
This article assumes you're familiar with the basics of the WebJobs SDK, C# class library development for Azure Functions, and Durable Functions. If you need an introduction to these concepts, see the following resources:
2424

2525
* [Get started with the WebJobs SDK](../../app-service/webjobs-sdk-get-started.md)
2626
* [Create your first function using Visual Studio](../functions-create-your-first-function-visual-studio.md)
@@ -132,7 +132,7 @@ In a WebJobs SDK project, the method name of a function is the function name. Th
132132

133133
### HTTP trigger
134134

135-
The WebJobs SDK does not have an HTTP trigger. The sample project's orchestration client uses a timer trigger:
135+
The WebJobs SDK doesn't have an HTTP trigger. The sample project's orchestration client uses a timer trigger:
136136

137137
```cs
138138
public static async Task CronJob(
@@ -199,7 +199,7 @@ This section provides an overview of how to run the [sample project](https://git
199199

200200
1. Create a web app and a storage account.
201201

202-
1. In the web app, save the storage connection string in an app setting named `AzureWebJobsStorage`.
202+
1. In the web app, save the storage connection information in an app setting named `AzureWebJobsStorage`. For the highest level of security, you should use a [managed identity connection](../../app-service/overview-managed-identity.md) to your storage account.
203203

204204
1. Create an Application Insights resource, and use the **General** app type for it.
205205

@@ -230,6 +230,9 @@ The main change introduced is the use of .NET Core instead of .NET Framework. To
230230
}
231231
```
232232

233+
>[!IMPORTANT]
234+
>For the highest level of security, you should use a managed identity connection to your storage account. For more information, see [How to use managed identities for App Service and Azure Functions](../../app-service/overview-managed-identity.md).
235+
233236
1. Change the `Main` method code to do this. Here's an example:
234237

235238
```cs

articles/azure-functions/durable/durable-functions-zero-downtime-deployment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Use the following procedure to set up this scenario.
5151

5252
1. [Add deployment slots](../functions-deployment-slots.md#add-a-slot) to your function app for staging and production.
5353

54-
1. For each slot, set the [AzureWebJobsStorage application setting](../functions-app-settings.md#azurewebjobsstorage) to the connection string of a shared storage account. This storage account connection string is used by the Azure Functions runtime to securely store the [functions' access keys](../security-concepts.md#function-access-keys).
54+
1. For each slot, set the [AzureWebJobsStorage application setting](../functions-app-settings.md#azurewebjobsstorage) to the connection of a shared storage account. This storage account connection is used by the Azure Functions runtime to securely store the [functions' access keys](../function-keys-how-to.md). For the highest level of security, you should use a [managed identity connection](../../app-service/overview-managed-identity.md) to your storage account.
5555

56-
1. For each slot, create a new app setting, for example, `DurableManagementStorage`. Set its value to the connection string of different storage accounts. These storage accounts are used by the Durable Functions extension for [reliable execution](./durable-functions-orchestrations.md). Use a separate storage account for each slot. Don't mark this setting as a deployment slot setting.
56+
1. For each slot, create a new app setting, for example, `DurableManagementStorage`. Set its value to the connection string of different storage accounts. These storage accounts are used by the Durable Functions extension for [reliable execution](./durable-functions-orchestrations.md). Use a separate storage account for each slot. Don't mark this setting as a deployment slot setting. Again, managed identity-based connections are the most secure.
5757

5858
1. In your function app's [host.json file's durableTask section](durable-functions-bindings.md#hostjson-settings), specify `connectionStringName` (Durable 2.x) or `azureStorageConnectionStringName` (Durable 1.x) as the name of the app setting you created in step 3.
5959

articles/azure-functions/flex-consumption-how-to.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create and manage function apps in a Flex Consumption plan
33
description: "Learn how to create function apps hosted in the Flex Consumption plan in Azure Functions and how to modify specific settings for an existing function app."
4-
ms.date: 08/21/2024
4+
ms.date: 12/29/2024
55
ms.topic: how-to
66
ms.custom: build-2024, devx-track-azurecli, devx-track-extended-java, devx-track-js, devx-track-python, devx-track-ts, ignite-2024
77
zone_pivot_groups: programming-languages-set-functions
@@ -331,6 +331,7 @@ A customized deployment source should meet this criteria:
331331

332332
When configuring deployment storage authentication, keep these considerations in mind:
333333

334+
+ As a security best practice, you should use managed identities when connecting to Azure Storage from you apps. For more information, see [Connections](./functions-reference.md#connections).
334335
+ When you use a connection string to connect to the deployment storage account, the application setting that contains the connection string must already exist.
335336
+ When you use a user-assigned managed identity, the provided identity gets linked to the function app. The `Storage Blob Data Contributor` role scoped to the deployment storage account also gets assigned to the identity.
336337
+ When you use a system-assigned managed identity, an identity gets created when a valid system-assigned identity doesn't already exist in your app. When a system-assigned identity does exists, the `Storage Blob Data Contributor` role scoped to the deployment storage account also gets assigned to the identity.

articles/azure-functions/functions-add-output-binding-azure-sql-vs-code.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Connect Azure Functions to Azure SQL Database using Visual Studio Code
33
description: Learn how to connect Azure Functions to Azure SQL Database by adding an output binding to your Visual Studio Code project.
4-
ms.date: 04/25/2024
4+
ms.date: 12/29/2024
55
ms.topic: quickstart
66
author: dzsquared
77
ms.author: drskwier
@@ -46,6 +46,9 @@ More details on the settings for [Azure SQL bindings and trigger for Azure Funct
4646
|**Password**|Enter a password that meets the complexity requirements.|
4747
|**Allow Azure services and resources to access this server**|Select **Yes**.|
4848

49+
>[!IMPORTANT]
50+
>This article currently shows how to connect to Azure SQL Database by using SQL Server authentication. For the best security, you should instead use managed identities for the Azure SQL Database connection. For more information, see the [Create an Azure SQL Database server with a user-assigned managed identity](/azure/azure-sql/database/authentication-azure-ad-user-assigned-managed-identity-create-server).
51+
4952
1. Once the creation has completed, navigate to the database blade in the Azure portal, and, under **Settings**, select **Connection strings**. Copy the **ADO.NET** connection string for **SQL authentication**. Paste the connection string into a temporary document for later use.
5053

5154
:::image type="content" source="./media/functions-add-output-binding-azure-sql-vs-code/adonet-connection-string.png" alt-text="Screenshot of copying the Azure SQL Database connection string in the Azure portal." border="true":::

articles/azure-functions/functions-add-output-binding-storage-queue-cli.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Connect Azure Functions to Azure Storage using command line tools
33
description: Learn how to connect Azure Functions to an Azure Storage queue by adding an output binding to your command line project.
4-
ms.date: 04/25/2024
4+
ms.date: 12/29/2024
55
ms.topic: quickstart
66
ms.devlang: csharp
77
# ms.devlang: csharp, java, javascript, powershell, python, typescript
@@ -34,7 +34,23 @@ Before you begin, you must complete the article, [Quickstart: Create an Azure Fu
3434
Before you begin, you must complete the article, [Quickstart: Create an Azure Functions project from the command line](create-first-function-cli-powershell.md). If you already cleaned up resources at the end of that article, go through the steps again to recreate the function app and related resources in Azure.
3535
::: zone-end
3636

37-
[!INCLUDE [functions-cli-get-storage-connection](../../includes/functions-cli-get-storage-connection.md)]
37+
### Retrieve the Azure Storage connection string
38+
39+
>[!IMPORTANT]
40+
>This article currently shows how to connect to your Azure Storage account by using the connection string, which contains a shared secret key. Using a connection string makes it easier for you to verify data updates in the storage account. For the best security, you should instead use managed identities when connecting to your storage account. For more information, see [Connections](./functions-reference.md#connections) in the Developer Guide.
41+
42+
Earlier, you created an Azure Storage account for function app's use. The connection string for this account is stored securely in app settings in Azure. By downloading the setting into the *local.settings.json* file, you can use the connection to write to a Storage queue in the same account when running the function locally.
43+
44+
1. From the root of the project, run the following command, replace `<APP_NAME>` with the name of your function app from the previous step. This command overwrites any existing values in the file.
45+
46+
```
47+
func azure functionapp fetch-app-settings <APP_NAME>
48+
```
49+
50+
1. Open *local.settings.json* file and locate the value named `AzureWebJobsStorage`, which is the Storage account connection string. You use the name `AzureWebJobsStorage` and the connection string in other sections of this article.
51+
52+
> [!IMPORTANT]
53+
> Because the *local.settings.json* file contains secrets downloaded from Azure, always exclude this file from source control. The *.gitignore* file created with a local functions project excludes the file by default.
3854
3955
::: zone pivot="programming-language-csharp"
4056
## Register binding extensions

0 commit comments

Comments
 (0)