Azure SQL Database
Azure SQL Database (Hyperscale) is the reporting projection store (ADR-0022). Subscriber services populate it from the event stores, and BFFs query it for dashboards. This page covers the data-protection configuration of the logical server, its databases, auditing, and backups.
Data the resource handles
- Reporting projections of customer and incident data, keyed by
customer_short. - Aggregates and history that feed customer-facing dashboards.
The projection is rebuildable from the event stores, but it holds customer data and is protected as a customer-data store.
Encryption at rest
- Transparent data encryption (TDE) MUST stay enabled on every database.
- Microsoft-managed TDE keys are the default. A customer-managed TDE protector MUST NOT be used without a documented compliance driver, key lifecycle, outage impact, and recovery design.
- Tenant segregation MUST use a
customer_shortcolumn on every reporting table and row-level security policies keyed off the caller’s tenant (ADR-0022). Cross-tenant reads need an explicit authorized capability; omitting the filter is not a cross-tenant view.
Encryption in transit
- The logical server MUST set the minimum TLS version to 1.2. TLS 1.3 SHOULD be used where all clients support it.
- Client connection strings MUST set
Encrypt=True(orEncrypt=Strict) and MUST NOT setTrustServerCertificate=True.
Identity and access
- The server MUST use Entra-only authentication. SQL authentication logins are disabled.
- The Entra administrator MUST be an Entra group, not an individual user. Membership is limited to break-glass and platform operators.
- Applications MUST connect with a user-assigned managed identity created
as a contained database user (
CREATE USER ... FROM EXTERNAL PROVIDER) (ADR-0013). - Database roles MUST be least privilege:
- Projection writers get write access only to the tables they own.
- Query services get read access only.
- No application identity gets
db_owneror DDL rights at runtime.
- Schema migrations SHOULD run under a separate migration identity from the pipeline, not under the runtime identity.
Secrets
- With Entra-only authentication there are no SQL credentials to store. The server administrator password set at creation MUST not be used or distributed after Entra-only authentication is enabled.
Backup and recovery
- Short-term retention for point-in-time restore MUST be at least 7 days. Longer periods come from the approved data inventory.
- Backup storage redundancy SHOULD be
Geoinprd, so a backup copy is held in Switzerland West. This is a backup copy, not a DR capability. Other environments MAY useZoneorLocal. - Long-term retention MUST NOT be configured unless the data inventory requires it.
- Databases MUST be zone redundant in
gmaandprd(ADR-0017). prdservers and databases MUST have aCanNotDeleteresource lock or Terraformprevent_destroy.- Restores MUST be tested, with drills in
gma. Because the store is a projection, a rebuild from the event store is also a valid recovery path and SHOULD be tested.
Logging and redaction
- Server auditing MUST be enabled with Azure Monitor as the target, and the
SQLSecurityAuditEventscategory sent to the Switzerland North Log Analytics workspace. - Audit action groups MUST include:
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUPFAILED_DATABASE_AUTHENTICATION_GROUPDATABASE_PERMISSION_CHANGE_GROUPDATABASE_ROLE_MEMBER_CHANGE_GROUPSCHEMA_OBJECT_CHANGE_GROUP
BATCH_COMPLETED_GROUPrecords full statement text. It SHOULD NOT be enabled by default. It MAY be enabled for a bounded period when query analysis needs it, recorded as an exception.- Applications MUST use parameterized queries so that literal values do not appear in statement text, Query Store, or audit records.
- Data-access audit records required by
ADR-0021 are
written by the owning service to
IonAudit_CL.
Network exposure
- Private endpoints are the Phase 2 target (ADR-0016). Until then, the ZPA configuration in ADR-0025 applies.
- Firewall rules MUST allow only ZPA connector IPs and platform IPs.
0.0.0.0/0MUST NOT be allowed. - Virtual network rules SHOULD be used for compute that has VNet integration.
- The
AllowAllWindowsAzureIpsrule (0.0.0.0–0.0.0.0) SHOULD NOT be created. If ZPA routing makes narrow IP rules impractical, it needs a recorded exception; Entra-only authentication stays enforced.
Configuration reference
Properties are on Microsoft.Sql/servers and child resources. Map them to
azurerm_mssql_* resources or azapi equivalents.
| Setting | Required value | Basis |
|---|---|---|
minimalTlsVersion | 1.2 or higher (minimum_tls_version in azurerm) | TLS on every hop |
administrators.azureADOnlyAuthentication | true (azuread_authentication_only in azurerm) | ADR-0013 |
administrators.principalType | Group | Encryption and access |
databases/transparentDataEncryption.state | Enabled | Encryption and access |
databases.zoneRedundant | true in gma and prd | ADR-0017 |
databases.requestedBackupStorageRedundancy | Geo in prd (SHOULD) | Residency and recovery |
backupShortTermRetentionPolicies.retentionDays | At least 7 | Residency and recovery |
auditingSettings.state / isAzureMonitorTargetEnabled | Enabled / true | ADR-0021 |
auditingSettings.auditActionsAndGroups | Authentication, permission, role, and schema change groups | ADR-0021 |
firewallRules | ZPA connector and platform IPs only; no AllowAllWindowsAzureIps without an exception | ADR-0025 |
| Resource lock | CanNotDelete in prd | Residency and recovery |