ION DocsV3
  • Architecture
    • ION Architecture V2
      • ION V2 — Architecture Overview
      • V2 context
        • V2 capacity model
        • V2 constraints
        • V2 integration boundaries
        • V2 requirements
        • V2 solution strategy
      • V2 Structural Design
        • ION V2 Landscape
        • ION V2 Platform Views
          • ION V2 Delivery and Runway
          • ION V2 Incident-Processing Pipelines
          • ION V2 Platform Networking
          • ION V2 Platform Observability
          • ION V2 Platform Security
        • ION V2 System Context
        • ION V2 Systems
          • Alya System Topology
          • Cogs System Topology
          • Ion IQ System Topology
          • Kingsman System Topology
          • Pigeon System Topology
          • Veritas System Topology
          • Watchtower System Topology
      • V2 evolution and platform lineage
        • Tiberium Origins
          • Tiberium Architecture Overview
          • Tiberium Components Architecture Overview
        • Voyager and the V2 Merge
          • Voyager Architecture Overview
          • Voyager Identity Architecture Overview
          • Voyager Services Architecture Overview
      • V2 Platform Architecture
        • Alya Workbench
          • Mission Brief: Alya (Workbench for Cyber Defenders)
        • Asset Discovery
        • Automation
        • Customer Communications
          • Notification and Escalation Design
        • Reporting and Dashboards
        • Vulnerability Mitigations
      • V2 Well-Architected
        • V2 Reliability
          • Availability Architecture
        • V2 Security
          • API Management
            • API Management Architecture
            • API Management Guidelines
            • API Management Implementation
              • APIM Deployment and Debugging
              • APIM Global Policy Implementation
              • APIM Platform Provisioning
              • APIM Policy Authoring
              • APIM Service Onboarding
              • APIM Webhook Flow Implementation
            • API Management Policy Model
          • V2 Security Architecture
          • Teams Notification Security
          • Customer Data and PII
          • V2 Identity
            • Applications and Authorization
            • V2 Identity Architecture
            • Microsoft Entra ID
            • V2 Identity Standard
            • V2 Identity Implementation
              • Application Registration
              • Application Roles
              • Customer Identity Onboarding
              • Identity Lifecycle and Operations
              • Managed Identity
            • V2 Identity Workflows
              • Alya Workbench Identity Workflow
              • Customer Portal Identity Workflow
              • Microservices Identity Workflow
              • ServiceNow Inbound Identity Workflow
              • Microsoft Teams Identity Workflow
          • Customer Environment Access
            • Customer Environment Access Architecture
            • Customer Environment Access Guidelines
            • Customer Environment Access How-to
    • ION Architecture V3
      • ION V3 Architecture Overview
      • V3 context
        • V3 capacity model
        • V3 constraints
        • V3 integration boundaries
        • V3 requirements
        • V3 solution strategy
      • V3 Structural Design
        • Data and events
          • Archival and retention
          • Event model
          • Event sourcing
          • Event store
          • Micro-frontend interaction
          • Recovery and disaster recovery
          • Replay and reconstruction
          • Reporting and customer analytics
          • Event-sourcing requirements
          • Snapshots
          • UI interaction
        • ION v3 domains
          • Assets domain
            • Assets domain flows
            • Assets domain implementation
            • Assets domain model
          • Customer Collaboration domain
            • Customer Collaboration domain flows
            • Customer Collaboration domain implementation
            • Customer Collaboration domain model
          • Incident domain
            • Incident domain flows
            • Incident domain implementation
            • Incident domain model
          • Investigation domain
            • Investigation domain flows
            • Investigation domain implementation
            • Investigation domain model
          • Remediation domain
            • Remediation domain implementation
            • Remediation domain model
          • Ticket domain
            • Ticket domain flows
            • Ticket domain implementation
            • Ticket domain model
        • ION V3 Landscape
        • ION V3 Platform Views
          • Internal API
            • Internal API architecture
            • Internal API consumer guide
            • Internal API identity and access
            • Internal API implementation
          • Micro-Frontends
            • Micro-Frontends architecture
            • Micro-Frontends capability service (Signet)
            • Micro-Frontends composition
            • Micro-Frontends identity and access
            • Micro-Frontends implementation
            • Micro-Frontends real-time (SignalR)
            • Micro-Frontends routing and ingress
            • Shells and MFEs
          • SOAR Integration
            • SOAR Integration architecture
            • SOAR Integration customer onboarding
            • SOAR Integration Identity and Access Design
            • SOAR Integration implementation
            • SOAR Integration operations
        • ION V3 System Context
        • ION V3 systems
          • Alya
          • Cogs
          • ION IQ
          • Kingsman
          • Pigeon
          • Veritas
          • Watchtower
      • V2 to V3 evolution
        • V2 to V3 architecture delta
        • V2 to V3 decision changes
        • V2 to V3 migration guidance
        • V2 to V3 service impact
      • Well-Architected
        • Cost Optimization
          • Cost Governance
            • Cost Governance Architecture
            • Cost Governance Guidelines
            • Cost Governance Implementation
          • SKU Strategy
            • SKU Strategy Architecture
            • SKU Strategy Guidelines
            • SKU Strategy Implementation
        • Operational excellence
          • Audit Logs
            • Audit Logs Architecture
            • Audit Logs Guidelines
            • Audit Logs Implementation
          • CI/CD Runway
            • CI/CD Runway Architecture
            • CI/CD Runway Guidelines
            • CI/CD Runway Implementation
          • Feature Flags
            • Feature Flags Architecture
            • Feature Flags Guidelines
            • Feature Flags Implementation
          • Incident management
            • Incident management architecture
            • Incident management guidelines
            • Incident management implementation
          • Azure Landing Zone
            • Azure Landing Zone Architecture
            • Azure Landing Zone Guidelines
            • Azure Landing Zone Implementation
          • Notifications
            • Notifications Architecture
            • Notifications Guidelines
            • Notifications Implementation
          • Observability
            • Observability Architecture
            • Observability Guidelines
            • Observability Implementation
        • Performance efficiency
          • Capacity, sizing, and scaling
            • Capacity, sizing, and scaling architecture
            • Capacity, sizing, and scaling guidelines
            • Implement capacity, sizing, and scaling
          • UI responsiveness
            • UI responsiveness architecture
            • UI responsiveness guidelines
            • Implement UI responsiveness
        • V3 reliability
          • Application resilience patterns
          • Critical flows
          • Customer reliability assurance
            • ION Platform reliability and service continuity
            • Customer reliability slides
          • Disaster recovery
            • Disaster recovery architecture
            • Disaster recovery guidelines
            • Disaster recovery implementation
              • DR implementation: API Management
              • DR implementation: App Configuration
              • DR implementation: Application Gateway
              • DR implementation: Azure SQL Database
              • DR implementation: Container Apps
              • DR implementation: Container Registry
              • DR implementation: Cosmos DB
              • DR implementation: Event Hubs
              • DR implementation: Azure Front Door
              • DR implementation: Function Apps
              • DR implementation: Key Vault
              • DR implementation: Log Analytics and Application Insights
              • DR implementation: MySQL Flexible Server (Temporal)
              • DR implementation: PostgreSQL Flexible Server
              • DR implementation: Azure Managed Redis
              • DR implementation: Service Bus
              • DR implementation: SignalR
              • DR implementation: Storage accounts
            • Operational-data replication
            • Disaster recovery operations
          • Edge and routing
            • Azure Application Gateway
              • Azure Application Gateway architecture
              • Azure Application Gateway guidelines
              • Azure Application Gateway implementation
              • Azure Application Gateway resiliency
              • Azure Application Gateway security
            • Azure Front Door
              • Azure Front Door architecture
              • Azure Front Door guidelines
              • Azure Front Door implementation
              • Azure Front Door resiliency
              • Azure Front Door security
          • Event-store disaster recovery (moved)
          • Failure mode analysis
          • Graceful degradation
            • Graceful degradation architecture
            • Graceful degradation guidelines
            • Graceful degradation implementation
          • V3 reliability maturity model
            • V3 reliability maturity assessment
            • Maturity level 2: self-preservation
            • Maturity level 3: recovery readiness
            • Maturity level 4: maintain stability
            • Maturity level 5: stay resilient
          • Multi-region replication
            • Multi-region replication architecture
            • Multi-region replication guidelines
            • Multi-region replication implementation assessment
          • Reliability testing
          • Scaling and headroom
          • Targets and health model
          • Trade-offs and accepted risks
        • V3 Security
          • API Management
            • API Management Architecture
            • API Management Guidelines
            • API Management Implementation
              • API Contracts and Asynchronous Operations
              • APIM Deployment and Debugging
              • APIM Global Policy Implementation
              • APIM Platform Provisioning
              • APIM Policy Authoring
              • APIM Service Onboarding
              • APIM Webhook Flow Implementation
            • API Management Policy Model
          • V3 Security Architecture
          • Data protection
            • Data protection architecture
            • Data protection guidelines
            • Data protection implementation guidelines
              • API Management
              • Application Gateway
              • Azure SQL Database
              • Azure Container Apps
              • Azure Cosmos DB
              • Azure Front Door
              • Azure Function Apps
              • Azure Database for MySQL
              • Azure Database for PostgreSQL
              • Data protection procedures
          • V3 Security Guidelines
          • V3 Identity
            • Applications and Authorization in ION V3
            • V3 Identity Architecture
            • Capabilities
            • Microsoft Entra ID for ION V3
            • V3 Identity Standard
            • V3 Identity Implementation
              • App Service Authentication
              • Application Registration
              • Application Roles
              • Customer Azure RBAC
              • Customer Identity Onboarding
              • Identity Lifecycle and Operations
              • Mailbox-Scoped Access
              • Managed Identity
              • Workload Identity Federation
            • V3 Identity Workflows
              • Alya Workbench Identity Workflow
              • Customer Azure RBAC Identity Workflow
              • Customer Portal Identity Workflow
              • Mailbox Access Identity Workflow
              • Microservices Identity Workflow
              • ServiceNow Inbound Identity Workflow
              • Shell and MFE Identity Workflow
              • Microsoft Teams Identity Workflow
          • Customer Environment Access
            • Azure Lighthouse
              • Azure Lighthouse implementation
            • GDAP and Tenant Governance
              • Access Packages (legacy)
              • GDAP human access implementation
            • Customer environment access guidelines
            • Multi-tenant Entra apps
              • Multi-tenant Entra apps implementation
            • Teams B2B Direct Connect
              • Teams B2B Direct Connect implementation
          • Network Security
            • Network Security Architecture
            • Network Security Guidelines
            • Network Security Implementation
              • Egress and Static IPs
              • Resource Access Restrictions
          • V3 Security Patterns
    • ION Architecture V4
      • How V4 evolves from V3
  • Principles
  • Patterns
    • Application Permissions Only
    • Async REST
    • Audit Logs (Pattern)
    • Auth / AuthZ
    • Dead Letter Queue (DLQ)
    • Dual Writes (and how to avoid them)
    • ECST — Event-Carried State Transfer
    • Event Hubs Throttling
    • Feature Flags (Pattern)
    • Idempotent Write
    • MFE UI Interaction
    • Notifications (Pattern)
    • Private Data Store Access
    • Schema Evolution
    • Service Bus Topic Throttling
    • UI Interaction with an Event-Sourced Backend
  • Standards
    • API Standard
    • API Standards
    • Coding Standard
    • Coding Standards
    • Documentation Standard
    • Documentation Standards
    • Microservice Standard
    • Microservice Checklist
    • Operational Readiness Standard
    • ORR — Operational Readiness Review Checklist
  • Decisions
    • ADR-0001
    • ADR-0002
    • ADR-0003
    • ADR-0004
    • ADR-0005
    • ADR-0006
    • ADR-0007
    • ADR-0008
    • ADR-0009
    • ADR-0010
    • ADR-0011
    • ADR-0012
    • ADR-0013
    • ADR-0014
    • ADR-0015
    • ADR-0016
    • ADR-0017
    • ADR-0018
    • ADR-0019
    • ADR-0020
    • ADR-0021
    • ADR-0022
    • ADR-0023
    • ADR-0024
    • ADR-0025
    • ADR-0026
    • ADR-0027
    • ADR-0028
    • ADR-0029
    • ADR-0030
    • ADR-0031
    • ADR-0032
    • ADR-0033
    • ADR-0034
  • Services
  • Governance
    • Assumptions
    • Discrepancies
    • V3 reference coverage and conflict matrix
OntinueION Docs
  1. Architecture
  2. ION Architecture V3
  3. Well-Architected
  4. V3 reliability
  5. Edge and routing
  6. Azure Application Gateway
  7. Azure Application Gateway guidelines

Azure Application Gateway guidelines

reliability
architecturev3

Azure Application Gateway guidelines

These rules apply to every change to the ION Application Gateway. MUST and MUST NOT are mandatory. SHOULD and SHOULD NOT are the expected default, and any deviation is recorded in the PR. MAY is optional. Where the current configuration differs from a rule, the gap and its remediation are listed in implementation.

Flexibility in alpha and beta

The rules apply to all environments. mgtapa and mgtbta hold no customer data, so they MAY use a lower minimum capacity or other cost-saving settings, with the reason recorded in the PR. Zones, TLS, certificates, and probe design stay the same in every environment, so what is tested in alpha behaves the same in production.

Topology and routing

  • Every public hostname on the gateway MUST be agw-<app>-webapp.<domain> for a frontend, or agw-api.<domain> for the API. A hostname MUST have one A record in dns.tf that points to the gateway public IP.
  • Every listener MUST be HTTPS only. The gateway MUST NOT have an HTTP listener or a plain-HTTP backend.
  • Backends MUST be addressed by FQDN, over HTTPS on 443, with the backend FQDN as the host override.
  • A listener MUST route to APIM or to a SPA or storage backend. It MUST NOT route to a BFF, Function App, or domain service directly. The legacy docs-site listener is the one exception, and it is removed under gap 24, because the docs site is now on GitHub Pages.
  • SPA hostnames MUST use path-based routing, so API prefixes go to APIM and the rest goes to the SPA host (ADR-0027).
  • Routing-rule priorities MUST be unique. A rule for a specific hostname MUST have a lower number than a rule for a less specific listener, and the host-less catch-all MUST have the highest number.
  • Unused objects MUST be removed: the unused private frontend IP, listeners with no consumer, and the legacy Yammer listener, pool, and rule once the service is retired.
  • New listeners MUST be added in a per-app data-<app>-fe.tf file, not inline in application_gateway.tf.

