Micro-Frontends routing and ingress
This page defines how a request reaches a shell and its MFEs, and how the browser, once it has the shell, discovers and loads each remote and reaches each MFE’s BFF. It turns the architecture directives independently deployable and BFF per MFE into a concrete ingress and routing model, and it complements composition (which covers the Module Federation wiring itself).
There are two routing layers and it helps to keep them separate:
- Network ingress — how an HTTPS request for a shell or MFE host reaches the web app that serves its static bundle. Azure Front Door is the entry point, and Application Gateway is Front Door’s priority-1 origin.
- Runtime composition routing — how the already-loaded shell resolves a browser
route to a remote, fetches that remote’s
mf-manifest.jsonfrom the right origin, and how each MFE then calls its own BFF under/api.
Hostname patterns use
<domain>, which ision.ontinue.comin production andalpha-ion.devorbeta-ion.devin the lower environments. Route and rewrite facts are fromrome-ion/infrastructure/hub/azure-front-door/(front_door.tf,services/*/main.tf) androme-ion/infrastructure/hub/application-gateway/(data-*.tf,dns.tf). Access-restriction facts are fromalya-fe/infrastructure/alya-shell-web.tf. Runtime resolution is fromalya-fe/app-shell/src/config/mf.util.ts,alya-fe/app-shell/public/config.js, and each MFE’sremote-origin.util.ts. The MFE applications / environments reference lists the alpha hostnames.
Front Door and Application Gateway hostnames
Each shell and each MFE is an Azure Linux Web App that serves a static bundle. Every user reaches it through Azure Front Door. Application Gateway is not a separate audience-specific entry point. It is Front Door’s priority-1 origin, and browsers reach it directly only in the exceptions documented by ADR-0015 and Front Door security.
| Hostname (alpha) | Role | Who connects | Notes |
|---|---|---|---|
portal.<short>.alpha-ion.dev | Front Door endpoint, the entry point for every user | Browser | Front Door WAF, security headers, /api/* path rewrites |
agw-<short>-webapp.alpha-ion.dev | Front Door priority-1 origin | Front Door at runtime; the browser only during a Front Door outage bypass | Public DNS A record to the Application Gateway public IP; DDoS protection on the IP |
agw-alya-sigr, agw-alya-shell-sigr | SignalR WebSocket endpoints | Browser directly (exception) | Negotiate still goes through Front Door and APIM; see real-time |
| Web app default hostname | Front Door priority-2 origin | Front Door, when Application Gateway is unhealthy | Locked down by the access restrictions below |
Application Gateway is publicly reachable. It is not a private or corporate
ingress, and it is not reached over ZPA. The agw-* hostnames serve the same
build as the Front Door hostnames. Nothing in the bundle is ingress-specific
except how it resolves other remotes’ origins (see
runtime remote resolution). That is what lets the
outage bypass work without a second deployment.
ZPA is for engineers, not the runtime
Note: Zscaler Private Access (ZPA) is the remote-access path for humans: engineering team members who reach platform resources directly for operational or engineering work (ADR-0025). ZPA is not part of the platform runtime. No user traffic, no Front Door or Application Gateway hop, and no service-to-service call depends on it. Arriving through ZPA grants no application or Azure authorization.
Access-restriction model (shell web app)
The shell web app denies by default and allows only the known origins, the
deployment path, and engineer access. From alya-fe/infrastructure/alya-shell-web.tf
(module linux-web-app v1.2.1, P0v3 plan, Node 24):
| Priority | Rule | Allows | Purpose |
|---|---|---|---|
| default | Deny | Everything not explicitly allowed | |
| 100 | agwsbn | Application Gateway subnet | Runtime: Front Door priority-1 path through Application Gateway |
| 101 | ghsbn | GitHub Actions runner subnet | Deployment |
| 102 | AzureFrontDoor | AzureFrontDoor.Backend service tag | Runtime: Front Door priority-2 failover origin |
| 103 | Zscaler | ZPA subnet | Human engineering access only; not a runtime path |
A direct hit on the web app’s default hostname from anywhere else is denied.
Gap: rule 102 matches the service tag only, with no
X-Azure-FDIDheader match, so any Front Door profile in Azure can reach the web app. Front Door guidelines require the header match on every priority-2 origin. The same gap exists on other MFE web apps. See implementation gap 11 in Front Door current configuration.
Request path
Solid edges are the runtime path. Dotted edges are failover, documented exceptions, or human access.
Runtime remote resolution
Once the shell bundle is running, it must decide where to fetch each remote from. Remotes are not hard-coded into the build — they are listed in a runtime config object and resolved per ingress:
window.RUNTIME_CONFIG.REMOTE_MFES(served bypublic/config.js) lists each remote with aname,alias, and two entry origins:entryAFDand (optionally)entryAGW.src/config/mf.util.tsinspectswindow.location.origin: if it starts withhttps://agw-the shell usesentryAGW, otherwiseentryAFD. In normal operation every browser is on a Front Door host and loads remotes from their AFD origins.entryAGWexists for the Front Door outage bypass: a shell served from anagw-host loads its remotes from theiragw-origins too, so the two worlds never cross.- Each remote descriptor’s entry is
`${entryUrl}/mf-manifest.json`; the shell callsregisterRemotes(...), and a route resolving to a remote triggers a lazyloadRemote('mfe_x/App').
Each remote resolves its own asset origin
A remote’s mf-manifest.json and its chunks must load from wherever the remote was
actually served — which is not always the shell’s origin. Every MFE ships a
remote-origin.util.ts Module Federation runtime plugin that reads
document.currentScript.src, derives that script’s origin, and stores it on a
per-app global (e.g. window.__IMFE_ORIGIN__ for Incidents). The federation runtime
then resolves the remote’s own assets against that origin, so the same remote build
works standalone, under the shell, or under a sub-shell, on either ingress.
This is why the same build runs on both the Front Door and the agw- hostnames:
the hostname selects the entry origin, and each remote carries the logic to resolve
its own assets from there.
Per-MFE hosts
Every MFE has one portal hostname that serves both its static bundle at / and its
BFF API under /api, so the bundle and its backend share one origin.
| Surface | Pattern | Example (Service Management, alpha) |
|---|---|---|
| Front Door host | portal.<short>.<domain> | portal.smfe.alpha-ion.dev |
| Application Gateway host (priority-1 origin, outage bypass) | agw-<short>-webapp.<domain> | agw-smfe-webapp.alpha-ion.dev |
| Static bundle | portal.<short>.<domain>/ | portal.smfe.alpha-ion.dev/ |
| BFF API | portal.<short>.<domain>/api/... | portal.smfe.alpha-ion.dev/api/v1/service-requests |
| On-behalf-of API (Bondi Core only) | portal.core.<domain>/api-obo/... | portal.core.alpha-ion.dev/api-obo/v1/... |
<domain> is ion.ontinue.com in production, and alpha-ion.dev or beta-ion.dev in
the lower environments. <short> is the MFE’s short code (smfe Service Management,
cife Customers, spi Security Posture Improvement, awkb Automation Workbench,
iwkb Investigation, imfe Incidents, core Bondi Core, and so on). See
shells and MFEs for the catalogue.
An MFE calls its own origin’s /api, even when it runs inside another shell. The
remote-origin runtime plugin stores the origin the remote was loaded from on a global,
and the MFE builds its API URLs from it. Reichenbach, for example, calls
${window.__IWKB_ORIGIN__}/api/.... During the outage bypass the same code calls
agw-iwkb-webapp.<domain>/api/..., without a rebuild.
API path anatomy
A browser API call crosses four hops. Front Door is the only hop that changes the
path in normal operation. It replaces the matched public prefix with the APIM API’s
path prefix (the route’s origin_path) and keeps the rest of the path
(preserve_unmatched_path).
| Hop | Host | Path | What happens |
|---|---|---|---|
| 1. Browser | portal.iwkb.<domain> | /api/investigations/incident/42 | Sends the Entra token and X-Capabilities |
| 2. Front Door | Route on the portal.iwkb endpoint | /api/* matched | WAF, then rewrite to the origin path /rebff-ext/ |
| 3. Application Gateway | agw-api.<domain> | /rebff-ext/investigations/incident/42 | default-api-listener (rule priority 110) forwards to gateway-pool, which is APIM. No rewrite |
| 4. APIM | apim-rome-<env>-chn-02 | API rebff-ext, operation /investigations/incident/{id} | Validates the JWT and capability scope, keeps the user token in X-Authorization, swaps Authorization for its managed-identity token, rate-limits |
| 5. BFF | The API’s backend URL | /investigations/incident/42 under the backend base path (/api for Function Apps) | Re-verifies the capability token and enforces route permissions |
If Application Gateway is unhealthy, Front Door sends hop 3 straight to APIM. See failover and the outage bypass.
APIM API naming
The APIM API path prefix is the first path segment after Front Door’s rewrite. Its suffix tells you who may call it:
| Suffix | Meaning | Reached from the browser | Example |
|---|---|---|---|
-ext | External API of a BFF, in the MFE product (apim-product-mfe-<env>-chn-01) or a shell product | Yes, through a Front Door route | rebff-ext, ddbff-ext, assgr-ext, signet-ext, bondi-bff-shell-ext |
-ext-fe | External, browser-facing API under the older naming | Yes, through a Front Door route | alya-ext-fe, alya-elk-ext-fe, alya-artemis-ext-fe, alya-sigr-ext-fe, theia-theia-ext-fe |
-int | Internal API for service-to-service calls, in its own product. Callers need an app role | No. BFFs and services call it on apim-rome-<env>-chn-02.azure-api.net | assgr-int |
A new MFE’s BFF publishes <short>-ext in the MFE product.
Routing styles
Front Door uses two styles to map /api paths to APIM APIs.
- Catch-all. One route,
/api/*, sends everything to the MFE’s own BFF API. The BFF owns its path space, so adding an endpoint needs no edge change. - Per-resource. One exact route and one wildcard route per resource and version, each to a possibly different APIM API. The Alya-family MFEs use this style because their pages call several BFFs.
Rules:
- A new MFE MUST use a single catch-all
/api/*route to its own BFF’s APIM API,<short>-extin the MFE product. - The only shared routes an MFE host MAY add are Signet
/api/v1/capabilitiesand, on the shell host, the Shell SignalR negotiate path/api/v2/signalr/*. - The Alya-family per-resource routes are transitional. They MUST NOT be copied for new MFEs. Calling several BFFs from one MFE is a gap against ADR-0023 “BFF per MFE” (gap RG-01).
Route catalogue
From rome-ion/infrastructure/hub/azure-front-door/front_door.tf and
services/*/main.tf. Every API route uses origin group RomeApiOriginGroup.
| Front Door host | Style | Public pattern | Origin path (APIM API) |
|---|---|---|---|
portal.iwkb | Catch-all | /api/* | /rebff-ext/ |
portal.awkb | Catch-all | /api/* | /ddbff-ext/ |
portal.spi | Catch-all | /api/* | /theia-theia-ext-fe/ |
portal.spi | Shared | /api/v1/capabilities | /signet-ext/v1/capabilities |
portal.spi | Storage | /api/v1/spi/initiative-blobs/* | Blob storage origin (valet key) |
portal.lobfe | Catch-all | /api/* | /lobbe-lobbe-bff-ext/ |
portal.lobfe | Per-resource | /api/v1/customers, /api/v1/customers/* | /alya-elk-ext-fe/v1/customers and /alya-elk-ext-fe/v1/customers/ |
portal.core | Catch-all per version | /api/vN/* | /bondi-bff/vN/ |
portal.core | Catch-all per version | /api-obo/vN/* | /bondi-bff-obo-int/vN/ |
portal (Bondi shell) | Catch-all | /api/* | /bondi-bff-shell-ext/ |
portal.alya, portal.imfe | Per-resource | /api/v1, v3, v4 /incidents; v1/tickets, v1/skills, v1/escalation, v1/ioniq, v1/app-config | /alya-ext-fe/... |
portal.alya, portal.imfe | Per-resource | /api/v1, v2, v3 /customers | /alya-elk-ext-fe/... |
portal.alya, portal.imfe | Shared | /api/v1/capabilities | /signet-ext/v1/capabilities |
portal.alya, portal.imfe | Legacy | /api/v1/signalr/* | /alya-sigr-ext-fe/v1/signalr/ |
portal.alya | Per-resource | /api/v1/service-requests/* | /alya-artemis-ext-fe/v1/service-requests/ |
portal.alya | Shared | /api/v2/signalr/* | /assgr-ext/v2/signalr/ |
portal.smfe | Per-resource | /api/v1/service-requests, /api/v1/service-requests/* | /alya-artemis-ext-fe/v1/service-requests |
portal.smfe | Storage | /api/v1/service-requests/attachments/* | Attachment blob storage origin (valet key) |
portal.cife | Per-resource | /api/v1/customers, /api/v1/customers/* | /alya-elk-ext-fe/v1/customers |
portal.ioniq | Per-resource | v1/ioniq, v3/incidents, v1/signalr, and Gutenberg, Herald, and Yammer event routes | Alya APIs. Herald and Yammer are reaching end of life |
Each exact and wildcard pair is listed once. The Front Door architecture explains the trailing-slash rule for wildcard origin paths.
Failover and the outage bypass
| Traffic | Origin group | Priority 1 | Priority 2 | Probe |
|---|---|---|---|---|
/api/* on every portal host | RomeApiOriginGroup | agw-api.<domain> (Application Gateway, then APIM) | apim-rome-<env>-chn-02.azure-api.net (APIM directly) | HEAD /health-probes-ext/v1/health |
/* static bundle | One group per MFE | agw-<short>-webapp.<domain> | The web app’s *.azurewebsites.net hostname | GET / |
Priority 2 needs no path change, because Front Door has already rewritten the path to the APIM API prefix.
During a Front Door outage, users reach the agw-<short>-webapp hostnames directly
(manual bypass).
Application Gateway then has to do Front Door’s rewrite itself:
- Each
agw-<short>-webapplistener has a URL path map:/api/*goes to APIM through a rewrite rule set, and/*goes to the web app. - The rewrite rule set mirrors the Front Door origin paths. It is maintained by hand
in
rome-ion/infrastructure/hub/application-gateway/data-*.tf, so it drifts. The Alya set has nov2/signalrrule (gap RG-02). - A catch-all MFE needs one rewrite rule, which prefixes the path after
/apiwith/<short>-ext. This is a further reason to prefer the catch-all style.
SignalR paths
| Purpose | Path or host | Routed to |
|---|---|---|
| Shell negotiate | portal.alya.<domain>/api/v2/signalr/negotiate | Front Door, then APIM assgr-ext, then the Shell SignalR BFF |
| Shell WebSocket | wss://agw-alya-shell-sigr.<domain>/client/?hub=alya | Application Gateway listener, basic rule, no rewrite, then Azure SignalR. Not a Front Door origin |
| Subscriptions | None in the browser. MFE BFFs call apim-rome-<env>-chn-02.azure-api.net/assgr-int/v2/signalr/... | APIM assgr-int, then the Shell SignalR BFF |
| Legacy negotiate (MUST NOT be used by new work) | /api/v1/signalr/* on portal.alya, portal.imfe, portal.ioniq | APIM alya-sigr-ext-fe, then the legacy Alya SignalR BFF |
| Legacy WebSocket | agw-alya-sigr.<domain> | Application Gateway with cookie affinity, then the legacy Azure SignalR |
MFEs never call a SignalR path. They subscribe through their own BFF under their own
/api. See real-time (SignalR).
New MFE route checklist
- Publish the BFF in APIM as
<short>-extin the MFE product. - Add a Front Door service stack for
portal.<short>with the static route/*to the MFE’s web-app origin group, and one catch-all API route/api/*toRomeApiOriginGroupwith origin path/<short>-ext/(Front Door: add an API route). - Do not add the shared Signet route unless the MFE’s own code calls Signet on its own host. The shell normally obtains the capability token.
- Add the
agw-<short>-webapplistener, path map, and a one-rule rewrite set that mirrors the Front Door origin path (Application Gateway: add a listener). - Add both origins (
portal.<short>andagw-<short>-webapp) to the BFF API’s CORS policy in APIM. - Lock the web app to the gateway subnet and the Front Door service tag with the
X-Azure-FDIDheader match. - Add the shell’s
REMOTE_MFESentry with bothentryAFDandentryAGW. - Extend the hub regression suite to cover the new hostnames.
The /api call path
An MFE never calls a domain service directly. It calls its own BFF under /api,
which goes through APIM’s MFE product:
- The MFE issues an authenticated request to
<its-host>/api/...with the user’s Entra bearer token (acquired through the shell’s shared MSAL singleton) and the capability token. - APIM validates the JWT and the capability scope against the request URL (the
sanctioned path convention
/<mfe-domain>/tenants/{tenantId}/...lets scope be checked structurally), applies rate limits, and swaps in its managed-identity token for the backend hop. - The request reaches the MFE BFF, which re-verifies the capability token, enforces per-route permissions and domain rules, and calls the domain store/service.
The capability token and the full APIM product policy are documented in
capability service (Signet); the enforcement layering is in
identity and access. Local dev uses ports instead of hosts
(service_management 3001, customers 3002, SPI 3003, incidents_management 3004,
daedalus 3100, ION IQ 8011 / 8031 / 8041, iwkb 3302, lobotomy 3201).
Gaps
| ID | Gap | Impact | Owner |
|---|---|---|---|
| RG-01 | The Alya-family MFEs on portal.alya, portal.imfe, and portal.ioniq reach several BFFs through per-resource routes: Alya, Elk, Artemis, and the legacy SignalR BFF. portal.lobfe also routes Elk customer paths next to its own catch-all. This does not conform to ADR-0023 “BFF per MFE”. portal.smfe and portal.cife use per-resource routes to a single BFF, which is the transitional style but not a BFF-per-MFE gap | Every new endpoint needs a Front Door route and an Application Gateway rewrite. Ownership of the edge contract is shared across teams | Alya |
| RG-02 | Application Gateway rewrite sets are maintained by hand and drift from Front Door. The Alya set has no v2/signalr rule (same item as RT-03) | Live updates stop during a Front Door outage bypass | CPE |
| RG-03 | The priority-2 web-app access restriction matches the Front Door service tag without the X-Azure-FDID header | See access-restriction model | CPE, MFE teams |
Related documentation
- Architecture · Composition · Real-time (SignalR) · Identity and access · Shells and MFEs
- Capability service (Signet)
- Azure Front Door: architecture · resiliency · security
- ADR-0015 — Edge topology · ADR-0025 — ZPA remote access
- ADR-0023 — Micro-Frontend (MFE) UI architecture
- Source references: MFE - Applications - Environments · Sharing deployment - MFE