An Aspire client integration for Bitwarden Secrets Manager.
Install
| Product | Versions |
|---|---|
| .NET |
README
CommunityToolkit.Aspire.Bitwarden.SecretManager
Overview
CommunityToolkit.Aspire.Bitwarden.SecretManager registers authenticated BitwardenClient instances using structured Aspire configuration.
Installation
dotnet add package CommunityToolkit.Aspire.Bitwarden.SecretManager
Configuration
The client integration expects configuration under Aspire:Bitwarden:SecretManager:{connectionName}.
When used with the hosting integration, call WithReference(bitwarden) in the AppHost and then register the client in the consuming application:
builder.AddBitwardenSecretManagerClient("bitwarden");
The configuration section includes:
OrganizationIdProjectIdAccessTokenApiUrlIdentityUrlAuthCacheFile(optional) — path to the Bitwarden SDK auth cache file inside the app. Set viaWithAuthCacheFile(...)in the AppHost. Persist the auth session to a durable storage path to avoid re-authenticating on every app restart.
Usage
builder.AddBitwardenSecretManagerClient("bitwarden");
WebApplication app = builder.Build();
app.MapGet("/sync", (Bitwarden.Sdk.BitwardenClient client, BitwardenSecretManagerClientSettings settings) =>
{
var sync = client.Secrets.Sync(settings.OrganizationId, null);
return Results.Ok(sync.Data.Count);
});
Use AddKeyedBitwardenSecretManagerClient(...) when you need multiple Bitwarden clients in the same application.
Changes from Previous Version
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.