ND.FW.SecretManagement 1.0.2

dotnet add package ND.FW.SecretManagement --version 1.0.2
                    
NuGet\Install-Package ND.FW.SecretManagement -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ND.FW.SecretManagement" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ND.FW.SecretManagement" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="ND.FW.SecretManagement" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ND.FW.SecretManagement --version 1.0.2
                    
#r "nuget: ND.FW.SecretManagement, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ND.FW.SecretManagement@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ND.FW.SecretManagement&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=ND.FW.SecretManagement&version=1.0.2
                    
Install as a Cake Tool

ND.FW.SecretManagement

Azure Key Vault-backed configuration source for Novacis Digital services.

Resolves the Key Vault credential through ND.FW.ClientManagement (IClientManagement), so Key Vault access uses the correct credential for the environment — cloud vs. local dev — with no if/else credential logic in application code. Supports multiple named Key Vault sources per service (e.g. one vault for app secrets, another for a shared/tenant vault).

Install

dotnet add package ND.FW.SecretManagement

Depends on ND.FW.ClientManagement. NuGet restores it transitively — you don't need to install it separately, but you do need AddAzureClientManagement() registered (see below) for credential resolution to work.

Register

using ClientManagement.Implementations;
using SecretManagement.Extensions;

// 1. Register credential/client factory (from ND.FW.ClientManagement)
services.AddAzureClientManagement();

// 2. Register one or more named Key Vault secret sources
services.AddAzureKeyVaultSecretSource("primary", options =>
{
    options.KeyVaultName = "nd-prod-kv";           // resolves to https://nd-prod-kv.vault.azure.net/
    // — or — options.KeyVaultUri = "https://custom.vault.azure.net/";
    options.CredentialType = CredentialType.ManagedIdentity; // default
});

Wire into configuration

At startup, after the service provider is built, pull all registered secret sources into the configuration pipeline:

var app = builder.Build();

builder.Configuration.AddSecretSources(app.Services);

Each registered ISecretSource calls AddAzureKeyVault(...) on the IConfigurationBuilder, so secrets surface as ordinary configuration values (IConfiguration["MySecretName"]) alongside appsettings.json and environment variables.

Multiple named vaults

services.AddAzureKeyVaultSecretSource("app", o => o.KeyVaultName = "nd-app-kv");
services.AddAzureKeyVaultSecretSource("shared", o =>
{
    o.KeyVaultName = "nd-shared-kv";
    o.CredentialType = CredentialType.CommandLineInterface; // e.g. local dev override
});

Both are picked up automatically by AddSecretSources — no extra wiring per vault.

API

AddAzureKeyVaultSecretSource(name, configureOptions)

Registers a named ISecretSource backed by Azure Key Vault.

AddSecretSources(serviceProvider)

Extension on IConfigurationBuilder. Resolves all registered ISecretSource instances and adds each one to the configuration pipeline.

KeyVaultSecretSourceOptions

Property Type Notes
KeyVaultName string? Shorthand — resolves to https://{name}.vault.azure.net/
KeyVaultUri string? Full URI; takes precedence over KeyVaultName if set
CredentialType CredentialType Default: ManagedIdentity

If neither KeyVaultUri nor KeyVaultName is set, the source is a no-op (AddSecrets returns without adding anything) rather than throwing — useful for environments where a given vault isn't configured.

Dependencies

  • Microsoft.Extensions.Configuration 8.0.0
  • ND.FW.ClientManagement (>= 1.0.0) — required. Must be published to the registry before this package.

Publish order

ND.FW.ClientManagement  →  ND.FW.SecretManagement
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 263 7/10/2026
1.0.1 119 7/8/2026
1.0.0 98 7/7/2026