Capacity and zones

  • The gateway MUST run in zones 1, 2, and 3 in every environment, in line with ADR-0017.
  • mgtgma and mgtprd MUST have a minimum capacity of 2 or more.
  • The maximum capacity MUST be sized from the capacity model and reviewed when a frontend is added.
  • Minimum and maximum capacity MUST be Terraform variables. They MUST NOT be hardcoded in the module.
  • An alert MUST fire when capacity units exceed 80% of the maximum.

Health probes

  • Every backend settings entry MUST have its own probe.
  • Probe interval SHOULD be 10 to 15 seconds. Probe timeout SHOULD be 5 to 10 seconds and MUST be shorter than the interval. Unhealthy threshold SHOULD be 2 or 3.
  • Probes MUST target a real, shallow, anonymous health path, and MUST NOT call optional dependencies:
    • APIM: /status-0123456789abcdef;
    • Azure SignalR: /api/health;
    • SPA hosts: /.
  • Expected status codes SHOULD be the narrowest set the endpoint returns. A wider set needs a comment that says why.
  • A probe host MUST match the HTTP settings host.

Connection draining and affinity

  • Connection draining SHOULD be enabled on every backend pool with more than one instance. The timeout SHOULD cover the longest normal request.
  • Cookie-based affinity MUST be disabled on every backend settings entry, including the SignalR leg. Azure SignalR handles its own connection routing.
  • Backend request timeout SHOULD be the shortest value that covers the longest normal request. The default of 30 seconds is acceptable for APIM and SPA hosts.

