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
API Management allows you to secure access to the backend service of an API using client certificates and mutual TLS authentication. This guide shows how to manage certificates in an Azure API Management service instance using the Azure portal. It also explains how to configure an API to use a certificate to access a backend service.
22
+
API Management allows you to secure access to the backend service of an API by using client certificates and mutual TLS authentication. This article shows how to manage certificates in API Management by using the Azure portal. It also explains how to configure an API to use a certificate to access a backend service.
21
23
22
-
You can also manage API Management certificates using the [API Management REST API](/rest/api/apimanagement/current-ga/certificate).
24
+
You can also manage API Management certificates by using the [API Management REST API](/rest/api/apimanagement/current-ga/certificate).
23
25
24
26
## Certificate options
25
27
26
-
API Management provides two options to manage certificates used to secure access to backend services:
28
+
API Management provides two options for managing certificates that are used to secure access to backend services:
27
29
28
-
* Reference a certificate managed in [Azure Key Vault](/azure/key-vault/general/overview)
29
-
* Add a certificate file directly in API Management
30
+
* Reference a certificate that's managed in [Azure Key Vault](/azure/key-vault/general/overview).
31
+
* Add a certificate file directly in API Management.
30
32
31
-
Using key vault certificates is recommended because it helps improve API Management security:
33
+
We recommend that you use key vault certificates because doing so improves API Management security:
32
34
33
-
* Certificates stored in key vaults can be reused across services
34
-
* Granular [access policies](/azure/key-vault/general/security-features#privileged-access) can be applied to certificates stored in key vaults
35
-
* Certificates updated in the key vault are automatically rotated in API Management. After update in the key vault, a certificate in API Management is updated within 4 hours. You can also manually refresh the certificate using the Azure portal or via the management REST API.
35
+
* Certificates stored in key vaults can be reused across services.
36
+
* Granular [access policies](/azure/key-vault/general/security-features#privileged-access) can be applied to certificates stored in key vaults.
37
+
* Certificates updated in the key vault are automatically rotated in API Management. After an update in the key vault, a certificate in API Management is updated within four hours. You can also manually refresh the certificate by using the Azure portal or via the management REST API.
* If you have not created an API Management service instance yet, see [Create an API Management service instance](get-started-create-service-instance.md).
42
-
*You should have your backend service configured for client certificate authentication. To configure certificate authentication in the Azure App Service, refer to [this article][to configure certificate authentication in Azure WebSites refer to this article].
43
-
*You need access to the certificate and the password for management in an Azure key vault or upload to the API Management service. The certificate must be in **PFX** format. Self-signed certificates are allowed.
43
+
* If you haven't created an API Management instance yet, see [Create an API Management service instance](get-started-create-service-instance.md).
44
+
*Configure your backend service client certificate authentication. For information about configuring certificate authentication in Azure App Service, see [Configure TLS mutual authentication in App Service][to configure certificate authentication in Azure WebSites refer to this article].
45
+
*Ensure that you have access to the certificate and the password for management in an Azure key vault, or a certificate to upload to the API Management service. The certificate must be in PFX format. Self-signed certificates are allowed.
44
46
45
47
If you use a self-signed certificate:
46
48
* Install trusted root and intermediate [CA certificates](api-management-howto-ca-certificates.md) in your API Management instance.
47
49
48
50
> [!NOTE]
49
-
> CA certificates for certificate validation are not supported in the Consumption tier.
After the certificate is uploaded, it shows in the **Certificates** window. If you have many certificates, make a note of the thumbprint of the desired certificate in order to configure an API to use a client certificate for [gateway authentication](#configure-an-api-to-use-client-certificate-for-gateway-authentication).
56
+
After the certificate is uploaded, it shows in the **Certificates** window. If you have many certificates, note the thumbprint of the certificate that you just uploaded. You'll need it to configure an API to use the client certificate for [gateway authentication](#configure-an-api-to-use-client-certificate-for-gateway-authentication).
55
57
56
58
57
59
## Configure an API to use client certificate for gateway authentication
58
60
59
-
1. In the [Azure portal](https://portal.azure.com), navigate to your API Management instance.
61
+
1. In the [Azure portal](https://portal.azure.com), go to your API Management instance.
60
62
1. Under **APIs**, select **APIs**.
61
63
1. Select an API from the list.
62
64
1. In the **Design** tab, select the editor icon in the **Backend** section.
63
-
1. In **Gateway credentials**, select **Client cert** and select your certificate from the dropdown.
65
+
1. In **Gateway credentials**, select **Client cert** and select your certificate from the dropdown list.
64
66
1. Select **Save**.
65
67
66
68
:::image type="content" source="media/api-management-howto-mutual-certificates/apim-client-cert-enable-select.png" alt-text="Use client certificate for gateway authentication":::
67
69
68
70
> [!CAUTION]
69
-
> This change is effective immediately, and calls to operations of that API will use the certificate to authenticate on the backend server.
71
+
> This change is effective immediately. Calls to operations of the API will use the certificate to authenticate on the backend server.
70
72
71
73
> [!TIP]
72
-
> When a certificate is specified for gateway authentication for the backend service of an API, it becomes part of the policy for that API, and can be viewed in the policy editor.
74
+
> When a certificate is specified for gateway authentication for the backend service of an API, it becomes part of the policy for that API and can be viewed in the policy editor.
73
75
74
76
## Disable certificate chain validation for self-signed certificates
75
77
76
-
If you are using self-signed certificates, you will need to disable certificate chain validation for API Management to communicate with the backend system. Otherwise it will return a 500 error code. To configure this, you can use the [`New-AzApiManagementBackend`](/powershell/module/az.apimanagement/new-azapimanagementbackend) (for new backend) or [`Set-AzApiManagementBackend`](/powershell/module/az.apimanagement/set-azapimanagementbackend) (for existing backend) PowerShell cmdlets and set the `-SkipCertificateChainValidation` parameter to `True`.
78
+
If you're using self-signed certificates, you need to disable certificate chain validation to enable API Management to communicate with the backend system. Otherwise you'll get a 500 error code. To disable this validation, you can use the [`New-AzApiManagementBackend`](/powershell/module/az.apimanagement/new-azapimanagementbackend) (for a new backend) or [`Set-AzApiManagementBackend`](/powershell/module/az.apimanagement/set-azapimanagementbackend) (for an existing backend) PowerShell cmdlets and set the `-SkipCertificateChainValidation` parameter to `True`:
@@ -84,18 +86,18 @@ You can also disable certificate chain validation by using the [Backend](/rest/a
84
86
85
87
## Delete a client certificate
86
88
87
-
To delete a certificate, select it and then select **Delete**from the context menu (**...**).
89
+
To delete a certificate, select it and then select **Delete**in the **...** menu.
88
90
89
91
:::image type="content" source="media/api-management-howto-mutual-certificates/apim-client-cert-delete-new.png" alt-text="Delete a certificate":::
90
92
91
93
> [!IMPORTANT]
92
-
> If the certificate is referenced by any policies, then a warning screen is displayed. To delete the certificate, you must first remove the certificate from any policies that are configured to use it.
94
+
> If the certificate is referenced by any policies, a warning screen appears. To delete the certificate, you must first remove it from any policies that are configured to use it.
93
95
94
96
## Related content
95
97
96
98
*[How to secure APIs using client certificate authentication in API Management](api-management-howto-mutual-certificates-for-clients.md)
97
99
*[How to add a custom CA certificate in Azure API Management](./api-management-howto-ca-certificates.md)
98
-
*Learn about [policies in API Management](api-management-howto-policies.md)
100
+
*[Policies in API Management](api-management-howto-policies.md)
99
101
100
102
101
103
[How to add operations to an API]: ./mock-api-responses.md
1. If you don't already have a key vault, create one. For steps to create a key vault, see [Quickstart: Create a key vault using the Azure portal](/azure/key-vault/general/quick-create-portal).
13
+
1. If you don't already have a key vault, create one. For information about creating a key vault, see [Quickstart: Create a key vault using the Azure portal](/azure/key-vault/general/quick-create-portal).
14
14
15
-
To create or import a certificate to the key vault, see [Quickstart: Set and retrieve a certificate from Azure Key Vault using the Azure portal](/azure/key-vault/certificates/quick-create-portal).
15
+
To create a certificate in the key vault or import a certificate to the key vault, see [Quickstart: Set and retrieve a certificate from Azure Key Vault using the Azure portal](/azure/key-vault/certificates/quick-create-portal).
16
16
17
-
1. Enable a system-assigned or user-assigned [managed identity](../articles/api-management/api-management-howto-use-managed-service-identity.md) in the API Management instance.
17
+
1. Enable a system-assigned or user-assigned [managed identity](../articles/api-management/api-management-howto-use-managed-service-identity.md) in API Management.
See [Prerequisites for key vault integration](#prerequisites-for-key-vault-integration).
26
26
27
27
> [!IMPORTANT]
28
-
> When adding a key vault certificate to your API Management instance, you must have permissions to list secrets from the key vault.
28
+
> To add a key vault certificate to your API Management instance, you must have permissions to list secrets from the key vault.
29
29
30
30
> [!CAUTION]
31
-
> When using a key vault certificate in API Management, be careful not to delete the certificate, key vault, or managed identity used to access the key vault.
31
+
> When using a key vault certificate in API Management, be careful not to delete the certificate, key vault, or managed identity that's used to access the key vault.
32
32
33
33
To add a key vault certificate to API Management:
34
34
35
-
1. In the [Azure portal](https://portal.azure.com), navigate to your API Management instance.
35
+
1. In the [Azure portal](https://portal.azure.com), go to your API Management instance.
36
36
1. Under **Security**, select **Certificates**.
37
37
1. Select **Certificates** > **+ Add**.
38
-
1. In **Id**, enter a name of your choice.
38
+
1. In **Id**, enter a name.
39
39
1. In **Certificate**, select **Key vault**.
40
40
1. Enter the identifier of a key vault certificate, or choose **Select** to select a certificate from a key vault.
41
41
> [!IMPORTANT]
42
-
> If you enter a key vault certificate identifier yourself, ensure that it doesn't have version information. Otherwise, the certificate won't rotate automatically in API Management after an update in the key vault.
43
-
1. In **Client identity**, select a system-assigned or an existing user-assigned managed identity. Learn how to [add or modify managed identities in your API Management service](../articles/api-management/api-management-howto-use-managed-service-identity.md).
42
+
> If you enter a key vault certificate identifier yourself, be sure that it doesn't have version information. Otherwise, the certificate won't rotate automatically in API Management after an update in the key vault.
43
+
1. In **Client identity**, select a system-assigned identity or an existing user-assigned managed identity. For more information, see [Use managed identities in Azure API Management](../articles/api-management/api-management-howto-use-managed-service-identity.md).
44
44
> [!NOTE]
45
-
> The identity needs permissions to get and list certificate from the key vault. If you haven't already configured access to the key vault, API Management prompts you so it can automatically configure the identity with the necessary permissions.
45
+
> The identity needs to have permissions to get and list certificates from the key vault. If you haven't already configured access to the key vault, API Management prompts you so that it can automatically configure the identity with the necessary permissions.
46
46
1. Select **Add**.
47
47
48
-
49
-
50
-
:::image type="content" source="../articles/api-management/media/api-management-howto-mutual-certificates/apim-client-cert-kv.png" alt-text="Screenshot of adding a key vault certificate to API Management in the portal.":::
48
+
:::image type="content" source="../articles/api-management/media/api-management-howto-mutual-certificates/apim-client-cert-kv.png" alt-text="Screenshot that shows how to add a key vault certificate to API Management in the portal." lightbox="../articles/api-management/media/api-management-howto-mutual-certificates/apim-client-cert-kv.png":::
51
49
52
50
1. Select **Save**.
53
51
54
52
## Upload a certificate
55
53
56
54
To upload a client certificate to API Management:
57
55
58
-
1. In the [Azure portal](https://portal.azure.com), navigate to your API Management instance.
56
+
1. In the [Azure portal](https://portal.azure.com), go to your API Management instance.
59
57
1. Under **Security**, select **Certificates**.
60
58
1. Select **Certificates** > **+ Add**.
61
-
1. In **Id**, enter a name of your choice.
59
+
1. In **Id**, enter a name.
62
60
1. In **Certificate**, select **Custom**.
63
61
1. Browse to select the certificate .pfx file, and enter its password.
Copy file name to clipboardExpand all lines: includes/api-management-key-vault-access.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
@@ -7,15 +7,15 @@ ms.author: danlep
7
7
---
8
8
9
9
### Configure access to key vault
10
-
1. In the portal, navigate to your key vault.
11
-
1. In the left menu, select **Access configuration**, and note the **Permission model** that is configured.
10
+
1. In the portal, go to your key vault.
11
+
1. In the left menu, select **Access configuration**. Note the **Permission model** that's configured.
12
12
1. Depending on the permission model, configure either a [key vault access policy](/azure/key-vault/general/assign-access-policy) or [Azure RBAC access](/azure/key-vault/general/rbac-guide) for an API Management managed identity.
13
13
14
14
**To add a key vault access policy:<br/>**
15
15
16
16
1. In the left menu, select **Access policies**.
17
17
1. On the **Access policies** page, select **+ Create**.
18
-
1. On the **Permissions** tab, under **Secret permissions**, select **Get** and **List**, then select **Next**.
18
+
1. On the **Permissions** tab, under **Secret permissions**, select **Get** and **List**, and then select **Next**.
19
19
1. On the **Principal** tab, **Select principal**, search for the resource name of your managed identity, and then select **Next**.
20
20
If you're using a system-assigned identity, the principal is the name of your API Management instance.
21
21
1. Select **Next** again. On the **Review + create** tab, select **Create**.
Copy file name to clipboardExpand all lines: includes/api-management-key-vault-network.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,19 +9,19 @@ ms.author: danlep
9
9
10
10
#### Requirements for Key Vault firewall
11
11
12
-
If [Key Vault firewall](/azure/key-vault/general/network-security) is enabled on your key vault, the following are additional requirements:
12
+
If [Key Vault firewall](/azure/key-vault/general/network-security) is enabled on your key vault, you must meet these requirements:
13
13
14
-
* You must use the API Management instance's **system-assigned** managed identity to access the key vault.
14
+
* You must use the API Management instance's system-assigned managed identity to access the key vault.
15
15
* In Key Vault firewall, enable the **Allow Trusted Microsoft Services to bypass this firewall** option.
16
16
* Ensure that your local client IP address is allowed to access the key vault temporarily while you select a certificate or secret to add to Azure API Management. For more information, see [Configure Azure Key Vault networking settings](/azure/key-vault/general/how-to-azure-key-vault-network-security).
17
17
18
-
After completing the configuration, you may block your client address in the key vault firewall.
18
+
After completing the configuration, you can block your client address in the key vault firewall.
19
19
20
20
#### Virtual network requirements
21
21
22
22
If the API Management instance is deployed in a virtual network, also configure the following network settings:
23
23
24
-
* Enable a [service endpoint](/azure/key-vault/general/overview-vnet-service-endpoints) to Azure Key Vault on the API Management subnet.
24
+
* Enable a [service endpoint](/azure/key-vault/general/overview-vnet-service-endpoints) to Key Vault on the API Management subnet.
25
25
* Configure a network security group (NSG) rule to allow outbound traffic to the AzureKeyVault and AzureActiveDirectory [service tags](../articles/virtual-network/service-tags-overview.md).
26
26
27
-
For details, see [Network configuration when setting up Azure API Management in a VNet](../articles/api-management/virtual-network-reference.md).
27
+
For details, see [Network configuration when setting up API Management in a virtual network](../articles/api-management/virtual-network-reference.md).
0 commit comments