Skip to content

Commit 408e66f

Browse files
authored
Merge pull request #295138 from dlepow/fixnv
[APIM] Update roles for KV access
2 parents 72f92df + b80000b commit 408e66f

6 files changed

+51
-25
lines changed

articles/api-management/api-management-howto-properties.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ms.custom: engagement-fy23, devx-track-azurecli
1717

1818
[API Management policies](api-management-howto-policies.md) are a powerful capability of the system that allow the publisher to change the behavior of the API through configuration. Policies are a collection of statements that are executed sequentially on the request or response of an API. Policy statements can be constructed using literal text values, policy expressions, and named values.
1919

20-
*Named values* are a global collection of name/value pairs in each API Management instance. There is no imposed limit on the number of items in the collection. Named values can be used to manage constant string values and secrets across all API configurations and policies.
20+
*Named values* are a global collection of name/value pairs in each API Management instance. There's no imposed limit on the number of items in the collection. Named values can be used to manage constant string values and secrets across all API configurations and policies.
2121

2222
:::image type="content" source="media/api-management-howto-properties/named-values.png" alt-text="Named values in the Azure portal":::
2323

@@ -44,10 +44,10 @@ Using key vault secrets is recommended because it helps improve API Management s
4444
* Secrets updated in the key vault are automatically rotated in API Management. After update in the key vault, a named value in API Management is updated within 4 hours. You can also manually refresh the secret using the Azure portal or via the management REST API.
4545

4646
> [!NOTE]
47-
> The secrets stored in Azure Key Vault must be between 1 and 4096 characters, as API Management cannot retrieve values that exceed this limit.
47+
> The secrets stored in Azure Key Vault must be between 1 and 4096 characters, as API Management can't retrieve values that exceed this limit.
4848
## Prerequisites
4949

50-
* If you have not created an API Management service instance yet, see [Create an API Management service instance](get-started-create-service-instance.md).
50+
* If you haven't created an API Management service instance yet, see [Create an API Management service instance](get-started-create-service-instance.md).
5151

5252
### Prerequisites for key vault integration
5353

@@ -59,8 +59,7 @@ Using key vault secrets is recommended because it helps improve API Management s
5959

6060
- Enable a system-assigned or user-assigned [managed identity](api-management-howto-use-managed-service-identity.md) in the API Management instance.
6161

62-
[!INCLUDE [api-management-key-vault-access](../../includes/api-management-key-vault-access.md)]
63-
62+
[!INCLUDE [api-management-key-vault-secret-access](../../includes/api-management-key-vault-secret-access.md)]
6463

6564
[!INCLUDE [api-management-key-vault-network](../../includes/api-management-key-vault-network.md)]
6665

@@ -134,7 +133,7 @@ az apim nv show --resource-group apim-hello-word-resource-group \
134133
--service-name apim-hello-world --named-value-id named_value_01
135134
```
136135

137-
This example is a secret value. The previous command does not return the value. To see the value, run the [az apim nv show-secret](/cli/azure/apim/nv#az-apim-nv-show-secret) command:
136+
This example is a secret value. The previous command doesn't return the value. To see the value, run the [az apim nv show-secret](/cli/azure/apim/nv#az-apim-nv-show-secret) command:
138137

139138
```azurecli
140139
az apim nv show-secret --resource-group apim-hello-word-resource-group \

articles/api-management/api-management-howto-use-managed-service-identity.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ The `tenantId` property identifies which Microsoft Entra tenant the identity bel
123123
124124
## Configure Key Vault access using a managed identity
125125

126-
The following configurations are needed for API Management to access secrets and certificates from an Azure key vault.
126+
The following configurations are needed for API Management to access certificates from an Azure key vault.
127127

128-
[!INCLUDE [api-management-key-vault-access](../../includes/api-management-key-vault-access.md)]
128+
[!INCLUDE [api-management-key-vault-certificate-access](../../includes/api-management-key-vault-certificate-access.md)]
129129

130130
[!INCLUDE [api-management-key-vault-network](../../includes/api-management-key-vault-network.md)]
131131

articles/api-management/configure-custom-domain.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ To fetch a TLS/SSL certificate, API Management must have the list and get secret
8989
1. On the **Managed identities** page of your API Management instance, enable a system-assigned or user-assigned [managed identity](api-management-howto-use-managed-service-identity.md). Note the principal ID on that page.
9090
1. Assign permissions to the managed identity to access the key vault. Use steps in the following section.
9191

92-
[!INCLUDE [api-management-key-vault-access](../../includes/api-management-key-vault-access.md)]
93-
92+
[!INCLUDE [api-management-key-vault-certificate-access](../../includes/api-management-key-vault-certificate-access.md)]
9493

9594
If the certificate is set to `autorenew` and your API Management tier has an SLA (that is, in all tiers except the Developer tier), API Management will pick up the latest version automatically, without downtime to the service.
9695

includes/api-management-key-vault-access.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,14 @@ ms.author: danlep
1111
1. In the left menu, select **Access configuration**, and note the **Permission model** that is configured.
1212
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.
1313

14-
**To add a key vault access policy:<br/>**
15-
16-
1. In the left menu, select **Access policies**.
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**.
19-
1. On the **Principal** tab, **Select principal**, search for the resource name of your managed identity, and then select **Next**.
20-
If you're using a system-assigned identity, the principal is the name of your API Management instance.
21-
1. Select **Next** again. On the **Review + create** tab, select **Create**.
14+
**To add a key vault access policy:<br/>**
15+
16+
1. In the left menu, select **Access policies**.
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**.
19+
1. On the **Principal** tab, **Select principal**, search for the resource name of your managed identity, and then select **Next**.
20+
If you're using a system-assigned identity, the principal is the name of your API Management instance.
21+
1. Select **Next** again. On the **Review + create** tab, select **Create**.
22+
2223

23-
**To configure Azure RBAC access:<br/>**
2424

25-
1. In the left menu, select **Access control (IAM)**.
26-
1. On the **Access control (IAM)** page, select **Add role assignment**.
27-
1. On the **Role** tab, select **Key Vault Certificate User**.
28-
1. On the **Members** tab, select **Managed identity** > **+ Select members**.
29-
1. On the **Select managed identity** page, select the system-assigned managed identity or a user-assigned managed identity associated with your API Management instance, and then select **Select**.
30-
1. Select **Review + assign**.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
author: dlepow
3+
ms.service: azure-api-management
4+
ms.topic: include
5+
ms.date: 02/21/2025
6+
ms.author: danlep
7+
---
8+
[!INCLUDE [api-management-key-vault-access](api-management-key-vault-access.md)]
9+
10+
**To configure Azure RBAC access:<br/>**
11+
12+
1. In the left menu, select **Access control (IAM)**.
13+
1. On the **Access control (IAM)** page, select **Add role assignment**.
14+
1. On the **Role** tab, select **Key Vault Certificate User**.
15+
1. On the **Members** tab, select **Managed identity** > **+ Select members**.
16+
1. On the **Select managed identity** page, select the system-assigned managed identity or a user-assigned managed identity associated with your API Management instance, and then select **Select**.
17+
1. Select **Review + assign**.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
author: dlepow
3+
ms.service: azure-api-management
4+
ms.topic: include
5+
ms.date: 02/21/2025
6+
ms.author: danlep
7+
---
8+
[!INCLUDE [api-management-key-vault-access](api-management-key-vault-access.md)]
9+
10+
**To configure Azure RBAC access:<br/>**
11+
12+
1. In the left menu, select **Access control (IAM)**.
13+
1. On the **Access control (IAM)** page, select **Add role assignment**.
14+
1. On the **Role** tab, select **Key Vault Secrets User**.
15+
1. On the **Members** tab, select **Managed identity** > **+ Select members**.
16+
1. On the **Select managed identity** page, select the system-assigned managed identity or a user-assigned managed identity associated with your API Management instance, and then select **Select**.
17+
1. Select **Review + assign**.

0 commit comments

Comments
 (0)