Azure Function Apps
Azure Function Apps host ION BFFs, event handlers, projection builders, and integration functions. This page covers the data-protection configuration of the Function App, its host storage, app settings, and telemetry.
Data the resource handles
- Requests and responses for BFF APIs, including user tokens that terminate at the BFF (ADR-0013).
- Events and messages from Cosmos DB change feed, Service Bus, and other triggers, which can contain customer data.
- Host storage: trigger checkpoints, leases, host keys, and (for Durable Functions) orchestration state with inputs and outputs.
- App settings and Key Vault references.
- Logs and traces in Application Insights.
Encryption at rest
- Function Apps hold no authoritative data. The host storage account can hold customer data (for example, Durable Functions state) and MUST follow the storage controls below.
- The host storage account MUST be in Switzerland North, require HTTPS, set minimum TLS 1.2, and disallow public blob access.
- Shared key access on the host storage account SHOULD be disabled where
the hosting plan supports identity-based host storage. Plans that need a
storage connection string for the content share
(
WEBSITE_CONTENTAZUREFILECONNECTIONSTRING) need a recorded exception, and the key MUST be stored as a Key Vault reference and rotated.
Encryption in transit
- HTTPS only MUST be enabled.
- Minimum TLS version MUST be 1.2 for the app and for the SCM (Kudu) site. TLS 1.3 SHOULD be used where supported.
- FTP and FTPS MUST be disabled.
- Outbound calls MUST use HTTPS or TLS-encrypted protocols. Clients MUST NOT disable certificate validation.
Identity and access
- The app MUST use a user-assigned managed identity for every Azure dependency — Cosmos DB, Azure SQL, PostgreSQL, Service Bus, Storage, Key Vault, App Configuration, and Application Insights (ADR-0013).
- Host storage MUST use identity-based connections
(
AzureWebJobsStorage__accountName,AzureWebJobsStorage__credentialset tomanagedidentity, andAzureWebJobsStorage__clientId) instead of a connection string. - Trigger and binding connections MUST use the same identity-based pattern
(
<Connection>__fullyQualifiedNamespace,<Connection>__accountEndpoint, and similar). - Function keys are not the authentication mechanism for ION APIs. HTTP functions MUST validate Entra tokens, and APIM calls the backend with its managed identity.
- Basic authentication for publishing (FTP and SCM) MUST be disabled. Deployments use Entra-authenticated pipelines.
Secrets
- Platform-internal credentials MUST NOT be stored as app settings.
- Remaining third-party secrets MUST be Key Vault references
(
@Microsoft.KeyVault(SecretUri=...)) to versionless secret URIs, so rotation is picked up without a deployment. keyVaultReferenceIdentityMUST be set to the app’s user-assigned identity.- Secret values MUST NOT appear in Terraform variables, app settings as plain values, or pipeline logs.
Backup and recovery
- Function Apps are stateless. Recovery is a redeploy from IaC and the build artifact.
- Durable Functions task hubs and trigger checkpoints in host storage are
recoverable state. The host storage account MUST use zone-redundant
storage in
gmaandprd. - Plans SHOULD be zone redundant in
gmaandprdwhere the tier supports it (ADR-0017).
Logging and redaction
- Telemetry MUST go to Application Insights backed by the Switzerland North Log Analytics workspace (ADR-0021).
- Application Insights ingestion SHOULD be Entra-authenticated
(
APPLICATIONINSIGHTS_AUTHENTICATION_STRINGset toAuthorization=AAD;ClientId=<identity client ID>), with local auth disabled on the Application Insights resource. - Request and response bodies MUST NOT be logged or traced. Structured log
properties MUST NOT include tokens, secrets, capability tokens, or whole
domain objects.
customerShortanduserEmailMAY be logged. - SQL command text collection in dependency telemetry MUST stay off.
- Audit records go to
IonAudit_CL, unsampled and unredacted. Sampling applies to operational telemetry only. - Diagnostic settings SHOULD send
FunctionAppLogsto the Switzerland North Log Analytics workspace.
Network exposure
- Access restrictions MUST default to
Deny.- BFFs and APIs allow only APIM and the required ZPA connector IPs.
- The SCM site MUST use the main site’s restrictions
(
scmIpSecurityRestrictionsUseMain) or stricter rules.
0.0.0.0/0MUST NOT be allowed.- VNet integration SHOULD be used for outbound traffic where feasible. Outbound IPs or the integration subnet are the platform IPs that data stores allow.
- Private endpoints for inbound traffic are the Phase 2 target (ADR-0016).
Configuration reference
Properties are on Microsoft.Web/sites and its child resources. Map them to
azurerm_linux_function_app or azapi equivalents.
| Setting | Required value | Basis |
|---|---|---|
httpsOnly | true (https_only in azurerm) | TLS on every hop |
siteConfig.minTlsVersion | 1.2 or higher (minimum_tls_version in azurerm) | TLS on every hop |
siteConfig.scmMinTlsVersion | 1.2 or higher | TLS on every hop |
siteConfig.ftpsState | Disabled (ftps_state in azurerm) | TLS on every hop |
basicPublishingCredentialsPolicies/ftp and /scm allow | false | ADR-0013 |
identity.type | UserAssigned | ADR-0013 |
keyVaultReferenceIdentity | User-assigned identity resource ID | Secrets and Key Vault |
App setting AzureWebJobsStorage__accountName | Identity-based host storage (no AzureWebJobsStorage connection string) | Secrets and Key Vault |
siteConfig.ipSecurityRestrictionsDefaultAction | Deny | ADR-0025 |
siteConfig.scmIpSecurityRestrictionsUseMain | true | ADR-0025 |
virtualNetworkSubnetId | Integration subnet (SHOULD) | ADR-0025 |
App setting APPLICATIONINSIGHTS_AUTHENTICATION_STRING | Entra ingestion (SHOULD) | ADR-0021 |