Azure Key Vault secrets value reading from Angular Code

492 Views Asked by At

I have some secret key which is presently in the git repo of angular code, which is not secure - I want them to be read from the Azure key vault from angular code.

Any help or suggestion will be appreciated.

1

There are 1 best solutions below

3
kittur_riyaz On

Managed identities are helpful to allows your app to easily access other Azure AD-protected resources such as Azure Key Vault

Please try below steps to access Key Vault

  1. Create Managed identity in Azure and Add role assignment to read Key Vault
  2. If your application is deployed in Azure App Service, go to Settings --> Identity --> User Assigned.
  3. Add the identity created earlier in step 1

If the application in deployed in Azure VM, managed identity can be added to VM. Please refer to the documentation for more details on managed identity

https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity?tabs=portal%2Chttp