Replace configuration tokens with ISecretProvider
When building your IConfiguration, you can use the extension .AddAzureKeyVault to pass in your ISecretProvider
instead of using the built-in Azure Key Vault provider.
#
InstallationThis feature requires to install our NuGet package
PM > Install-Package Arcus.Security.Providers.AzureKeyVault
#
UsageExample how the configuration builder is used inside a web application:
var vaultAuthenticator = new ManagedServiceIdentityAuthenticator();var vaultConfiguration = new KeyVaultConfiguration(keyVaultUri);var yourSecretProvider = new KeyVaultSecretProvider(vaultAuthenticator, vaultConfiguration);
var config = new ConfigurationBuilder() .AddAzureKeyVault(yourSecretProvider) .Build();
var host = new WebHostBuilder() .UseConfiguration(config) .UseKestrel() .UseStartup<Startup>();