Repository navigation
Project Radius backing resource connections from recipe outputs, and upgrade to Radius 0.60 - #19253
Nell Shamrell-Harrington (nellshamrell) wants to merge 19 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19253Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19253" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Fixes Radius backing-resource connections by projecting recipe-provided endpoints and credentials into consumer environments.
Changes:
- Adds recipe-output connection projection and credential handling.
- Adds cross-environment diagnostics and URI escaping.
- Expands unit, snapshot, and deployment coverage.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
tests/Aspire.Hosting.Radius.Tests/Snapshots/LegacyFallbackEmissionTests.UdtOnly_DoesNotEmitLegacyParents.verified.bicep |
Updates PostgreSQL UDT output. |
tests/Aspire.Hosting.Radius.Tests/Snapshots/LegacyFallbackEmissionTests.MixedLegacyAndUdt_EmitsBothParentPairs.verified.bicep |
Updates mixed-resource output. |
tests/Aspire.Hosting.Radius.Tests/Snapshots/LegacyFallbackEmissionTests.LegacyAndUdt_ShareResourceNameAndUseDistinctParents.verified.bicep |
Updates shared-name output. |
tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceValueResolutionTests.UserNameParameter_IsProjectedFromRecipeOutputs.verified.bicep |
Covers username projection. |
tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceProjectionTests.LegacyBackingResource_DoesNotLeakAspireGeneratedPasswordParameter.verified.bicep |
Verifies password secrecy. |
tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceProjectionTests.DirectEndpointPropertyReference_ProjectsRecipeOutputs.verified.bicep |
Covers direct endpoint properties. |
tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceProjectionTests.CallbackRenamingBackingResource_RewiresProjectedEnvironmentValues.verified.bicep |
Covers callback renaming. |
tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceProjectionTests.AllBackingResourceTypes_ProjectRecipeOutputs.verified.bicep |
Covers all backing types. |
tests/Aspire.Hosting.Radius.Tests/ResourceMapping/ResourceTypeMapperTests.cs |
Updates SQL Server mapping tests. |
tests/Aspire.Hosting.Radius.Tests/RecordingLogger.cs |
Adds diagnostic capture helper. |
tests/Aspire.Hosting.Radius.Tests/Publishing/BicepGenerationMultiResourceTests.cs |
Updates SQL Server assertion. |
tests/Aspire.Hosting.Radius.Tests/Publishing/BackingResourceValueResolutionTests.cs |
Tests value and credential resolution. |
tests/Aspire.Hosting.Radius.Tests/Publishing/BackingResourceProjectionTests.cs |
Tests recipe-output projection. |
tests/Aspire.Hosting.Radius.Tests/Publishing/BackingResourceContractTests.cs |
Tests mapping/schema contracts. |
tests/Aspire.Cli.EndToEnd.Tests/RadiusDeployTests.cs |
Adds PostgreSQL deployment validation. |
src/Aspire.Hosting.Radius/ResourceMapping/ResourceTypeMapper.cs |
Maps SQL Server to legacy Radius type. |
src/Aspire.Hosting.Radius/ResourceMapping/RadiusResourceTypes.cs |
Corrects SQL Server type constants. |
src/Aspire.Hosting.Radius/README.md |
Documents projections and diagnostics. |
src/Aspire.Hosting.Radius/RadiusEnvironmentResource.cs |
Rejects underivable backing endpoints. |
src/Aspire.Hosting.Radius/RadiusBackingResourceEndpointException.cs |
Adds public endpoint exception. |
src/Aspire.Hosting.Radius/Publishing/RadiusUnresolvableValueException.cs |
Narrows skippable resolution failures. |
src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureBuilder.cs |
Implements connection projection logic. |
src/Aspire.Hosting.Radius/Publishing/RadiusBackingConnections.cs |
Defines backing-resource schemas. |
src/Aspire.Hosting.Radius/Publishing/Constructs/RadiusResourceTypeConstruct.cs |
Adds UDT credential properties. |
88d96d3 to
1c8fa2e
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Suppressed comments (2)
src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureBuilder.cs:1462
- This structural match also classifies a separately authored expression as an injected connection property. For example,
WithEnvironment("ADMIN_PASSWORD", ReferenceExpression.Create($"{shared}"))has the sameValueExpressionas the backing resource'sPasswordproperty, sosharedis replaced by the recipe secret butResolveParameterPartreceives the credential owner and suppresses the promisedASPIRERADIUS070warning. Track provenance for the actual splatted values rather than inferring ownership solely from expression text.
foreach (var (_, connectionProperty) in withConnectionString.GetConnectionProperties())
{
if (string.Equals(connectionProperty.ValueExpression, valueExpression, StringComparison.Ordinal))
{
return credentialOwner;
src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureBuilder.cs:2045
- A database child is not the registered credential owner; its parent server is. Here the child connection string is resolved with the child as provenance, and child-specific splatted expressions also fail the parent-only structural match above. For
MongoDBDatabaseResource, both paths expand the parent's password directly, so a normalWithReference(database)is misreported as an unrelated credential use underASPIRERADIUS070. Normalize child provenance to the parent and recognize connection properties originating from its database children.
// The credential parameters inside a backing resource's own connection string are
// exactly the ones the substitution is meant to rewrite, so the referenced resource
// becomes the context here — otherwise every consumer of `.WithReference(cache)`
// would be reported as an unrelated use of the cache's own password.
await ResolveEnvPartsAsync(connectionStringReference.Resource.ConnectionStringExpression, owner, parts, connectionStringReference.Resource, allowRecipeSubstitutions).ConfigureAwait(false);
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Suppressed comments (3)
src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureBuilder.cs:1463
- Matching only
ValueExpressionconflates value equality with provenance. An unrelated environment value such asReferenceExpression.Create($"{shared}")has the same expression as a backing resource's password connection property, so this returns the credential owner and suppresses theASPIRERADIUS070warning even thoughsharedis then replaced with that resource's recipe secret. Track which values were injected byWithReferenceinstead of treating every structurally identical expression as originating from the backing resource.
foreach (var (_, connectionProperty) in withConnectionString.GetConnectionProperties())
{
if (string.Equals(connectionProperty.ValueExpression, valueExpression, StringComparison.Ordinal))
{
return credentialOwner;
}
tests/Aspire.Cli.EndToEnd.Tests/RadiusDeployTests.cs:254
- This test installs KinD and the Radius control plane, pulls network artifacts, and allows a 20-minute deployment, so running it as a normal
[Fact]puts a resource-intensive outer-loop scenario in the regular test suite. Mark it withOuterloopTest, as other network/container installation tests in this project do (for examplePodmanDeploymentTests.cs:21).
[Fact]
[CaptureWorkspaceOnFailure]
src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureBuilder.cs:2069
IManifestExpressionProvideris not a reliable marker for “only known after another deployment.” For example,StaticValueProvider<T>andContainerImageReferencealso implement it and can throwInvalidOperationExceptionfor genuine invalid state. Those failures still reach this filter, are misreported as deferred deployment values, and cause the environment variable to be omitted instead of failing publication. Gate this on an explicit deferred-deployment contract rather than the general manifest-expression interface.
catch (InvalidOperationException ex) when (value is IManifestExpressionProvider manifestExpressionProvider)
{
| RadiusResourceTypes.SqlServerDatabases, | ||
| RadiusResourceTypes.RadiusApiVersion, | ||
| RadiusResourceTypes.LegacySqlDatabases, | ||
| RadiusResourceTypes.LegacyApiVersion), |
There was a problem hiding this comment.
You are right that the database is not created. I dug into the recipe: Applications.Datastores/sqlDatabases takes a database parameter and only echoes it back into its outputs — the workload it deploys is a SQL Server container with the sa login and nothing that runs CREATE DATABASE. So a referenced AddSqlServer("sql").AddDatabase("appdb") was handing the consumer a connection string naming a database the deployment does not contain, silently.
Publishing now warns (0831627), scoped to referenced database children so an inert AddDatabase(...) stays quiet, matching the ASPIRERADIUS072 precedent. Also documented as a known limitation.
I chose warn over fail for three reasons, and I am open to being overruled on any of them:
- The publisher cannot fix it. There is no
databaseinput the recipe would honour and no post-deploy hook to run DDL. - Remapping to a type that could create it is not available.
Radius.Data/sqlServerDatabasesexists in resource-types-contrib, butghcr.io/radius-project/kube-recipes/sqlserverdatabasesreturns 403 — no published Kubernetes recipe, unlikepostgresqldatabaseswhich has one. So the SQL equivalent of the Postgres path does not exist yet. - Failing would break models that work today. An app using EF Core
Migrate()/EnsureCreated(), orsaconnecting tomaster, deploys fine against this recipe. Turning that into a publish error is a regression for them with no workaround short of removingAddDatabase.
If you would rather this be hard-fail I will make it one — it is a small change (the warning site is already scoped correctly) but it needs an escape hatch, and I did not want to add public API speculatively.
James Newton-King (JamesNK)
left a comment
There was a problem hiding this comment.
Three correctness issues should be addressed before merge: the generated PostgreSQL artifacts cannot use the standard Aspire deploy path, unresolved non-HTTP endpoint values can now abort publishing, and metadata-only backing endpoint properties regress across compute environments. I also left one documentation correction for RabbitMQ. The existing open PostgreSQL database-default and SQL Server child-database threads remain applicable.
| await ResolveEnvPartsAsync(rawValue, resource, parts, ResolveEnvValueProvenance(rawValue, resource)).ConfigureAwait(false); | ||
| } | ||
| catch (InvalidOperationException ex) | ||
| catch (RadiusUnresolvableValueException ex) |
There was a problem hiding this comment.
This narrowing regresses the unavailable-endpoint case the old catch explicitly handled. For a non-backing container with an unallocated non-HTTP endpoint, ResolveEndpointUrl reaches GetDefaultPort, which throws a plain InvalidOperationException; that now aborts the entire publish instead of omitting the unresolved environment variable. Wrap the known endpoint-resolution failure in RadiusUnresolvableValueException at ResolveEndpointUrl / ResolveEndpointProperty so genuine errors still propagate while this supported publish-time omission remains intact, and add a regression test for an unallocated tcp endpoint.
There was a problem hiding this comment.
I went looking for the test and could not make the throw fire, so I traced it instead — I think the branch is unreachable, and I would rather say so than add a test that passes for the wrong reason.
ResolveServicePort runs before GetDefaultPort and delegates to ResourceExtensions.ResolveEndpoints, whose fallback arm is _ => ResolvedPort.Allocated(portAllocator.AllocatePort()) (ResourceExtensions.cs:857). An endpoint with no port declared still resolves to an allocated one, so a portless non-HTTP endpoint never reaches GetDefaultPort. The single case where ResolveServicePort returns null is a projects synthetic default HTTPS endpoint (RadiusServiceDiscovery.cs:118-124), and httpsis one of the schemesGetDefaultPort` answers (443).
I added the regression test anyway, since the reachability argument is only as good as the call graph today: PortlessNonHttpEndpoint_IsResolvedRatherThanOmitted builds a portless tcp endpoint and asserts it emits an allocated port rather than throwing. It passes. If you would still rather the throw not exist at all I am happy to replace it with a Debug.Assert, but I did not want to change behaviour on an unreachable path without your call.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Suppressed comments (2)
src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureBuilder.cs:2052
- Resolve credential ownership through the emitted parent here. For a legacy database child such as
AddSqlServer(...).AddDatabase(...), the recipe credential is registered to the server, but this passes the child asreferencedResource;ResolveParameterParttherefore emits anASPIRERADIUS070“unrelated use” warning for the child's legitimate connection string. Classifying the child by its parent avoids the false warning.
bool IsNumeric)
src/Aspire.Hosting.Radius/RadiusBackingResourceEndpointException.cs:58
- This public constructor throws
ArgumentNullExceptionwhenresourceis null, but the XML documentation omits that exception. Public API exception behavior should be documented for IntelliSense.
/// <param name="resource">The backing resource whose address could not be determined.</param>
/// <param name="message">The message that describes the error.</param>
public RadiusBackingResourceEndpointException(IResource resource, string message)
| switch (schema.Credentials) | ||
| { | ||
| case RadiusBackingConnections.RadiusCredentialMode.ListSecrets(var passwordSecret): | ||
| ApplyListSecretsCredentials(resource, withConnectionString, construct, schema, passwordSecret); |
There was a problem hiding this comment.
This is the same concern as the earlier thread on the SQL Server → legacy recipe mapping, where I have left a detailed reply. Keeping the discussion in one place rather than answering twice — please follow it there. Leaving this thread open until that one is settled, since the resolution will be the same for both.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated no new comments.
Suppressed comments (2)
src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureBuilder.cs:2204
- A conditional expression whose condition is a deployment-time value still fails the entire publish here. For example, a
BicepOutputReferenceused asConditionthrowsInvalidOperationExceptionbefore its deployment has run, but this call bypasses theIManifestExpressionProviderconversion inResolveEnvPartsAsync, so the environment-variable loop never receivesRadiusUnresolvableValueExceptionand cannot omit the variable with the documented warning. Resolve conditions through an equivalent marker-gated path while preserving the rule that unrelated nestedInvalidOperationExceptions must still fail publication.
var conditionContext = new ValueProviderContext { ExecutionContext = _executionContext, Caller = owner };
var conditionValue = await expression.Condition!.GetValueAsync(conditionContext, _cancellationToken).ConfigureAwait(false);
src/Aspire.Hosting.Radius/RadiusBackingResourceEndpointException.cs:58
- The new public constructor throws when
resourceis null, but its XML documentation omits that exception. Documenting thrown exceptions is required for public APIs so IntelliSense accurately describes the contract.
/// <param name="resource">The backing resource whose address could not be determined.</param>
/// <param name="message">The message that describes the error.</param>
public RadiusBackingResourceEndpointException(IResource resource, string message)
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated no new comments.
Suppressed comments (2)
src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureBuilder.cs:1548
- This structural match can suppress the new ASPIRERADIUS070 warning for an unrelated use. For example,
WithEnvironment("ADMIN_PASSWORD", ReferenceExpression.Create($"{shared}"))has the sameValueExpressionas the backing resource'sPasswordconnection property, so this method attributes it to the backing resource and the consumer silently receives the recipe secret without the promised warning. Equality of values does not establish provenance; preserve explicit injection metadata or otherwise distinguish connection-property injection from an independently authored expression.
foreach (var (_, connectionProperty) in withConnectionString.GetConnectionProperties())
{
if (string.Equals(connectionProperty.ValueExpression, valueExpression, StringComparison.Ordinal))
{
return credentialOwner;
tests/Aspire.Hosting.Radius.Tests/Publishing/BackingResourceContractTests.cs:190
- This helper intentionally leaves both the test builder and the built
DistributedApplicationundisposed for every theory invocation. Building initializes a service provider that owns disposable services; the returned resource objects do not require that provider to remain alive. Dispose both objects after materializing the endpoint annotations to avoid accumulating test resources.
// Build so endpoint annotations are materialized; the builder is intentionally not disposed
// here because the returned resources outlive it and hold no disposable state.
_ = builder.Build().Services.GetRequiredService<DistributedApplicationModel>();
Fixes the findings from the code-review, hosting-integration-authoring and architecture reviews of the backing-resource projection change. Error handling. The env-var loop's `catch (InvalidOperationException)` was positional rather than structural: it silently dropped every value produced by an Azure Bicep output, at Debug level, because that is the type `BicepOutputReference.Value` happens to throw. The two conditions the publisher genuinely means to skip -- a value only knowable after another deployment, and a reference to an endpoint the target does not declare -- are now raised as `RadiusUnresolvableValueException` and logged at Warning; everything else fails the publish. Exception contract. `RadiusBackingResourceEndpointException` is now public and lives in `Aspire.Hosting.Radius`, because it reaches authors using the Kubernetes, Container Apps and App Service publishers through the shared endpoint resolver. Its message is written for that audience. Schema table. The `(string? PasswordSecret, bool TakesCredentialRecipeParameters)` pair could express "credential handled by neither mechanism" -- the shape of the bug this change fixes -- so it is replaced by a closed credential mode. Radius types with no verified schema are removed rather than left to project values that may not exist, and a test fails if an emitted type has no entry. Credentials. A user name supplied as a parameter is now projected from the recipe's output like the password already was, so the connection string no longer names a user the recipe never created. Replacing a credential the AppHost author chose is reported, since its value never reaches the cluster. Databases. The multi-database failure is scoped to databases consumers actually reference; a server with no database child publishes with a warning. Recipe inputs are resolved through a substitution-free path so a recipe cannot be fed its own output, and are rebuilt when a `ConfigureRadiusInfrastructure` callback swaps the construct they target. URI escaping. Values a reference expression marked as URI components are emitted as `uriComponent(...)`, so a recipe-generated password containing `@` or `/` cannot corrupt the URI it is placed in. Co-authored-by: Copilot <[email protected]> Copilot-Session: b3bee2e4-d5fd-4325-a4e7-090e4598c5e1
The exception is the one piece of public API this change introduces, and catching it is the whole reason it is public, so show that. Co-authored-by: Copilot <[email protected]> Copilot-Session: b3bee2e4-d5fd-4325-a4e7-090e4598c5e1
Address the second round of review feedback on the Radius backing resource projection: - Credentials for Radius.* resource types are now written to the required top-level schema properties (username/password/database) instead of properties.recipe.parameters. The resource type manifests in radius-project/resource-types-contrib declare these as required properties and the recipes read them via context.resource.properties.<name>, so the previous shape would have failed schema validation at deploy time. - Point Radius.Data/postgreSqlDatabases at ghcr.io/radius-project/kube-recipes/postgresqldatabases:latest. The recipes/local-dev/postgresqldatabases artifact is not published. - Only skip an environment variable when the failing value provider is an IManifestExpressionProvider, so an InvalidOperationException from an arbitrary provider fails the publish instead of silently dropping the variable. - Add a KinD deployment end-to-end test that deploys a Radius Postgres backing resource and verifies the projected connection information. - Fix stale test class and method references in docs, and scope the README credential-replacement warning to legacy Applications.* resources. Co-authored-by: Copilot <[email protected]> Copilot-Session: 62ae7028-e315-4b1d-9d85-e7b58bc1e1f0
rad install kubernetes registers only the built-in namespaces, and the pinned bicep extension does not carry Radius.Data/postgreSqlDatabases, so the resource compiled to a classic ARM resource and the deployment engine routed it to the Azure provider. Register the type with the control plane and import a locally published extension so the type is deployable, then deploy the published artifacts directly and assert the password projected into the consumer both matches the parameter and authenticates. Co-authored-by: Copilot <[email protected]> Copilot-Session: 62ae7028-e315-4b1d-9d85-e7b58bc1e1f0
- Map SqlServerServerResource to the legacy Applications.Datastores/sqlDatabases type with a listSecrets() projection. Radius.Data/sqlDatabases is not a real UDT (contrib defines Radius.Data/sqlServerDatabases) and its kube recipe is not published, so the emitted type could not resolve at deploy time. - Reject a parameter used as both the user name and the password of one backing resource. Substitutions are keyed by parameter identity, so the later user name assignment silently overwrote the password projection. - Register user-name parameters as recipe credentials on the schema-property path so sharing one with a listSecrets()-substituted resource is caught, and unwrap nested pass-through ReferenceExpressions when extracting a credential parameter (PostgreSQL exposes its user name that way). - Fail the publish when several databases are declared and none is referenced through WithReference, instead of picking the first child; a WithEnvironment callback consumer records no annotation, so the choice cannot be proven. Co-authored-by: Copilot <[email protected]> Copilot-Session: d532fd9b-ea31-4f3e-afa0-2511df99b0ba
The secret-store work that landed on main claimed ASPIRERADIUS061-068, which collided with the 060-065 range this branch used for backing-resource projection. Move the backing-resource codes to the free 069-074 range so each diagnostic still identifies exactly one condition. Co-authored-by: Copilot <[email protected]> Copilot-Session: d532fd9b-ea31-4f3e-afa0-2511df99b0ba
Detect unrelated uses of a substituted credential parameter where the substitution is actually applied, during environment resolution, instead of by pre-scanning ResourceRelationshipAnnotations. The pre-scan could not see a parameter that only appears inside an EnvironmentCallbackAnnotation lambda, so that form silently received another resource's recipe secret. Values splatted from a referenced resource's own connection properties are matched back to their owner by manifest expression so they are not reported. Convert a numeric projection to a string before applying a string format in the composite-expression path. A `:uri`-formatted Radius port previously emitted uriComponent(resource.properties.port), which fails Bicep type checking; the lone-projection path already did the conversion. Name ASPIRERADIUS070 in the unrelated-use warning so it can be mapped to the diagnostics table, and reject one parameter used as both the user name and the password on the RecipeInputProperties path. RegisterRecipeCredential only rejects sharing across different owners, so PostgreSQL previously published successfully despite the documented restriction. Correct the Radius Postgres deploy E2E comment: `database` is optional in the pinned manifest and defaults to postgres_db. Co-authored-by: Copilot <[email protected]> Copilot-Session: d532fd9b-ea31-4f3e-afa0-2511df99b0ba
A conditional ReferenceExpression carries an empty Format and exposes the union of both branches' value providers. The publisher's splice therefore resolved both branches — which can fail the publish on the inactive one — and then appended no parts, emitting the environment variable as an empty string. Select the branch first, matching ReferenceExpression.GetValueAsync and ExpressionResolver.EvalExpressionAsync. Co-authored-by: Copilot <[email protected]> Copilot-Session: d532fd9b-ea31-4f3e-afa0-2511df99b0ba
…back, README Narrows the ASPIRERADIUS069 backing-resource guard to address properties only. Scheme and TlsEnabled are read from the endpoint declaration and describe no address, so a Radius-owned backing resource can answer them; rejecting them broke Kubernetes/ACA/App Service consumers that ask only for the scheme. Only Port and TargetPort need an explicit guard - the other four address properties reach it through GetHostAddressExpression via the lazy host. Service-port resolution is now lazy because it allocates a port as a side effect. Emits the user name as the Postgres 'database' property when a server declares no AddDatabase(...) child. The server-level connection string carries no database name, so clients default it to the user name while the recipe would have defaulted to postgres_db - a consumer with a custom user opened a database the recipe never created. Corrects the README claim that legacy rabbitMQQueues is undeployable because Aspire omits 'queue'. The property is optional and the built-in recipe defaults it to the Radius resource name. Adds a regression test for a portless non-HTTP endpoint, confirming the narrowed catch in the container environment loop does not drop the variable. Co-authored-by: Copilot <[email protected]> Copilot-Session: 75005945-442c-4e01-bcb8-130f4d6cd1cd
…erequisites
The legacy Applications.Datastores/sqlDatabases recipe takes a `database`
parameter but only echoes it back: the workload it deploys is a SQL Server with
the `sa` login and nothing that runs CREATE DATABASE. AddDatabase(...) creates
the database in run mode only, so a referenced AddSqlServer("sql").AddDatabase
("appdb") handed the consumer a connection string naming a database the
deployment does not contain, with nothing in the output to explain it.
Publishing now warns, scoped to *referenced* database children so an inert
AddDatabase(...) stays silent (matching the ASPIRERADIUS072 precedent). It is a
warning rather than a failure because the publisher cannot provision the
database, the contrib Radius.Data/sqlServerDatabases type that could has no
published Kubernetes recipe, and models whose application creates its own
database (EF Core Migrate/EnsureCreated) deploy successfully today.
Also documents that the PostgreSQL type registration steps are prerequisites
rather than conveniences: against Radius 0.59, a model containing AddPostgres
cannot be deployed by `aspire publish` + `aspire deploy` alone. Radius 0.60
carries Radius.Data/postgreSqlDatabases in the pinned Bicep extension and
registers it by default, so both steps - and the E2E's artifact patching -
disappear once the pinned extension version moves to 0.60.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 75005945-442c-4e01-bcb8-130f4d6cd1cd
… create A consumer that references a PostgreSQL server rather than one of its databases receives a connection string with no database name, so it opens the client's default - the database named after the user - while the recipe creates the AddDatabase(...) child instead. Run mode hides the mismatch because the Postgres image creates a database named after POSTGRES_USER alongside the ones Aspire creates per child, but a recipe provisions exactly one, so the reference is left pointing at a database that will not exist. Warns rather than failing, and leaves the child selection alone: the existing ASPIRERADIUS072 failure exists to protect consumers composed through a WithEnvironment callback, which record no reference annotation, and picking the user name here instead would silently break them. Also corrects the Radius 0.60 notes. Both the README and the E2E comment implied 0.60 makes a PostgreSQL model deploy untouched; it removes the Bicep extension and type registration steps, but the type is still absent from the default Kubernetes recipe pack (resource-types-contrib#276), so a recipe registration is still required. Co-authored-by: Copilot <[email protected]> Copilot-Session: 75005945-442c-4e01-bcb8-130f4d6cd1cd
- Redis: the local-dev recipe deploys an unauthenticated server and emits no `secrets` output, so `listSecrets().password` would fail at deploy time. Model it as a new `NoCredential` credential mode that projects an empty password and warns with ASPIRERADIUS075. - Fail the publish (ASPIRERADIUS076) if a recipe input schema does not accept the credential properties we must supply, and fall back to schema-property assignment when the password is not a bare parameter. - Only throw for multiple unreferenced databases when the model actually has a resource that could have consumed one. - Reject secondary endpoints explicitly (ASPIRERADIUS077) instead of silently projecting them, and split the endpoint diagnostics into 071/077/079 so the failure mode is identifiable. - Resolve conditional ReferenceExpression conditions without declaring unused Bicep parameters; surface unresolvable conditions as ASPIRERADIUS078 and skip just that variable. - Make the RadiusResourceTypeConstruct credential properties internal and document why; add the inner-exception constructor to RadiusBackingResourceEndpointException. - Document the listSecrets()/@secure() trade, the Redis limitation, and the new diagnostics in the README. - E2E: pass the Postgres password through an owner-only ARM parameters file rather than the command line, and align the psql retry budget with the wait timeout. Co-authored-by: Copilot <[email protected]> Copilot-Session: e3a1574a-b750-4a9c-afb0-d952485d6b73
Structural equality of a ReferenceExpression does not establish where the
value came from: an AppHost author can build the same expression, and
`ReferenceExpression.Create($"{shared}")` renders identically to the
owner's `password` connection property when `shared` is that parameter.
Treating equal values as proof of origin suppressed ASPIRERADIUS070 for
exactly the case it exists to report - a user's value silently replaced
by the recipe credential.
Provenance is now taken from the name the connection-property splat
produces for a reference the resource actually declares. The connection
name can be aliased and `WithReference` records the override nowhere, so
the alias is recovered from the `ConnectionStrings__<name>` entry the
same call injects - keeping an aliased reference attributable without
accepting an arbitrary prefix. The value is still compared, as a second
condition rather than the only one.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: e3a1574a-b750-4a9c-afb0-d952485d6b73
Scheme and TlsEnabled describe the container Aspire would have run locally, while the recipe decides what the deployed workload speaks - and no mapped Radius type publishes a transport-security output. `local-dev/rediscaches` starts plain Redis on 6379, so a TLS-enabled endpoint emitted `rediss://` and `ssl=true` against a plaintext server: a run-time handshake failure that points at neither the recipe nor the AppHost. Unlike a credential the recipe overrides, there is no value here that becomes correct at deploy time, so this fails the publish with ASPIRERADIUS081 rather than warning. Only the properties carrying the decision are rejected (Scheme, TlsEnabled, and Url, which embeds the scheme); Host, Port, and HostAndPort still project, since the address is right regardless of transport. Replaces the previously documented "TLS is read from the Aspire model" limitation in the README. Co-authored-by: Copilot <[email protected]> Copilot-Session: e3a1574a-b750-4a9c-afb0-d952485d6b73
…rences
Two related changes to the Radius publisher.
Radius 0.60 renames the recipe-pack properties `recipeKind`/`recipeLocation`
to `kind`/`source`. The API server silently drops unknown fields, so the old
spelling produces an empty recipe pack with no publish error and no deploy
failure — only a real cluster surfaces it. The rename ships together with the
version pins for that reason. Also on 0.60: Redis and RabbitMQ move off the
legacy `Applications.*` portable types onto their `Radius.*` UDTs, the
RabbitMQ type is `Radius.Messaging/rabbitMQ` (not `rabbitMQQueues`), and
credentials that a UDT consumes by resource ID are carried by a new
`Radius.Security/secrets` resource. The legacy `Applications.Core/environments`
shape is deliberately not renamed — it still uses `templateKind`/`templatePath`.
RabbitMQ now requires an explicit user name (ASPIRERADIUS082). The 0.60 schema
restricts `guest` to loopback connections, so a broker provisioned with the
Aspire default would reject every workload pod, and a default user name reaches
the publisher as literal text inside the connection string with no value to
rewrite — so the broker and the connection string cannot be made to agree.
Separately, container environment variables were always emitted as
`env: { NAME: { value: ... } }`. Routing a credential through an `@secure()`
Bicep param keeps it out of the published artifact, but the resolved string
still lands in the Kubernetes Deployment spec and its rollout history, readable
by anyone with `get deployment` in the namespace. Credential-bearing values are
now emitted as `valueFrom.secretKeyRef` against a per-container
`Radius.Security/secrets` resource.
The whole composed expression moves into the secret rather than the container
referencing a secret-backed fragment through kubelet's `$(VAR)` expansion.
Aspire applies per-fragment percent-encoding via Bicep `uriComponent()` at
deploy time, whereas `$(VAR)` substitutes at pod start — a password containing
`@`, `:` or `/` would silently corrupt a connection string. Keeping composition
in Bicep preserves the escaping exactly.
`Radius.Security/secrets` is recipe-backed, so emitting one obliges the pack to
carry its recipe. The pack is built before container environments are resolved,
so registration is reconciled afterwards (and again after callbacks, which can
add a secret of their own) rather than pre-scanned — resolving an environment
runs the resource's environment callbacks, and a pre-pass would run every user
callback twice.
New diagnostics: ASPIRERADIUS082 (RabbitMQ `guest` user name), ASPIRERADIUS083
(credential in a variable whose name is not a valid Kubernetes secret key), and
ASPIRERADIUS084 (a ConfigureRadiusInfrastructure callback removed a secret, or
a key, that a container reads a credential from).
The KinD end-to-end test now asserts the `secretKeyRef` shape, that the
plaintext is absent from the Deployment JSON, and that the pod process actually
receives the value. It could not be run locally; CI must prove it.
Co-authored-by: Copilot <[email protected]>
Three review threads. `IComputeEnvironmentResource.GetEndpointPropertyExpression` answered Scheme, TlsEnabled and Url off the local EndpointAnnotation for a backing resource, so a Kubernetes/ACA/App Service consumer could be told `rediss`/`TlsEnabled=True` for a broker whose Radius recipe provisions plaintext transport — the same mismatch the publisher already rejects as ASPIRERADIUS081. The guard now runs on this path too, scoped to TLS-enabled endpoints, since no mapped Radius type publishes a transport-security output for the value to be derived from. `ToSecretKey` validated Kubernetes Secret data keys with a bare `[-._a-zA-Z0-9]+` character class, which accepts keys longer than 253 characters as well as `.`, `..` and `..`-prefixed names — all rejected by the API server. It now reuses `KubernetesName.IsValidSecretDataKey`, which already carries the complete contract, so an invalid key fails at publish time rather than when the Secret reaches the cluster. The PostgreSQL deployment test read `APPDB_PASSWORD` from `.value`, but credential-bearing variables are now published as `valueFrom.secretKeyRef`, so that read yields an empty password and psql would fail as an authentication error. It resolves the referenced Secret name and key and decodes the value, matching the RabbitMQ test. Co-authored-by: Copilot <[email protected]>
The Radius deploy E2E failed with RecipeDownloadFailed for both
`ghcr.io/radius-project/kube-recipes/rediscaches:latest` and
`ghcr.io/radius-project/kube-recipes/rabbitmq:latest`: neither tag exists.
resource-types-contrib publishes an immutable `<sha>` tag on every push to
main, refreshes the floating `edge` tag alongside it, and moves `:latest` only
when a recipe ships in a stable release. Its own workflow documents `<sha>` as
"the tag Radius pins against". Both of these recipes post-date the last stable
release, so they have `edge` and SHA tags and no `:latest` — the reference
resolved to a 404, which the publisher cannot detect and which surfaces only
when the deployment engine tries to pull the recipe.
Both are now pinned to ebdeec95, the newest publish carrying both recipes
("Make RabbitMQ password optional"), which is byte-identical to `edge` today:
the manifest digests match for both repositories. `edge` itself is not usable
here because it floats, and an artifact must keep deploying the recipe it was
published against. The other types keep `:latest`, which resolves for them.
Documented in the README as a known limitation, since the SHA is visible in
the recipe pack the publisher emits.
Co-authored-by: Copilot <[email protected]>
…d stale comments - Drop the Radius.Data/mongoDatabases row from s_defaultRecipeTemplates: it pointed a UDT at a legacy recipes/local-dev/ recipe, which both fails to pull and ignores the credentials Aspire sets. LegacyMongoDatabases is what the mapper emits, and its row already covers it. - Add EveryEmittedBackingType_HasADefaultRecipeWithAMatchingPrefix so the recipe table is held to the same contract as the connection-schema table: total over the emitted backing types, with each recipe prefix matching its namespace. That catches the Mongo pairing mechanically instead of by inspection. - Split setup from assertion in the no-plaintext-credential deploy check. `||` bound to the whole `&&` chain, so any setup failure short-circuited straight to the NOPLAINTEXT_OK marker and reported success without running the grep. - Cover ASPIRERADIUS086 (an unresolvable connection property fails the publish, unlike the container env-var skip) and pin ASPIRERADIUS080's code in the SQL database warning test. - Correct the sqlserverdatabases comment (the ghcr repo does not exist; it does not return 403) and the rabbitMQQueues -> rabbitMQ type name in the RadiusResourceTypeConstruct doc, and explain why the unreferenced legacy Redis and RabbitMQ constants are kept. Co-authored-by: Copilot <[email protected]>
9fc44bc to
b5f35ff
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 44 out of 45 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/Aspire.Hosting.Radius/Publishing/Constructs/ContainerEnvVarConstruct.cs:57
- This public construct documents
Valueand the secret-reference pair as mutually exclusive, but the API neither enforces that union nor provides a way to clear the representation already assigned by the publisher. A customization callback that changes a generated secret-backed variable by assigningValue, or changes a plain variable by assigningSecretName/SecretKey, emits both forms; the Radius container recipe then produces duplicate environment entries and may expose the plain value. Provide an atomic representation switch or validate/reject mixed and incomplete states after callbacks.
public BicepValue<string> SecretName
{
get { Initialize(); return _secretName!; }
set { Initialize(); _secretName!.Assign(value); }
}
Tests selector (audit mode)The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement. 3 / 102 test projects · 4 jobs, from 45 changed files. Selected test projects (3 / 102)
Selected jobs (4)
How these were chosen — grouped by what changed🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
|
Closing in favour of a fresh PR on the same branch — the discussion here had grown long enough to be hard to follow. No code changes; the same commits are up for review in the successor, and the two unsettled questions (SQL Server database children, and the endpoint-resolution guard) are carried over into its description. This thread stays here for the history. |
|
Superseded by #19555. |
Description
An Aspire app deployed to Radius could not talk to its own cache, database, or queue. Every connection value the app received was wrong, so
WithReferenceproduced a connection string that pointed nowhere and the app failed at startup.The cause is that a "backing" resource targeted at a Radius environment — Redis, PostgreSQL, MongoDB, SQL Server, RabbitMQ — is not deployed as a
Radius.Compute/containersworkload. It is provisioned by a Radius recipe. The recipe, not Aspire, decides the KubernetesServicename and generates the credentials. Aspire was still deriving the host, port, and password from its own endpoint model, so it emitted a container-shaped address likecache-cache.default.svc.cluster.localfor a Service the recipe had named something else, paired with a password the recipe never issued.Scope
This started as the connection-projection fix above and grew, in review, into four related changes. They are together because each one is required for the first to actually work end to end — a projected connection value is only correct if it names the right recipe, survives the deploy, and does not leak on the way:
Radius.*UDTsrecipePacksfields the publisher writes. The API server drops unknown fields instead of rejecting them, so the pre-0.60 spelling publishes and deploys cleanly while producing an empty recipe pack — every backing resource then fails to resolve a recipe. Correct projection onto a silently-empty pack is still a broken deployment.valueFrom.secretKeyRefASPIRERADIUS069–086)Items 2 and 3 landed together in a single commit (
a3a8ffbb0), because the secret carrier they both depend on —Radius.Security/secrets— is introduced by 0.60; reviewing that commit on its own covers both.User-facing behavior
Referencing a backing resource now works. Every value a consumer sees is projected from that resource's own Radius outputs:
ConnectionStrings__*,*_HOST,*_PORT,*_URI, service discovery)<resource>.properties.host/<resource>.properties.portApplications.*types (MongoDB, SQL Server)<resource>.listSecrets().password<resource>.properties.usernameRadius.*types (PostgreSQL, RabbitMQ)username/passwordschema properties, using the same secure Bicep parameter Aspire composes into the connection string, so both sides agree by construction. RabbitMQ takes its password as the resource ID of aRadius.Security/secretsresource rather than as a stringASPIRERADIUS075; one supplied explicitly fails the publish withASPIRERADIUS085Because the substitution happens on the underlying values rather than on formatted strings, connection strings, URIs, and the individual properties emitted by
WithReferenceall resolve consistently.Failures that were previously silent are now reported by name. The full set is
ASPIRERADIUS069–086, tabulated insrc/Aspire.Hosting.Radius/README.md; the ones most likely to change the outcome for an existing AppHost:ASPIRERADIUS069instead of emitting an unroutable address. This also surfaces from the Kubernetes, Azure Container Apps, and Azure App Service publishers, which resolve such references through the owning Radius environment.Scheme,TlsEnabled, orUrlfails withASPIRERADIUS081. No mapped Radius type publishes a transport-security output, so those values would describe how the resource runs locally (rediss://,ssl=true) against a server the recipe starts in plaintext.ASPIRERADIUS085rather than being dropped: the recipe deploys an unauthenticated server, and quietly downgrading an author's request for authentication is not a decision the publisher should make. A password Aspire generated is still dropped, with theASPIRERADIUS075warning.AddRabbitMQ(...)without an explicit user name fails withASPIRERADIUS082(see the 0.60 section below).AddSqlServer("sql").AddDatabase("appdb")warns withASPIRERADIUS080: the legacy SQL recipe echoes thedatabaseparameter into its outputs but never runsCREATE DATABASE, so the consumer was being handed a connection string naming a catalog the deployment does not contain.Radius 0.60 is now the minimum supported runtime
This is a breaking change for anyone deploying to Radius v0.59 or earlier, and the incompatibility is silent. v0.60 renamed the
Radius.Core/recipePacksfieldsrecipeKind/recipeLocationtokind/source. The Radius API server ignores fields it does not recognize rather than rejecting them, so deploying these artifacts to a v0.59 cluster produces an empty recipe pack with no publish error and no deploy error — and every backing resource then fails to resolve a recipe. There is no version negotiation available to soften this, so the package pins 0.60 and the README states the requirement up front.What the upgrade brings with it:
Radius.*UDTs (Radius.Data/redisCaches,Radius.Messaging/rabbitMQ— note: notrabbitMQQueues) and their legacyApplications.*fallbacks are gone. MongoDB, SQL Server, and the Dapr building blocks stay on the legacy types, because their UDT equivalents still have no published Kubernetes recipe.Radius.Security/secretsis the new carrier for credentials a UDT consumes by resource ID. RabbitMQ'spasswordproperty takes the resource ID of a secrets resource, not a password string.ASPIRERADIUS082). The 0.60 schema restrictsguestto loopback connections, so a broker provisioned with the Aspire default would reject every workload pod — and the default arrives at the publisher as literal text inside the connection string, with no value to rewrite, so the broker and the connection string cannot be made to agree.:latest.resource-types-contribmoves:latestonly on a stable recipe release and publishes an immutable<sha>tag on every push tomain— the tag its own workflow documents as "the tag Radius pins against". Both recipes post-date the last stable release, so:latestdoes not exist for either, and referencing it fails at deploy time withRecipeDownloadFailed.edgeis not usable either: it floats, and a generated artifact must keep deploying the recipe it was published against.Credentials reach containers as secret references
Container environment variables were previously always emitted as
env: { NAME: { value: ... } }. Routing a credential through an@secure()Bicep parameter keeps it out of the published artifact, but the resolved string still lands in the KubernetesDeploymentspec — readable by anyone withget deploymentin the namespace, and retained in the rollout history after a rotation.A value that carries a credential is now written to a
Radius.Security/secretsresource named<container>-env-secretand referenced by key:A value counts as credential-bearing if it is built from a secret parameter (
AddParameter(name, secret: true), and the passwords Aspire generates for backing resources) or from a recipe'slistSecrets()output. Everything else keeps its plainvalue, so the deployed spec stays readable. Because the variable name becomes a KubernetesSecretdata key, it is validated at publish time against the full API-server contract — 1–253 characters of[-._a-zA-Z0-9], and not.,.., or..-prefixed — instead of failing when the Secret reaches the cluster (ASPIRERADIUS083).User-facing usage
No API change is required — this is what an existing AppHost already looks like, and it now deploys correctly:
aspire publishnow emits, for the container:pg_passwordis the secure parameter Aspire also passes into the recipe, so the value the app receives and the value the recipe provisions are the same by construction. Where the same credential appears inside a URI it is escaped:The one new public API is the exception, so that a cross-environment reference can be caught by name:
Implementation notes
RadiusBackingConnectionsholds the type → connection-schema table. Its credential mode is a closed hierarchy (ListSecrets/RecipeInputProperties/NotProjected) so "credential handled by neither mechanism" — the exact shape of this bug — is unrepresentable, and a contract test fails if a newly mapped backing type has no schema entry.InvalidOperationExceptionbroadly. That was positional rather than structural; it is now narrowed to the conditions the publisher genuinely intends to skip, raised as an internalRadiusUnresolvableValueException. A value is only skipped when it is anIManifestExpressionProvider(a positive marker for "produced by another deployment") and it fails to resolve; anInvalidOperationExceptionfrom any other value provider now fails the publish rather than silently dropping the variable.Radius.*types are written to the resource type's top-level schema properties rather thanproperties.recipe.parameters. The manifests inradius-project/resource-types-contribdeclareusername/passwordas required properties and the recipes read them ascontext.resource.properties.<name>, so the recipe-parameter shape would have failed schema validation at deploy time.Radius.Data/postgreSqlDatabasesisghcr.io/radius-project/kube-recipes/postgresqldatabases:latest. Therecipes/local-dev/postgresqldatabasesartifact this originally pointed at is not published.ReferenceExpressionmarked as URI components are emitted as BicepuriComponent(...), so a recipe-generated password containing@or/cannot corrupt the URI it sits in.WithEnvironmentcallback records no reference annotation, so the choice cannot be proven.Applications.Datastores/sqlDatabasestype. The contrib UDT isRadius.Data/sqlServerDatabases(notsqlDatabases), and its Kubernetes recipe is not published — there is noghcr.io/radius-project/kube-recipes/sqlserverdatabasesrepository at all — so the legacy type, which has both a published recipe and alistSecrets()action, is the only deployable option today.ASPIRERADIUS070. Substitutions are keyed by parameter identity, so such a parameter could only ever be rewritten to one of the two values.ASPIRERADIUS069–086, documented insrc/Aspire.Hosting.Radius/README.mdalong with the known gaps (the default MongoDB user name cannot be projected,Radius.Messaging/rabbitMQcarries aqueueproperty Aspire has no concept of,uriComponentescaping differs cosmetically fromUri.EscapeDataString, and only a resource's primary endpoint is projectable).ASPIRERADIUS076fails the publish when the recipe's input schema does not accept the credential properties the resource requires, which previously produced a resource nothing could authenticate against.ASPIRERADIUS081TLS guard is enforced inRadiusEnvironmentResourcerather than only in the publisher, so a Kubernetes, Azure Container Apps, or App Service consumer that resolves a Radius-owned endpoint throughComputeEnvironmentEndpointResolvergets the same failure instead of a locally-derivedrediss/TlsEnabled=True.Host/Port/HostAndPortstill project — the address is right regardless of transport.connectionNamerecovered from theConnectionStrings__<name>entry the same call emits) rather than from value equality. A user-authored value identical to an injected property is still silently replaced by the recipe credential, so it is now reported instead of exempted.Validation
Aspire.Hosting.Radius.Tests: 546 passing, 0 failing (the count includes the secret-store tests that landed onmainwhile this branch was open). The new tests cover schema totality, the cross-publisher exception contract, the narrowed-catch conditions (both the skip and the fail-the-publish path), user-name projection, database scoping, the credential warnings, and URI escaping.DeployRadiusPostgresBackingResourceToKind, stands up KinD plus the Radius control plane, publishes an AppHost that references a Postgres backing resource, deploys the generated artifacts, and then reads the environment back off the deployed container and authenticates against the provisioned database withpsql. This is what surfaced the property-shape and recipe-source bugs above, which the Bicep snapshots could not catch.rad resource-type createplusrad bicep publish-extension) and to patch the published artifact, becauseRadius.Data/postgreSqlDatabaseswas absent from the Bicep extension at 0.59. Radius 0.60 ships the type in the pinned extension and registers it atrad install kubernetes, so all of that is gone: the test publishes and then runsaspire deployagainst the untouched artifacts, which is the path a user actually follows.DeployRadiusRedisAndRabbitMqBackingResourcesToKind, covers the two types whose 0.60 migration cannot be proven from a Bicep snapshot. RabbitMQ'spasswordtakes the resource ID of aRadius.Security/secretsresource, so only a real deployment shows that Radius dereferenced it and the broker enforces the projected credential. It also asserts the credential reaches the pod as asecretKeyRefand that the plaintext appears nowhere in the Deployment spec.Aspire.Hosting.Kubernetes.Tests269/269,Aspire.Hosting.Azure.Kubernetes.Tests63/63,Aspire.Hosting.Azure.Tests1645 passed / 5 skipped../build.shclean with 0 warnings.AutoVerifylocally.Security considerations
This change alters how credentials appear in generated deployment artifacts, so it is flagged for review even though the net effect is a reduction in exposure:
listSecrets(), or passed into the recipe as a secure parameter. No secret value is materialized into the generated file in either case.uriComponent(...). Recipe-generated passwords come from an alphabet the recipe chooses rather than Aspire's URL-safe generator, so an unescaped@,/, or:could previously have re-parsed the URI's authority section.listSecrets()is evaluated by the deployment engine, so the resolved secret is written into the consuming resource's Deployment spec (and is therefore readable by anything withget pod/get deploymentin the namespace, and by anyone who can read the deployment history that records the evaluated template output). The alternative - declaring the value@secure()- keeps it out of deployment history but requires the operator to supply it out of band, which defeats the point of a recipe that generates its own credential. The correct long-term shape is a secret reference so neither the artifact nor the Deployment spec carries the plaintext, and this PR now lands it: a container environment variable that carries a credential is published asvalueFrom.secretKeyRefagainst aRadius.Security/secretsresource named<container>-env-secret, rather than as an inlinevalue. Non-credential variables keep their plainvalue, so the deployed spec stays readable. Net: both the artifact-at-rest and the Deployment-spec exposure are reduced.secretsoutput at all, so no credential is projected. The generated connection string carries an empty password. A password Aspire generated is dropped with theASPIRERADIUS075warning; a password the AppHost author supplied fails the publish withASPIRERADIUS085, because silently downgrading an explicit request for authentication is a security decision the publisher should not make. This is the recipe's security posture, not a change introduced here - see the Known limitations section of the README.Fixes #18935
Checklist
<remarks />and<code />elements on your triple slash comments?