pvNugsSecretManagerNc6Abstractions 6.0.0
dotnet add package pvNugsSecretManagerNc6Abstractions --version 6.0.0
NuGet\Install-Package pvNugsSecretManagerNc6Abstractions -Version 6.0.0
<PackageReference Include="pvNugsSecretManagerNc6Abstractions" Version="6.0.0" />
<PackageVersion Include="pvNugsSecretManagerNc6Abstractions" Version="6.0.0" />
<PackageReference Include="pvNugsSecretManagerNc6Abstractions" />
paket add pvNugsSecretManagerNc6Abstractions --version 6.0.0
#r "nuget: pvNugsSecretManagerNc6Abstractions, 6.0.0"
#:package pvNugsSecretManagerNc6Abstractions@6.0.0
#addin nuget:?package=pvNugsSecretManagerNc6Abstractions&version=6.0.0
#tool nuget:?package=pvNugsSecretManagerNc6Abstractions&version=6.0.0
pvNugs Secret Manager NC6 Abstractions
A lightweight .NET 6 (LTS) abstraction library for secret management. This package exposes interfaces and contracts suitable for implementing providers that integrate with secret stores (Azure Key Vault, environment variables, vaults, etc.). It is the NC6-targeted sibling of the NC9 abstractions and intentionally keeps the API surface compatible with projects targeting .NET 6.
🔐 Features
- Clear, minimal interfaces for static and dynamic secret retrieval
- CancellationToken-aware methods for graceful shutdown and testing
- Designed for easy DI registration and unit testing
- Portable: implement your provider for Azure, AWS, HashiCorp, or custom stores
- Focus on correctness and thread-safety for common usage patterns
📦 Installation
dotnet add package pvNugsSecretManagerNc6Abstractions
Or via Package Manager Console:
Install-Package pvNugsSecretManagerNc6Abstractions
🚀 Quick Start
- Register your implementation with the DI container in a .NET 6 application (Program.cs):
// Program.cs (.NET 6 minimal host)
var builder = WebApplication.CreateBuilder(args);
// register your implementation
builder.Services.AddSingleton<IPvNugsStaticSecretManager, YourSecretManagerImplementation>();
var app = builder.Build();
app.Run();
Static Secret Retrieval (example)
public class DatabaseService
{
private readonly IPvNugsStaticSecretManager _secretManager;
public DatabaseService(IPvNugsStaticSecretManager secretManager)
{
_secretManager = secretManager;
}
public async Task<string> GetConnectionStringAsync(CancellationToken ct)
{
var password = await _secretManager.GetStaticSecretAsync("database-password", ct);
return $"Server=myserver;Database=mydb;Password={password};";
}
}
Dynamic Credential Retrieval (example)
public class SecureDataService
{
private readonly IPvNugsDynamicSecretManager _secretManager;
public SecureDataService(IPvNugsDynamicSecretManager secretManager)
{
_secretManager = secretManager;
}
public async Task UseDynamicCredentialAsync(CancellationToken ct)
{
var credential = await _secretManager.GetDynamicSecretAsync("app-db", ct);
if (credential == null || DateTime.UtcNow >= credential.ExpirationDateUtc)
throw new InvalidOperationException("Unable to obtain valid credentials");
// use credential.Username and credential.Password
}
}
🔧 Dependency Injection Setup
// Program.cs (register implementations)
services.AddSingleton<IPvNugsStaticSecretManager, YourSecretManagerImplementation>();
services.AddSingleton<IPvNugsDynamicSecretManager, YourDynamicSecretManagerImplementation>();
🛡️ Security Best Practices
- Never log secrets in plaintext
- Use managed identities or service principals when possible
- Cache secrets carefully and respect expiration for dynamic credentials
- Protect memory containing secrets and clear when finished
📋 Use Cases
- Centralized static secret retrieval (API keys, connection strings)
- Dynamic, short-lived database credentials
- Multi-tenant or ephemeral environments needing credential rotation
🎯 Target Framework
- .NET 6 (LTS) — designed for projects still running on .NET 6 while keeping the API consistent with the pvNugs ecosystem.
📚 Documentation
The package includes XML documentation for all public interfaces and members. See the repository for example implementations and tests.
🤝 Contributing
Part of the pvWayNugs ecosystem. Issues and pull requests are welcome: https://github.com/licheez/pvWayNugs
📄 License
MIT — see the LICENSE file for details.
Keywords: Secret Management, .NET 6, Abstractions, Dynamic Credentials, Static Secrets, pvWayNugs
| 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 was computed. 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 was computed. 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 was computed. 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 was computed. 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. |
-
net6.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on pvNugsSecretManagerNc6Abstractions:
| Package | Downloads |
|---|---|
|
pvNugsCsProviderNc6MsSql
Package Description |
|
|
pvNugsSecretManagerNc6Azure
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.0.0 | 203 | 11/6/2025 |
Initial