Skip to content

Replace Bitwarden's private Aspire parameter access with public Aspire 17 APIs #2564

Closed

Description

@sliekens

Related to an existing integration?

Yes. CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager.

Overview

The hosting integration uses four UnsafeAccessor calls into private members of ParameterResource and ParameterProcessor. These calls depend on Aspire's internal parameter state and can break when an Aspire upgrade changes those members.

Aspire 17.0.0 exposes public APIs for this work. Use optional parameters for existing secrets read from Bitwarden. Use Aspire's public parameter APIs to read current values, set resolved values, and prompt for required inputs. Preserve configured values, defaults, and remote prefill when a managed input is missing.

Usage example

Existing AppHost declarations stay the same. bitwarden.AddSecret("managed-key") declares a managed secret. bitwarden.GetSecret("existing-key") reads a secret from Bitwarden without prompting for a local value.

Breaking change?

Existing AppHost signatures stay the same. The hosting package requires Aspire 17.0.0 for the public parameter APIs.

Alternatives

Keep the private accessors and maintain them across Aspire releases.

Additional context

The public parameter APIs landed in microsoft/aspire#18108. This cleanup prepares the integration for the separate resource-output proposal in #1591.

Help us help you

Yes, I'd like to be assigned to work on this item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions