MaksIT.Vault.Client 1.3.0

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

MaksIT.Vault.Client

HTTP client for the MAKS-IT Vault API.

  • Vault routes (api/vault/*): API key via X-API-KEY header.
  • Identity, API key admin, key migration (api/identity/*, api/apikey/*, api/admin/key-migration/*): JWT Bearer via AccessToken (set manually or after LoginAsync / RefreshTokenAsync).
  • Secret generation (api/secret/generatesecret): no auth required.

Shared wire types (MaksIT.Vault.Contracts) are bundled in this NuGet package.

Features

  • IVaultClient / VaultClient for vault CRUD, identity, API keys, key migration, and secret generation.
  • DI registration via AddVaultClient (Microsoft.Extensions.Http).
  • VaultApiException when the API returns a non-success status code.

Installation

dotnet add package MaksIT.Vault.Client

Target Framework

  • .NET 10 (net10.0)

Quick Start

Dependency injection (API key)

using MaksIT.Vault.Client;
using MaksIT.Vault.Contracts.Vault.Organization.Search;

builder.Services.AddVaultClient(opts => {
  opts.BaseAddress = "https://vault.example.com";
  opts.ApiKey = "<api-key>";
});

public sealed class MyService(IVaultClient vault) {
  public Task DoWorkAsync(CancellationToken ct) =>
    vault.SearchOrganizationsAsync(new SearchOrganizationRequest { PageNumber = 1, PageSize = 20 }, ct);
}

JWT (identity / admin)

var login = await client.LoginAsync(new LoginRequest { Username = "admin", Password = "..." });
// client.AccessToken is set automatically

var users = await client.SearchUsersAsync(new SearchUserRequest { PageNumber = 1, PageSize = 20 });

Or pass AccessToken in VaultClientOptions / Connect-Vault -AccessToken.

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

var httpClient = new HttpClient();
var client = new VaultClient(httpClient, "https://vault.example.com", "<api-key>", accessToken: null);

Contract namespaces

Types moved from flat MaksIT.Vault.Contracts / MaksIT.Vault.Client.Models to nested folders:

Area Namespace example
Organizations MaksIT.Vault.Contracts.Vault.Organization
Applications MaksIT.Vault.Contracts.Vault.Application
Secrets MaksIT.Vault.Contracts.Vault.Secret
Users MaksIT.Vault.Contracts.Identity.User
API keys MaksIT.Vault.Contracts.ApiKeys
Key migration MaksIT.Vault.Contracts.KeyMigration
Shared enums MaksIT.Vault.Contracts.Shared
Paging MaksIT.Core.Webapi.Models.PagedRequest / PagedResponse<T>

Patch DTOs use PatchRequestModelBase with Operations: Dictionary<string, PatchOperation> from MaksIT.Core.Webapi.Models.

API surface

Area Methods
Vault — search SearchOrganizationsAsync, SearchApplicationsAsync, SearchSecretsAsync
Vault — read GetOrganizationAsync, GetApplicationAsync, GetSecretAsync, GetSecretVersionAsync
Vault — write Create*Async, Patch*Async, Delete*Async
Secret generation GenerateSecretAsync
Identity SearchUsersAsync, SearchUserEntityScopesAsync, GetUserAsync, CreateUserAsync, PatchUserAsync, DeleteUserAsync, LoginAsync, RefreshTokenAsync, LogoutAsync
API keys SearchApiKeysAsync, SearchApiKeyEntityScopesAsync, GetApiKeyAsync, CreateApiKeyAsync, PatchApiKeyAsync, DeleteApiKeyAsync
Key migration GetKeyMigrationStatusAsync, StartKeyMigrationAsync, ValidateKeyMigrationAsync, CompleteKeyMigrationAsync

Secret version label current (case-insensitive) resolves to the lowest vN version that is not expired.

PowerShell

See MaksIT.Vault.Client.PowerShell (Connect-Vault, 38 cmdlets for vault, identity, API keys, and key migration).

Contributing

See CONTRIBUTING.md.

License

See LICENSE.md.

Product 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. 
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.3.0 88 8/1/2026
1.1.0 118 7/27/2026
1.0.6 124 7/9/2026
1.0.5 112 7/7/2026
1.0.4 110 7/6/2026
1.0.3 121 6/28/2026