Repository navigation
Use public Aspire 17 parameter APIs for Bitwarden secrets - #2565
Merged
aaronpowell merged 4 commits intoNov 18, 2026
Merged
aaronpowell merged 4 commits into
aaronpowell merged 4 commits into
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 2565Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 2565" |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Managed-secret reconciliation can overwrite defaults or user-supplied values during deploy pre-sync or concurrent dashboard input, potentially persisting the remote value instead.
2 open issues
What changed in this PR
Migrates Bitwarden Secrets Manager to public Aspire 17 parameter APIs, removing private-access dependencies while keeping the AddSecret and GetSecret signatures unchanged. This addresses #2564 and prepares for the separate resource-output proposal in #1591.
Changes:
- Uses optional parameters for read-only secrets and public APIs for value inspection, assignment, and prompting.
- Pins Aspire Hosting 17.0.0 for the Bitwarden project and updates package-source mappings.
- Adds parameter-resolution tests and updates compatibility and architecture documentation.
| File | Description |
|---|---|
tests/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager.Tests/BitwardenSecretSourceResolutionTests.cs |
Adds coverage for prepared inputs, defaults, cancellation, and remote binding. |
tests/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager.Tests/BitwardenSecretManagerBuilderTests.cs |
Updates tests for asynchronous binding and explicit parameter assignment. |
src/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager/README.md |
Updates input precedence and Aspire compatibility documentation. |
src/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager/Extensions/ParameterResourceExtensions.cs |
Removes private-access helpers and compatibility logging. |
src/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager.csproj |
Pins Aspire Hosting 17.0.0 and updates hosting abstractions. |
src/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager/BitwardenSecretResource.cs |
Consolidates value reads through inherited parameter state. |
src/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager/BitwardenSecretManagerResource.cs |
Uses public parameter APIs for prompting, binding, and reset. |
src/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager/BitwardenSecretManagerProvisioner.cs |
Replaces private-state updates with public value setters. |
src/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager/BitwardenSecretManagerExtensions.cs |
Marks read-only secret parameters optional. |
src/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager/ASPIRE-INTERNALS.md |
Removes obsolete internal-API workaround documentation. |
src/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager/ARCHITECTURE.md |
Documents the public parameter model and prefill flow. |
nuget.config |
Allows Aspire Hosting resolution from both configured feeds. |
Review effort: Balanced
aaronpowell
approved these changes
Nov 18, 2026
Member
|
It's alright Copilot, I got you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #2564.
This PR moves the Bitwarden Secrets Manager integration off Aspire’s private parameter internals. Aspire 17 exposes public APIs for the parameter operations the integration used to access through
UnsafeAccessor.The integration lets an Aspire AppHost manage secrets for its services. For example, if a service needs an API key and you haven’t supplied one locally, the integration checks Bitwarden for a value it can reuse. Aspire may show a dashboard prompt during that lookup, so you can enter a replacement while the existing key is still on its way back.
Reviewing the migration surfaced two related cases worth correcting. A remote fallback could take precedence over a local value, and deployment could save a remote fallback as a local input. The PR makes local input take precedence and keeps remote fallbacks in memory for the deployment.
Mechanical changes
UnsafeAccessorcalls into Aspire parameter internals with the public Aspire 17 parameter APIs.Aspire.Hostingto 17.0.0 for the Bitwarden hosting project and update its hosting abstractions dependency.Previous behavior
New behavior
publishandbuildskip remote pre-sync.Aspire can still show the local dashboard prompt while Bitwarden checks for a remote value.
The resource-output overload is tracked in #1591.
Validation
Built the Bitwarden hosting project against Aspire 17.0.0 with zero warnings. All 82 Bitwarden hosting tests passed on
net10.0, including input submitted during lookup, edits during a write, headless recovery, and repeated deployments.Dogfooding
I published a package to my private NuGet feed that includes the changes in this PR. I tested it in a local Aspire 17 AppHost and through a staging CI/CD deployment. Local startup loaded existing managed secrets and started dependent services. The staging deployment completed Bitwarden reconciliation and passed its health checks.
https://nuget.sliekens.dev/packages/communitytoolkit.aspire.hosting.bitwarden.secretmanager/17.0.0-bitwarden.20261118.2