Skip to content

Commit 9d347fd

Browse files
Merge pull request #314718 from nimakamoosi/nimak/docs/apim-managed-identity-security-note
[APIM] Add security note about managed identity policy and Contributor role
2 parents fe9ecd9 + eb96c4d commit 9d347fd

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,12 @@ You can use a system-assigned managed identity to access Key Vault to store and
315315

316316
Use the system-assigned identity to authenticate to a backend service via the [authentication-managed-identity](authentication-managed-identity-policy.md) policy.
317317

318+
> [!CAUTION]
319+
> **Security consideration:** Users with permissions to edit API Management policies (for example, users assigned the [API Management Service Contributor](/azure/role-based-access-control/built-in-roles#api-management-service-contributor) role) can use the [`authentication-managed-identity`](authentication-managed-identity-policy.md) policy to authenticate as the service's managed identity. When you assign roles or permissions to the API Management resouce, be aware that any user who can edit policies may be able to access those same resources through the managed identity. To mitigate risk:
320+
> - Follow the [principle of least privilege](/entra/identity-platform/secure-least-privileged-access) when assigning roles to managed identities.
321+
> - Only grant the API Management Contributor role or policy editing permissions to trusted users.
322+
> - Regularly review and audit managed identity role assignments and who has access to edit API Management policies.
323+
318324
### Connect to Azure resources behind an IP firewall by using a system-assigned managed identity
319325

320326
API Management is a trusted Microsoft service to the following resources. This trusted status enables the service to connect to the following resources behind a firewall when the firewall enables the **Allow Trusted Microsoft Services to bypass this firewall** setting. After you explicitly assign the appropriate Azure role to the [system-assigned managed identity](../active-directory/managed-identities-azure-resources/overview.md) for a resource instance, the scope of access for the instance corresponds to the Azure role that's assigned to the managed identity.
@@ -481,6 +487,12 @@ You can use a user-assigned managed identity to access Key Vault to store and ma
481487

482488
You can use the user-assigned identity to authenticate to a backend service via the [authentication-managed-identity](authentication-managed-identity-policy.md) policy.
483489

490+
> [!CAUTION]
491+
> **Security consideration:** Users with permissions to edit API Management policies (for example, users assigned the [API Management Service Contributor](/azure/role-based-access-control/built-in-roles#api-management-service-contributor) role) can use the [`authentication-managed-identity`](authentication-managed-identity-policy.md) policy to authenticate as the service's managed identity. When you assign roles or permissions to the API Management resouce, be aware that any user who can edit policies may be able to access those same resources through the managed identity. To mitigate risk:
492+
> - Follow the [principle of least privilege](/entra/identity-platform/secure-least-privileged-access) when assigning roles to managed identities.
493+
> - Only grant the API Management Contributor role or policy editing permissions to trusted users.
494+
> - Regularly review and audit managed identity role assignments and who has access to edit API Management policies.
495+
484496
### Log events to an event hub
485497

486498
You can configure and use a user-assigned managed identity to access an event hub to log events from an API Management instance. For more information, see [How to log events to Azure Event Hubs in Azure API Management](api-management-howto-log-event-hubs.md).

articles/api-management/authentication-managed-identity-policy.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Both system-assigned identity and any of the multiple user-assigned identities c
2020

2121
[!INCLUDE [api-management-policy-generic-alert](../../includes/api-management-policy-generic-alert.md)]
2222

23+
> [!CAUTION]
24+
> **Security consideration:** Any user with permissions to edit API Management policies (for example, users assigned the [API Management Service Contributor](/azure/role-based-access-control/built-in-roles#api-management-service-contributor) role) can use this policy to authenticate as the service's managed identity. This effectively grants that user access to any resource for which the managed identity has permissions. Ensure that you follow the [principle of least privilege](/entra/identity-platform/secure-least-privileged-access) when assigning permissions to API Management resource. For more information, see [How to use managed identities in Azure API Management](api-management-howto-use-managed-service-identity.md).
2325
2426
## Policy statement
2527

0 commit comments

Comments
 (0)