Repository navigation
Support Azure Front Door Private Link for App Service - #21396
Conversation
Resolve Private Link targets per origin, disable public website access, and wire website outputs into Front Door publishing and deployment. Co-authored-by: Copilot App <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21396Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21396" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
App Service ingress restrictions and website-before-Front-Door provisioning lack automated deployment regression coverage verifying direct HTTPS denial and successful Front Door responses for two websites.
1 open issue
What changed in this PR
Extends the Front Door Private Link support from #21228 to Azure App Service, using each website as a private origin while preserving Container Apps’ shared-environment targeting.
Changes:
- Adds website-specific Private Link targets, disables public access on workload websites, and rejects deployment slots.
- Preserves website resource identities during dependency discovery and exposes separately published website outputs as infrastructure inputs.
- Adds regression tests, generated infrastructure snapshots, and configuration and approval documentation.
| File | Description |
|---|---|
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.WebsitesWithoutOriginsAreAlsoPrivate.verified.bicep | Captures access restrictions for non-origin websites. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.PublishExposesWebsiteOutputsAsInfrastructureInputs.verified.bicep | Captures explicit website output inputs. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.PrivateLinkTargetsEachWebsite_connectBeforeOrigins=True.verified.txt | Captures per-website targets when connected before origins. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.PrivateLinkTargetsEachWebsite_connectBeforeOrigins=False.verified.txt | Captures per-website targets when connected after origins. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.MixedComputeEnvironmentsUseTheirOwnPrivateLinkTargets.verified.txt | Captures mixed private and public origins. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.ExistingPlanCanHostPrivateWebsites.verified.bicep | Captures private websites on existing plans. |
| tests/Aspire.Hosting.Azure.Tests/AzureFrontDoorPrivateLinkTests.cs | Adapts tests to per-origin target resolution. |
| tests/Aspire.Hosting.Azure.Tests/AzureFrontDoorAppServicePrivateLinkTests.cs | Tests publishing, targeting, validation, and run-mode behavior. |
| src/Aspire.Hosting.Azure/IAzureCdnPrivateLinkTarget.cs | Resolves resource IDs and regions per origin. |
| src/Aspire.Hosting.Azure/AzurePublishingContext.cs | Exposes separate deployment-target outputs as inputs. |
| src/Aspire.Hosting.Azure.FrontDoor/README.md | Documents App Service setup, approval, and networking limits. |
| src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorPrivateLinkExtensions.cs | Documents App Service support and restrictions. |
| src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs | Configures and tracks per-origin Private Link targets. |
| src/Aspire.Hosting.Azure.AppService/README.md | Introduces private origins and links to setup guidance. |
| src/Aspire.Hosting.Azure.AppService/AzureAppServiceWebsiteContext.cs | Disables public access and emits Private Link outputs. |
| src/Aspire.Hosting.Azure.AppService/AzureAppServiceEnvironmentResource.cs | Supplies stable website targets and validates slot restrictions. |
| src/Aspire.Hosting.Azure.AppService/AzureAppServiceEnvironmentContext.cs | Reuses website resources during deployment preparation. |
| src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppEnvironmentResource.cs | Adapts shared-environment targeting to the revised contract. |
Review effort: Balanced
Emit website ID and normalized location outputs regardless of public network access so App Service targets expose them consistently, as Container Apps does. Co-authored-by: Copilot App <[email protected]>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <[email protected]>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔵 Needs a closer look
The new tests lack deployment E2E coverage for the two-website scenario, leaving provisioning order, private-endpoint approval, Front Door responses, and blocked direct access without regression protection.
2 open issues
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
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 App <[email protected]>
This comment has been minimized.
This comment has been minimized.
Private Link targets the production site; slots stay private and are swapped into production. Co-authored-by: Copilot App <[email protected]>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <[email protected]>
Tests selector16 / 101 PR test projects · 3 PR jobs, from 44 changed files. Selected PR test projects (16 / 101)
Selected PR jobs (3)
How these were chosen — grouped by what changed
🔧 🔧 🧪 📦 affected project 🔧 🔧 🔧 🔧 🔧 🔧 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because an origin consuming an App Service environment output can create a provisioning cycle between the website and Front Door through generic private-endpoint prerequisite handling.
3 resolved since last review
Review effort: Balanced
PR Testing ReportPR Information
Artifact Version Verification
Changes AnalyzedFiles Changed
The complete changed-file inventory is preserved in Change Categories
Commands and EnvironmentThe following variables describe the original execution paths. Temporary execution directories are removed after the report is saved; evidence is preserved separately. $testDir = 'C:\Users\dapine\AppData\Local\Temp\aspire-pr-21396-ee286f38'
$cliPath = "$testDir\dogfood\pr-21396\bin\aspire.exe"
$hivePath = "$testDir\hives\pr-21396\packages"
$version = '17.0.0-pr.21396.g1a495aea'
$appHost = "$testDir\PrivateOriginsSmoke\PrivateOriginsSmoke.AppHost\PrivateOriginsSmoke.AppHost.csproj"Scenario 1: Exact-head source regression testsCoverage: Regression, happy path, boundary, and negative. Result: Passed: 119 succeeded, 0 failed, 0 skipped. From the exact-head source checkout: .\restore.cmd
$env:MSBUILDTERMINALLOGGER = 'false'
dotnet test --project tests\Aspire.Hosting.Azure.Tests\Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-class '*.AzureFrontDoorTests' --filter-class '*.AzureFrontDoorPrivateLinkTests' --filter-class '*.AzureFrontDoorAppServicePrivateLinkTests' --filter-class '*.AzureEnvironmentResourceTests' --filter-class '*.AzureAppServiceTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'Restore passed with 19 NuGet advisory warnings and no errors. The test command passed. The test run itself took approximately seven seconds, excluding compilation. The source checkout remained clean after testing: no snapshot drift or modified tracked files. Evidence: Scenario 2: Fresh app and two-origin publishingCoverage: End-to-end local publishing happy path. Result: Passed. 12/12 publishing pipeline steps succeeded. Installed using the PR dogfood script with its documented local-isolation switches: iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21396 -InstallPath $testDir -SkipExtension -SkipPath"
& $cliPath --version
& $cliPath new aspire-starter --name PrivateOriginsSmoke --output "$testDir\PrivateOriginsSmoke" --source $hivePath --version $version --test-framework None --use-redis-cache false --localhost-tld false --suppress-agent-init --use-config-source false --non-interactive
& $cliPath add Aspire.Hosting.Azure.AppService --version $version --source $hivePath --apphost $appHost --non-interactive
& $cliPath add Aspire.Hosting.Azure.FrontDoor --version $version --source $hivePath --apphost $appHost --non-interactive
& $cliPath publish --apphost $appHost --output-path "$testDir\publish" --non-interactive --include-exception-detailsAll commands passed. The starter was configured with:
Publishing used the normal single-environment inference, without explicit Evidence: Scenario 3: Generated Bicep compilation and infrastructure assertionsCoverage: Generated artifact shape, validity, and per-origin binding. Result: Passed: 6/6 Bicep files compiled; 36/36 ARM JSON assertions passed. Each generated Bicep file was compiled using: $files = Get-ChildItem "$testDir\publish" -Recurse -Filter *.bicep
foreach ($file in $files)
{
az bicep build --file $file.FullName --outfile ([IO.Path]::ChangeExtension($file.FullName, '.json'))
}All six invocations exited 0:
Compiler version: Bicep CLI The saved
The script was executed with: & 'C:\Users\dapine\.copilot\session-state\ee286f38-4ea4-46ad-995a-515406c834ea\files\verify-published.ps1' -PublishPath "$testDir\publish"Evidence: Scenario 4: Boundary behaviorCoverage: Focused source tests, not separate live deployments. Result: Passed as part of the 119-test run.
Snapshots validate generated infrastructure. These results do not prove that an existing public production site is retroactively restricted; the PR explicitly documents that caveat. Evidence: Scenario 5: Negative behaviorCoverage: Focused source tests. Result: Passed as part of the 119-test run.
Evidence: Additional Read-Only Deployment Preview ExperimentStatus: Limitation observed; actual deployment ordering remains unvalidated. No deployment was executed. Only & $cliPath deploy --apphost $appHost --list-steps --non-interactiveWith ordinary single-environment inference, this exited 6: A fresh & $cliPath new aspire-empty --name PublicOriginsControl --output "$testDir\PublicOriginsControl" --source $hivePath --version $version --localhost-tld false --suppress-agent-init --use-config-source false --non-interactiveThis template produces a file-based The control's results:
The public control reproduces the error without enabling Private Link, so it is not evidence that the new opt-in alone causes it. A pre-PR binary baseline was not run; this report does not claim the error is proven pre-existing. The successful explicit-binding preview lists 13 steps but does not materialize website deployment steps. Evidence: Summary
Overall ResultApproved offline scenarios passed. No new regression was established within that scope. This is not full live-Azure verification. Website-before-Front-Door deployment ordering, managed private endpoint creation/approval, direct-site denial, Front Door connectivity, slot swapping, and service-to-service private networking remain unvalidated in this run. The additional Artifacts and Cleanup
|
|
Pull request created: #2062
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#2062 targeting Added a "Private Link origins for Azure App Service" section to Note This draft PR needs human review before merging. |
…App Service (#2084) ## Summary Documents `WithAzureFrontDoorPrivateLink` (`withAzureFrontDoorPrivateLink` in TypeScript) for Azure Container Apps and Azure App Service in Aspire 17.0. This consolidates the two bot drafts, #1965 (Container Apps) and #2062 (App Service), into one set of docs and supersedes both. The source changes are microsoft/aspire#21228 and microsoft/aspire#21396, and the final code and README on `release/17.0` are identical to `main` for the affected files. What changed: - `azure-front-door.mdx`: new **Private Link origins** section with requirements and SKU constraints, a complete TypeScript and C# example for each target, what Aspire provisions (with a generated Bicep excerpt), App Service publish/deploy behavior, deployment slots, existing sites, service-to-service limits, connection approval commands for both targets, the private endpoint region mapping and override (TypeScript and C#), and a troubleshooting table. The frontmatter description now mentions private origins. - Short cross-links from the App Service host page, the Configure Container Apps page, the two Azure deployment pages, and the Azure security best practices page. The security page no longer says App Service can only be a public website model. - `ASPIREAZURE003` diagnostic page: notes that `WithAzureFrontDoorPrivateLink` reports the diagnostic and adds an example. Decisions and assumptions: - Examples use `AddDotnetProject` / `addDotnetProject`, because `AddProject` is marked obsolete on `release/17.0`. The new section notes the `Aspire.Hosting.Dotnet` package requirement. - The TypeScript App Service example uses `withDashboard({ enable: false })`. The `withDashboard(false)` form in the source PR description is a type error against the generated SDK. Existing pages (`deployment/azure/app-service.mdx`, `deployment/azure/container-apps.mdx`) still show `withDashboard(false)`; I left those alone because they are unrelated to this change. - The region override sets a literal region in both languages. The C# parameter-based variant from the Front Door README was left out to keep the TypeScript and C# samples equivalent. TypeScript needs the opt-in, experimental `Aspire.Hosting.Azure.Provisioning.Cdn` package. - App Service plan tiers that support private endpoints come from Azure docs, not from the source PRs. The default Aspire plan (`P0V3`) qualifies. - No `ApiReference` links for the new APIs, because the generated API data in this repo (13.6) does not contain them yet. - Did not edit the 17.0 what's-new page, per the task scope. Not verified and flagged in the docs where relevant: - Same-environment Container Apps calls when public network access is disabled. The source PR says this was not verified against a deployed environment, so the docs tell readers to verify after the first deployment. - An end-to-end Container Apps deployment. Source PR #21396 deployed App Service end to end (27 steps, direct URL returned 403, Front Door returned 200). Source PR #21228 did not run an end-to-end deployment. ## Third-party links and affiliations None. The added links point to Microsoft Learn and to NuGet.org package pages for Aspire packages. ## Validation - `pnpm install --frozen-lockfile` (from `src/frontend`): passed. - `pnpm exec vitest run --config vitest.config.ts tests/unit/seo-lengths.vitest.test.ts tests/unit/api-reference-components.vitest.test.ts tests/unit/typescript-first-apphost-tabs.vitest.test.ts`: passed (3 files, 8 tests). - `pnpm test:unit:twoslash-blocks`: passed (2 tests). No new `twoslash` fences were added. - `pnpm dev`, then requesting all 7 edited pages: all returned HTTP 200 with no error overlay. Checked the rendered tabs, code blocks, and troubleshooting table with `playwright-cli`. - TypeScript samples: type-checked with `tsc` against the SDK generated by `aspire add` for `17.1.0-preview.1.26556.5` (Front Door, Container Apps, App Service, Dotnet, and Provisioning.Cdn packages). Passed. `withAzureFrontDoorPrivateLink` is present on both `AzureContainerAppEnvironmentResource` and `AzureAppServiceEnvironmentResource`, and on `17.0.0-preview.1.26552.6` for Container Apps. - C# samples: `dotnet build apphost.cs` with the same packages: passed with no warnings. Removing the `#pragma` produced error `ASPIREAZURE003`. - `aspire publish` for the TypeScript Container Apps sample (with the region override) and the App Service sample: both succeeded. The generated Bicep confirmed the `Premium_AzureFrontDoor` SKU, `publicNetworkAccess: 'Disabled'`, `managedEnvironments` and `sites` group IDs, the request message, `privateLinkLocation: 'westus2'`, and the `<name>_website_resourceId_input` parameters in `main.bicep`. - Not run: `pnpm build` (CI does this per repo policy) and an end-to-end Azure deployment. --------- Co-authored-by: Copilot App <[email protected]>
#21457 added snapshots that predate the resourceId and resourceLocation outputs from #21396. Co-authored-by: Copilot App <[email protected]>
<!-- copilot-assessment:v1 --> ### Agent assessment Self-reported assessment, not an independent review. Assessed revision: `a4a7fdc6e14c767da40d1a8cac4598d40a29ed78` | Dimension | Assessment | Rationale | |---|---|---| | Change confidence | 8.5/10 | ↑ All 14 image-build harness scenarios pass on Linux (node 24), including new pre-deadline and cleanup Docker/plugin 255 cases, which fail without the fix.<br>↑ DcpConnectionHealthCheckTests builds; the repaired test passes locally.<br>↑ All 61 AzureAppServiceTests pass locally with updated snapshots.<br>↓ Two DcpConnectionHealthCheckTests string assertions fail locally only due to a Spanish UI culture.<br>↓ Post-push CI not yet inspected at time of assessment. | | Diagnosis confidence | 9/10 | ↑ docker/cli v28.0.4 propagates WaitStatus.ExitStatus() (-1 for signaled plugins, exit 255).<br>↑ CI log shows CS7036 at DcpConnectionHealthCheckTests.cs:208-209 matching the #22553 signatures. | | Evidence fit | 8.5/10 | ↑ Regression reproduces the reviewer's fallback-and-exit-0 symptom.<br>↓ Not validated against a real Buildx plugin kill. | <!-- /copilot-assessment --> ## Description Shared CLI E2E image builds can exhaust their 45-minute job downloading from a throttled Azure Ubuntu apt mirror without reaching the existing error-only fallback. Bound primary attempts so default-source fallback also runs for slow or stalled builds. Independent fix based on `main`; relates to #21828, which is unchanged and is not a dependency. No auto-merge or bypass requested. - Share orchestration across the reusable image workflow and cache warmer. Apply a five-minute primary limit to .NET, polyglot base, Java and Go. Four primary attempts plus four 30-second cleanup grace periods leave 23 minutes within the unchanged 45-minute cap for fallback, setup and artifact handling. - TERM the client's process group so Docker can cancel its BuildKit session. Retry exactly once after ordinary failure or deadline, preserving both attempts' output and fallback status. A dependency-free Node supervisor tracks deadline and external signals independently, including cancellation during cleanup. External cancellation and forced kills, including an independently killed client, fail without fallback. - Preserve original Ubuntu apt sources and restore them for empty mirror arguments, including inherited Java/Go layers. Leave third-party sources untouched. - Add behavioral regressions, test-selection routes, cache-warmer filters and docs. No action pins, package manifests or product code changed. - Treat Docker exit 255 (a CLI plugin such as Buildx killed by a signal) as unconfirmed cancellation, before or during deadline cleanup, so it fails without fallback. - Fix the `main` build break in `tests/Aspire.Cli.Tests/Utils/DcpConnectionHealthCheckTests.cs`: the test added by #21919 used the pre-#22553 `CertificateManager.Create` and `DcpConnectionChecker` signatures (CS7036). It now passes `TemporaryStorage` like neighboring tests. - Fix the `main` test break in `AzureAppServiceTests.UserDefinedSlotConfigNames_AreMergedWithGeneratedStickySettings`: the snapshots from #21457 predate the `resourceId`/`resourceLocation` outputs added by #21396. ### Two-attempt root-cause evidence Both jobs ran at #21828 head `1ab3ad1e302a110bdb4f69ad4e3ee2e05d646d9a` in [run 42151619597](https://github.com/microsoft/aspire/actions/runs/42151619597). Both have annotation `The job has exceeded the maximum execution time of 45m0s`. | Attempt | Image job | Started / completed (UTC, November 6) | Exact apt log | | --- | --- | --- | --- | | 1 | [127676748230](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127676748230) | 02:41:00 / 03:26:22 | `#11 2272.6 Fetched 82.4 MB in 37min 49s (36.3 kB/s)` | | 2 | [127692798471](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127692798471) | 03:29:03 / 04:14:24 | `#11 2492.6 Fetched 108 MB in 41min 29s (43.4 kB/s)` | Attempt 2 then downloaded from HTTPS GitHub at `#11 2497.2 Fetched 15.1 MB in 0s (80.1 MB/s)`, while another mirror download logged `#15 92.37 Fetched 4031 kB in 1min 29s (45.4 kB/s)`. Both also reported GHA cache-import HTTP 400, `Our services aren't available right now`. Cold apt downloads, not product tests, consumed the image job. Neither attempt reached product-test execution using these images. No third rerun was triggered. ### Local validation `.\restore.cmd`: passed, 0 errors and 18 dependency-advisory warnings. Original selector coverage passed across appropriate hosts: 299 Windows managed cases, 2 Windows native MSBuild graph cases and 79 Linux shell/Git cases: ```powershell dotnet test --project tests\Infrastructure.Tests\Infrastructure.Tests.csproj --no-launch-profile -- --filter-namespace "Infrastructure.Tests.TestTriggerMap" --filter-not-class "*.PrComparisonBaseTests" --filter-not-class "*.SelectTestsCliTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" # Passed: 299 dotnet test --project tests\Infrastructure.Tests\Infrastructure.Tests.csproj --no-launch-profile -- --filter-method "*.NativeDashboardSharedHelpersSelectNativeValidationInEnforceMode" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" # Passed: 2 dotnet test --project tests\Infrastructure.Tests\Infrastructure.Tests.csproj --no-launch-profile -- --filter-class "*.TestTriggerMapTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" # Passed: 179 after the final routing change dotnet run --project tools\SelectTests -- --changed-files <generated-changed-files.txt> --explain # Passed: production graph/prefilter, 0 unattributed inputs. # Shared Docker shell helper correctly activates the existing ALL route. ``` Linux container, pinned .NET runtime, same built MTP assembly: ```bash /tmp/dotnet/dotnet /repo/artifacts/bin/Infrastructure.Tests/Debug/net11.0/Infrastructure.Tests.dll --filter-class "*.PrComparisonBaseTests" --filter-class "*.CliE2EImageBuildTests" --filter-class "*.SelectTestsCliTests" --filter-not-method "*.NativeDashboardSharedHelpersSelectNativeValidationInEnforceMode" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" --results-directory /tmp/test-results # Original implementation: passed 88 (79 selector + 9 image cases). /tmp/dotnet/dotnet artifacts/bin/Infrastructure.Tests/Debug/net11.0/Infrastructure.Tests.dll --filter-class "*.CliE2EImageBuildTests" --filter-not-trait quarantined=true --filter-not-trait outerloop=true # Final b8274fc: passed all 13 expanded image cases. ``` The initial Windows run failed in 17 shell cases because it selected the broken System32 WSL bash shim, and 5 existing Git-fixture cleanup cases with `UnauthorizedAccessException`. The same cases passed on Linux. The 2 native graph cases passed on Windows; running the Windows SDK on Linux caused `BadImageFormatException`. Passing partitions cover every focused case without modifying unrelated tests. The 13 image cases cover success, ordinary failure, fallback failure, slow success, stall, forced kill, client cancellation, external cancellation before/during deadline cleanup, client SIGKILL during cleanup, all-image/.NET-only orchestration, and exact original apt-source restoration in real Ubuntu. Cleanup cancellation reproduces on 4bb054c as incorrect exit 0 plus fallback; the corrected supervisor exits 143 without fallback. Killed clients retain 137, never deadline 124. Real Docker/Buildx probe re-run after the supervisor change: ```bash build_with_mirror_retry 20s "real BuildKit cancellation probe" docker buildx build --progress plain --load -t mirror-fallback-probe ``` Passed: primary printed `PRIMARY_RUNNING`, then `#5 CANCELED` / `Canceled: context canceled`; fallback printed `FALLBACK_RUNNING` and loaded the image. BuildKit history recorded primary `Error` and fallback `Completed`. Process inspection before fallback and afterwards found only the BuildKit daemon, no surviving primary `RUN`/`sleep`. Temporary builder and image removed. `git diff --check`: passed. ### Actual final-head CI Head **b8274fc8e0377c70ada8aa9eecfbdbc4069c6ff7**, [run 42170803717](https://github.com/microsoft/aspire/actions/runs/42170803717): **image build and all four uploads passed; Infrastructure passed 2090/2090; all 116 selected CLI archive E2E jobs passed.** The downloaded Infrastructure TRX confirms all 13 new image cases passed. CLI unit tests passed on Linux, macOS and Windows. This is actual final-head evidence, not evidence from superseded runs. [Image job 127739541935](https://github.com/microsoft/aspire/actions/runs/42170803717/job/127739541935) ran 05:56:03–06:05:32 UTC. All four artifacts are present and unexpired: | Variant | Artifact ID | Size (bytes) | Uploaded UTC | | --- | --- | --- | --- | | .NET | 13481517063 | 696399767 | 06:04:42 | | Polyglot | 13480867983 | 391644472 | 06:04:54 | | Java | 13481671757 | 654944092 | 06:05:13 | | Go | 13481043964 | 583388699 | 06:05:30 | The primary mirror was healthy: `#11 4.388 Fetched 108 MB in 1s (114 MB/s)`. **No actual CI timeout/fallback occurred**; fallback evidence is deterministic/local BuildKit evidence, not a production CI claim. Representative actual consumers confirm all four artifacts load and execute tests: | Consumer job | Images loaded | Test outcome | | --- | --- | --- | | [Go starter 127743182589](https://github.com/microsoft/aspire/actions/runs/42170803717/job/127743182589) | .NET, polyglot, Go | 1 passed, 1 skipped | | [Java polyglot 127743185239](https://github.com/microsoft/aspire/actions/runs/42170803717/job/127743185239) | .NET, polyglot, Java | 1 passed | | [.NET smoke 127743188570](https://github.com/microsoft/aspire/actions/runs/42170803717/job/127743188570) | .NET, polyglot | 10 passed | **Required checks are not green; approval is still required.** Two failures outside the changed image infrastructure remain, with same-source main controls rather than blind reruns: - [Windows extension units 127739542026](https://github.com/microsoft/aspire/actions/runs/42170803717/job/127739542026): 4150 passed, 9 pending, 1 failed. `rejects when a POSIX process group remains alive after forced termination` passed its rejection/listener assertions but saw global fake-timer count 2 instead of 0. Test and process-helper blobs are identical to main 54b4929. [Main control 127718292677](https://github.com/microsoft/aspire/actions/runs/42164303520/job/127718292677) passed that exact case and all 4151 tests. The source of the two timers is not established; no extension edit or retry made. - [Windows Hosting-2 127739572340](https://github.com/microsoft/aspire/actions/runs/42170803717/job/127739572340): `ExecutableDoesNotExist` and `ExecutableWorkingDirectoryDoesNotExist` failed before scenario assertions because DCP's `docker.exe --version` dependency probe timed out. Test file and entire DCP source tree are identical to main 54b4929. [Main control 127718297752](https://github.com/microsoft/aspire/actions/runs/42164303520/job/127718297752) TRX passed the same cases in 6.005s and 2.854s. No product edit or retry made. All four review threads have been addressed. No merge or bypass performed; #21828 remains untouched and cannot consume this fix until integration. ### Security considerations The supervisor executes existing checked-in Docker commands, not new untrusted input. Separate-session process-group signaling avoids signaling the workflow shell and permits child cleanup. A forced kill cannot confirm remote BuildKit cancellation, so it fails closed without fallback. No threat model or separate security review has been performed. Fixes # (issue) ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] 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 - [x] No - Does the change make any security assumptions or guarantees? - [x] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [x] No - [ ] No --------- Co-authored-by: IEvangelist <[email protected]> Co-authored-by: Copilot App <[email protected]> Co-authored-by: Adam Ratzman <[email protected]>


Description
Follow-up to #21228: App Service workloads can now be private origins behind Azure Front Door using the same
WithAzureFrontDoorPrivateLinkAPI.Each App Service origin targets its own
Microsoft.Web/sitesresource (sitesgroup), rather than the shared App Service plan. The opt-in disables public network access on every workload website in the environment and selects Front Door Premium. Existing plans are supported; deployment slots are supported by targeting the production site, since Front Door Private Link cannot target a slot; the slot has public access disabled and is swapped into production. Aspire creates the production site only if it does not exist, so enabling Private Link on an existing public site does not disable its public access; disable it on the site yourself. The separately provisioned dashboard is unchanged.The new, unreleased experimental
IAzureCdnPrivateLinkTargetcontract from #21228 now resolves resource ID and region outputs per origin. Container Apps continues to share its environment target. App Service maintains stable website resource identities during dependency discovery, and the deployment graph provisions websites before Front Door. Published infrastructure exposes separately published website outputs as explicit inputs instead of referencing modules absent frommain.bicep.Fixes # (issue)
User-facing usage
C#:
TypeScript (verified against generated SDK signatures):
After deployment, the resource owner must approve Front Door's pending managed private endpoint connection on each website:
App Service does not provide Container Apps-style environment-local ingress.
WithReferencestill resolves to website hostnames, so service-to-service callers need Front Door URLs or their own private networking/DNS. Passing Front Door outputs back to its own origins creates a deployment cycle; configure those URLs separately after deployment.Validation
.\restore.cmd— passed.dotnet test --project tests\Aspire.Hosting.Azure.Tests\Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-class "*.AzureFrontDoorTests" --filter-class "*.AzureFrontDoorPrivateLinkTests" --filter-class "*.AzureFrontDoorAppServicePrivateLinkTests" --filter-class "*.AzureEnvironmentResourceTests" --filter-class "*.AzureAppServiceTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"— 117 passed.dotnet test --project tests\Aspire.Hosting.Azure.Tests\Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"— 2,118 passed, 5 skipped, 1 failed. The failure was the unrelated storage emulator startup test below.dotnet test --project tests\Aspire.Hosting.Azure.Tests\Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-method "*.AzureStorageEmulator_WithPersistentLifetime_ReusesContainersAndPorts" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"— 1 passed on isolated retry.aspire publish --apphost playground\FrontDoorPrivateLinkSmoke\Smoke.AppHost\Smoke.AppHost.csproj --output-path <scratch>\publish --non-interactive— passed using a temporary two-origin AppHost with source project references.az bicep build --file <published-file> --stdout— passed for all six generated Bicep artifacts.Set-Location playground\FrontDoorPrivateLinkSmoke\TypeScript; dotnet run --project ..\..\..\src\Aspire.Cli\Aspire.Cli.csproj --no-launch-profile -- restore --non-interactive— SDK generation succeeded; confirmedwithAzureFrontDoorPrivateLinkon the generated App Service resource and fluent promise. npm reported the intentionally absent temporarypackage.json; this was a generated API surface check, not a TypeScript runtime test.git diff --check— passed.Live Azure deployment
Deployed in
westus3using the requested tenant's only subscription, with two distinct App Service websites and Front Door Premium:Result: 27/27 deployment steps succeeded. Both managed private endpoint connections were approved; both websites are running with
publicNetworkAccess: Disabled.Verified at 2026-10-29 17:01:43 UTC, after Front Door propagation:
api-ryygo2c7mutbk.azurewebsites.netweb-ryygo2c7mutbk.azurewebsites.netBoth Front Door responses contained exactly
aspire-appservice-private-link-ok. Both website private endpoint connections wereApproved. Test resources are retained inrg-aspire-appservice-private-20261029for inspection and continue to incur Azure charges.Security considerations
This is an opt-in ingress restriction. It disables public access on all workload websites, not only registered origins. Front Door uses website-specific Private Link targets, the website host header, HTTPS origin forwarding, and certificate-name validation. Managed private endpoint requests require explicit approval by the resource owner. The dashboard is separate and is not locked down by this feature; use
WithDashboard(false)when it is not needed. No automatic approval or service-to-service networking is introduced. Security review is still needed for the network-isolation guarantees.Checklist
<remarks />and<code />elements on your triple slash comments?