You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-azure-storage-provider.md
+13-8Lines changed: 13 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ The extra compression and blob operation steps for large messages can be expensi
106
106
107
107
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.
108
108
109
-
#### Durable Functions 2.x
109
+
#### [Durable 2.x](#tab/durable-2x)
110
110
111
111
```json
112
112
{
@@ -120,7 +120,7 @@ The queues, tables, and blobs used by Durable Functions are created in a configu
120
120
}
121
121
```
122
122
123
-
#### Durable Functions 1.x
123
+
#### [Durable 1.x](#tab/durable-1x)
124
124
125
125
```json
126
126
{
@@ -131,11 +131,15 @@ The queues, tables, and blobs used by Durable Functions are created in a configu
131
131
}
132
132
}
133
133
```
134
+
---
134
135
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:
136
137
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.
139
143
140
144
### Orchestrator scale-out
141
145
@@ -146,7 +150,7 @@ While activity functions can be scaled out infinitely by adding more VMs elastic
146
150
147
151
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.
148
152
149
-
#### Durable Functions 2.x
153
+
#### [Durable 2.x](#tab/durable-2x)
150
154
151
155
```json
152
156
{
@@ -160,7 +164,7 @@ The number of control queues is defined in the **host.json** file. The following
160
164
}
161
165
```
162
166
163
-
#### Durable Functions 1.x
167
+
#### [Durable 1.x](#tab/durable-1x)
164
168
165
169
```json
166
170
{
@@ -171,6 +175,7 @@ The number of control queues is defined in the **host.json** file. The following
171
175
}
172
176
}
173
177
```
178
+
---
174
179
175
180
A task hub can be configured with between 1 and 16 partitions. If not specified, the default partition count is **4**.
176
181
@@ -211,7 +216,7 @@ Extended sessions is a [caching mechanism](durable-functions-perf-and-scale.md#i
211
216
212
217
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:
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-storage-providers.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,10 +84,10 @@ The Azure Storage provider is the default storage provider and doesn't require a
84
84
85
85
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:
86
86
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 storageaccount.
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).
89
89
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`.
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-webjobs-sdk.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ The chaining Durable Functions sample is available in a WebJobs SDK 2.x version:
20
20
21
21
## Prerequisites
22
22
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:
24
24
25
25
*[Get started with the WebJobs SDK](../../app-service/webjobs-sdk-get-started.md)
26
26
*[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
@@ -230,6 +230,9 @@ The main change introduced is the use of .NET Core instead of .NET Framework. To
230
230
}
231
231
```
232
232
233
+
>[!IMPORTANT]
234
+
>Forthehighestlevelofsecurity, youshoulduseamanagedidentityconnectiontoyourstorageaccount. Formoreinformation, see [HowtousemanagedidentitiesforAppServiceandAzureFunctions](../../app-service/overview-managed-identity.md).
235
+
233
236
1. Changethe `Main` methodcodetodothis. Here's an example:
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-zero-downtime-deployment.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,9 +51,9 @@ Use the following procedure to set up this scenario.
51
51
52
52
1.[Add deployment slots](../functions-deployment-slots.md#add-a-slot) to your function app for staging and production.
53
53
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.
55
55
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.
57
57
58
58
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.
Copy file name to clipboardExpand all lines: articles/azure-functions/flex-consumption-how-to.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Create and manage function apps in a Flex Consumption plan
3
3
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."
@@ -331,6 +331,7 @@ A customized deployment source should meet this criteria:
331
331
332
332
When configuring deployment storage authentication, keep these considerations in mind:
333
333
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).
334
335
+ When you use a connection string to connect to the deployment storage account, the application setting that contains the connection string must already exist.
335
336
+ 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.
336
337
+ 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.
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-add-output-binding-azure-sql-vs-code.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Connect Azure Functions to Azure SQL Database using Visual Studio Code
3
3
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
5
5
ms.topic: quickstart
6
6
author: dzsquared
7
7
ms.author: drskwier
@@ -46,6 +46,9 @@ More details on the settings for [Azure SQL bindings and trigger for Azure Funct
46
46
|**Password**|Enter a password that meets the complexity requirements.|
47
47
|**Allow Azure services and resources to access this server**|Select **Yes**.|
48
48
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
+
49
52
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.
50
53
51
54
:::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":::
@@ -34,7 +34,23 @@ Before you begin, you must complete the article, [Quickstart: Create an Azure Fu
34
34
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.
>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.
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.
0 commit comments