Skip to content

Commit 9ff9c39

Browse files
Merge pull request #264536 from ecfan/patch-1
Azure Logic Apps: Troubleshooting for HTTP operations that use client certificate authentication with OpenSSL
2 parents d4b0d8d + 0797f0e commit 9ff9c39

File tree

1 file changed

+31
-19
lines changed

1 file changed

+31
-19
lines changed

articles/logic-apps/logic-apps-securing-a-logic-app.md

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: logic-apps
55
ms.suite: integration
66
ms.reviewer: estfan, rarayudu, azla
77
ms.topic: how-to
8-
ms.date: 10/16/2023
8+
ms.date: 01/29/2024
99
ms.custom: ignite-fall-2021
1010
---
1111

@@ -811,7 +811,7 @@ The Microsoft Authentication Library (MSAL) libraries provide PoP tokens for you
811811

812812
* [A .NET Core daemon console application calling a protected Web API with its own identity](https://github.com/Azure-Samples/active-directory-dotnetcore-daemon-v2/tree/master/2-Call-OwnApi)
813813

814-
* [SignedHttpRequest aka PoP (Proof of Possession)](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/wiki/SignedHttpRequest-aka-PoP-(Proof-of-Possession))
814+
* [SignedHttpRequest, also known as PoP (Proof of Possession)](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/wiki/SignedHttpRequest-aka-PoP-(Proof-of-Possession))
815815

816816
To use the PoP token with your Consumption logic app, follow the next section to [set up OAuth with Microsoft Entra ID](#enable-azure-ad-inbound).
817817

@@ -1224,7 +1224,7 @@ Based on the target endpoint's capability, outbound calls sent by the [HTTP trig
12241224

12251225
This list includes information about TLS/SSL self-signed certificates:
12261226

1227-
* For Consumption logic app workflows in the multi-tenant Azure Logic Apps environment, HTTP operations don't permit self-signed TLS/SSL certificates. If your logic app makes an HTTP call to a server and presents a TLS/SSL self-signed certificate, the HTTP call fails with a `TrustFailure` error.
1227+
* For Consumption logic app workflows in the multitenant Azure Logic Apps environment, HTTP operations don't permit self-signed TLS/SSL certificates. If your logic app makes an HTTP call to a server and presents a TLS/SSL self-signed certificate, the HTTP call fails with a `TrustFailure` error.
12281228

12291229
* For Standard logic app workflows in the single-tenant Azure Logic Apps environment, HTTP operations support self-signed TLS/SSL certificates. However, you have to complete a few extra steps for this authentication type. Otherwise, the call fails. For more information, review [TLS/SSL certificate authentication for single-tenant Azure Logic Apps](../connectors/connectors-native-http.md#tlsssl-certificate-authentication).
12301230

@@ -1350,10 +1350,22 @@ If the [Client Certificate](../active-directory/authentication/active-directory-
13501350

13511351
| Property (designer) | Property (JSON) | Required | Value | Description |
13521352
|---------------------|-----------------|----------|-------|-------------|
1353-
| **Authentication** | `type` | Yes | **Client Certificate** <br>or <br>`ClientCertificate` | The authentication type to use. You can manage certificates with [Azure API Management](../api-management/api-management-howto-mutual-certificates.md). <p></p>**Note**: Custom connectors don't support certificate-based authentication for both inbound and outbound calls. |
1354-
| **Pfx** | `pfx` | Yes | <*encoded-pfx-file-content*> | The base64-encoded content from a Personal Information Exchange (PFX) file <p><p>To convert the PFX file into base64-encoded format, you can use PowerShell 7 by following these steps: <p>1. Save the certificate content into a variable: <p> `$pfx_cert = [System.IO.File]::ReadAllBytes('c:\certificate.pfx')` <p>2. Convert the certificate content by using the `ToBase64String()` function and save that content to a text file: <p> `[System.Convert]::ToBase64String($pfx_cert) | Out-File 'pfx-encoded-bytes.txt'` <p><p>**Troubleshooting**: If you use the `cert mmc/PowerShell` command, you might get this error: <p><p>`Could not load the certificate private key. Please check the authentication certificate password is correct and try again.` <p><p>To resolve this error, try converting the PFX file to a PEM file and back again by using the `openssl` command: <p><p>`openssl pkcs12 -in certificate.pfx -out certificate.pem` <br>`openssl pkcs12 -in certificate.pem -export -out certificate2.pfx` <p><p>Afterwards, when you get the base64-encoded string for the certificate's newly converted PFX file, the string now works in Azure Logic Apps. |
1353+
| **Authentication** | `type` | Yes | **Client Certificate** <br>or <br>`ClientCertificate` | The authentication type to use. You can manage certificates with [Azure API Management](../api-management/api-management-howto-mutual-certificates.md). <br><br></p>**Note**: Custom connectors don't support certificate-based authentication for both inbound and outbound calls. |
1354+
| **Pfx** | `pfx` | Yes | <*encoded-pfx-file-content*> | The base64-encoded content from a Personal Information Exchange (PFX) file <br><br>To convert the PFX file into base64-encoded format, you can use PowerShell 7 by following these steps: <br><br>1. Save the certificate content into a variable: <br><br> `$pfx_cert = [System.IO.File]::ReadAllBytes('c:\certificate.pfx')` <br><br>2. Convert the certificate content by using the `ToBase64String()` function and save that content to a text file: <br><br> `[System.Convert]::ToBase64String($pfx_cert) | Out-File 'pfx-encoded-bytes.txt'` <br><br>**Troubleshooting**: If you use the `cert mmc/PowerShell` command, you might get this error: <br><br>`Could not load the certificate private key. Please check the authentication certificate password is correct and try again.` <br><br>To resolve this error, try converting the PFX file to a PEM file and back again by using the `openssl` command: <br><br>`openssl pkcs12 -in certificate.pfx -out certificate.pem` <br>`openssl pkcs12 -in certificate.pem -export -out certificate2.pfx` <br><br>Afterwards, when you get the base64-encoded string for the certificate's newly converted PFX file, the string now works in Azure Logic Apps. |
13551355
| **Password** | `password`| No | <*password-for-pfx-file*> | The password for accessing the PFX file |
1356-
|||||
1356+
1357+
> [!NOTE]
1358+
>
1359+
> If you try to authenticate with a client certificate using OpenSSL, you might get the following error:
1360+
>
1361+
> `BadRequest: Could not load private key`
1362+
>
1363+
> To resolve this error, follow these steps:
1364+
>
1365+
> 1. Uninstall all OpenSSL instances.
1366+
> 2. Install OpenSSL version 1.1.1t.
1367+
> 3. Resign your certificate using the new update.
1368+
> 4. Add the new certificate to the HTTP operation when using client certificate authentication.
13571369
13581370
When you use [secured parameters](#secure-action-parameters) to handle and secure sensitive information, for example, in an [Azure Resource Manager template for automating deployment](../logic-apps/logic-apps-azure-resource-manager-templates-overview.md), you can use expressions to access these parameter values at runtime. This example HTTP action definition specifies the authentication `type` as `ClientCertificate` and uses the [parameters() function](../logic-apps/workflow-definition-language-functions-reference.md#parameters) to get the parameter values:
13591371

@@ -1374,11 +1386,11 @@ When you use [secured parameters](#secure-action-parameters) to handle and secur
13741386
```
13751387

13761388
> [!IMPORTANT]
1377-
> If you have a **Logic App (Standard)** resource in single-tenant Azure Logic Apps,
1378-
> and you want to use an HTTP operation with a TSL/SSL certificate, client certificate,
1379-
> or Microsoft Entra ID Open Authentication (Microsoft Entra ID OAuth) with the `Certificate`
1380-
> credential type, make sure to complete the extra setup steps for this authentication type.
1381-
> Otherwise, the call fails. For more information, review
1389+
>
1390+
> If you have a Standard logic app resource in single-tenant Azure Logic Apps, and you want to use an HTTP
1391+
> operation with a TSL/SSL certificate, client certificate, or Microsoft Entra ID Open Authentication
1392+
> (Microsoft Entra ID OAuth) with the `Certificate` credential type, make sure to complete the extra setup
1393+
> steps for this authentication type. Otherwise, the call fails. For more information, review
13821394
> [Authentication in single-tenant environment](../connectors/connectors-native-http.md#single-tenant-authentication).
13831395
13841396
For more information about securing services by using client certificate authentication, review these topics:
@@ -1431,11 +1443,11 @@ When you use [secured parameters](#secure-action-parameters) to handle and secur
14311443
```
14321444

14331445
> [!IMPORTANT]
1434-
> If you have a **Logic App (Standard)** resource in single-tenant Azure Logic Apps,
1435-
> and you want to use an HTTP operation with a TSL/SSL certificate, client certificate,
1436-
> or OAuth with Microsoft Entra ID with the `Certificate`
1437-
> credential type, make sure to complete the extra setup steps for this authentication type.
1438-
> Otherwise, the call fails. For more information, review
1446+
>
1447+
> If you have a Standard logic app resource in single-tenant Azure Logic Apps, and you want to use an HTTP
1448+
> operation with a TSL/SSL certificate, client certificate, or Microsoft Entra ID Open Authentication
1449+
> (Microsoft Entra ID OAuth) with the `Certificate` credential type, make sure to complete the extra setup
1450+
> steps for this authentication type. Otherwise, the call fails. For more information, review
14391451
> [Authentication in single-tenant environment](../connectors/connectors-native-http.md#single-tenant-authentication).
14401452
14411453
<a name="raw-authentication"></a>
@@ -1486,9 +1498,9 @@ When you use [secured parameters](#secure-action-parameters) to handle and secur
14861498

14871499
When the [managed identity](../active-directory/managed-identities-azure-resources/overview.md) option is available on the [trigger or action that supports managed identity authentication](#authentication-types-supported-triggers-actions), your logic app can use this identity for authenticating access to Azure resources that are protected by Microsoft Entra ID, rather than credentials, secrets, or Microsoft Entra tokens. Azure manages this identity for you and helps you secure your credentials because you don't have to manage secrets or directly use Microsoft Entra tokens. Learn more about [Azure services that support managed identities for Microsoft Entra authentication](../active-directory/managed-identities-azure-resources/services-support-managed-identities.md#azure-services-that-support-azure-ad-authentication).
14881500

1489-
* The **Logic App (Consumption)** resource type can use the system-assigned identity or a *single* manually created user-assigned identity.
1501+
* A Consumption logic app resource can use the system-assigned identity or a *single* manually created user-assigned identity.
14901502

1491-
* The **Logic App (Standard)** resource type supports having the [system-assigned managed identity *and* multiple user-assigned managed identities](create-managed-service-identity.md) enabled at the same time, though you still can only select one identity to use at any time.
1503+
* A Standard logic app resource supports having the [system-assigned managed identity *and* multiple user-assigned managed identities](create-managed-service-identity.md) enabled at the same time, though you still can only select one identity to use at any time.
14921504

14931505
> [!NOTE]
14941506
> By default, the system-assigned identity is already enabled to authenticate connections at run time.
@@ -1508,7 +1520,7 @@ When the [managed identity](../active-directory/managed-identities-azure-resourc
15081520
|---------------------|-----------------|----------|-------|-------------|
15091521
| **Authentication** | `type` | Yes | **Managed Identity** <br>or <br>`ManagedServiceIdentity` | The authentication type to use |
15101522
| **Managed Identity** | `identity` | No | <*user-assigned-identity-ID*> | The user-assigned managed identity to use. **Note**: Don't include this property when using the system-assigned managed identity. |
1511-
| **Audience** | `audience` | Yes | <*target-resource-ID*> | The resource ID for the target resource that you want to access. <p>For example, `https://storage.azure.com/` makes the [access tokens](../active-directory/develop/access-tokens.md) for authentication valid for all storage accounts. However, you can also specify a root service URL, such as `https://fabrikamstorageaccount.blob.core.windows.net` for a specific storage account. <p>**Note**: The **Audience** property might be hidden in some triggers or actions. To make this property visible, in the trigger or action, open the **Add new parameter** list, and select **Audience**. <p><p>**Important**: Make sure that this target resource ID *exactly matches* the value that Microsoft Entra ID expects, including any required trailing slashes. So, the `https://storage.azure.com/` resource ID for all Azure Blob Storage accounts requires a trailing slash. However, the resource ID for a specific storage account doesn't require a trailing slash. To find these resource IDs, review [Azure services that support Microsoft Entra ID](../active-directory/managed-identities-azure-resources/services-support-managed-identities.md#azure-services-that-support-azure-ad-authentication). |
1523+
| **Audience** | `audience` | Yes | <*target-resource-ID*> | The resource ID for the target resource that you want to access. <br><br>For example, `https://storage.azure.com/` makes the [access tokens](../active-directory/develop/access-tokens.md) for authentication valid for all storage accounts. However, you can also specify a root service URL, such as `https://fabrikamstorageaccount.blob.core.windows.net` for a specific storage account. <br><br>**Note**: The **Audience** property might be hidden in some triggers or actions. To make this property visible, in the trigger or action, open the **Add new parameter** list, and select **Audience**. <br><br>**Important**: Make sure that this target resource ID *exactly matches* the value that Microsoft Entra ID expects, including any required trailing slashes. So, the `https://storage.azure.com/` resource ID for all Azure Blob Storage accounts requires a trailing slash. However, the resource ID for a specific storage account doesn't require a trailing slash. To find these resource IDs, review [Azure services that support Microsoft Entra ID](../active-directory/managed-identities-azure-resources/services-support-managed-identities.md#azure-services-that-support-azure-ad-authentication). |
15121524

15131525
When you use [secured parameters](#secure-action-parameters) to handle and secure sensitive information, for example, in an [Azure Resource Manager template for automating deployment](../logic-apps/logic-apps-azure-resource-manager-templates-overview.md), you can use expressions to access these parameter values at runtime. For example, this HTTP action definition specifies the authentication `type` as `ManagedServiceIdentity` and uses the [parameters() function](../logic-apps/workflow-definition-language-functions-reference.md#parameters) to get the parameter values:
15141526

0 commit comments

Comments
 (0)