NDM-Key-Vault 7.1.0

dotnet add package NDM-Key-Vault --version 7.1.0
                    
NuGet\Install-Package NDM-Key-Vault -Version 7.1.0
                    
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="NDM-Key-Vault" Version="7.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NDM-Key-Vault" Version="7.1.0" />
                    
Directory.Packages.props
<PackageReference Include="NDM-Key-Vault" />
                    
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 NDM-Key-Vault --version 7.1.0
                    
#r "nuget: NDM-Key-Vault, 7.1.0"
                    
#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 NDM-Key-Vault@7.1.0
                    
#: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=NDM-Key-Vault&version=7.1.0
                    
Install as a Cake Addin
#tool nuget:?package=NDM-Key-Vault&version=7.1.0
                    
Install as a Cake Tool

This package is used to connect to an HTTP endpoint (BaseUri) that returns Key Vault secrets.

The BaseUri is expected to expose:

  • GET {BaseUri}/GetKey?keyName={name} returning the secret value as plain text
  • POST {BaseUri}/GetKeys with a JSON array body of secret names, returning a JSON object mapping names to values

API contract (Azure Function)

This package is a client for an HTTP “Key Vault proxy” endpoint (commonly an Azure Function).

GET {BaseUri}/GetKey

  • Query string: keyName (string)
  • Response body: the secret value as plain text (not JSON)
  • Success: 200 OK
  • Failure: any non-success status code should be returned (for example 401/403, 404, 429, 5xx)

POST {BaseUri}/GetKeys

  • Request body: JSON array of secret names
    • Example: ["SecretA","SecretB"]
  • Response body: JSON object mapping secret names to secret values
    • Example: { "SecretA": "value", "SecretB": "value" }
  • Success: 200 OK
  • Failure: any non-success status code should be returned (for example 401/403, 404, 429, 5xx)

Client behavior

  • Secrets are cached in-process by name (and BaseUri) for KeyVaultCacheOptions.Expiration.
  • For cache misses, outbound requests are throttled by KeyVaultClientOptions.MaxConcurrentRequests.
  • HTTP/timeout/deserialize failures are raised as KeyVaultClientException.
  • Missing/empty secret values are raised as KeyVaultClientException (including bulk dictionary fetches).
  • Caller-initiated cancellation is propagated as OperationCanceledException.

How to use the package:

services.AddNDMKeyVaultClient(o ⇒ { o.BaseUri = builder.Configuration["KeyVault:Uri"] ?? throw new InvalidOperationException("KeyVault:Uri is missing.");

o.Timeout = TimeSpan.FromSeconds(15);
o.MaxConcurrentRequests = 2; // or 4, 8 depending on behavior

});

// builder.Services.Configure<KeyVaultCacheOptions>(opt ⇒ opt.Expiration = TimeSpan.FromMinutes(60));

// Optional: configure the underlying HttpClient (for example, add auth headers) // services.AddNDMKeyVaultClient(o ⇒ { o.BaseUri = ...; }, http ⇒ http.DefaultRequestHeaders.Add("X-Api-Key", "..."));

// Recommended bulk usage (safe for typical secret names) // var secrets = await keyVaultService.GetCredentialsDictionaryAsync(new[] { "Secret1", "Secret2" }, cancellationToken);

// Temp no config console builder.Services.AddSingleton<IOptions<KeyVaultClientOptions>>( Options.Create(new KeyVaultClientOptions { BaseUri = "https://kvfunctionapp-test.azurewebsites.net/api/GetSecret", Timeout = TimeSpan.FromSeconds(15) }) );

builder.Services.AddNDMKeyVaultClient(_ ⇒ { });

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 is compatible.  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 is compatible.  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
7.1.0 134 5/5/2026
7.0.0 117 4/29/2026
6.1.0 229 11/3/2025
6.0.0 213 10/29/2025
6.0.0-alpha 210 10/29/2025
5.0.0 368 6/13/2025
4.1.0 352 6/12/2025
4.0.0 336 6/9/2025
3.0.0 148 6/6/2025
2.1.0 226 5/8/2025
2.0.0 212 5/8/2025
1.1.0-alpha 227 4/15/2025
1.0.1-alpha 243 4/15/2025
1.0.0 237 4/17/2025
1.0.0-alpha 231 4/15/2025