Skip to content

Commit bad1660

Browse files
Merge pull request #283769 from ecfan/ropc
[SFI - ROPC] Add guidance around using managed identities for authentication and other preferred authentication methods
2 parents d9739b2 + 6c0f00f commit bad1660

9 files changed

+132
-24
lines changed

articles/logic-apps/call-azure-functions-from-workflows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: logic-apps
55
ms.suite: integration
66
ms.reviewer: estfan, azla
77
ms.topic: how-to
8-
ms.date: 05/07/2024
8+
ms.date: 08/07/2024
99
---
1010

1111
# Call Azure Functions from workflows in Azure Logic Apps
@@ -385,7 +385,7 @@ Now that you have the tenant ID and the application ID, you can set up your func
385385
| Property | Required | Value | Description |
386386
|----------|----------|-------|-------------|
387387
| **Application (client) ID** | Yes | <*application-ID*> | The unique identifier to use for this app registration. For this example, use the application ID that you copied for the Enterprise application associated with your managed identity. |
388-
| **Client secret** | Optional, but recommended | <*client-secret*> | The secret value that the app uses to prove its identity when requesting a token. The client secret is created and stored in your app's configuration as a slot-sticky [application setting](../app-service/configure-common.md#configure-app-settings) named **MICROSOFT_PROVIDER_AUTHENTICATION_SECRET**. To manage the secret in Azure Key Vault instead, you can update this setting later to use [Key Vault references](../app-service/app-service-key-vault-references.md). <br><br>- If you provide a client secret value, sign-in operations use the hybrid flow, returning both access and refresh tokens. <br><br>- If you don't provide a client secret, sign-in operations use the OAuth 2.0 implicit grant flow, returning only an ID token. <br><br>These tokens are sent by the provider and stored in the EasyAuth token store. |
388+
| **Client secret** | Optional, but recommended | <*client-secret*> | The secret value that the app uses to prove its identity when requesting a token. The client secret is created and stored in your app's configuration as a slot-sticky [application setting](../app-service/configure-common.md#configure-app-settings) named **MICROSOFT_PROVIDER_AUTHENTICATION_SECRET**. <br><br>- Make sure to regularly rotate secrets and store them securely. For example, manage your secrets in Azure Key Vault where you can use a managed identity to retrieve the key without exposing the value to an unauthorized user. You can update this setting to use [Key Vault references](../app-service/app-service-key-vault-references.md). <br><br>- If you provide a client secret value, sign-in operations use the hybrid flow, returning both access and refresh tokens. <br><br>- If you don't provide a client secret, sign-in operations use the [OAuth 2.0 implicit grant flow](/entra/identity-platform/v2-oauth2-implicit-grant-flow). This method directly returns only an ID token or access token. These tokens are sent by the provider and stored in the EasyAuth token store. <br><br>**Important**: Due to security risks, the implict grant flow is [no longer a suitable authentication method](/entra/identity-platform/v2-oauth2-implicit-grant-flow#prefer-the-auth-code-flow). Instead, use either [authorization code flow with Proof Key for Code Exchange (PKCE)](/entra/msal/dotnet/advanced/spa-authorization-code) or [single-page application (SPA) authorization codes](/entra/msal/dotnet/advanced/spa-authorization-code). |
389389
| **Issuer URL** | No | **<*authentication-endpoint-URL*>/<*Entra-tenant-ID*>/v2.0** | This URL redirects users to the correct Microsoft Entra tenant and downloads the appropriate metadata to determine the appropriate token signing keys and token issuer claim value. For apps that use Azure AD v1, omit **/v2.0** from the URL. <br><br>For this scenario, use the following URL: **`https://sts.windows.net/`<*Entra-tenant-ID*>** |
390390
| **Allowed token audiences** | No | <*application-ID-URI*> | The application ID URI (resource ID) for the function app. For a cloud or server app where you want to allow authentication tokens from a web app, add the application ID URI for the web app. The configured client ID is always implicitly considered as an allowed audience. <br><br>For this scenario, the value is **`https://management.azure.com`**. Later, you can use the same URI in the **Audience** property when you [set up your function action in your workflow to use the managed identity](create-managed-service-identity.md#authenticate-access-with-identity). <br><br>**Important**: The application ID URI (resource ID) must exactly match the value that Microsoft Entra ID expects, including any required trailing slashes. |
391391

articles/logic-apps/create-custom-built-in-connector-standard.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: logic-apps
55
ms.suite: integration
66
ms.reviewer: estfan, daviburg, apseth, psrivas, azla
77
ms.topic: how-to
8-
ms.date: 01/04/2024
8+
ms.date: 08/06/2024
99
---
1010

1111
# Create custom built-in connectors for Standard logic apps in single-tenant Azure Logic Apps
@@ -20,7 +20,6 @@ This article shows how to create an example custom built-in Azure Cosmos DB conn
2020
|-----------|-------------------|-------------|
2121
| Trigger | When a document is received | This trigger operation runs when an insert operation happens in the specified Azure Cosmos DB database and collection. |
2222
| Action | None | This connector doesn't define any action operations. |
23-
||||
2423

2524
This sample connector uses the same functionality as the [Azure Cosmos DB trigger for Azure Functions](../azure-functions/functions-bindings-cosmosdb-v2-trigger.md), which is based on [Azure Functions triggers and bindings](../azure-functions/functions-triggers-bindings.md). For the complete sample, review [Sample custom built-in Azure Cosmos DB connector - Azure Logic Apps Connector Extensions](https://github.com/Azure/logicapps-connector-extensions/tree/CosmosDB/src/CosmosDB).
2625

@@ -110,6 +109,21 @@ You can add or expose an [Azure Functions trigger or action](../azure-functions/
110109

111110
The following sections describe the methods that the example connector implements. For the complete sample, review [Sample CosmosDbServiceOperationProvider.cs](https://github.com/Azure/logicapps-connector-extensions/blob/CosmosDB/src/CosmosDB/Providers/CosmosDbServiceOperationProvider.cs).
112111

112+
> [!IMPORTANT]
113+
>
114+
> When you have sensitive information, such as connection strings that include usernames and passwords,
115+
> make sure to use the most secure authentication flow available. For example, Microsoft recommends that
116+
> you authenticate access to Azure resources with a [managed identity](/entra/identity/managed-identities-azure-resources/overview)
117+
> when support is available, and assign a role that has the least required privilege.
118+
>
119+
> If this capability is unavailable, make sure to secure connection strings through other measures, such as
120+
> [Azure Key Vault](../key-vault/general/overview.md), which you can use with [app settings](edit-app-settings-host-settings.md).
121+
> You can then [directly reference secure strings](../app-service/app-service-key-vault-references.md), such as connection
122+
> strings and keys. Similar to ARM templates, where you can define environment variables at deployment time, you can define
123+
> app settings within your [logic app workflow definition](/azure/templates/microsoft.logic/workflows).
124+
> You can then capture dynamically generated infrastructure values, such as connection endpoints, storage strings, and more.
125+
> For more information, see [Application types for the Microsoft identity platform](/entra/identity-platform/v2-app-types).
126+
113127
#### GetService()
114128

115129
The designer requires the following method to get the high-level description for your service:
@@ -364,7 +378,6 @@ To add the NuGet reference from the previous section, in the extension bundle na
364378
|----------|----------|-------|-------------|
365379
| **Connection name** | Yes | <*Azure-Cosmos-DB-connection-name*> | The name for the Azure Cosmos DB connection to create |
366380
| **Connection String** | Yes | <*Azure Cosmos DB-DB-connection-string*> | The connection string for the Azure Cosmos DB database collection or lease collection where you want to add each new received document. |
367-
|||||
368381

369382
![Screenshot showing the connection pane when using the connector for the first time.](./media/create-custom-built-in-connector-standard/visual-studio-code-built-in-connector-create-connection.png)
370383

@@ -376,7 +389,6 @@ To add the NuGet reference from the previous section, in the extension bundle na
376389
|----------|----------|-------|-------------|
377390
| **Database name** | Yes | <*Azure-Cosmos-DB-database-name*> | The name for the Azure Cosmos DB database to use |
378391
| **Collection name** | Yes | <*Azure-Cosmos-DB-collection-name*> | The name for the Azure Cosmos DB collection where you want to add each new received document. |
379-
|||||
380392

381393
![Screenshot showing the trigger properties pane.](./media/create-custom-built-in-connector-standard/visual-studio-code-built-in-connector-trigger-properties.png)
382394

articles/logic-apps/create-parameters-workflows.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: logic-apps
55
ms.suite: integration
66
ms.reviewer: estfan, azla
77
ms.topic: how-to
8-
ms.date: 01/04/2024
8+
ms.date: 08/06/2024
99
---
1010

1111
# Create cross-environment parameters for workflow inputs in Azure Logic Apps
@@ -40,14 +40,21 @@ In multi-tenant Consumption logic app workflows, after you create and use parame
4040

4141
In single-tenant Standard logic app workflows, you can work with environment variables both at runtime and deployment by using parameters *and* app settings. App settings contain global configuration options for *all the workflows* in the same logic app resource. For more information, review [Edit host and app settings for single-tenant based logic apps](edit-app-settings-host-settings.md).
4242

43-
> [!NOTE]
44-
> In Standard logic app workflows, secure data types, such as `securestring` and `secureobject`,
45-
> aren't supported. However, as an alternative option, you can use app settings with Azure Key Vault.
46-
> You can then [directly reference secure strings](../app-service/app-service-key-vault-references.md),
47-
> such as connection strings and keys. Similar to ARM templates, where you can define environment
48-
> variables at deployment time, you can define app settings within your
49-
> [logic app workflow definition](/azure/templates/microsoft.logic/workflows). You can then capture
50-
> dynamically generated infrastructure values, such as connection endpoints, storage strings, and more.
43+
> [!IMPORTANT]
44+
>
45+
> When you have sensitive information, such as connection strings that include usernames and passwords,
46+
> make sure to use the most secure authentication flow available. For example, in Standard logic app workflows,
47+
> secure data types, such as `securestring` and `secureobject`, aren't supported. Microsoft recommends that you
48+
> authenticate access to Azure resources with a [managed identity](/entra/identity/managed-identities-azure-resources/overview)
49+
> when possible, and assign a role that has the least privilege necessary.
50+
>
51+
> If this capability is unavailable, make sure to secure connection strings through other measures, such as
52+
> [Azure Key Vault](../key-vault/general/overview.md), which you can use with [app settings](edit-app-settings-host-settings.md).
53+
> You can then [directly reference secure strings](../app-service/app-service-key-vault-references.md), such as connection
54+
> strings and keys. Similar to ARM templates, where you can define environment variables at deployment time, you can define
55+
> app settings within your [logic app workflow definition](/azure/templates/microsoft.logic/workflows).
56+
> You can then capture dynamically generated infrastructure values, such as connection endpoints, storage strings, and more.
57+
> For more information, see [Application types for the Microsoft identity platform](/entra/identity-platform/v2-app-types).
5158
5259
However, app settings have size limits and can't be referenced from certain areas in Azure Logic Apps. Parameters offer a wider range of use cases than app settings, such as support for large value sizes and complex objects.
5360

@@ -134,7 +141,6 @@ For example, if you use Visual Studio Code as your local development tool to run
134141
| **Name** | Yes | The name for the parameter to create. |
135142
| **Type** | Yes | The data type for the parameter, such as **Array**, **Bool**, **Float**, **Int**, **Object**, and **String**. <br><br>**Note**: In Standard logic app workflows, secure data types, such as `securestring` and `secureobject`, aren't supported. |
136143
| **Value** | Yes | The value for the parameter. <br><br>In Standard logic app workflows, you have to specify the parameter value because the workflow logic, connection information, and parameter values don't exist in a single location. The designer must be able to resolve the parameter values before loading. |
137-
||||
138144

139145
The following example shows a definition for a string parameter:
140146

articles/logic-apps/custom-connector-overview.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,21 @@ Custom built-in trigger capabilities support adding or exposing an [Azure Functi
114114

115115
The following sections provide more information about the methods that your connector needs to implement. For the complete sample, review [Sample CosmosDbServiceOperationProvider.cs](https://github.com/Azure/logicapps-connector-extensions/blob/CosmosDB/src/CosmosDB/Providers/CosmosDbServiceOperationProvider.cs) and [Create custom built-in connectors for Standard logic apps in single-tenant Azure Logic Apps](create-custom-built-in-connector-standard.md).
116116

117+
> [!IMPORTANT]
118+
>
119+
> When you have sensitive information, such as connection strings that include usernames and passwords,
120+
> make sure to use the most secure authentication flow available. For example, Microsoft recommends that
121+
> you authenticate access to Azure resources with a [managed identity](/entra/identity/managed-identities-azure-resources/overview)
122+
> when support is available, and assign a role that has the least required privilege.
123+
>
124+
> If this capability is unavailable, make sure to secure connection strings through other measures, such as
125+
> [Azure Key Vault](../key-vault/general/overview.md), which you can use with [app settings](edit-app-settings-host-settings.md).
126+
> You can then [directly reference secure strings](../app-service/app-service-key-vault-references.md), such as connection
127+
> strings and keys. Similar to ARM templates, where you can define environment variables at deployment time, you can define
128+
> app settings within your [logic app workflow definition](/azure/templates/microsoft.logic/workflows).
129+
> You can then capture dynamically generated infrastructure values, such as connection endpoints, storage strings, and more.
130+
> For more information, see [Application types for the Microsoft identity platform](/entra/identity-platform/v2-app-types).
131+
117132
#### GetService()
118133

119134
The designer requires this method to get the high-level metadata for your service, including the service description, connection input parameters, capabilities, brand color, icon URL, and so on.

articles/logic-apps/devops-deployment-single-tenant-azure-logic-apps.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,21 @@ In Visual Studio Code, when you use the designer to develop or make changes to y
9797

9898
When you use a built-in operation for a service such as Azure Service Bus or Azure Event Hubs in single-tenant Azure Logic Apps, you create a service provider connection that runs in the same process as your workflow. This connection infrastructure is hosted and managed as part of your logic app resource, and your app settings store the connection strings for any service provider-based built-in operation that your workflows use.
9999

100+
> [!IMPORTANT]
101+
>
102+
> When you have sensitive information, such as connection strings that include usernames and passwords,
103+
> make sure to use the most secure authentication flow available. For example, Microsoft recommends that
104+
> you authenticate access to Azure resources with a [managed identity](/entra/identity/managed-identities-azure-resources/overview)
105+
> when support is available, and assign a role that has the least required privilege.
106+
>
107+
> If this capability is unavailable, make sure to secure connection strings through other measures, such as
108+
> [Azure Key Vault](../key-vault/general/overview.md), which you can use with [app settings](edit-app-settings-host-settings.md).
109+
> You can then [directly reference secure strings](../app-service/app-service-key-vault-references.md), such as connection
110+
> strings and keys. Similar to ARM templates, where you can define environment variables at deployment time, you can define
111+
> app settings within your [logic app workflow definition](/azure/templates/microsoft.logic/workflows).
112+
> You can then capture dynamically generated infrastructure values, such as connection endpoints, storage strings, and more.
113+
> For more information, see [Application types for the Microsoft identity platform](/entra/identity-platform/v2-app-types).
114+
100115
In your logic app project, each workflow has a workflow.json file that contains the workflow's underlying JSON definition. This workflow definition then references the necessary connection strings in your project's connections.json file.
101116

102117
The following example shows how the service provider connection for a built-in Service Bus operation appears in your project's connections.json file:

articles/logic-apps/logic-apps-diagnosing-failures.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.suite: integration
66
ms.reviewer: estfan, azla
77
ms.topic: how-to
88
ms.custom: engagement-fy23
9-
ms.date: 01/04/2024
9+
ms.date: 08/06/2024
1010
---
1111

1212
# Troubleshoot and diagnose workflow failures in Azure Logic Apps
@@ -158,7 +158,6 @@ Standard logic apps store all artifacts in an Azure storage account. You might g
158158
| Overview pane | - **System.private.corelib:Access to the path 'C:\\home\\site\\wwwroot\\hostj.son is denied** <br><br>- **Azure.Storage.Blobs: This request is not authorized to perform this operation** |
159159
| Workflows pane | - **Cannot reach host runtime. Error details, Code: 'BadRequest', Message: 'Encountered an error (InternalServerError) from host runtime.'** <br><br>- **Cannot reach host runtime. Error details, Code: 'BadRequest', Message: 'Encountered an error (ServiceUnavailable) from host runtime.'** <br><br>- **Cannot reach host runtime. Error details, Code: 'BadRequest', Message: 'Encountered an error (BadGateway) from host runtime.'** |
160160
| During workflow creation and execution | - **Failed to save workflow** <br><br>- **Error in the designer: GetCallFailed. Failed fetching operations** <br><br>- **ajaxExtended call failed** |
161-
|||
162161

163162
### Troubleshooting options
164163

@@ -172,6 +171,22 @@ The following list includes possible causes for these errors and steps to help t
172171

173172
If connectivity fails, check whether the Shared Access Signature (SAS) key in the connection string is the most recent.
174173

174+
> [!IMPORTANT]
175+
>
176+
> When you have sensitive information, such as connection strings that include usernames and passwords,
177+
> make sure to use the most secure authentication flow available. For example, in Standard logic app workflows,
178+
> secure data types, such as `securestring` and `secureobject`, aren't supported. Microsoft recommends that you
179+
> authenticate access to Azure resources with a [managed identity](/entra/identity/managed-identities-azure-resources/overview)
180+
> when possible, and assign a role that has the least privilege necessary.
181+
>
182+
> If this capability is unavailable, make sure to secure connection strings through other measures, such as
183+
> [Azure Key Vault](../key-vault/general/overview.md), which you can use with [app settings](edit-app-settings-host-settings.md).
184+
> You can then [directly reference secure strings](../app-service/app-service-key-vault-references.md), such as connection
185+
> strings and keys. Similar to ARM templates, where you can define environment variables at deployment time, you can define
186+
> app settings within your [logic app workflow definition](/azure/templates/microsoft.logic/workflows).
187+
> You can then capture dynamically generated infrastructure values, such as connection endpoints, storage strings, and more.
188+
> For more information, see [Application types for the Microsoft identity platform](/entra/identity-platform/v2-app-types).
189+
175190
* For a storage account that's behind a firewall, check access to the storage account in the following ways:
176191

177192
* If firewall restrictions are enabled on the storage account, check whether [private endpoints](../private-link/private-endpoint-overview.md) are set up for Blob, File, Table, and Queue storage services.

0 commit comments

Comments
 (0)