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
<PackageReference Include="NDM-Key-Vault" Version="7.1.0" />
<PackageVersion Include="NDM-Key-Vault" Version="7.1.0" />
<PackageReference Include="NDM-Key-Vault" />
paket add NDM-Key-Vault --version 7.1.0
#r "nuget: NDM-Key-Vault, 7.1.0"
#:package NDM-Key-Vault@7.1.0
#addin nuget:?package=NDM-Key-Vault&version=7.1.0
#tool nuget:?package=NDM-Key-Vault&version=7.1.0
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 textPOST {BaseUri}/GetKeyswith 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"]
- Example:
- Response body: JSON object mapping secret names to secret values
- Example:
{ "SecretA": "value", "SecretB": "value" }
- Example:
- 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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.Caching.Memory (>= 10.0.7)
- Microsoft.Extensions.Http (>= 10.0.7)
- Microsoft.Extensions.Logging (>= 10.0.7)
-
net6.0
- Microsoft.Extensions.Caching.Memory (>= 7.0.0)
- Microsoft.Extensions.Http (>= 7.0.0)
- Microsoft.Extensions.Logging (>= 7.0.0)
-
net7.0
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.Http (>= 8.0.1)
- Microsoft.Extensions.Logging (>= 8.0.1)
-
net8.0
- Microsoft.Extensions.Caching.Memory (>= 9.0.15)
- Microsoft.Extensions.Http (>= 9.0.15)
- Microsoft.Extensions.Logging (>= 9.0.15)
-
net9.0
- Microsoft.Extensions.Caching.Memory (>= 9.0.15)
- Microsoft.Extensions.Http (>= 9.0.15)
- Microsoft.Extensions.Logging (>= 9.0.15)
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 |