Skip to content

Add Azure Connector Namespace integration - #19024

Merged
Eric Erhardt (eerhardt) merged 140 commits into
microsoft:mainfrom
spboyer:spboyer/aca-connector-gateway
Sep 3, 2026
Merged

Eric Erhardt (eerhardt) merged 140 commits into
microsoft:mainfrom
spboyer:spboyer/aca-connector-gateway

Conversation

@spboyer

@spboyer Shayne Boyer (spboyer) commented Aug 5, 2026 •

Copy link
Copy Markdown
Member

Description

Adds the Aspire.Hosting.Azure.ConnectorNamespace integration for Azure Connector Namespace resources (ARM resource type Microsoft.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-preview provisioning
  • connector connections and Microsoft Entra connection access policies
  • user-assigned identity access policies without hard-coded principal IDs
  • workload WithReference configuration for the Azure Connector SDK
  • managed MCP server configurations, connector routes, explicit operation allow-lists, and caller access policies
  • existing Connector Namespace, connection, and MCP configuration references
  • TypeScript validation, README guidance, Bicep snapshots, and an opt-in live Azure deployment test

Generated 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 triggerConfigs children, 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

var connectorNamespace = builder.AddAzureConnectorNamespace("connectors");
var outlook = connectorNamespace.AddConnection(
    "outlook",
    "office365",
    new AzureConnectorNamespaceConnectionOptions
    {
        ConnectionName = "office365-outlook",
        DisplayName = "Office 365 Outlook"
    });

builder.AddProject<Projects.Worker>("worker")
    .WithReference(outlook);

connectorNamespace.AddMcpServerConfig("outlook-mcp")
    .WithConnector(
        "office365",
        outlook,
        new AzureConnectorNamespaceMcpConnectorOptions
        {
            Operations =
            [
                new AzureConnectorNamespaceMcpOperationOptions { Name = "GetEmailsV3" }
            ]
        })
    .WithAccessPolicy(
        "developer-access",
        new AzureConnectorNamespaceMcpAccessPolicyOptions
        {
            ObjectId = "11111111-1111-1111-1111-111111111111",
            TenantId = "22222222-2222-2222-2222-222222222222",
            PrincipalType = AzureConnectorNamespaceMcpAccessPolicyPrincipalType.User
        });

TypeScript example

const connectorNamespace = await builder.addAzureConnectorNamespace("connectors");
const outlook = await connectorNamespace.addConnection("outlook", "office365", {
    connectionName: "office365-outlook",
    displayName: "Office 365 Outlook"
});

const worker = await builder.addContainer(
    "worker",
    "mcr.microsoft.com/dotnet/runtime-deps:10.0"
);
await worker.withReference(outlook);

const outlookMcp = await connectorNamespace.addMcpServerConfig("outlook-mcp");
await outlookMcp.withConnector("office365", outlook, {
    operations: [{ name: "GetEmailsV3" }]
});
await outlookMcp.withAccessPolicy("developer-access", {
    objectId: "11111111-1111-1111-1111-111111111111",
    tenantId: "22222222-2222-2222-2222-222222222222",
    principalType: AzureConnectorNamespaceMcpAccessPolicyPrincipalType.User
});

Security considerations

  • Aspire provisions connection resources but does not automate or store OAuth consent. Interactive authorization remains a user action in connectors.azure.com.
  • MCP routes require an explicit operation allow-list; broad connector tool exposure is rejected.
  • Connection and MCP access policies authorize only explicitly configured Microsoft Entra principals.
  • Secret-valued connection parameter sets are intentionally unsupported; use an existing externally authorized connection instead.

Validation

  • 33 AzureConnectorNamespaceTests pass with quarantined and outerloop tests excluded
  • Aspire.Deployment.EndToEnd.Tests builds with the guarded Connector Namespace deployment scenario
  • Connector Namespace package creation succeeds
  • TypeScript SDK generation and tsc --noEmit are covered by the polyglot validation fixture
  • generated Bicep compiles and matches the verified snapshot
  • git diff --check passes

Related: #19008, #19809
Original implementation source and credit: #17873 by David Fowler (@davidfowl)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Copilot AI balanced review requested due to automatic review settings August 5, 2026 19:00
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19024

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19024"

@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Copilot AI review requested due to automatic review settings August 5, 2026 19:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

  • IsCompleted also 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 EnableAspireIntegrationAnalyzers for 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.

Copilot AI review requested due to automatic review settings August 5, 2026 20:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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.

Copilot AI review requested due to automatic review settings August 5, 2026 20:53
@spboyer
Shayne Boyer (spboyer) changed the base branch from main to spboyer/aca-sandboxes August 5, 2026 21:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 PolicyName is gateway-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 physical gateway-acl as 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.

@spboyer
Shayne Boyer (spboyer) marked this pull request as ready for review August 6, 2026 18:19
@spboyer
Shayne Boyer (spboyer) marked this pull request as draft August 6, 2026 18:29
@spboyer
Shayne Boyer (spboyer) marked this pull request as ready for review August 7, 2026 17:52
@spboyer
Shayne Boyer (spboyer) marked this pull request as draft August 7, 2026 18:28
@spboyer
Shayne Boyer (spboyer) marked this pull request as ready for review August 7, 2026 19:50
@spboyer
Shayne Boyer (spboyer) marked this pull request as draft August 7, 2026 20:30
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 High severity

New issues introduced by this change (2)
Severity Finding
High severity 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…
High severity 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
Medium severity src/​Aspire.Hosting.Azure.ConnectorNamespace/​AzureConnectorNamespaceExtensions.cs — This connection-policy overload accepts any nonempty strings for Microsoft Entra object and tenant… View resolved comment
High severity src/​Aspire.Hosting.Azure.ConnectorNamespace/​AzureConnectorNamespaceExtensions.cs — These resources are applied through an incremental ARM deployment (BicepProvisioner.cs:598).… View resolved comment
High severity 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; SuppressFinalPackageVersion only 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).

