Skip to content

Consolidate back-office into the account self-contained system with Entra ID Auth#876

Draft
tjementum wants to merge 44 commits intomainfrom
back-office-consolidation
Draft

Consolidate back-office into the account self-contained system with Entra ID Auth#876
tjementum wants to merge 44 commits intomainfrom
back-office-consolidation

Conversation

@tjementum
Copy link
Copy Markdown
Member

Summary & Motivation

Collapse the back-office self-contained system into the account container and put authentication for the back-office subdomain behind Azure Container Apps built-in authentication (Easy Auth). The legacy back-office SCS, its Dockerfile, separate API, separate WebApp, and dedicated CI workflow are removed. The account container now serves both the public app (app.<host>) and the back-office app (back-office.<host>) on host-scoped routes, with EasyAuth enforced at the platform layer for the back-office host.

  • Add backend foundations: BackOfficeEndpoints, GetMe query, BackOfficeIdentityHandler for the X-MS-CLIENT-PRINCIPAL-* header contract, MockEasyAuthMiddleware for local development, and BackOfficeGroupRequirement for authorization
  • Add BackOfficeWebApp shell as a sibling to WebApp inside the account project, with its own routes, error pages, side menu, and translations, served via dual SPA hosting (HostScopedSinglePageApp + UseHostScopedSinglePageAppFallback)
  • Remove the entire application/back-office folder, the back-office.yml GitHub workflow, the back-office solution filter, and all references in AppHost, AppGateway, and the platform solution
  • Update main-cluster.bicep to drop the back-office container app and add container-app-auth-config.bicep so the account container app is provisioned with EasyAuth bound to the back-office subdomain; the cluster deploy script and account workflow are updated accordingly
  • Add Playwright smoke coverage for the back-office host in application/account/WebApp/tests/e2e/back-office-flows.spec.ts, plus subdomain-aware constants in shared-webapp/tests/e2e/utils/constants.ts
  • Fix runtime consolidation gaps surfaced after the move: endpoints are tagged with their target SPA host, the EndpointMetadataTests enforce the metadata, HostScopedSinglePageApp correctly resolves per-host fallbacks, and the back-office endpoint base test seeds an EasyAuth identity

Checklist

  • I have added tests, or done manual regression tests
  • I have updated the documentation, if necessary

@tjementum tjementum added the Enhancement New feature or request label Apr 28, 2026
@tjementum tjementum self-assigned this Apr 28, 2026
@tjementum tjementum changed the title Consolidate back-office into the account self-contained system with Easy Auth Consolidate back-office into the account self-contained system with Entra ID Auth Apr 28, 2026
@tjementum tjementum moved this to 🏗 In Progress in Kanban board Apr 28, 2026
@tjementum tjementum added the Deploy to Staging Set this label on pull requests to deploy code or infrastructure to the Staging environment label Apr 28, 2026
@tjementum tjementum force-pushed the back-office-consolidation branch from 2294c40 to b972191 Compare April 28, 2026 17:45
@tjementum tjementum force-pushed the back-office-consolidation branch 3 times, most recently from e2c6abb to 858f9b0 Compare April 28, 2026 22:16
@tjementum tjementum force-pushed the back-office-consolidation branch from 858f9b0 to 4936ef6 Compare April 28, 2026 22:26
@tjementum tjementum force-pushed the back-office-consolidation branch from 4936ef6 to 06c0573 Compare April 28, 2026 23:02
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
4.9% Duplication on New Code (required ≤ 4%)
E Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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

Labels

Deploy to Staging Set this label on pull requests to deploy code or infrastructure to the Staging environment Enhancement New feature or request

Projects

Status: 🏗 In Progress

Development

Successfully merging this pull request may close these issues.

1 participant