0
votes

I am new to Azure Functions and Azure Key vault. I am using Azure function version V3 for my project. To Integrate Azure Key vault with Azure function, I have created both the resources in Azure and added secrets in Azure key vault. I have inserted the Keys and values as @Microsoft.KeyVault(SecretUri=secret_uri_with_version) in Application settings of function app and calling it using Environment.GetEnvironmentVariable("Key").

My Question is

  1. How the values from Key vault is getting into my Function app?
  2. Will my function app have to make a call every time to access value from Key vault? If so, will there be any performance issues for my project?
  3. Can We also inject Key vault values in Startup.cs?

Any help is appreciated!! Thanks in advance

1

1 Answers

1
votes
  1. When function app instantiates a new instance it calls key vault to get the secret. Make sure Function App has permission to the specified secret or it wont work.
  2. No only one time per instance so it will not impact performance. The only reason it could impact startup performance would be if the specified key vault has thousands of other services also trying to access it at the same time. In which case you should probably start looking into why that is happening.
  3. You would access it just like any other key and can be used like any string. (Just don't log it ;) )

Docs on key vault integration https://docs.microsoft.com/sv-se/azure/app-service/app-service-key-vault-references

Please ask any questions for clarification in answer