View on GitHub

Arcus Security

Azure Security development in a breeze

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.

Installation

This feature requires to install our NuGet package

PM > Install-Package Arcus.Security.Providers.AzureKeyVault

Usage

Example 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>();

← back