"
ASP.NET (snapshot 2017) Microsoft documentation and samples

Prefix Key Vault Configuration Provider sample application (ASP.NET Core 2.x)

This sample illustrates the use of the Azure Key Vault Configuration Provider for ASP.NET Core 2.x using key name prefixes. For the ASP.NET Core 1.x sample, see Prefix Key Vault Configuration Provider sample application (ASP.NET Core 1.x).

For more information on how the sample works, see the (xref:)Azure Key Vault configuration provider topic.

Using the sample

  1. Create a key vault and set up Azure Active Directory (Azure AD) for the application following the guidance in Get started with Azure Key Vault.
  1. Update the app’s appsettings.json file with the values of Vault, ClientId, and ClientSecret.
  2. Run the sample app, which obtains its configuration values from IConfigurationRoot with the same name as the prefixed secret name. In this sample, the prefix is the app’s version, which you provided to the PrefixKeyVaultSecretManager when you added the Azure Key Vault configuration provider. The value for AppSecret is obtained with config["AppSecret"].
  3. Change the version of the app assembly in the project file from 5.0.0.0 to 5.1.0.0 and run the app again. This time, the secret value returned is 5.1.0.0_secret_value.




Comments ( )
<00>  <01>  <02>  <03>  <04>  <05>  <06>  <07>  <08>  <09>  <10>  <11>  <12>  <13>  <14>  <15>  <16>  <17
Link to this page: http://www.vb-net.com/AspNet-DocAndSamples-2017/aspnetcore/security/key-vault-configuration/samples/key-name-prefix-sample/2.x/README.htm
<SITEMAP>  <MVC>  <ASP>  <NET>  <DATA>  <KIOSK>  <FLEX>  <SQL>  <NOTES>  <LINUX>  <MONO>  <FREEWARE>  <DOCS>  <ENG>  <MAIL ME>  <ABOUT ME>  < THANKS ME>