Application Gateway
Application Gateway (v2) is the regional layer-7 gateway between Azure Front Door and APIM. ADR-0015 defines its place in the edge topology. This page covers the data-protection configuration of its listeners, certificates, backend settings, and diagnostics.
Data the resource handles
- Every API and SPA request that passes Front Door, including bearer tokens, capability tokens, request bodies, and responses.
- TLS certificates for listeners.
- Access logs that contain client IP, request URI including query string, host, user agent, and response metadata.
Application Gateway does not persist request or response data.
Encryption at rest
- Application Gateway stores no customer data at rest. The listener certificate MUST come from Key Vault and MUST NOT be uploaded as a PFX file stored in source, pipeline variables, or Terraform variables.
Encryption in transit
- The SSL policy MUST be the predefined
AppGwSslPolicy20220101Sor a later predefined policy, or aCustomV2policy with minimum protocolTLSv1_2. Older predefined policies that allow TLS 1.0 or 1.1 MUST NOT be used. - Listeners MUST use HTTPS. An HTTP listener, if present, MUST only redirect to HTTPS and MUST NOT route to a backend.
- Backend settings MUST use HTTPS to APIM and other backends. Backend host names MUST match the backend certificate so that certificate validation succeeds without disabling checks.
- Trusted root certificates MUST NOT be configured unless a backend presents a certificate from a private CA. ION backends present publicly trusted certificates, so no trusted-root configuration is needed.
Identity and access
- The gateway MUST use a dedicated user-assigned managed identity to read the listener certificate from Key Vault, with the Key Vault Secrets User role scoped to the certificate secrets through Key Vault RBAC. It MUST NOT use a shared platform identity.
- Configuration changes MUST go through IaC. Portal write access MUST be limited to break-glass roles.
Secrets
- Listener certificates MUST be referenced by a versionless Key Vault secret ID so the gateway picks up rotated certificates automatically.
- Rewrite rules MUST NOT add credentials, API keys, or shared secrets to requests. Rewrite rules that set trusted forwarding headers MUST overwrite client-supplied values.
Backup and recovery
- Application Gateway holds no authoritative data. Recovery is a redeploy from IaC.
- Listeners, rules, rewrite sets, backend pools and settings, health probes, SSL policy, and certificate references MUST be in IaC.
- The gateway MUST be deployed across availability zones 1, 2, and 3 in every environment, in line with the multi-AZ posture in ADR-0017. Alpha and beta MAY use a lower minimum capacity, but not fewer zones.
Logging and redaction
ApplicationGatewayAccessLogMUST be sent to the Switzerland North Log Analytics workspace.ApplicationGatewayFirewallLogMUST be sent where a WAF policy is attached.- Diagnostic settings are applied through Azure Policy. Stacks SHOULD use resource-specific tables.
- Access logs record the full request URI. Tokens, secrets, and personal data
other than identifiers such as
customerShortMUST NOT be placed in query strings. The one exception is the short-lived SignalR connection token that the SignalR client protocol sends as anaccess_tokenquery parameter on the WebSocket hostnames. It is logged, and this is a flagged risk. See Application Gateway security.
Network exposure
- Application Gateway MUST accept client traffic only from Front Door,
except for the SignalR WebSocket hostnames and the manual Front Door outage
bypass recorded in
ADR-0015.
The subnet NSG rules, the
AzureFrontDoor.Backendservice tag, and the Front Door ID check are owned by Application Gateway security. - Application Gateway WAF is not enabled; the target-state WAF is owned by Application Gateway security and is out of scope for this page.
Configuration reference
Properties are on Microsoft.Network/applicationGateways. Map them to
azurerm_application_gateway blocks or azapi equivalents.
| Setting | Required value | Basis |
|---|---|---|
sslPolicy.policyType / policyName | Predefined / AppGwSslPolicy20220101S or later | TLS on every hop |
httpListeners.protocol | Https (HTTP only for redirect) | TLS on every hop |
sslCertificates.keyVaultSecretId | Versionless Key Vault secret ID | Secrets and Key Vault |
identity.type | UserAssigned | ADR-0013 |
backendHttpSettingsCollection.protocol | Https | TLS on every hop |
backendHttpSettingsCollection.hostName or pickHostNameFromBackendAddress | Matches the backend certificate | TLS on every hop |
zones | 1, 2, 3 in every environment | ADR-0017 |
| Diagnostic settings | ApplicationGatewayAccessLog (and ApplicationGatewayFirewallLog with WAF) to Switzerland North Log Analytics | ADR-0021 |