Skip to content

Commit eb3af8f

Browse files
authored
Merge pull request #227579 from csmulligan/csmulligan-b2b-secure-api-connector
[B2B] Content freshness update for self-service-sign-up-secure-api-connector (ADO-64314)
2 parents a86273d + 95a57cf commit eb3af8f

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed
-7.83 KB
Loading

articles/active-directory/external-identities/self-service-sign-up-secure-api-connector.md

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@ services: active-directory
55
ms.service: active-directory
66
ms.subservice: B2B
77
ms.topic: article
8-
ms.date: 07/16/2021
8+
ms.date: 02/15/2023
99

1010
ms.author: mimart
1111
author: msmimart
1212
manager: celestedg
1313
ms.custom: "it-pro"
14-
ms.collection: M365-identity-device-management
14+
ms.collection: engagement-fy23, M365-identity-device-management
15+
16+
# Customer intent: As a tenant administrator, I want to make sure that I protect my API endpoint with proper authentication.
1517
---
1618

1719
# Secure your API used an API connector in Azure AD External Identities self-service sign-up user flows
1820

19-
When integrating a REST API within an Azure AD external identities self-service sign-up user flow, you must protect your REST API endpoint with authentication. The REST API authentication ensures that only services that have proper credentials, such as Azure AD, can make calls to your endpoint. This article will explore how to secure REST API.
21+
When integrating a REST API within an Azure AD external identities self-service sign-up user flow, you must protect your REST API endpoint with authentication. The REST API authentication ensures that only services that have proper credentials, such as Azure AD, can make calls to your endpoint. This article explores how to secure REST API.
2022

2123
## Prerequisites
2224
Complete the steps in the [Walkthrough: Add an API connector to a sign-up user flow](self-service-sign-up-add-api-connector.md) guide.
2325

24-
You can protect your API endpoint by using either HTTP basic authentication or HTTPS client certificate authentication. In either case, you provide the credentials that Azure AD will use when calling your API endpoint. Your API endpoint then checks the credentials and performs authorization decisions.
25-
26+
You can protect your API endpoint by using either HTTP basic authentication or HTTPS client certificate authentication. In either case, you provide the credentials that Azure AD uses when calling your API endpoint. Your API endpoint then checks the credentials and performs authorization decisions.
2627

2728
## HTTP basic authentication
2829

@@ -32,11 +33,12 @@ To configure an API Connector with HTTP basic authentication, follow these steps
3233

