MaksIT.Vault.Client
1.0.4
See the version list below for details.
dotnet add package MaksIT.Vault.Client --version 1.0.4
NuGet\Install-Package MaksIT.Vault.Client -Version 1.0.4
<PackageReference Include="MaksIT.Vault.Client" Version="1.0.4" />
<PackageVersion Include="MaksIT.Vault.Client" Version="1.0.4" />
<PackageReference Include="MaksIT.Vault.Client" />
paket add MaksIT.Vault.Client --version 1.0.4
#r "nuget: MaksIT.Vault.Client, 1.0.4"
#:package MaksIT.Vault.Client@1.0.4
#addin nuget:?package=MaksIT.Vault.Client&version=1.0.4
#tool nuget:?package=MaksIT.Vault.Client&version=1.0.4
MaksIT.Vault.Client
HTTP client for the MAKS-IT Vault API. Authenticates with an API key (X-API-KEY header) and exposes typed methods for organizations, applications, secrets, and secret versions.
Shared wire types (MaksIT.Vault.Contracts) are included in this package.
Features
IVaultClient/VaultClientfor search, read, create, patch, and delete operations.- DI registration via
AddVaultClient(Microsoft.Extensions.Http). - API key authentication; routes under
api/vault/.... VaultApiExceptionwhen the API returns a non-success status code.
Installation
Package Manager:
Install-Package MaksIT.Vault.Client
dotnet CLI:
dotnet add package MaksIT.Vault.Client
Target Framework
.NET 10(net10.0)
Quick Start
Dependency injection
using MaksIT.Vault.Client;
builder.Services.AddVaultClient("https://vault.example.com", "<api-key>");
// Inject IVaultClient
public sealed class MyService(IVaultClient vault)
{
public Task DoWorkAsync(CancellationToken ct) =>
vault.SearchOrganizationsAsync(new() { Page = 1, PageSize = 20 }, ct);
}
Use the reverse-proxy origin when Vault is deployed behind YARP or ingress (e.g. http://localhost:8080), not the internal server port.
Manual construction
using MaksIT.Vault.Client;
var httpClient = new HttpClient();
var client = new VaultClient(httpClient, "https://vault.example.com", "<api-key>");
var orgs = await client.SearchOrganizationsAsync(new() { Page = 1, PageSize = 20 });
API surface
| Area | Methods |
|---|---|
| Search | SearchOrganizationsAsync, SearchApplicationsAsync, SearchSecretsAsync |
| Read | GetOrganizationAsync, GetApplicationAsync, GetSecretAsync, GetSecretVersionAsync |
| Create | CreateOrganizationAsync, CreateApplicationAsync, CreateSecretAsync, CreateSecretVersionAsync |
| Patch | PatchOrganizationAsync, PatchApplicationAsync, PatchSecretAsync |
| Delete | DeleteOrganizationAsync, DeleteApplicationAsync, DeleteSecretAsync |
Secret version label current (case-insensitive) resolves to the lowest vN version that is not expired.
PowerShell
For interactive and automation scenarios, see MaksIT.Vault.Client.PowerShell in the same repository (Connect-Vault).
Contributing
See CONTRIBUTING.md.
License
See LICENSE.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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.Http (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.