How to find your secret using KeyVault

The KeyVault will be used to store every single key or client secret important for your application. You can use the KeyVault to store your connection string too.

Reference: Best practices for using Azure Key Vault

 

How to create a secret in Azure

  1. Open your app registration > Select Certificates & secrets > New Client Secret

  2. Once you have created your secret, you need to save it somewhere because Azure doesn’t show it another time and you cannot copy it after. So, the best practice is to take this information and add it to your KeyVault.

  3. Open KeyVault > Select your KeyVault > Go to Secrets

  4. Select Generate/Import

  5. Add the Name and the Value copied from your client’s secret and click on Create.

  6. To see the value, you can select your secret created

  7. Select the value in your current version

  8. After that, click on Show Secret Value

NOTE: It is important to apply the established security premises for sending an application in production. In this case, we need to apply this option in KeyVault.

Instead of select “All networks”, the option “Selected networks” needs to be checked and Save it.

The difference for us with this option selected will be the visualisation for ours secrets. We will no longer have access to the list of secrets, but it will not affect the applications.