Home > Net >  Key Vault reference in Azure App Service doesn't resolve
Key Vault reference in Azure App Service doesn't resolve

Time:01-06

I have an ASP.NET (.NET 6) application hosted within an Linux app service plan. I'm attempting to reference a Key Vault secret within the configuration settings using the following syntax: @Microsoft.KeyVault(SecretUri=https://redacted.vault.azure.net/secrets/test/version)

However, I just get a red-cross next to the setting inside Configuation blade in the Azure Portal. If I open up the setting, then I get no further information about the issue.

Here's what I have done so far:

Uncategorized issues found

  • I have configured the ap service managed identity and given the appropriate permissions to the principal inside Key Vault
  • I have enabled 'Allow access from trusted Microsoft services' inside the Key Vault firewall.

CodePudding user response:

The solution was to add the outbound IP addresses of my app service to the Key Vault firewall, as 'Allow trusted Microsoft services to bypass this firewall' was not enough because app services are not trusted services.

CodePudding user response:

Adding so I can have some Internet Points

I don't think that Allow Trusted Microsoft Services is not enough to bypass the firewall for your app service:

https://azidentity.azurewebsites.net/post/2019/01/03/key-vault-firewall-access-by-azure-app-services

  •  Tags:  
  • Related