Skip to content

Commit 627a6f3

Browse files
Sql vm akv changes (#35123)
* Update managed identity EKM requirements in documentation Added explicit exclusion for "Azure Cloud HSM" after discussion with Pieter Vanhove. Update key vault creation steps with support note Clarify supported Azure Key Vault services Added explicit exclusion for "Azure Cloud HSM" after discussion with Pieter Vanhove. * Edit pass --------- Co-authored-by: Randolph West MSFT <97149825+rwestMSFT@users.noreply.github.com>
1 parent bee9dcd commit 627a6f3

3 files changed

Lines changed: 99 additions & 70 deletions

File tree

azure-sql/virtual-machines/windows/managed-identity-extensible-key-management.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: Managed Identity Support for Extensible Key Management (EKM) with Azure K
33
description: Learn how to use managed identities with SQL Server on Azure Virtual Machines and Transparent Data Encryption (TDE) Extensible Key Management with Azure Key Vault.
44
author: Pietervanhove
55
ms.author: pivanho
6-
ms.reviewer: vanto, mathoma
7-
ms.date: 02/16/2025
6+
ms.reviewer: vanto, mathoma, randolphwest
7+
ms.date: 10/06/2025
88
ms.service: azure-vm-sql-server
99
ms.subservice: security
1010
ms.topic: how-to
@@ -19,7 +19,7 @@ This article shows you how to use managed identities for Extensible Key Manageme
1919

2020
Starting with SQL Server 2022 Cumulative Update 17 (CU17), managed identities are supported for EKM with AKV and Managed Hardware Security Modules (HSM) on SQL Server on Azure VMs. Managed identities are the recommended authentication method to allow different Azure services to authenticate the SQL Server on Azure VM resource without using passwords or secrets. For more information on managed identities, see [Managed identity types](/entra/identity/managed-identities-azure-resources/overview#managed-identity-types).
2121

22-
> [!NOTE]
22+
> [!NOTE]
2323
> Managed identities are only supported for SQL Server on Azure VMs and not for SQL Server on-premises.
2424
>
2525
> For information on setting up EKM with AKV for SQL Server on-premises, see [Set up SQL Server TDE Extensible Key Management by using Azure Key Vault](/sql/relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault).
@@ -29,6 +29,10 @@ Starting with SQL Server 2022 Cumulative Update 17 (CU17), managed identities ar
2929
- A SQL Server on Azure VM with SQL Server 2022 CU17 or later [registered with the SQL IaaS Agent extension](sql-agent-extension-manually-register-single-vm.md).
3030
- The SQL Server instance using a managed identity for EKM must be [configured with Microsoft Entra authentication](configure-azure-ad-authentication-for-sql-vm.md), whether or not it's the instance registered with the extension.
3131
- An Azure Key Vault and key created in the key vault. For more information, see [Create a key vault](/sql/relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault?tabs=portal#step-2-create-a-key-vault).
32+
33+
> [!NOTE]
34+
> Only Azure Key Vault and Azure Key Vault Managed HSM are supported. Azure Cloud HSM isn't supported.
35+
3236
- Managed identities are supported for EKM with AKV. The primary managed identity for the SQL Server on Azure VM needs:
3337
- To be assigned with a user-assigned managed identity or system-assigned managed identity. For more information, see [Configure managed identities on Azure virtual machines (VMs)](/entra/identity/managed-identities-azure-resources/how-to-configure-managed-identities) and [Enable Microsoft Entra authentication](configure-azure-ad-authentication-for-sql-vm.md#enable-microsoft-entra-authentication).
3438
- To have the `Key Vault Crypto Service Encryption User` role for the primary managed identity assigned to the key vault if you're using [Azure role-based access control](/sql/relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault?tabs=portal#azure-role-based-access-control) or the *Unwrap Key* and *Wrap Key* permissions if you're using [vault access policy](/sql/relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault?tabs=portal#vault-access-policy).
@@ -43,30 +47,32 @@ Before you can create a credential using a managed identity, you need to add a r
4347
The following example shows how to create a credential for a managed identity to use with the AKV:
4448

4549
```sql
46-
CREATE CREDENTIAL [<akv-name>.vault.azure.net]
50+
CREATE CREDENTIAL [<akv-name>.vault.azure.net]
4751
WITH IDENTITY = 'Managed Identity'
48-
FOR CRYPTOGRAPHIC PROVIDER AzureKeyVault_EKM_Prov
52+
FOR CRYPTOGRAPHIC PROVIDER AzureKeyVault_EKM_Prov;
4953
```
5054

5155
You can check the AKV name by querying `sys.credentials`:
5256

5357
```sql
5458
SELECT name, credential_identity
55-
FROM sys.credentials
59+
FROM sys.credentials;
5660
```
5761

5862
The `WITH IDENTITY = 'Managed Identity'` clause requires a primary managed identity assigned to the SQL Server on Azure VM.
5963

6064
For more information on setting up EKM with AKV, see [Set up SQL Server TDE Extensible Key Management by using Azure Key Vault](/sql/relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault).
6165

62-
## Creating a credential to use with Managed Hardware Security Modules (HSMs)
66+
<a id="creating-a-credential-to-use-with-managed-hardware-security-modules-hsms"></a>
67+
68+
## Create a credential to use with managed hardware security modules (HSMs)
6369

6470
To create a credential to use with Azure Key Vault Managed Hardware Security Modules (HSMs), use the following syntax:
6571

6672
```sql
67-
CREATE CREDENTIAL [<akv-name>.managedhsm.azure.net]
73+
CREATE CREDENTIAL [<akv-name>.managedhsm.azure.net]
6874
WITH IDENTITY = 'Managed Identity'
69-
FOR CRYPTOGRAPHIC PROVIDER AzureKeyVault_EKM_Prov
75+
FOR CRYPTOGRAPHIC PROVIDER AzureKeyVault_EKM_Prov;
7076
```
7177

7278
For more information on setting up EKM with AKV, see [Set up SQL Server TDE Extensible Key Management by using Azure Key Vault](/sql/relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault).
@@ -78,31 +84,31 @@ If your current configuration is using EKM with AKV using a secret, you'll need
7884
1. Create the credential using a managed identity:
7985

8086
```sql
81-
CREATE CREDENTIAL [<akv-name>.vault.azure.net]
87+
CREATE CREDENTIAL [<akv-name>.vault.azure.net]
8288
WITH IDENTITY = 'Managed Identity'
83-
FOR CRYPTOGRAPHIC PROVIDER AzureKeyVault_EKM_Prov
89+
FOR CRYPTOGRAPHIC PROVIDER AzureKeyVault_EKM_Prov;
8490
```
8591

8692
1. If there's a credential using a secret associated with the SQL Server administration domain login, drop the existing credential:
8793

8894
```sql
8995
ALTER LOGIN [<domain>\<login>]
90-
DROP CREDENTIAL [<existing-credential-name>]
96+
DROP CREDENTIAL [<existing-credential-name>];
9197
```
9298

9399
1. Associate the new credential with the SQL Server administration domain login:
94100

95101
```sql
96102
ALTER LOGIN [<domain>\<login>]
97-
ADD CREDENTIAL [<akv-name>.vault.azure.net]
103+
ADD CREDENTIAL [<akv-name>.vault.azure.net];
98104
```
99105

100106
You can check the encrypted database view to verify the database encryption using the following query:
101107

102108
```sql
103-
SELECT *
104-
FROM sys.dm_database_encryption_keys
105-
WHERE database_id=db_id('<your-database-name>')
109+
SELECT *
110+
FROM sys.dm_database_encryption_keys
111+
WHERE database_id = db_id('<your-database-name>');
106112
```
107113

108114
For more information on setting up EKM with AKV, see [Set up SQL Server TDE Extensible Key Management by using Azure Key Vault](/sql/relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault).
Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,65 @@
11
---
2-
title: "Extensible Key Management using Azure Key Vault"
2+
title: Extensible Key Management Using Azure Key Vault
33
description: Use the SQL Server Connector for Extensible Key Management with Azure Key Vault for SQL Server.
44
author: jaszymas
55
ms.author: jaszymas
6-
ms.reviewer: vanto
7-
ms.date: "07/22/2016"
6+
ms.reviewer: vanto, randolphwest
7+
ms.date: 10/06/2025
88
ms.service: sql
99
ms.subservice: security
1010
ms.topic: conceptual
11+
ms.custom:
12+
- sfi-image-nochange
1113
helpviewer_keywords:
1214
- "Extensible Key Management with key vault"
1315
- "Transparent Data Encryption, using EKM and key vault"
1416
- "EKM, with key vault"
1517
- "TDE, EKM and key vault"
1618
- "Key Management with key vault"
1719
- "SQL Server Connector, about"
18-
ms.custom: sfi-image-nochange
1920
---
20-
# Extensible Key Management Using Azure Key Vault (SQL Server)
21+
# Extensible Key Management using Azure Key Vault (SQL Server)
22+
2123
[!INCLUDE [SQL Server](../../../includes/applies-to-version/sqlserver.md)]
2224

23-
The [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] Connector for [!INCLUDE[msCoName](../../../includes/msconame-md.md)] Azure Key Vault enables [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] encryption to use the Azure Key Vault service as an [Extensible Key Management &#40;EKM&#41;](../../../relational-databases/security/encryption/extensible-key-management-ekm.md) provider to protect [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] encryption keys.
24-
25-
This topic describes the [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] connector. Additional information is available in [Setup Steps for Extensible Key Management Using the Azure Key Vault](../../../relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault.md), [Use SQL Server Connector with SQL Encryption Features](../../../relational-databases/security/encryption/use-sql-server-connector-with-sql-encryption-features.md), and [SQL Server Connector Maintenance & Troubleshooting](../../../relational-databases/security/encryption/sql-server-connector-maintenance-troubleshooting.md).
26-
27-
## <a name="Uses"></a> What is Extensible Key Management (EKM) and Why Use it?
28-
[!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] provides several types of encryption that help protect sensitive data, including [Transparent Data Encryption &#40;TDE&#41;](../../../relational-databases/security/encryption/transparent-data-encryption.md), [Column Level Encryption](../../../relational-databases/security/encryption/encrypt-a-column-of-data.md) (CLE), and [Backup Encryption](../../../relational-databases/backup-restore/backup-encryption.md). In all of these cases, in this traditional key hierarchy, the data is encrypted using a symmetric data encryption key (DEK). The symmetric data encryption key is further protected by encrypting it with a hierarchy of keys stored in [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)]. Instead of this model, the alternative is the EKM Provider Model. Using the EKM provider architecture enables [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] to protect the data encryption keys by using an asymmetric key stored outside of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] in an external cryptographic provider. This model adds an additional layer of security and separates the management of keys and data.
29-
30-
The following image compares the traditional service-manage key hierarchy with the Azure Key Vault system.
31-
32-
![Diagram that compares the traditional service-manage key hierarchy with the Azure Key Vault system.](../../../relational-databases/security/encryption/media/ekm-key-hierarchy-traditional.png "ekm-key-hierarchy-traditional")
33-
34-
35-
The [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] Connector serves as a bridge between [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] and Azure Key Vault, so [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] can leverage the scalability, high performance, and high availability of the Azure Key Vault service. The following image represents how the key hierarchy works in the EKM provider architecture with Azure Key Vault and [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] Connector.
36-
37-
Azure Key Vault can be used with [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] installations on [!INCLUDE[msCoName](../../../includes/msconame-md.md)] Azure Virtual Machines and for on-premises servers. The key vault service also provides the option to use tightly controlled and monitored Hardware Security Modules (HSMs) for a higher level of protection for asymmetric encryption keys. For more information about the key vault, see [Azure Key Vault](/azure/key-vault/general/basic-concepts).
38-
39-
The following image summarizes the process flow of EKM using the key vault. (The process step numbers in the image are not meant to match the setup step numbers that follow the image.)
40-
41-
![SQL Server EKM using the Azure Key Vault](../../../relational-databases/security/encryption/media/ekm-using-azure-key-vault.png "SQL Server EKM using the Azure Key Vault")
25+
The [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] Connector for Azure Key Vault enables [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] encryption to use the Azure Key Vault service as an [Extensible Key Management (EKM)](extensible-key-management-ekm.md) provider to protect [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] encryption keys.
26+
27+
This article describes the [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] connector. More information is available in:
28+
29+
- [Set up SQL Server TDE Extensible Key Management by using Azure Key Vault](setup-steps-for-extensible-key-management-using-the-azure-key-vault.md)
30+
- [Use SQL Server Connector with SQL Encryption Features](use-sql-server-connector-with-sql-encryption-features.md)
31+
- [SQL Server Connector Maintenance & Troubleshooting](sql-server-connector-maintenance-troubleshooting.md)
32+
33+
<a id="Uses"></a>
34+
35+
## What is Extensible Key Management (EKM) and why use it?
36+
37+
[!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] provides several types of encryption that help protect sensitive data, including [Transparent data encryption (TDE)](transparent-data-encryption.md), [Encrypt a Column of Data](encrypt-a-column-of-data.md) (CLE), and [Backup encryption](../../backup-restore/backup-encryption.md). In all of these cases, in this traditional key hierarchy, the data is encrypted using a symmetric data encryption key (DEK). The symmetric data encryption key is further protected by encrypting it with a hierarchy of keys stored in [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)].
38+
39+
Instead of this model, the alternative is the EKM Provider Model. Using the EKM provider architecture enables [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] to protect the data encryption keys by using an asymmetric key stored outside of [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] in an external cryptographic provider. This model adds an additional layer of security and separates the management of keys and data.
40+
41+
The following image compares the traditional service-manage key hierarchy with the Azure Key Vault system.
42+
43+
:::image type="content" source="media/ekm-key-hierarchy-traditional.png" alt-text="Diagram that compares the traditional service-manage key hierarchy with the Azure Key Vault system." lightbox="media/ekm-key-hierarchy-traditional.png":::
44+
45+
The [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] Connector serves as a bridge between [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] and Azure Key Vault, so [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] can use the scalability, high performance, and high availability of the Azure Key Vault service. The following image represents how the key hierarchy works in the EKM provider architecture with Azure Key Vault and [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] Connector.
46+
47+
Azure Key Vault can be used with [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] installations on Azure Virtual Machines and for on-premises servers. The key vault service also provides the option to use tightly controlled and monitored Hardware Security Modules (HSMs) for a higher level of protection for asymmetric encryption keys. For more information about the key vault, see [Azure Key Vault](/azure/key-vault/general/basic-concepts).
48+
49+
> [!NOTE]
50+
> Only Azure Key Vault and Azure Key Vault Managed HSM are supported. Azure Cloud HSM isn't supported.
51+
52+
The following image summarizes the process flow of EKM using the key vault. (The process step numbers in the image aren't meant to match the setup step numbers that follow the image.)
53+
54+
:::image type="content" source="media/ekm-using-azure-key-vault.png" alt-text="Screenshot of SQL Server EKM using the Azure Key Vault." lightbox="media/ekm-using-azure-key-vault.png":::
4255

4356
> [!NOTE]
44-
> Versions 1.0.0.440 and older have been replaced and are no longer supported in production environments. Upgrade to version 1.0.1.0 or later by visiting the [Microsoft Download Center](https://www.microsoft.com/download/details.aspx?id=45344) and using the instructions on the [SQL Server Connector Maintenance & Troubleshooting](../../../relational-databases/security/encryption/sql-server-connector-maintenance-troubleshooting.md) page under "Upgrade of SQL Server Connector."
45-
46-
For the next step, see [Setup Steps for Extensible Key Management Using the Azure Key Vault](../../../relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault.md).
47-
48-
For use scenarios, see [Use SQL Server Connector with SQL Encryption Features](../../../relational-databases/security/encryption/use-sql-server-connector-with-sql-encryption-features.md).
49-
50-
## See Also
51-
[SQL Server Connector Maintenance & Troubleshooting](../../../relational-databases/security/encryption/sql-server-connector-maintenance-troubleshooting.md)
52-
57+
> Versions 1.0.0.440 and older are no longer supported in production environments. Upgrade to version 1.0.1.0 or a later version by visiting the [Microsoft Download Center](https://www.microsoft.com/download/details.aspx?id=45344) and using the instructions on the [SQL Server Connector Maintenance & Troubleshooting](sql-server-connector-maintenance-troubleshooting.md) page under "Upgrade of SQL Server Connector."
58+
59+
For the next step, see [Set up SQL Server TDE Extensible Key Management by using Azure Key Vault](setup-steps-for-extensible-key-management-using-the-azure-key-vault.md).
60+
61+
For use scenarios, see [Use SQL Server Connector with SQL Encryption Features](use-sql-server-connector-with-sql-encryption-features.md).
62+
63+
## Related content
64+
65+
- [SQL Server Connector Maintenance & Troubleshooting](sql-server-connector-maintenance-troubleshooting.md)

0 commit comments

Comments
 (0)