Hi,
I'm trying to setup a listener in application gateway to use a certificate from keyvault using managed identity.
But every time whne I choose in portal the managed identity and then select the key vault from the dropdown menu I get this error:
"This key vault doesn't allow access to the managed identity"
Here is what I set up (all resources are in same resource group "my-rg"):
KeyVault: my-keyvault
Certificate: my-cert
Application gateway: my-appgw
Managed identity: appgw-to-keyvault-managed-identity
Permission model for the KeyVault is set to: "Azure role-based access control"
Once the above resource were created I asigned the managed identity to the application gateway (did this using cli as I haven't found a way to do it in portal):
az network application-gateway identity assign --gateway-name my-appgw --resource-group my-rg --identity appgw-to-keyvault-managed-identity
After that I configured following role assigment for the managed identity "appgw-to-keyvault-managed-identity":
- role "Key Vault Secrets User" for the key vault "my-keyvault"
After this setup I'm getting the above error when trying to choose the kay vault in the application gateway listener setting.
I was trying also following:
- adding "Key Vault Certificates Officer" role for the managed identity towards the key vault
- adding "Contributor" role for the managed identity towards the whole resource group.
None of these helped.
I wasn't able to find any instruction which woudl describe how to set this up for the application gateway.
Can someone let me know if I'm missing something in my setup?
Thanks,
Martin Cangar