I’m new to Azure. While exploring various services, I have a question.
Are the values stored in Azure App Configuration and Key Vault loaded and used not only in the backend API server but also in the frontend, such as mobile apps and websites?
This is a simple question, but I couldn’t find information about this use case in the Azure official documentation.
2
Answers
This comes down to how you load and access the data in the KeyVault via your code or setup in Azure as mentioned by @juunas.
So, you can load the KeyVault Secret in backend code using something like this:
Available Here
Depending where you call this and what variable you save to will decide where available.
For Frontend, for example Javascript (I am not a FrontEnd Developer) use something like this:
Available here
You can also add KeyVault data straight into the Azure WebApp appSettings by doing something like this in the configuration of you Web App.
All these require correct setup of security and network access to the KeyVault for them to work.
There are no problems using Azure App Configuration and Key Vault in backend applications.
There are two major considerations for using Azure App Configuration and Key Vault in frontend/mobile/client applications.
How are you going to secure the connection and data?
Any secrets you made available to client applications should be considered pubic.
How are you going to scale?
Very often, the instances of client applications are multi-magnitude higher than the instances of backend applications. Azure App Configurate allows a request to retrieve 100 key-values and Key Vault allows a request to retrieve 1 secret. Nevertheless, your clients may be throttled if they send a massive number of requests at the same time.
Here are some recommendations from Azure App Configuration about how to use the service for client applications:
https://learn.microsoft.com/en-us/azure/azure-app-configuration/howto-best-practices#client-applications-in-app-configuration