ADR-0015 — Layered edge: Front Door, Application Gateway, and APIM
Context
ION has several distinct edge responsibilities that should not be collapsed into a single component:
- Global or internet-facing entry and traffic distribution.
- Web application firewall and network-level protection.
- Regional ingress and private-network routing.
- API publication, authentication policy, throttling, quotas, and backend protection.
- Routing user traffic to the appropriate BFF while keeping user tokens from reaching domain services directly.
ADR-0014 establishes shared Azure API Management as the platform API ingress and policy boundary. It does not by itself define the outer internet edge or regional network path. This ADR establishes the intended layered topology and the responsibility boundary between those services.
The architecture must avoid two common failure modes:
- Using APIM as a substitute for a global edge, network ingress tier, or complete WAF strategy.
- Placing domain services directly on the public internet and expecting application code to provide all edge protection.
The topology was validated against the implementation repository
(rome-ion/infrastructure/hub) on 2026-10-15. It consists of:
- Azure Front Door Premium (
fd-rome-<env>-glb-02) with a Premium WAF policy in Prevention mode (Default Rule Set 2.1, Bot Manager 1.0). - A zone-redundant Application Gateway
Standard_v2without WAF in Switzerland North. - Shared APIM behind it.
See the Amendments section.
Forces / Drivers
- principles/README.md § 21 Azure-native managed services first — prefer Azure-managed edge and gateway services over self-hosted reverse proxies, ingress controllers, or WAF appliances.
- principles/README.md § 22 Least privilege — each layer should expose only the endpoints and capabilities it owns; network access should be restricted to the next required hop.
- principles/README.md § 23 Blast-radius containment — isolate global edge, regional ingress, API policy, and backend failure domains rather than exposing every backend through one undifferentiated public endpoint.
- principles/README.md § 13 BFF pattern for frontend access — customer and advisor user tokens terminate at BFF services; the edge must route user traffic to BFFs and not make domain services user-facing.
- principles/README.md § 14 Independent scalability — edge, API policy, BFF, and domain services have different load profiles and should scale independently.
- principles/README.md § 16 Observability at every layer — each hop must provide health, access, security, latency, and rejection telemetry with correlation preserved end-to-end.
- Internet threat exposure — public APIs and Portal traffic require managed DDoS and WAF capabilities before requests reach application workloads.
- Capacity model — planned UI and API growth requires global routing, regional protection, early rejection, and independent gateway capacity rather than a single backend scaling assumption.
Decision
Adopt the following layered Azure-native edge topology as the V3 target architecture:
Internet / customer user
|
v
Azure Front Door Premium
(global entry, TLS, platform WAF, health-based routing, edge protection)
|
v
Application Gateway
(regional ingress, path routing, private network boundary;
regional WAF is target state)
|
v
Shared Azure API Management
(API products, token policy, quotas, throttling, routing, diagnostics)
|
+--> Customer Portal BFF
+--> Advisor / Engineer BFF
+--> Alya Workbench BFF
+--> approved service API surfaces
Azure Front Door — global edge
Front Door is the intended internet-facing global entry point for supported ION web and API traffic. Its responsibilities are:
- TLS termination and global endpoint presentation.
- The platform WAF: a Front Door Premium WAF policy in Prevention mode with managed rule sets, associated with every endpoint and custom domain.
- Health-based routing and, where applicable, regional failover.
- Origin-group failover from Application Gateway to a direct priority-2 origin (see Permitted edge exceptions).
- Edge caching only for explicitly cacheable, non-sensitive content.
- Early rejection of malformed or abusive traffic where supported.
- Preservation of correlation and forwarding headers required by later layers.
Front Door does not own domain authorization, customer-tenant validation, app-role authorization, or business routing.
Application Gateway — regional ingress
Application Gateway is the regional ingress tier between the global edge and the private application network. Its responsibilities are:
- Regional routing to the shared APIM endpoint.
- Regional Web Application Firewall policy for HTTP(S) traffic as a
target-state capability. Application Gateway runs
Standard_v2without WAF today; Front Door WAF is the platform WAF. - TLS and certificate handling according to the approved network design.
- Health probes and regional backend availability signals.
- Restricting the supported path from the regional edge to APIM and preventing arbitrary public backend exposure.
Application Gateway does not replace APIM API policies and does not perform ION domain authorization.
Shared APIM — API policy boundary
APIM responsibilities remain those defined in ADR-0014:
- Publish the approved API inventory and products.
- Validate caller-class tokens and route user requests only to the corresponding BFF.
- Validate service-to-service tokens and preserve them as caller context in
X-Authorization, while authenticating to the backend with APIM’s own managed identity. APIM is not a general token exchanger. - Apply quotas, rate limits, request-size limits, concurrency protection, diagnostics, correlation, and standard error mapping.
- Route only to approved backend services and revisions.
APIM is not a substitute for the platform WAF and is not the user identity boundary; the BFF is the user-token boundary.
Backend exposure invariant
Customer-facing and advisor-facing domain services are not independently public. Supported user traffic follows:
user token -> edge -> APIM policy -> appropriate BFF ->
BFF UAMI / ION Platform API app token -> downstream service
Service-to-service traffic uses the caller service’s Managed Identity and ION Platform API app roles. The edge does not change that identity model.
Permitted edge exceptions
Only the following paths may skip Front Door or Application Gateway. Each has compensating controls. Any new exception requires an amendment to this ADR.
-
Priority-2 failover origins. A Front Door origin group may send traffic directly to the APIM gateway, an App Service, or a Static Web App only as the priority-2 origin behind an Application Gateway priority-1 origin. The direct origin accepts traffic only from ION’s Front Door: the
AzureFrontDoor.Backendservice tag plus anX-Azure-FDIDmatch. Front Door WAF and APIM policy still apply. -
Storage origins. Front Door may route directly to Azure Storage for two purposes:
- Valet-key blob routes. A BFF behind APIM authorizes the caller and issues a short-lived, user-delegation SAS.
- The operational-data continuity portal. It uses an RA-GZRS static website and blob data, with Entra-authenticated Storage RBAC reads.
Shared-key access is disabled on these accounts.
-
SignalR WebSocket. The browser opens the SignalR WebSocket through Application Gateway public hostnames, because Front Door did not support WebSockets when this was designed. Negotiation still traverses Front Door, Application Gateway, and APIM. Moving the WebSocket leg behind Front Door should be re-evaluated.
-
Front Door outage bypass. During a Front Door outage, an incident-approved manual change lets users reach the Application Gateway hostnames directly. This path has no WAF; DDoS protection on the Application Gateway public IP remains.
Alternatives Considered
Option A — Direct public exposure of APIM or each backend
- Rejected. Grounds:
- (decisive) Insufficient layered protection and exposure control. Directly exposing every backend increases the attack surface and makes it possible to bypass the shared API inventory, WAF path, BFF boundary, throttling, and diagnostics.
- Domain services would each need to implement internet-edge concerns.
- A compromised or misconfigured backend endpoint would be independently reachable even when the supported customer path is healthy.
Option B — Self-hosted reverse proxy, ingress controller, or WAF
- Rejected. Grounds:
- (decisive) Violates § 21 Azure-native managed services first. ION would own patching, scaling, certificates, WAF rules, monitoring, backup, and disaster recovery for infrastructure Azure already provides as managed services.
- A self-hosted edge creates a new platform-critical operational surface.
- The operational burden is not justified by a V3 requirement identified in the available references.
Option C — Use Application Gateway only; omit Front Door
- Rejected. Grounds:
- (decisive) No global edge abstraction or global performance layer. Regional ingress alone does not provide the intended global endpoint, health-based global routing, or global failover model. Every user would connect to a regional Application Gateway rather than first reaching an Azure edge point selected for the user’s network location and the health/latency state of the available origins.
- Loss of CDN and edge-caching capability. Azure Front Door can serve eligible static content and other explicitly cacheable responses from edge locations, reducing repeated requests to the regional ingress, APIM, and Portal hosting backends. This improves time-to-first-byte, reduces bandwidth and origin load, and protects regional capacity during bursts. Application Gateway is a regional Layer-7 load balancer and WAF; it is not a global CDN or the equivalent global content-delivery layer.
- Poorer performance for geographically distributed users. Static Portal assets (JavaScript bundles, stylesheets, fonts, and images) would travel from a regional origin for every cache miss instead of being served from a Front Door edge near the user. This increases network distance and makes frontend performance more dependent on the selected region.
- Origin load remains unnecessarily high. Without edge caching, repeated requests for identical cacheable assets reach the regional stack. At the planned UI growth envelope this consumes Application Gateway, APIM, network, and backend capacity that can instead serve authenticated dynamic requests.
- Internet-facing traffic would arrive directly at the regional edge, reducing the separation between global traffic management and regional ingress. Multi-region evolution would require reworking the public endpoint rather than adding a routing target behind the global edge.
Caching boundary. This decision does not imply that ION should cache incident data, tenant-sensitive responses, or authenticated API responses at the edge. Front Door caching is appropriate only after an explicit cacheability classification, for example for immutable versioned Portal assets and approved public content. Dynamic customer data remains governed by APIM, BFF authorization, and the appropriate backend data-access policy.
Option D — Use Front Door only; omit Application Gateway
- Rejected. Grounds:
- (decisive) Front Door is a global edge, not the regional VNet load-balancing boundary. Microsoft’s comparison guidance distinguishes Front Door’s global path-based load balancing from Application Gateway’s ability to load-balance traffic further inside a virtual network. In ION, Front Door would therefore not replace the regional ingress function between the internet edge and the shared APIM/application network.
- Insufficient backend-instance lifecycle control. Front Door health probes select or remove an origin based on global health, latency, priority, and weight, but do not operate at the VM/container-instance level. In particular, Front Door does not provide Application Gateway’s connection-draining behavior for taking an individual regional backend instance out of rotation while allowing existing connections to complete. That matters during BFF/APIM scale-in, deployment, and maintenance.
- Wrong granularity for session affinity. Front Door can keep a user’s session on the same regional cluster, whereas Application Gateway can affinitize traffic to a specific server within that regional cluster. If ION needs instance-level affinity for a regional component, Front Door alone cannot provide it.
- Regional isolation and network-policy control are weakened. APIM and the application network would be coupled directly to the global edge. Application Gateway provides the regional Layer-7 ingress boundary (and, in the target state, a regional WAF) needed to apply regional routing and network controls before traffic reaches APIM.
- Front Door does provide valuable global WAF and edge capabilities; this option is rejected because those capabilities do not cover the full regional ingress and backend-lifecycle requirements, not because Front Door lacks a WAF.
Option E — Use Front Door directly to every backend and APIM only for APIs
- Rejected. Grounds:
- (decisive) Bypasses the intended shared API boundary for Portal and BFF traffic. Different traffic classes would have inconsistent authentication, policy, and observability paths.
- Backend-specific edge configuration would reintroduce operational duplication and public endpoint sprawl.
- The narrow direct origins listed under Permitted edge exceptions are not this option. They are bounded, failover-only or storage-only paths with origin lockdown.
Rationale
The layers are complementary, not redundant:
- Front Door owns global internet entry, traffic distribution, and the platform WAF.
- Application Gateway owns regional ingress and the network path into the application environment.
- APIM owns API publication and application-level API policy.
- BFFs own user-token termination and frontend-specific authorization.
- Domain services own business authorization and domain behavior.
This separation keeps each boundary honest. It avoids moving domain logic into gateway policies, while ensuring no backend must independently solve all global, network, API, and identity concerns.
The Azure-native approach is also a deliberate operations decision. Even where a self-hosted gateway or WAF might offer a narrower feature advantage, ION does not want to own that infrastructure’s perpetual patching, scaling, certificate, monitoring, and recovery burden.
Consequences
Positive
- Layered defense before requests reach application services.
- Global routing and regional ingress can evolve independently.
- Shared APIM remains the single API inventory and policy surface.
- User tokens are confined to BFF paths; domain services receive service identities for downstream calls.
- WAF, API policy, and backend authorization have explicit owners.
- Azure-native managed services minimize self-hosted operational burden.
Negative / Trade-offs
- Multiple hops add latency and increase end-to-end troubleshooting complexity.
- Front Door, Application Gateway, APIM, and BFF health must be correlated in monitoring and incident runbooks.
- Several services may process TLS, forwarding headers, and correlation metadata; configuration drift can cause hard-to-diagnose failures.
- Layered WAF and API policies can produce duplicate blocking or unexpected interactions; policy ownership and staged rollout are required.
- The topology introduces shared dependencies whose tiers, limits, and failover behavior must be validated against the capacity and availability targets.
- Cost is higher than a single public endpoint, especially when highly available or multi-region tiers are selected.
WAF Pillar Impact
- Security (primary) — layered WAF and ingress controls, reduced public backend exposure, BFF user-token boundary, and explicit policy ownership.
- Reliability — health-based routing and regional isolation can reduce regional failure impact; each hop becomes a dependency that needs health monitoring and tested failover.
- Performance Efficiency — edge rejection, routing, and independent scaling protect backend capacity; additional hops add latency.
- Cost Optimization — managed shared components avoid self-hosting but incur multiple service-tier costs; sizing and traffic-based cost review are required.
- Operational Excellence — standardized topology and ownership improve rollout and incident response, provided cross-layer observability is implemented.
Previous approach (V2)
The available V2/V3 references establish APIM policy and Managed Identity patterns but do not provide enough evidence to assert the exact deployed Front Door, Application Gateway, WAF, or regional topology. This ADR therefore records the intended V3 layered edge design rather than claiming that every element was deployed in every environment.
Deployment status, SKU and tier, routing rules, WAF mode and rules, and
origin failover were validated against the implementation repository on
2026-10-15. The ADR is therefore active. See the Amendments section.
Amendments
-
2026-10-15 — Validated and activated. The topology was validated against
rome-ion/infrastructure/hub:- Front Door Premium profile
fd-rome-<env>-glb-02; - Application Gateway
Standard_v2, zone-redundant in Switzerland North; - shared APIM.
Status changed from
proposedtoactive. - Front Door Premium profile
-
2026-10-15 — Front Door WAF is the platform WAF. The Front Door Premium WAF (Prevention mode, Default Rule Set 2.1 and Bot Manager 1.0 in Block) is the platform WAF. Application Gateway runs without WAF, and Application Gateway WAF is a target-state capability. The Decision diagram, the Application Gateway responsibilities, and the Rationale were updated to match.
-
2026-10-15 — Permitted edge exceptions recorded. The Decision now lists the only allowed paths that skip a layer:
- priority-2 failover origins;
- storage origins (valet-key blobs and the operational-data continuity portal);
- the SignalR WebSocket leg through Application Gateway;
- the manual Front Door outage bypass.
Option E remains rejected as a general pattern.
-
2026-10-15 — Caching status. Front Door caching is an available capability but is not enabled on any route. Enabling it for content-hashed static assets is the intended next step. API, authenticated, and tenant-varying responses remain uncacheable, as stated in the caching boundary.
-
2026-10-15 — Realized value of Application Gateway. The grounds in Option D (instance-level connection draining and instance-level session affinity) remain Application Gateway capabilities, but they are not what ION uses today. The realized value of Application Gateway is regional hostname and path routing, URL and header rewrites (including the path rewrites that make the Front Door outage bypass work), and the hub-network boundary in front of APIM and SPA hosts. Connection draining is a SHOULD on any backend pool with more than one instance and is not yet configured. Cookie-based affinity MUST be disabled, including on the SignalR leg. The Application Gateway pages under reliability record the details and gaps.
-
2026-10-15 — Shared APIM identity wording aligned with ADR-0014. The “Shared APIM” bullet said APIM validates service-to-service tokens “without exchanging them for an APIM identity”. It now matches the amended ADR-0014: APIM authenticates to the backend with its own managed identity and preserves the validated caller token in
X-Authorization. -
2026-10-15 — APIM does not yet enforce the Front Door check (gap APIM-02). The priority-2 failover-origin exception and the exposure invariant assume that the APIM gateway accepts only traffic carrying ION’s
X-Azure-FDID. The APIM global policy does not check it; only the Pigeon Twilio webhook API does. The APIM gateway is publicly reachable on the classic Standard tier without VNet integration, so a request sent directly to it skips the Front Door WAF, although it still has to pass APIM token and tenant policy. Until the global check is deployed, the edge chain is the supported path rather than the only path. The recommended fix is a globalcheck-headeronX-Azure-FDIDagainst the existingAPIM-FRONT-DOOR-IDnamed value, exempting only the public health operations, with a per-API check on each webhook API. When the check is deployed, the manual Front Door outage bypass runbook must include a step to relax it. See the APIM global policy implementation.
References
- ADR-0013 — Managed Identity, BFF user-token boundary, and platform app roles.
- ADR-0014 — shared APIM ingress and API policy boundary.
- Azure Front Door reliability documentation — implementation, resiliency, security, and guidelines.
- context/capacity-model.md — UI/API demand and performance drivers.
- principles/README.md §§ 13, 14, 16, 21, 22, 23.
- Microsoft documentation for Azure Front Door, Application Gateway, Application Gateway WAF, and Azure DDoS Protection.
- Microsoft Q&A — Application Gateway vs Azure Front Door — global versus VNet load balancing, connection draining, session-affinity granularity, and health-probe behavior.