Repository navigation
Add Azure Connector Namespace integration - #19024
Eric Erhardt (eerhardt) merged 140 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 -- 19024Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19024" |
There was a problem hiding this comment.
🔵 Human review recommended
Security-sensitive preview provisioning has unresolved correctness issues, lacks formal security/API review, and still depends on unmerged prerequisite work.
Pull request overview
Adds preview Azure Connector Namespace support to the Azure Container Apps Sandboxes integration, including secure triggers, MCP configuration, provisioning, and TypeScript exports.
Changes:
- Models Connector Namespace resources, policies, connections, MCP servers, and triggers.
- Extends sandbox deployment with image inspection, endpoint authorization, and late provisioning.
- Adds C#, TypeScript, snapshot, and deployment test coverage.
File summaries
| File | Description |
|---|---|
.github/workflows/deployment-tests.yml |
Gates sandbox deployment tests. |
Aspire.slnx |
Registers the new project. |
src/Aspire.Hosting.Azure.Sandboxes/Aspire.Hosting.Azure.Sandboxes.csproj |
Defines the integration package. |
src/Aspire.Hosting.Azure.Sandboxes/AzureConnectorGatewayConnectionAccessPolicyResource.cs |
Models access policies. |
src/Aspire.Hosting.Azure.Sandboxes/AzureConnectorGatewayConnectionResource.cs |
Models connector connections. |
src/Aspire.Hosting.Azure.Sandboxes/AzureConnectorGatewayEndpointAuthorizationAnnotation.cs |
Captures callback authorization. |
src/Aspire.Hosting.Azure.Sandboxes/AzureConnectorGatewayMcpConnectorDefinition.cs |
Defines MCP connectors. |
src/Aspire.Hosting.Azure.Sandboxes/AzureConnectorGatewayMcpOperationDefinition.cs |
Defines MCP operations. |
src/Aspire.Hosting.Azure.Sandboxes/AzureConnectorGatewayMcpServerConfigResource.cs |
Models MCP configurations. |
src/Aspire.Hosting.Azure.Sandboxes/AzureConnectorGatewayOptions.cs |
Adds Connector Gateway options. |
src/Aspire.Hosting.Azure.Sandboxes/AzureConnectorGatewayResource.cs |
Models Connector Namespaces. |
src/Aspire.Hosting.Azure.Sandboxes/AzureConnectorGatewayTriggerConfigResource.cs |
Implements late-bound triggers. |
src/Aspire.Hosting.Azure.Sandboxes/AzureConnectorGatewayTriggerParameter.cs |
Defines trigger parameters. |
src/Aspire.Hosting.Azure.Sandboxes/AzureSandboxCleanupResource.cs |
Coordinates cleanup. |
src/Aspire.Hosting.Azure.Sandboxes/AzureSandboxContainerDeployment.cs |
Implements sandbox deployment. |
src/Aspire.Hosting.Azure.Sandboxes/AzureSandboxContainerOptionsAnnotation.cs |
Defines sandbox options and tiers. |
src/Aspire.Hosting.Azure.Sandboxes/AzureSandboxContainerResource.cs |
Models sandbox containers. |
src/Aspire.Hosting.Azure.Sandboxes/AzureSandboxEndpointPropertyValueProvider.cs |
Resolves deployed endpoints. |
src/Aspire.Hosting.Azure.Sandboxes/AzureSandboxGroupResource.cs |
Models sandbox groups. |
src/Aspire.Hosting.Azure.Sandboxes/AzureSandboxesExtensions.cs |
Exposes integration APIs. |
src/Aspire.Hosting.Azure.Sandboxes/Internal/Adc/AzureDevComputeClient.cs |
Implements ADC operations. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGateway.cs |
Models gateway Bicep. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGatewayAccessPolicyPrincipal.cs |
Models policy principals. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGatewayAccessPolicyPrincipalIdentity.cs |
Models principal identity. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGatewayConnection.cs |
Models connection Bicep. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGatewayConnectionAccessPolicy.cs |
Models policy Bicep. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGatewayMcpConnector.cs |
Models MCP routes. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGatewayMcpOperation.cs |
Models allowed operations. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGatewayMcpServerConfig.cs |
Models MCP server Bicep. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGatewayTriggerAuthentication.cs |
Models trigger authentication. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGatewayTriggerConfig.cs |
Models trigger Bicep. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGatewayTriggerConnectionDetails.cs |
Models trigger connection data. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGatewayTriggerNotificationDetails.cs |
Models callback data. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/ConnectorGatewayTriggerParameter.cs |
Models trigger parameters. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/SandboxGroup.cs |
Models sandbox group Bicep. |
src/Aspire.Hosting.Azure.Sandboxes/Provisioning/SandboxesResourceVersions.cs |
Defines preview API versions. |
src/Aspire.Hosting.Azure.Sandboxes/README.md |
Documents integration usage. |
src/Aspire.Hosting.Azure.Sandboxes/api/Aspire.Hosting.Azure.Sandboxes.ats.txt |
Tracks ATS API surface. |
src/Aspire.Hosting.Azure.Sandboxes/api/Aspire.Hosting.Azure.Sandboxes.cs |
Tracks C# API surface. |
src/Aspire.Hosting.Azure/AcrLoginService.cs |
Extends ACR login behavior. |
src/Aspire.Hosting.Azure/Aspire.Hosting.Azure.csproj |
Updates project dependencies. |
src/Aspire.Hosting.Azure/IAcrLoginService.cs |
Updates ACR login contract. |
src/Aspire.Hosting.Azure/Provisioning/BicepUtilities.cs |
Supports contextual value resolution. |
src/Aspire.Hosting.Azure/Provisioning/Internal/DefaultUserPrincipalProvider.cs |
Detects principal types. |
src/Aspire.Hosting.Azure/Provisioning/Provisioners/BicepProvisioner.cs |
Binds principal parameters. |
src/Aspire.Hosting.Azure/Provisioning/ProvisioningContext.cs |
Carries value-provider context. |
src/Aspire.Hosting/Publishing/ContainerRuntimeBase.cs |
Adds image inspection support. |
src/Aspire.Hosting/Publishing/DockerContainerRuntime.cs |
Implements Docker inspection. |
src/Aspire.Hosting/Publishing/IContainerImageInspector.cs |
Defines image inspection APIs. |
src/Aspire.Hosting/Publishing/PodmanContainerRuntime.cs |
Implements Podman inspection. |
src/Aspire.Hosting/Publishing/ResourceContainerImageManager.cs |
Updates image handling. |
tests/Aspire.Deployment.EndToEnd.Tests/AzureSandboxesDeploymentTests.cs |
Adds gated deployment coverage. |
tests/Aspire.Hosting.Azure.Tests/AcrLoginServiceTests.cs |
Tests ACR login changes. |
tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj |
Adds test dependencies. |
tests/Aspire.Hosting.Azure.Tests/AzureBicepProvisionerTests.cs |
Tests principal binding. |
tests/Aspire.Hosting.Azure.Tests/AzureSandboxesTests.cs |
Tests sandbox and connector behavior. |
tests/Aspire.Hosting.Azure.Tests/DefaultUserPrincipalProviderTests.cs |
Tests claim parsing. |
tests/Aspire.Hosting.Azure.Tests/FakeAcrLoginService.cs |
Updates the ACR test fake. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.AddAzureConnectorGatewayResourcesGeneratesBicep.verified.bicep |
Verifies gateway Bicep. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.AddAzureConnectorGatewayResourcesGeneratesBicep.verified.json |
Verifies gateway parameters. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.AddAzureSandboxGroupAddsDeploymentPrincipalDataOwnerRoleAssignment.verified.bicep |
Verifies sandbox RBAC. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.AddAzureSandboxGroupAddsDeploymentPrincipalDataOwnerRoleAssignment.verified.json |
Verifies RBAC parameters. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.AddAzureSandboxResourcesGeneratesBicep#00.verified.bicep |
Verifies sandbox infrastructure. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.AddAzureSandboxResourcesGeneratesBicep#00.verified.json |
Verifies sandbox parameters. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.AddAzureSandboxResourcesGeneratesBicep#01.verified.bicep |
Verifies related infrastructure. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.AddAzureSandboxResourcesGeneratesBicep#01.verified.json |
Verifies related parameters. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.AddConnectorTriggerConfigSecuresSandboxCallback#00.verified.bicep |
Verifies callback security. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.AddConnectorTriggerConfigSecuresSandboxCallback#01.verified.bicep |
Verifies trigger provisioning. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.AddConnectorTriggerConfigSecuresSandboxCallback.verified.json |
Verifies trigger parameters. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.ExistingConnectorGatewayChildrenGenerateExistingBicep.verified.bicep |
Verifies existing resources. |
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSandboxesTests.ExistingConnectorGatewayChildrenGenerateExistingBicep.verified.json |
Verifies existing parameters. |
tests/Aspire.Hosting.TestUtilities/Publishing/FakeContainerRuntime.cs |
Adds inspection test support. |
tests/Aspire.Hosting.Tests/Publishing/ContainerRuntimeBaseTests.cs |
Tests inspection commands. |
tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sandboxes/TypeScript/apphost.mts |
Validates TypeScript APIs. |
tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sandboxes/TypeScript/aspire.config.json |
Configures the TypeScript AppHost. |
tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sandboxes/TypeScript/package-lock.json |
Locks validation dependencies. |
tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sandboxes/TypeScript/package.json |
Defines validation tooling. |
tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sandboxes/TypeScript/tsconfig.json |
Configures type checking. |
Review details
Files not reviewed (1)
- tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sandboxes/TypeScript/package-lock.json: Generated file
- Files reviewed: 77/78 changed files
- Comments generated: 8
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
There was a problem hiding this comment.
🟡 Changes recommended
Faulted trigger provisioning can be mistaken for success, and ATS analyzer coverage is not enabled.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Files not reviewed (1)
- tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sandboxes/TypeScript/package-lock.json: Generated file
Suppressed comments (2)
src/Aspire.Hosting.Azure.Sandboxes/AzureConnectorGatewayTriggerConfigResource.cs:263
IsCompletedalso matches a faulted or canceled provisioning task. If this step is retried on the same resource instance after a transient deployment failure, it will report the trigger as already provisioned and skip the retry. Only skip successful tasks and replace a completed unsuccessful completion source before retrying.
if (ProvisioningTaskCompletionSource?.Task.IsCompleted == true)
{
context.Logger.LogDebug("Connector trigger config {ResourceName} is already provisioned. Skipping provisioning.", Name);
return;
}
src/Aspire.Hosting.Azure.Sandboxes/Aspire.Hosting.Azure.Sandboxes.csproj:11
- This integration exports ATS APIs but does not enable the integration analyzers, so ATS-specific contract mistakes will not be checked when this project builds. Enable
EnableAspireIntegrationAnalyzersfor the new package.
<PropertyGroup>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<RootNamespace>Aspire.Hosting.Azure</RootNamespace>
<IsPackable>true</IsPackable>
<PackageTags>aspire integration hosting azure container apps sandboxes connector namespace mcp cloud</PackageTags>
<Description>Azure Container Apps Sandboxes and Connector Namespace support for Aspire.</Description>
<!-- In preview while Azure Container Apps Sandboxes and Connector Namespace are in preview. -->
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
</PropertyGroup>
- Files reviewed: 77/78 changed files
- Comments generated: 0 new
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
There was a problem hiding this comment.
🔵 Human review recommended
It is a draft security-sensitive preview integration that depends on #19008 and has not completed API or security review.
Review details
Files not reviewed (1)
- tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sandboxes/TypeScript/package-lock.json: Generated file
- Files reviewed: 77/78 changed files
- Comments generated: 0 new
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
There was a problem hiding this comment.
🟡 Changes recommended
Podman cannot resolve uncached remote single-image manifests, and a reserved access-policy collision can generate duplicate Azure resources.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Suppressed comments (1)
src/Aspire.Hosting.Azure.Sandboxes/AzureSandboxesExtensions.cs:809
- A caller can register an explicit policy whose
PolicyNameisgateway-acl. Because this predicate ignores that policy unless it already uses the gateway identity, adding a trigger appends a second child with the same ARM name, causing duplicate-resource deployment failure. Treat any existing physicalgateway-aclas a collision: reuse it only when it is the generated gateway policy; otherwise reject the reserved name with a clear exception.
const string accessPolicyName = "gateway-acl";
if (connection.AccessPolicies.Any(policy =>
string.Equals(policy.PolicyName, accessPolicyName, StringComparison.OrdinalIgnoreCase) &&
policy.UsesGatewayManagedIdentity))
{
return;
}
- Files reviewed: 40/40 changed files
- Comments generated: 0 new
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Co-authored-by: Copilot <[email protected]> Copilot-Session: 2fbe254b-3480-468c-99fa-428b6d207542
Co-authored-by: Copilot <[email protected]> Copilot-Session: 2fbe254b-3480-468c-99fa-428b6d207542
Co-authored-by: Copilot <[email protected]> Copilot-Session: 2fbe254b-3480-468c-99fa-428b6d207542
Co-authored-by: Copilot <[email protected]> Copilot-Session: 2fbe254b-3480-468c-99fa-428b6d207542
Co-authored-by: Copilot <[email protected]> Copilot-Session: 2fbe254b-3480-468c-99fa-428b6d207542
Co-authored-by: Copilot <[email protected]> Copilot-Session: 2fbe254b-3480-468c-99fa-428b6d207542
Co-authored-by: Copilot <[email protected]> Copilot-Session: 2fbe254b-3480-468c-99fa-428b6d207542
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Access-policy removals leave stale authorization, while packaging and experimental API safeguards are incomplete.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 2
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
src/Aspire.Hosting.Azure.ConnectorNamespace/Aspire.Hosting.Azure.ConnectorNamespace.csproj — This new package has no shipped 13.4.6 baseline, but package validation is enabled by default in… |
|
src/Aspire.Hosting.Azure.ConnectorNamespace/README.md — This means removing a principal from the AppHost does not revoke its Azure access, and removing or… |
Issues resolved since last review (3)
| Severity | Finding |
|---|---|
src/Aspire.Hosting.Azure.ConnectorNamespace/AzureConnectorNamespaceExtensions.cs — This connection-policy overload accepts any nonempty strings for Microsoft Entra object and tenant… View resolved comment |
|
src/Aspire.Hosting.Azure.ConnectorNamespace/AzureConnectorNamespaceExtensions.cs — These resources are applied through an incremental ARM deployment (BicepProvisioner.cs:598).… View resolved comment |
|
src/Aspire.Hosting.Azure.ConnectorNamespace/AzureConnectorNamespaceExtensions.cs — Connection access policies are also emitted into an incremental ARM deployment. If a principal is… View resolved comment |
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
src/Aspire.Hosting.Azure.ConnectorNamespace/AzureConnectorNamespaceExtensions.cs:16
- The entire surface targets a preview Azure service, but none of the new public types or methods are marked
Experimental;SuppressFinalPackageVersiononly affects package versioning. Consumers can therefore compile against this unstable API without the required diagnostic. Mark the package surface experimental (an assembly-level attribute with a new diagnostic ID is the least repetitive option).
Co-authored-by: Copilot <[email protected]>
|
Copilot review |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Security-sensitive preview provisioning lacks current live deployment coverage and formal security review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
src/Aspire.Hosting.Azure.ConnectorNamespace/Provisioning/ConnectorNamespaceResourceVersions.cs — The new 2026-05-01-preview provisioning path is covered only by generated Bicep snapshots. This… |
Issues resolved since last review (2)
| Severity | Finding |
|---|---|
src/Aspire.Hosting.Azure.ConnectorNamespace/README.md — This means removing a principal from the AppHost does not revoke its Azure access, and removing or… View resolved comment |
|
src/Aspire.Hosting.Azure.ConnectorNamespace/Aspire.Hosting.Azure.ConnectorNamespace.csproj — This new package has no shipped 13.4.6 baseline, but package validation is enabled by default in… View resolved comment |
Suppressed comments (1)
src/Aspire.Hosting.Azure.ConnectorNamespace/README.md:108
- This lifecycle warning omits connections themselves. Incremental ARM deployment also leaves a removed connection child in Azure, including its externally authorized state, so readers may incorrectly assume deleting
AddConnectionfrom the AppHost retires it. Include connections in the list of resources that require explicit deletion or environment teardown.
Aspire provisions Connector Namespace resources through incremental ARM deployments. Removing a connection access policy, MCP access policy, or MCP server configuration from the AppHost does not delete a previously deployed Azure child resource. To revoke access or retire a configuration, delete it explicitly in Azure or tear down the provisioning environment.
Co-authored-by: Copilot <[email protected]>
|
Copilot review |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The security-sensitive preview integration lacks formal security/API review and currently cannot reference provisioned connections from workloads.
Review tier: Balanced
Findings: 1
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
src/Aspire.Hosting.Azure.ConnectorNamespace/AzureConnectorNamespaceConnectionResource.cs — The connection child cannot currently be consumed by an Aspire workload: it implements only… |
|
src/Aspire.Hosting.Azure.ConnectorNamespace/README.md — The required hosting-integration usage flow is incomplete here: the example provisions the… |
Issues resolved since last review (1)
| Severity | Finding |
|---|---|
src/Aspire.Hosting.Azure.ConnectorNamespace/Provisioning/ConnectorNamespaceResourceVersions.cs — The new 2026-05-01-preview provisioning path is covered only by generated Bicep snapshots. This… View resolved comment |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Stale authorization grants, missing package configuration, and deployment coverage gaps must be addressed.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 2
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
tests/Aspire.Deployment.EndToEnd.Tests/AzureConnectorNamespaceDeploymentTests.cs — Cleanup failures are only written to test output, so this deployment test can remain green while… |
Pre-existing issues (2)
| Severity | Finding |
|---|---|
src/Aspire.Hosting.Azure.ConnectorNamespace/AzureConnectorNamespaceConnectionResource.cs — The connection child cannot currently be consumed by an Aspire workload: it implements only… View comment |
|
src/Aspire.Hosting.Azure.ConnectorNamespace/README.md — The required hosting-integration usage flow is incomplete here: the example provisions the… View comment |
Suppressed comments (4)
Previously missed (2) — in code that hasn't changed since the last review.
src/Aspire.Hosting.Azure.ConnectorNamespace/Aspire.Hosting.Azure.ConnectorNamespace.csproj:7
- The project exports ATS APIs but does not enable the integration analyzers.
Aspire.Hosting.targets:4defaults them off, so export diagnostics are not enforced and the package does not receive thepolyglotNuGet tag added atAspire.Hosting.targets:24-27; once polyglot filtering is enabled,aspire addwill reject/hide this TypeScript-compatible integration. Enable the analyzers as the Sandboxes and Kubernetes integration projects do.
src/Aspire.Hosting.Azure.ConnectorNamespace/AzureConnectorNamespaceExtensions.cs:389 - The identity-backed policy path is only covered by generated Bicep and TypeScript compilation; the deployment E2E creates only a literal
WithAccessPolicy. This leaves the cross-resource principal-ID output wiring unverified against Azure, even though it is a key feature and can fail despite valid Bicep. Extend the deployment test to create a user-assigned identity, call this API, and verify the deployed policy object ID equals the identity's actual principal ID.
src/Aspire.Hosting.Azure.ConnectorNamespace/README.md:108
- Removing an access policy from the AppHost leaves the previously deployed Microsoft Entra grant active. That is a persistent authorization drift and contradicts the PR's guarantee that only explicitly configured principals are authorized; it is also the same incremental-deployment lifecycle problem used to defer triggers. Access-policy support needs deletion/reconciliation (including an empty desired set), or it should be deferred until that lifecycle exists rather than relying on manual portal cleanup.
Aspire provisions Connector Namespace resources through incremental ARM deployments. Removing a connection, connection access policy, MCP access policy, or MCP server configuration from the AppHost does not delete a previously deployed Azure child resource. To revoke access or retire a connection or configuration, delete it explicitly in Azure or tear down the provisioning environment.
src/Aspire.Hosting.Azure.ConnectorNamespace/Aspire.Hosting.Azure.ConnectorNamespace.csproj:9
- This new package inherits
EnablePackageValidation=trueand baseline version13.4.6fromsrc/Directory.Build.props:6-7, but no package with this ID exists at that baseline. Package validation during a pack/full build will therefore try to compare against a nonexistent baseline. Disable package validation until the first release establishes one, as the new Sandboxes package does insrc/Aspire.Hosting.Azure.Sandboxes/Aspire.Hosting.Azure.Sandboxes.csproj:11-12.
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Co-authored-by: Copilot <[email protected]>
|
All current review feedback has been addressed in d2f3b40: Connector Namespace connections now support workload |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Package validation is misconfigured, access-policy revocation is unsafe, and deployed authorization lacks functional verification.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
src/Aspire.Hosting.Azure.ConnectorNamespace/Aspire.Hosting.Azure.ConnectorNamespace.csproj — The PR description says the generated C# and ATS baselines are included, but this new project… |
Issues resolved since last review (3)
| Severity | Finding |
|---|---|
tests/Aspire.Deployment.EndToEnd.Tests/AzureConnectorNamespaceDeploymentTests.cs — Cleanup failures are only written to test output, so this deployment test can remain green while… View resolved comment |
|
src/Aspire.Hosting.Azure.ConnectorNamespace/README.md — The required hosting-integration usage flow is incomplete here: the example provisions the… View resolved comment |
|
src/Aspire.Hosting.Azure.ConnectorNamespace/AzureConnectorNamespaceConnectionResource.cs — The connection child cannot currently be consumed by an Aspire workload: it implements only… View resolved comment |
Suppressed comments (4)
Previously missed (1) — in code that hasn't changed since the last review.
tests/Aspire.Deployment.EndToEnd.Tests/AzureConnectorNamespaceDeploymentTests.cs:115
- This live test verifies only that ARM stored the requested policy fields. It never calls the MCP endpoint as the configured principal or without authentication, so it cannot detect a policy that is accepted by ARM but fails to enforce the advertised access boundary. Add authenticated and unauthenticated endpoint checks for this security-sensitive behavior.
src/Aspire.Hosting.Azure.ConnectorNamespace/Aspire.Hosting.Azure.ConnectorNamespace.csproj:9
- This brand-new package inherits
EnablePackageValidation=trueand baseline version13.4.6fromsrc/Directory.Build.props, but no package with this ID exists at that baseline. Package generation will therefore attempt compatibility validation against a nonexistent package. Disable package validation until the first baseline package ships, matchingAspire.Hosting.Azure.Sandboxes.csproj.
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
src/Aspire.Hosting.Azure.ConnectorNamespace/AzureConnectorNamespaceExtensions.cs:115
- Incremental deployment only emits the currently configured connection policies; it never deletes a policy omitted on a later deployment. As the new README acknowledges, removing
WithAccessPolicyleaves the previous principal authorized, contradicting the stated guarantee that access is limited to explicitly configured principals. Connection-policy support needs stateful delete reconciliation, or should be deferred until revocation is safe.
foreach (var accessPolicyResource in connectionResource.AccessPolicies)
{
var accessPolicy = new ConnectorGatewayConnectionAccessPolicy(
src/Aspire.Hosting.Azure.ConnectorNamespace/AzureConnectorNamespaceExtensions.cs:215
- Removing an MCP access policy from the AppHost does not remove the deployed Azure child, so a user or group retains MCP access after being deconfigured. Documentation alone is insufficient for a security grant: reconcile and delete stale policy children on deployment, or defer this API until revocation is implemented.
foreach (var accessPolicyResource in configResource.AccessPolicies)
{
var accessPolicy = new ConnectorGatewayMcpServerConfigAccessPolicy(
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
The latest review feedback has been addressed by correcting the PR description to match repository baseline policy and the current implementation. Copilot review |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Integration analyzer enablement and functional README authorization examples must be corrected before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
src/Aspire.Hosting.Azure.ConnectorNamespace/Aspire.Hosting.Azure.ConnectorNamespace.csproj — Enable the Aspire integration analyzers for this exported integration. The shared targets default… |
|
src/Aspire.Hosting.Azure.ConnectorNamespace/README.md — Clarify that WithReference only injects discovery settings and does not authorize the workload… |
Issues resolved since last review (1)
| Severity | Finding |
|---|---|
src/Aspire.Hosting.Azure.ConnectorNamespace/Aspire.Hosting.Azure.ConnectorNamespace.csproj — The PR description says the generated C# and ATS baselines are included, but this new project… View resolved comment |
Suppressed comments (1)
src/Aspire.Hosting.Azure.ConnectorNamespace/README.md:89
- Use a workload that can actually run and consume the injected Connector SDK settings.
runtime-depsis only a runtime base image and this container has no application or command, so it exits without demonstrating the documentedWithReferenceflow; the hosting README convention calls for a minimal working workload example.
const worker = await builder.addContainer(
"worker",
"mcr.microsoft.com/dotnet/runtime-deps:10.0"
);
await worker.withReference(outlook);
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
Addressed the latest feedback in afa735f and resolved the review thread. copilot-pull-request-reviewer — ready for another look. Thanks!\n\n@copilot review |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The preview Azure security surface needs the identified package and coverage fixes plus human API and security review.
Review tier: Balanced
Findings: None
Issues resolved since last review (2)
| Severity | Finding |
|---|---|
src/Aspire.Hosting.Azure.ConnectorNamespace/README.md — Clarify that WithReference only injects discovery settings and does not authorize the workload… View resolved comment |
|
src/Aspire.Hosting.Azure.ConnectorNamespace/Aspire.Hosting.Azure.ConnectorNamespace.csproj — Enable the Aspire integration analyzers for this exported integration. The shared targets default… View resolved comment |
Suppressed comments (3)
Previously missed (2) — in code that hasn't changed since the last review.
src/Aspire.Hosting.Azure.ConnectorNamespace/AzureConnectorNamespaceExtensions.cs:428
- The late-bound user-assigned-identity policy path is not exercised by the live deployment test: that test only supplies literal object/tenant IDs, while the snapshot only proves Bicep serialization. Because this method crosses module outputs into a preview ARM child resource, extend the opt-in deployment test with
AddAzureUserAssignedIdentity,WithIdentityAccessPolicy, and a live query that verifies the deployed policy's principal ID.
src/Aspire.Hosting.Azure.Sandboxes/Internal/Adc/AzureDevComputeClient.cs:663 ActivationModehas no production caller: the only assignment is in the added unit test, and the same is true of the newEntraIdauth model;AzureSandboxContainerDeployment.AddPortAsyncstill sends only name, port, anonymous, and protocol. This is dead groundwork for the port-authorization scenario deferred to #19809 rather than behavior used by this integration. Remove the unused ADC contract and test from this PR, or wire them through a current production path.
src/Aspire.Hosting.Azure.ConnectorNamespace/Aspire.Hosting.Azure.ConnectorNamespace.csproj:9
- This brand-new packable project inherits
EnablePackageValidation=trueand the13.4.6baseline fromsrc/Directory.Build.props:6-7, but no package with this ID exists at that baseline. New packages disable validation until their first release (for example,Aspire.Hosting.Azure.Sandboxes.csproj:11-12); without that opt-out, package validation will try to resolve a nonexistent baseline. Disable package validation here until a baseline package ships.
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The new exported integration does not enable the required Aspire integration analyzers.
Review tier: Balanced
Findings: None
Suppressed comments (1)
src/Aspire.Hosting.Azure.ConnectorNamespace/Aspire.Hosting.Azure.ConnectorNamespace.csproj:9
- This package exports multiple
[AspireExport]APIs but does not enable the integration analyzers, soASPIREEXPORT*contract and capability-collision diagnostics are skipped. Exporting integrations enable these analyzers insrc/Aspire.Hosting.Azure.Sandboxes/Aspire.Hosting.Azure.Sandboxes.csproj:13andsrc/Aspire.Hosting.Azure.Kubernetes/Aspire.Hosting.Azure.Kubernetes.csproj:9; enable them here as well.
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |



Description
Adds the
Aspire.Hosting.Azure.ConnectorNamespaceintegration for Azure Connector Namespace resources (ARM resource typeMicrosoft.Web/connectorGateways).This is a hardened port of the Connector Namespace portion of #17873, adapted to the current Azure provisioning pipeline, existing-resource APIs, workload references, and ATS exports.
Included
Microsoft.Web/connectorGateways@2026-05-01-previewprovisioningWithReferenceconfiguration for the Azure Connector SDKGenerated C# and ATS compatibility baselines are intentionally not updated in this feature PR; those release baselines are generated separately by the repository's release process.
Deferred
Connector triggers and event subscriptions are intentionally deferred. Incremental ARM deployments do not remove omitted or renamed
triggerConfigschildren, so safe support requires explicit lifecycle reconciliation and persistent deployed-trigger state rather than best-effort child deployments. #19809 tracks that follow-up.C# example
TypeScript example
Security considerations
connectors.azure.com.Validation
AzureConnectorNamespaceTestspass with quarantined and outerloop tests excludedAspire.Deployment.EndToEnd.Testsbuilds with the guarded Connector Namespace deployment scenariotsc --noEmitare covered by the polyglot validation fixturegit diff --checkpassesRelated: #19008, #19809
Original implementation source and credit: #17873 by David Fowler (@davidfowl)
Checklist
<remarks />and<code />elements on your triple slash comments?