Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure HorizonDB is a cloud-native, fully managed, PostgreSQL-compatible database service for mission-critical workloads.
This article describes security best practices for protecting Azure HorizonDB deployments.
The security recommendations in this article implement Zero Trust principles: "Verify explicitly", "Use least privilege access", and "Assume breach". For comprehensive Zero Trust guidance, see the Zero Trust Guidance Center.
Network security
Network controls help restrict which clients can reach your Azure HorizonDB cluster before database authentication and authorization occur.
- Use private endpoints when public routing isn't required: Use private endpoints for workloads that can connect privately to Azure HorizonDB instead of routing database traffic over public internet paths. For more information, see Networking overview with public access (allowed IP addresses) and private endpoints in Azure HorizonDB.
- Restrict public access to approved IP addresses: Add firewall rules only for trusted client and application IP addresses or ranges. By default, no public IP addresses are allowed. For more information, see Add firewall rules in Azure HorizonDB.
- Limit broad Azure service access: Avoid the
0.0.0.0firewall rule unless your scenario requires it, because it allows connections from IP addresses allocated to Azure services and assets, including resources in other customer subscriptions. For more information, see Networking overview with public access (allowed IP addresses) and private endpoints in Azure HorizonDB. - Use fully qualified domain names for connections: Use the Azure HorizonDB cluster fully qualified domain name in connection strings instead of an IP address, because the cluster IP address isn't guaranteed to remain static. For more information, see Networking overview with public access (allowed IP addresses) and private endpoints in Azure HorizonDB.
Identity and access management
Identity and access management helps protect Azure HorizonDB by controlling who can manage the cluster, how users and applications authenticate, and what they can do in the database.
- Assign Azure RBAC permissions by least privilege: Grant users and automation only the Azure permissions needed to create, view, modify, or delete Azure HorizonDB resources. For more information, see Azure role-based access control (Azure RBAC).
- Use Microsoft Entra authentication for database access: Authenticate users and applications to Azure HorizonDB with Microsoft Entra ID, and use PostgreSQL roles to grant only the database permissions they need. For more information, see Microsoft Entra authentication in HorizonDB.
- Use user-assigned managed identities (UMI) for passwordless access: Applications can use their own user-assigned managed identities to authenticate to Azure HorizonDB without storing database passwords. A user-assigned managed identity can also be assigned to the cluster for supported service features. For more information, see User-assigned managed identities in Azure HorizonDB.
- Create database roles for application access: Use PostgreSQL roles with specific permissions instead of using the administrator role for applications. For more information, see Access management in Azure HorizonDB.
- Manage local database users separately from Azure RBAC: Create database users and grant database, schema, and table privileges based on each user's workload requirements. For more information, see Manage users in Azure HorizonDB.
- Require SCRAM-SHA-256 password authentication: Configure
password_encryptionand supported authentication methods to use SCRAM-SHA-256, and update user passwords before enforcing SCRAM-only authentication. For more information, see SCRAM authentication in Azure HorizonDB. - Use row-level security for tenant or row-scoped access: Define PostgreSQL row-level security policies when authorization depends on row ownership, tenant boundaries, or classified data access. For more information, see Access management in Azure HorizonDB.
Data protection
Protect stored data with encryption at rest, application-level encryption, and data masking.
Data encryption at rest
Azure HorizonDB always encrypts all managed data at rest, including system and user databases, cluster logs, write-ahead log segments, and backups. Service-managed keys are the default, and customer-managed keys are available in preview. Select the encryption mode when you create the cluster; you can't change it later.
- Use service-managed keys for automatic key management: Let Azure HorizonDB manage encryption keys and their rotation without additional configuration.
- Use customer-managed keys when you need control over keys: Store your key in Azure Key Vault. You're responsible for key permissions, network access, auditing, and rotation.
For more information, see Data encryption at rest in Azure HorizonDB and Configure data encryption in Azure HorizonDB.
Sensitive values and data masking
Use application-level protection and masking to reduce exposure of sensitive data beyond encryption at rest.
- Encrypt sensitive values before storing them: For data that requires application-controlled secrecy in addition to service-managed encryption at rest, encrypt values in the application before writing them to Azure HorizonDB and manage encryption keys separately from database administrators. For more information, see Azure encryption overview.
- Use data masking for controlled data exposure: Use supported PostgreSQL anonymizer capabilities for patterns such as anonymous dumps, static masking, dynamic masking, masking views, and masking data wrappers when you need to reduce sensitive data exposure. For more information, see HorizonDB customized options.
Transport layer security (TLS)
Use TLS to protect data in transit between client applications and your Azure HorizonDB cluster. Azure HorizonDB supports TLS 1.2 and TLS 1.3.
- Verify TLS certificates for client connections: Configure PostgreSQL clients to use
sslmode=verify-fullorsslmode=verify-caso clients validate the Azure HorizonDB cluster certificate. For more information, see Connect clients with TLS security to your database in Azure HorizonDB. - Require TLS 1.3 when clients support it: Set the
ssl_min_protocol_versionparameter toTLSv1.3for workloads that don't need TLS 1.2 compatibility. For more information, see Transport layer security (TLS) in Azure HorizonDB. - Maintain trusted root certificates: Keep required Azure HorizonDB root certificate authorities in client trust stores and avoid trusting intermediate certificate authorities or individual cluster certificates. For more information, see Transport layer security (TLS) in Azure HorizonDB.
Backup and recovery
Backup and recovery controls help you recover from accidental data changes, destructive operations, and availability events.
- Validate recovery requirements against backup retention limits: Azure HorizonDB supports a backup retention period of 1 to 35 days. For more information, see Backups in Azure HorizonDB.
- Restore to a custom point after accidental changes: Use point-in-time restore to create a new cluster from a selected restore point within the current retention window. For more information, see Restore for Azure HorizonDB.
- Configure nodes for availability goals: Use at least two compute nodes for zonal resilience, and use in-region read nodes to offload read workloads and provide failover targets. For more information, see Overview of business continuity in Azure HorizonDB.
- Protect clusters from accidental deletion: Apply Azure resource locks to critical Azure HorizonDB clusters because deleted servers can't currently be restored. For more information, see Protect against accidental deletion by using resource locks in Azure HorizonDB .