locked
How can i copy App Keys to a Key Vault in Azure ? RRS feed

  • Question

  • User1253338400 posted

    Hi ,

    I have an app service  (azure function ) and under App Keys I can see the Host Keys and System Keys.

    I have created a Key Vault in Azure, How can i coipy my values into the Key Vault for this particular App ?

    So i want to user the key vault to hold a number of diferent apps that are hosted in Azure with the associated Keys .

    Is that possible or am i missing something with the purpose of the Key Vault ?

    Thanks

    Thursday, May 28, 2020 1:20 AM

Answers

  • User283571144 posted

    Hi robby32,

    As far as I know, renew means it will re-generated the function system key.  But the azure key vault doesn't know the key is re-generated. So it will remove the link. For this kind of issue, you should re-bind the keyvalut to this function.

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 29, 2020 2:14 AM

All replies

  • User283571144 posted

    Hi robby32,

    According to your description, I couldn't understand your requirement clearly.

    Do you mean you want to add key vault to azure key vault service?

    If this is your requirement, I suggest you could try to use azure key vault secret to achieve your requirement.

    https://docs.microsoft.com/en-us/azure/key-vault/secrets/about-secrets 

    https://docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-portal#add-a-secret-to-key-vault 

    Best Regards,

    Brando

    Thursday, May 28, 2020 9:23 AM
  • User1253338400 posted

    Hi ,

    Documentation was helpful. I have even created a Function App Hosted in Azure. I access the functions via a Key in the Host Keys namely, default. This is linked to a secret in the KeyVault via the following format :

         @Microsoft.KeyVault(SecretUri=secret_uri_with_version)

    but if an Admin comes along and clicks on "renew key" that link is lost . Is that how its meant to work ? shouldnt it keep the link to the Key Vault ?

    thanks

    Thursday, May 28, 2020 9:31 AM
  • User283571144 posted

    Hi robby32,

    As far as I know, renew means it will re-generated the function system key.  But the azure key vault doesn't know the key is re-generated. So it will remove the link. For this kind of issue, you should re-bind the keyvalut to this function.

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 29, 2020 2:14 AM
  • User1253338400 posted

    Hi,

    yes i thought this may be the case , so as I dont want to always retrieve the key from the portal . There is no real way  way to have a static key that will always invoke the function.

    Maybe i could retrieve the defaultkey everytime before i invoke the call  and attach to the url , will that work ?

    Friday, May 29, 2020 2:58 AM