Skip to content

PaulHatch/vault-data-protection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vault Data Protection

NuGet version (VaultSharpDataProtection)

This package provides an XmlRepository implementation which can be used to store ASP.NET Data Protection keys in Hashcorp Vault using the VaultSharp client.

Usage

In your Startup.cs when configuring data protection use one of the PersistKeysToVault extension methods:

public void ConfigureServices(IServiceCollection services)
{
    var vaultUri = Configuration.GetConnectionString("vault");
    var vaultToken = Environment.GetEnvironmentVariable("VAULT_TOKEN");

    services.AddDataProtection()
        .PersistKeysToVault(vaultUri, vaultToken, "DataProtectionsKeys", "appSecrets");
    // ...
}

About

Vault Key Repository for ASP.NET Core Data Protection

Resources

License

Stars

Watchers

Forks

Packages