CommunityToolkit.Aspire.Bitwarden.SecretManager 13.4.0-preview.3

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:

  • OrganizationId
  • ProjectId
  • AccessToken
  • ApiUrl
  • IdentityUrl
  • AuthCacheFile (optional) — path to the Bitwarden SDK auth cache file inside the app. Set via WithAuthCacheFile(...) 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.

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