This package provides an XmlRepository implementation which can be used to store ASP.NET Data Protection keys in Hashcorp Vault using the VaultSharp client.
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");
// ...
}