Question

Difficulty: MediumProvision and Configure Azure API Management

An organization requires an Azure API Management (APIM) instance to securely retrieve a database password from an Azure Key Vault secret. The password will be exposed to API policies via a Named Value. You must use a user-assigned managed identity named apim-identity to authenticate from the APIM instance to the Key Vault.

Which two configurations should you implement to achieve this? (Choose two.)

  1. Associate the apim-identity user-assigned managed identity with the APIM instance.Answer
  2. Grant the apim-identity user-assigned managed identity the Secret Get permission in the Key Vault access policies or Azure Role-Based Access Control (RBAC).Answer
  3. C
    Enable the system-assigned managed identity on the APIM instance and assign it the Secret Get permission on the Key Vault.
  4. D
    Grant the apim-identity user-assigned managed identity the Secret List and Secret Backup permissions on the Key Vault.

Answer

To configure the APIM instance to retrieve the secret from the Key Vault using a user-assigned managed identity, you must associate the user-assigned managed identity (apim-identity) with the APIM instance, and grant this identity the Secret Get permission on the Key Vault.
To retrieve a secret value from Key Vault for an APIM Named Value using a user-assigned managed identity, two configuration steps are required: 1) Associate the user-assigned managed identity with the APIM instance so it is available for use. 2) Grant the user-assigned managed identity the Secret Get permission on the Key Vault access policies or Azure RBAC so it has permission to read the secret value.

Step-by-Step Solution

1
Associate the identity
The user-assigned managed identity named apim-identity is registered with the API Management instance.
The APIM instance needs to be associated with the identity to use it for outgoing authentication requests to other Azure resources.
2
Configure permissions
The user-assigned identity is granted the Secret Get permission in Key Vault.
Key Vault requires the Secret Get permission to read the value of secrets; other permissions like List or Backup are insufficient.
3
Create Named Value
A Named Value of type Key Vault is configured in APIM specifying the user-assigned identity and the secret URI.
This links the APIM Named Value to the Key Vault secret using the specified identity for authorization.

Key Concept

Configuring Azure API Management Named Values to retrieve secrets from Key Vault using a user-assigned managed identity.
Rate this question