Cirreum.SecretsProvider 1.0.6

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

Cirreum Secrets Provider

NuGet Version NuGet Downloads GitHub Release License .NET

Secrets provider abstractions and registration patterns for the Cirreum Framework

Overview

Cirreum.SecretsProvider is the foundational library for implementing secrets providers within the Cirreum ecosystem. It provides the core abstractions, registration patterns, and configuration management infrastructure needed to build pluggable secrets management solutions that integrate seamlessly with .NET's configuration system.

Key Features

🔐 Provider Registration Pattern

A standardized approach to implementing secrets providers through the SecretsProviderRegistrar<TSettings, TInstanceSettings> abstract base class:

  • Multi-instance support - Configure multiple instances of the same provider type with different endpoints
  • Duplicate detection - Automatic prevention of duplicate endpoint registrations using SHA256 hashing
  • Validation framework - Provider-specific settings validation before registration
  • Configuration integration - Direct integration with .NET's IConfiguration system
🔍 Endpoint Validation System

Robust validation and duplicate detection for provider endpoints:

  • Endpoint uniqueness - SHA256-based hashing prevents duplicate endpoint registrations
  • Connection string parsing - Extensible endpoint parsing for provider-specific formats
  • Error handling - Clear error messages for configuration issues
⚙️ Configuration Abstractions

Flexible configuration models that support provider-specific settings while maintaining consistency:

  • Hierarchical settings - Provider-level settings with instance-specific overrides
  • OpenTelemetry integration - Built-in tracing support for observability
  • Configuration binding - Seamless integration with .NET configuration system

Usage Example

// Implement a custom secrets provider
public class MySecretsProvider : SecretsProviderRegistrar<MyProviderSettings, MyInstanceSettings>
{
    public override ProviderType ProviderType => ProviderType.Secrets;
    public override string ProviderName => "MySecretsProvider";
    public override string[] ActivitySourceNames => ["MySecretsProvider"];

    public override void AddSecretsProviderInstance(
        IConfigurationBuilder builder,
        MyInstanceSettings settings)
    {
        // Add the secrets provider to the configuration pipeline
        builder.Add(new MySecretsConfigurationSource(settings));
    }

    public override void ValidateSettings(MyInstanceSettings settings)
    {
        // Provider-specific validation
        if (string.IsNullOrEmpty(settings.ApiKey))
            throw new InvalidOperationException("ApiKey is required");
    }
}

// Define your settings classes
public class MyProviderSettings : SecretsProviderSettings<MyInstanceSettings> { }

public class MyInstanceSettings : SecretsProviderInstanceSettings
{
    public string ApiKey { get; set; } = "";
    
    public override void ParseEndPoint()
    {
        // Parse provider-specific connection strings if needed
        // This method is called during registration
    }
}

// Register the provider
var providerSettings = configuration.GetSection("MySecretsProvider").Get<MyProviderSettings>();
var myProvider = new MySecretsProvider();
myProvider.Register(providerSettings, services, configurationBuilder);

Architecture

The library follows a layered architecture:

SecretsProviderRegistrar (Base Class)
├── Provider Type Identification
├── Instance Management & Validation
├── Endpoint Duplicate Detection
└── Configuration Integration Hooks

Validation System
├── Endpoint Uniqueness (SHA256 Hashing)
├── Provider-specific Validation
└── Configuration Parsing

Configuration Models
├── Provider Settings (Multiple Instances + Tracing)
└── Instance Settings (Endpoint + Provider-specific)

Installation

dotnet add package Cirreum.SecretsProvider

Basic Setup

// In Program.cs or Startup.cs
var builder = WebApplication.CreateBuilder(args);

// Register your secrets providers during configuration building
var providerSettings = builder.Configuration.GetSection("MySecretsProvider").Get<MyProviderSettings>();
var myProvider = new MySecretsProvider();
myProvider.Register(providerSettings, builder.Services, builder.Configuration);

var app = builder.Build();

// Secrets are now available through IConfiguration
var secretValue = app.Configuration["MySecret"];

Contribution Guidelines

  1. Be conservative with new abstractions
    The API surface must remain stable and meaningful.

  2. Limit dependency expansion
    Only add foundational, version-stable dependencies.

  3. Favor additive, non-breaking changes
    Breaking changes ripple through the entire ecosystem.

  4. Include thorough unit tests
    All primitives and patterns should be independently testable.

  5. Document architectural decisions
    Context and reasoning should be clear for future maintainers.

  6. Follow .NET conventions
    Use established patterns from Microsoft.Extensions.* libraries.

Versioning

Cirreum.SecretsProvider follows Semantic Versioning:

  • Major - Breaking API changes
  • Minor - New features, backward compatible
  • Patch - Bug fixes, backward compatible

Given its foundational role, major version bumps are rare and carefully considered.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Cirreum Foundation Framework
Layered simplicity for modern .NET

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 (2)

Showing the top 2 NuGet packages that depend on Cirreum.SecretsProvider:

Package Downloads
Cirreum.Runtime.SecretsProvider

The Cirreum SecertsProvider for the Cirreum Runtime Server.

Cirreum.Secrets.Azure

Secrets provider using Azure KeyVault.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.6 131 1/22/2026
1.0.5 121 1/21/2026
1.0.4 160 12/20/2025
1.0.3 325 12/16/2025
1.0.2 241 11/24/2025
1.0.1 198 11/24/2025
1.0.0 411 11/21/2025