TLS and certificates

  • TLS MUST be used on every hop, with no exceptions.
  • The SSL policy MUST be a predefined policy of AppGwSslPolicy20220101S or later, or a custom policy with a minimum of TLS 1.2.
  • The listener certificate MUST come from Key Vault and MUST be referenced by a versionless secret ID. It MUST NOT be a PFX in source, a pipeline variable, or a Terraform variable.
  • The gateway MUST use a dedicated user-assigned managed identity with Key Vault Secrets User scoped to the certificate secrets. It MUST NOT use a shared platform identity.
  • Certificate near-expiry (30 days or less) MUST raise an alert.
  • Trusted-root certificate configuration MUST NOT be present unless a backend presents a private-CA certificate. ION backends present publicly trusted certificates.
  • Module inputs that pin a certificate version MUST NOT be used.

Network

  • The NSG MUST allow GatewayManager on 65200 to 65535, AzureLoadBalancer, AzureFrontDoor.Backend on 443, and Internet on 443 for the sanctioned exceptions only.
  • The NSG MUST NOT allow Internet on port 80. No HTTP listener exists.
  • An AzureSignalR inbound rule MUST be removed unless something uses SignalR upstream calls.
  • Backends that support it MUST restrict access to the gateway subnet through service endpoints or access restrictions. App Service hosts that also serve as Front Door priority-2 origins follow the Front Door origin lockdown rules.
  • ZPA MUST NOT be used for the runtime path from the gateway to a backend. It is for engineers only.

