Indiko.KeyStorage.Client 1.3.0

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

Indiko.KeyStorage.Client

A .NET client library for Indiko.KeyStorage — a self-hosted secrets management vault. Store secrets centrally and inject them into your .NET apps via IConfiguration, just like appsettings.json.

Installation

dotnet add package Indiko.KeyStorage.Client

Quick Start

1. Add configuration

Add the vault connection to your appsettings.json:

{
  "Indiko.KeyStorage": {
    "BaseUrl": "https://your-keystorage-server",
    "ApiKey": "kss_your_api_key_here"
  }
}

2. Wire up in Program.cs

A single line loads all secrets into the configuration pipeline:

using Indiko.KeyStorage.Client;

var builder = WebApplication.CreateBuilder(args);

// Load secrets from the vault into IConfiguration
builder.Configuration.AddIndikoKeyStorage(builder.Configuration);

var app = builder.Build();

3. Use your secrets

Secrets are available like any other configuration value:

app.MapGet("/demo", (IConfiguration config) =>
{
    // Reads a secret stored in the vault
    var password = config["SmtpPassword"];

    // Connection strings work too
    var conn = config.GetConnectionString("DefaultDb");

    // Strongly-typed binding works as expected
    var smtp = config.GetSection("Smtp").Get<SmtpSettings>();
});

Configuration Provider

The configuration provider fetches all secrets at startup and merges them into IConfiguration. Secrets override values from appsettings.json and environment variables.

builder.Configuration.AddIndikoKeyStorage(builder.Configuration);

This reads BaseUrl and ApiKey from the Indiko.KeyStorage config section. If the server is unreachable, the app still starts — only the remote keys will be missing.

Advanced: Manual options

builder.Configuration.AddIndikoKeyStorage(options =>
{
    options.ServiceUrl = "https://your-keystorage-server";
    options.ApiKey     = "kss_your_api_key_here";
    options.CacheTtl   = TimeSpan.FromMinutes(5);
});

Typed HTTP Client (On-Demand Reads)

For scenarios where you need to fetch secrets at runtime (outside the startup configuration pipeline):

var kss = builder.Configuration.GetSection("Indiko.KeyStorage");

builder.Services.AddIndikoKeyStorage(options =>
{
    options.ServiceUrl = kss["BaseUrl"] ?? "http://localhost:5000";
    options.ApiKey     = kss["ApiKey"]  ?? "";
    options.CacheTtl   = TimeSpan.FromMinutes(5);
});

Then inject IndikoKeyStorageClient in your services:

app.MapGet("/secret/{key}", async (string key, IndikoKeyStorageClient client) =>
{
    var secret = await client.GetSecretAsync(key);
    return secret is not null
        ? Results.Ok(new { secret.Key, secret.Value })
        : Results.NotFound();
});

Client Options

Option Default Description
ServiceUrl https://localhost:5001 Base URL of the Indiko.KeyStorage server
ApiKey "" The app's API key (kss_...)
CacheTtl 5 minutes In-memory cache duration (TimeSpan.Zero to disable)

Features

  • IConfiguration integration — secrets appear alongside appsettings.json values with zero code changes
  • In-memory caching — configurable TTL to reduce server calls
  • Resilient HTTP client — built-in retry policy via Polly
  • Graceful degradation — if the vault is unreachable, the app starts without remote secrets
  • Typed clientIndikoKeyStorageClient for on-demand secret reads with DI support
  • Batch reads — fetch multiple secrets in a single call

Requirements

  • .NET 10.0 or later
  • A running Indiko.KeyStorage server instance

License

See LICENSE for details.

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 110 2/20/2026
1.2.0 113 2/20/2026
1.1.0 112 2/19/2026
1.0.0 104 2/19/2026