Azure Key Vault RBAC permissions required for APIM to retreive a cert?

SKT 141 Reputation points
2024-02-18T20:52:19+00:00

Hi I have a Azure API manager setup and want to add a custom domain. We have deployed Azure Key Vault and uploaded a certificate. We have deployed Key Vault with the recommended "role-based access control" We have given the APIM managed identity "Key Vault Reader" access with rbac. When we try to add the custom domain and certificate to APIM we get an error: "failed to access KeyVault Secret xxxxxxx using managed service identity (http://aka.ms/apimmsi) of Api Management service. Check if Managed Identity YYYYY and Object ID ZZZZZZZ has GET permissions on secrets in the KeyValuyt Access Policies. What does this error mean? We don't have Key vault access policys configured (not recommended) What RBAC role should I give the APIM managed identity to use the certificate? Thanks

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,144 questions
Azure Role-based access control
Azure Role-based access control
An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
683 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dillon Silzer 54,746 Reputation points
    2024-02-18T21:58:39.3933333+00:00

    Hi SKT,

    Try applying the following:

    • Key Vault Secrets User

    User's image

    Cited from https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-guide?tabs=azure-cli#using-azure-rbac-secret-key-and-certificate-permissions-with-key-vault

    Another note is Key Vault Reader gives the following:

    • Read metadata of key vaults and its certificates, keys, and secrets. Cannot read sensitive values such as secret contents or key material. Only works for key vaults that use the 'Azure role-based access control' permission model.

    If this is helpful please accept answer.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful