CommunityToolkit.Aspire.Bitwarden.SecretManager 13.3.1-preview.2
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.
No packages depend on CommunityToolkit.Aspire.Bitwarden.SecretManager.
.NET 10.0
- Bitwarden.Secrets.Sdk (>= 1.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.7)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.7)
.NET 8.0
- Bitwarden.Secrets.Sdk (>= 1.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.7)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.7)
.NET 9.0
- Bitwarden.Secrets.Sdk (>= 1.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.7)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.7)
| Version | Downloads | Last updated |
|---|---|---|
| 13.4.0-preview.3 | 51 | 06/06/2026 |
| 13.3.1-preview.2 | 15 | 05/31/2026 |
| 13.3.1-preview.1 | 1 | 05/31/2026 |