3334
1. Sign in to the [Azure portal](https://portal.azure.com/).
3435
2. Under **Azure services**, select **Azure AD**.
35-
3. Select **API connectors**, and then select the **API Connector** you want to configure.
36-
4. For the **Authentication type**, select **Basic**.
37-
5. Provide the **Username**, and **Password** of your REST API endpoint.
38-
:::image type="content" source="media/secure-api-connector/api-connector-config.png" alt-text="Providing basic authentication configuration for an API connector.":::
39-
6. Select **Save**.
36+
1. In the left menu, select **External Identities**.
37+
1. Select **All API connectors**, and then select the **API Connector** you want to configure.
38+
1. For the **Authentication type**, select **Basic**.
39+
1. Provide the **Username**, and **Password** of your REST API endpoint.
40+
:::image type="content" source="media/secure-api-connector/api-connector-config.png" alt-text="Screenshot of basic authentication configuration for an API connector.":::
41+
1. Select **Save**.
4042

4143
## HTTPS client certificate authentication
4244

@@ -69,29 +71,30 @@ To configure an API Connector with client certificate authentication, follow the
6971

7072
1. Sign in to the [Azure portal](https://portal.azure.com/).
7173
2. Under **Azure services**, select **Azure AD**.
72-
3. Select **API connectors**, and then select the **API Connector** you want to configure.
73-
4. For the **Authentication type**, select **Certificate**.
74-
5. In the **Upload certificate** box, select your certificate's .pfx file with a private key.
75-
6. In the **Enter Password** box, type the certificate's password.
76-
:::image type="content" source="media/secure-api-connector/api-connector-upload-cert.png" alt-text="Providing certificate authentication configuration for an API connector.":::
77-
7. Select **Save**.
74+
1. In the left menu, select **External Identities**.
75+
1. Select **All API connectors**, and then select the **API Connector** you want to configure.
76+
1. For the **Authentication type**, select **Certificate**.
77+
1. In the **Upload certificate** box, select your certificate's .pfx file with a private key.
78+
1. In the **Enter Password** box, type the certificate's password.
79+
:::image type="content" source="media/secure-api-connector/api-connector-upload-cert.png" alt-text="Screenshot of certificate authentication configuration for an API connector.":::
80+
1. Select **Save**.
7881

7982
### Perform authorization decisions
8083
Your API must implement the authorization based on sent client certificates in order to protect the API endpoints. For Azure App Service and Azure Functions, see [configure TLS mutual authentication](../../app-service/app-service-web-configure-tls-mutual-auth.md) to learn how to enable and *validate the certificate from your API code*. You can alternatively use Azure API Management as a layer in front of any API service to [check client certificate properties](
8184
../../api-management/api-management-howto-mutual-certificates-for-clients.md) against desired values.
8285

8386
### Renewing certificates
84-
It's recommended you set reminder alerts for when your certificate will expire. You will need to generate a new certificate and repeat the steps above when used certificates are about to expire. To "roll" the use of a new certificate, your API service can continue to accept old and new certificates for a temporary amount of time while the new certificate is deployed.
87+
It's recommended you set reminder alerts for when your certificate expires. You'll need to generate a new certificate and repeat the steps above when used certificates are about to expire. To "roll" the use of a new certificate, your API service can continue to accept old and new certificates for a temporary amount of time while the new certificate is deployed.
8588

86-
To upload a new certificate to an existing API connector, select the API connector under **API connectors** and click on **Upload new certificate**. The most recently uploaded certificate which is not expired and whose start date has passed will automatically be used by Azure AD.
89+
To upload a new certificate to an existing API connector, select the API connector under **API connectors** and select on **Upload new certificate**. The most recently uploaded certificate that isn't expired and whose start date has passed will automatically be used by Azure AD.
8790

88-
:::image type="content" source="media/secure-api-connector/api-connector-renew-cert.png" alt-text="Providing a new certificate to an API connector when one already exists.":::
91+
:::image type="content" source="media/secure-api-connector/api-connector-renew-cert.png" alt-text="Screenshot of a new certificate, when one already exists.":::
8992

9093
## API key authentication
9194

9295
Some services use an "API key" mechanism to obfuscate access to your HTTP endpoints during development by requiring the caller to include a unique key as an HTTP header or HTTP query parameter. For [Azure Functions](../../azure-functions/functions-bindings-http-webhook-trigger.md#authorization-keys), you can accomplish this by including the `code` as a query parameter in the **Endpoint URL** of your API connector. For example, `https://contoso.azurewebsites.net/api/endpoint`<b>`?code=0123456789`</b>).
9396

94-
This is not a mechanism that should be used alone in production. Therefore, configuration for basic or certificate authentication is always required. If you do not wish to implement any authentication method (not recommended) for development purposes, you can select 'basic' authentication in the API connector configuration and use temporary values for `username` and `password` that your API can disregard while you implement proper authorization.
97+
This isn't a mechanism that should be used alone in production. Therefore, configuration for basic or certificate authentication is always required. If you don't wish to implement any authentication method (not recommended) for development purposes, you can select 'basic' authentication in the API connector configuration and use temporary values for `username` and `password` that your API can disregard while you implement proper authorization.
9598

9699
## Next steps
97100
- Get started with our [quickstart samples](code-samples-self-service-sign-up.md#api-connector-azure-function-quickstarts).

0 commit comments

Comments
 (0)