Blog Post

Microsoft Blog for PostgreSQL
2 MIN READ

Encryption at rest with customer-managed keys in Azure HorizonDB (Preview)

PieterVanhove's avatar
PieterVanhove
Icon for Microsoft rankMicrosoft
Nov 30, 2026

Take full control of the encryption keys that protect your data at rest.

With customer-managed keys (CMK) for data encryption at rest in Azure HorizonDB, you use a key that you own and manage in Azure Key Vault to protect your cluster, so you can align encryption with your corporate security and compliance policies.

Encryption at rest, now with your choice of keys

Azure HorizonDB always encrypts all data it manages at rest, including system and user databases, cluster logs, write-ahead log (WAL) segments, and backups. The service now supports two modes:

  • Service-managed keys (SMK): the default. The service manages the keys and their rotation for you, using Azure Storage encryption. No action is needed.
  • Customer-managed keys (CMK) (preview): you own and manage the key. Azure HorizonDB uses storage-layer encryption for WAL and page-level encryption for page servers.

You select the encryption mode when you create the cluster, and it can't be changed later.

Why use customer-managed keys

  • Fully control the key life cycle, including rotation, to align with corporate policies.
  • Centrally manage and organize all your encryption keys in your own Azure Key Vault instances.
  • Revoke the cluster's access to the key, which makes encrypted data inaccessible.
  • Implement separation of duties between security officers, database administrators, and system administrators.

What you need to get started

  • An Azure Key Vault in the same region and Microsoft Entra tenant as your cluster.
  • An asymmetric 4,096-bit RSA or RSA-HSM key in the Enabled state.
  • A user-assigned managed identity for the cluster with access to the key.

Get started in the Azure portal

To enable CMK, configure a user-assigned managed identity (UAMI) and a customer-managed key when you create your cluster. In the Security tab, select Customer-managed key for Data encryption key, then choose the UAMI and the key from your Azure Key Vault.

 

 

Create a cluster with CMK using the Azure CLI

Pass the managed identity and the versionless key URI when you create the cluster:

az horizondb cluster create \
--resource-group <resource-group> \
--cluster-name <cluster-name> \
--location <location> \
--version 17 \
--primary-user-assigned-identity-id <managed-identity-resource-id> \
--primary-key-uri <versionless-key-uri>

Try it today

Create a new Azure HorizonDB cluster, choose customer-managed keys as the encryption mode, and tell us what you think. Your feedback during the preview will help shape the general availability release. To learn more, see Configure data encryption at rest in Azure HorizonDB and Data encryption at rest in Azure HorizonDB in the documentation.

Published Nov 24, 2026
Version 1.0
No CommentsBe the first to comment