Skip to content

Commit 5f5a318

Browse files
authored
Merge pull request #6418 from DBAlberto/patch-2
Add support for key version on the key vault
2 parents d0eed2b + dd5c39b commit 5f5a318

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

docs/relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,20 @@ For a note about the minimum permission levels needed for each action in this se
442442
WITH PROVIDER_KEY_NAME = 'ContosoRSAKey0',
443443
CREATION_DISPOSITION = OPEN_EXISTING;
444444
```
445+
446+
Beginning with updated version 1.0.5.0 of the SQL Server connector, you can refer to a specific key version in the Azure key vault:
447+
448+
```sql
449+
CREATE ASYMMETRIC KEY EKMSampleASYKey
450+
FROM PROVIDER [AzureKeyVault_EKM]
451+
WITH PROVIDER_KEY_NAME = 'ContosoRSAKey0/1a4d3b9b393c4678831ccc60def75379',
452+
CREATION_DISPOSITION = OPEN_EXISTING;
453+
```
454+
455+
In the preceding example script, `1a4d3b9b393c4678831ccc60def75379` represents the specific version of the key that will be used. If you use this script, it doesn't matter if you update the key with a new version. The key version (for example) `1a4d3b9b393c4678831ccc60def75379` will always be used for database operations. For this scenario, you must complete two prerequisites:
456+
457+
1. Create a **SQL Server Cryptographic Provider** key on **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\\**.
458+
1. Delegate access permissions on the **SQL Server Cryptographic Provider** key to the user account running the SQL Server database engine service.
445459

446460
1. Create a new login by using the asymmetric key in [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] that you created in the preceding step.
447461

@@ -481,8 +495,7 @@ For a note about the minimum permission levels needed for each action in this se
481495
CREATE DATABASE ENCRYPTION KEY
482496
WITH ALGORITHM = AES_256
483497
ENCRYPTION BY SERVER ASYMMETRIC KEY EKMSampleASYKey;
484-
```
485-
498+
```
486499
1. Encrypt the test database. Enable TDE by setting ENCRYPTION ON.
487500

488501
```sql

0 commit comments

Comments
 (0)