@spboyer

Copy link
Copy Markdown
Member Author

Copilot review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity 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
High severity 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
High severity 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 AddConnection from 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.

@spboyer

Copy link
Copy Markdown
Member Author

Copilot review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity · 1 Low severity

New issues introduced by this change (2)
Severity Finding
Medium severity src/​Aspire.Hosting.Azure.ConnectorNamespace/​AzureConnectorNamespaceConnectionResource.cs — The connection child cannot currently be consumed by an Aspire workload: it implements only…
Low severity 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
Medium severity 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity · 1 Low severity

New issues introduced by this change (1)
Severity Finding
Medium severity 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
Medium severity src/​Aspire.Hosting.Azure.ConnectorNamespace/​AzureConnectorNamespaceConnectionResource.cs — The connection child cannot currently be consumed by an Aspire workload: it implements only… View comment
Low severity 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:4 defaults them off, so export diagnostics are not enforced and the package does not receive the polyglot NuGet tag added at Aspire.Hosting.targets:24-27; once polyglot filtering is enabled, aspire add will 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=true and baseline version 13.4.6 from src/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 in src/Aspire.Hosting.Azure.Sandboxes/Aspire.Hosting.Azure.Sandboxes.csproj:11-12.
    <SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@spboyer

Copy link
Copy Markdown
Member Author

All current review feedback has been addressed in d2f3b40: Connector Namespace connections now support workload WithReference configuration in C# and polyglot AppHosts, the README demonstrates the full consumption flow, and deployment cleanup reports only completed deletion as success. Copilot review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity 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
Medium severity 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
Low severity src/​Aspire.Hosting.Azure.ConnectorNamespace/​README.md — The required hosting-integration usage flow is incomplete here: the example provisions the… View resolved comment
Medium severity 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=true and baseline version 13.4.6 from src/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, matching Aspire.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 WithAccessPolicy leaves 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(

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@spboyer

Copy link
Copy Markdown
Member Author

The latest review feedback has been addressed by correcting the PR description to match repository baseline policy and the current implementation. Copilot review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity · 1 Low severity

New issues introduced by this change (2)
Severity Finding
Medium severity src/​Aspire.Hosting.Azure.ConnectorNamespace/​Aspire.Hosting.Azure.ConnectorNamespace.csproj — Enable the Aspire integration analyzers for this exported integration. The shared targets default…
Low severity 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
Medium severity 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-deps is only a runtime base image and this container has no application or command, so it exits without demonstrating the documented WithReference flow; 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);

@spboyer

Copy link
Copy Markdown
Member Author

Addressed the latest feedback in afa735f and resolved the review thread. copilot-pull-request-reviewer — ready for another look. Thanks!\n\n@copilot review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Low severity src/​Aspire.Hosting.Azure.ConnectorNamespace/​README.md — Clarify that WithReference only injects discovery settings and does not authorize the workload… View resolved comment
Medium severity 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
  • ActivationMode has no production caller: the only assignment is in the added unit test, and the same is true of the new EntraId auth model; AzureSandboxContainerDeployment.AddPortAsync still 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=true and the 13.4.6 baseline from src/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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

It introduces a large security-sensitive public Azure provisioning surface without completed API or security review.

Review tier: Balanced
Findings: None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, so ASPIREEXPORT* contract and capability-collision diagnostics are skipped. Exporting integrations enable these analyzers in src/Aspire.Hosting.Azure.Sandboxes/Aspire.Hosting.Azure.Sandboxes.csproj:13 and src/Aspire.Hosting.Azure.Kubernetes/Aspire.Hosting.Azure.Kubernetes.csproj:9; enable them here as well.
    <SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

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

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants