You are configuring a custom domain for the gateway endpoint of an Azure API Management (APIM) instance. The TLS certificate for the custom domain is stored in an Azure Key Vault. You want to use the system-assigned managed identity of the APIM instance to authorize access to the Key Vault. Which of the following describes the correct set of actions to configure the custom domain?
- AEnable the system-assigned managed identity on the API Management instance. In API Management, add the custom domain and reference the Key Vault certificate URL. The system-assigned identity is automatically granted access upon domain configuration.
- BConfigure a new Azure Active Directory app registration. Generate a client secret and add it to the API Management Named Values. Grant the app registration Get secret permission in Key Vault, and configure the custom domain using the named value.
- Enable the system-assigned managed identity on the API Management instance. Grant the managed identity the Get secret permission in the Key Vault access policies. In API Management, add the custom domain and select the certificate from the Key Vault.Answer
- DEnable the system-assigned managed identity on the API Management instance. In API Management, add the custom domain and reference the Key Vault certificate using the @Microsoft.KeyVault syntax in the Hostname configuration.
Answer
Enable the system-assigned managed identity on the API Management instance, grant the managed identity the Get secret permission in the Key Vault access policies, and configure the custom domain in API Management by selecting the certificate from Key Vault.
To secure a custom domain in Azure API Management using a certificate from Azure Key Vault, you must first enable the system-assigned managed identity on the API Management instance. Next, you must grant this identity the Get secret permission in the Key Vault's access policies (or assign an equivalent RBAC role such as Key Vault Secrets User), as API Management needs to read the secret representing the certificate to access the private key. Finally, the custom domain can be configured within the API Management instance by referencing the Key Vault certificate.
Step-by-Step Solution
Key Concept
Key Vault integration for API Management custom domains using managed identity