Rewrites and CORS

  • Every Front Door rewrite, header rule, and CORS rule that affects an /api/* path or security header MUST have a documented gateway mirror, and the PR checklist MUST check parity. A route that exists only in Front Door breaks the outage bypass.
  • Security headers MUST be added by the gateway only when X-Azure-FDID does not match ION’s Front Door. The profile ID MUST be read from a Terraform data source, and MUST NOT be written in documentation.
  • The gateway MUST set CORS only for hostnames that browsers reach directly, with an explicit allow-list of exact https:// origins. It MUST NOT use *.
  • Access-Control-Allow-Credentials MUST be set only together with an exact matched origin.
  • Access-Control-Allow-Headers MUST list only the headers that browsers send to that hostname. The # TODO: FIX rule MUST be resolved.
  • Rewrite rules MUST NOT add credentials, API keys, or shared secrets to requests. Rules that set trusted forwarding headers MUST overwrite client-supplied values.
  • CSP variants SHOULD be consolidated into a small shared set. X-Xss-Protection SHOULD be removed.
  • Long term, Front Door and gateway rewrites SHOULD be generated from one route map.

Exceptions

Only these paths may reach the gateway without Front Door, as in ADR-0015 and security:

  • SignalR WebSocket to agw-alya-sigr and agw-alya-shell-sigr. ION SHOULD re-evaluate routing it through Front Door, which now supports WebSockets.
  • Front Door outage bypass, a human change approved by the incident commander.

A new exception MUST be added through an ADR-0015 amendment before it is deployed. Application Gateway MUST NOT be described as Front Door-only until the target-state WAF custom rule exists (security).

Observability

  • Access and performance logs MUST go to the Switzerland North Log Analytics workspace. Azure Policy applies the diagnostic setting, and a stack MUST NOT work around it with a separate setting.
  • Query strings MUST NOT carry secrets or personal data, except the protocol-mandated SignalR connection token, which MUST be short-lived.
  • These alerts MUST exist in every environment, routed to the CPE action group:
    • Resource Health;
    • unhealthy host count;
    • backend 5xx;
    • failed requests;
    • capacity units (80% of maximum);
    • backend connect time;
    • certificate near-expiry.

Change management

  • Changes MUST go through a PR with plan output and be deployed through Runway by CPE. Emergency portal changes MUST be reconciled into IaC immediately.
  • Changes MUST be promoted through mgtapa, mgtbta, and mgtgma before mgtprd, and the hub-test-suite MUST pass in each environment before the next.
  • A PR that changes a shared object (the gateway-rewrite-ruleset, gateway-pool, certificate, probe, or rule priority) MUST call it out, because it affects every hostname.
  • A new listener MUST add its routes to hub-test-suite/agw_routes.yaml in the same PR.
  • IDs (subscription, tenant, Front Door profile ID) and public IP addresses MUST NOT be hard-coded in documentation.
  • The gateway module SHOULD be consumed from a pinned, versioned source. It is a local relative path today.
Related pages

Architecture · Resiliency · Security · Implementation

On this page

  • Topology and routing
  • Capacity and zones
  • Health probes
  • Connection draining and affinity
  • TLS and certificates
  • Network
  • Rewrites and CORS
  • Exceptions
  • Observability
  • Change management
PreviousAzure Application Gateway architecture
NextAzure Application Gateway implementation
Edit on GitHubSecurity