API Management
The shared APIM instance per environment (ADR-0014) is the API boundary for BFFs, integration APIs, and external-provider webhooks such as the Twilio webhooks. The API management pages own API design, authentication, and policy. This page covers only the data-protection configuration of the APIM service, its backends, named values, and diagnostics.
Data the resource handles
- Every API request and response, including bearer tokens, capability tokens, subscription keys, request bodies, and responses.
- Named values, some of which hold secrets for external integrations.
- Optional response cache entries.
- Gateway diagnostics in Log Analytics and Application Insights.
Encryption at rest
- APIM encrypts its configuration and internal cache at rest with platform keys. No extra configuration is needed.
- Response caching MUST follow the API management guidelines: cache keys include every tenant, user, capability, and permission dimension, and sensitive or mutation responses are not cached. Responses that are specific to a user or tenant SHOULD NOT be cached at all unless the cache key is proven to isolate them.
- An external cache, if added, MUST be in Switzerland North, use TLS, and authenticate with managed identity.
Encryption in transit
- Frontend (client-side) protocols SSL 3.0, TLS 1.0, and TLS 1.1 MUST be disabled.
- Backend protocols SSL 3.0, TLS 1.0, and TLS 1.1 MUST be disabled.
- The 3DES cipher (
TLS_RSA_WITH_3DES_EDE_CBC_SHA) MUST be disabled. - Backends MUST use
httpsURLs. Backend entities MUST keep certificate chain and certificate name validation enabled. - HTTP/2 on the client side MAY be enabled. It does not change the TLS requirements.
- Custom domain certificates MUST come from Key Vault through the APIM managed identity, using a versionless secret ID.
Identity and access
- APIM MUST use a user-assigned managed identity for Key Vault access and
for backend authentication
(ADR-0013).
authentication-managed-identityreplaces clientAuthorizationheaders on the backend call. - Subscription keys are not an authentication mechanism for ION APIs. Where a product needs a subscription key for metering, Entra authentication is still required.
- Direct management API access (
tenant/accessenabled) SHOULD remain disabled. Configuration changes go through IaC.
Secrets
- Secrets in named values MUST be Key Vault–backed named values that use the APIM managed identity and a versionless secret ID. Plain secret named values MUST NOT be used for credentials.
- Policy XML, policy fragments, and OpenAPI files MUST NOT contain credentials, tokens, or signing keys.
- Provider secrets for webhooks, such as the Twilio auth token, MUST stay in Key Vault and be read by the backend that validates the signature, as described in API management architecture.
Backup and recovery
- APIM configuration — APIs, operations, products, policies, fragments, named value references, backends, loggers, and diagnostics — MUST be fully in IaC so that a new instance can be built without manual steps.
- APIM service backup and restore is planned under ADR-0017. Until it is implemented and tested, IaC redeploy is the recovery path.
Logging and redaction
- API diagnostics MUST log zero body bytes on frontend and backend request
and response (
body.bytes = 0). - Header logging MUST use an allowlist.
Authorization,Cookie,Set-Cookie,Ocp-Apim-Subscription-Key, capability-token headers, and provider signature headers such asX-Twilio-SignatureMUST NOT be logged. dataMaskingMUST mask or hide query parameters and headers that can carry sensitive values.- Policy
traceandlog-to-eventhubstatements MUST NOT emit tokens, secrets, or request bodies. - Gateway logs (
GatewayLogs) MUST go to the Switzerland North Log Analytics workspace. The Application Insights logger SHOULD use a connection string with Entra-based ingestion. - Request tracing (
Ocp-Apim-Trace) MUST be disabled inprd. - Sampling applies to operational diagnostics only. Audit records required by
ADR-0021 go to
IonAudit_CLand are never sampled; APIM diagnostic sampling does not replace them.
Network exposure
- APIM is reached from Application Gateway. Direct client access that bypasses Front Door and Application Gateway is not supported (ADR-0015).
- Backend network rules that admit APIM MUST allow the APIM public IP from
Terraform outputs, not
0.0.0.0/0or broad Azure ranges. - APIM is public by design. The missing Front Door check (gap APIM-02) is owned by API Management architecture, and backend access restrictions by network security.
Configuration reference
Properties are on Microsoft.ApiManagement/service and its child resources.
Map them to azurerm_api_management* resources or azapi equivalents.
| Setting | Required value | Basis |
|---|---|---|
customProperties ...Security.Protocols.Ssl30, .Tls10, .Tls11 | False | TLS on every hop |
customProperties ...Security.Backend.Protocols.Ssl30, .Tls10, .Tls11 | False | TLS on every hop |
customProperties ...Security.Ciphers.TripleDes168 | False | TLS on every hop |
backends.url | https://... | TLS on every hop |
backends.tls.validateCertificateChain / validateCertificateName | true | TLS on every hop |
hostnameConfigurations.keyVaultId | Versionless Key Vault secret ID | Secrets and Key Vault |
namedValues.keyVault.secretIdentifier | Key Vault–backed for every secret | Secrets and Key Vault |
identity.type | UserAssigned | ADR-0013 |
diagnostics.frontend / backend request / response body.bytes | 0 | ADR-0021 |
diagnostics headers | Allowlist without auth, cookie, key, capability, or signature headers | ADR-0021 |
diagnostics dataMasking | Mask or hide sensitive query parameters and headers | ADR-0021 |