|
| 1 | +--- |
| 2 | +title: "Configure column encryption using Always Encrypted Wizard in SSMS 21" |
| 3 | +description: Learn how to configure Always Encrypted for database columns by using the Always Encrypted Wizard in SSMS 21. |
| 4 | +author: pietervanhove |
| 5 | +ms.author: pivanho |
| 6 | +ms.reviewer: vanto, maghan, randolphwest |
| 7 | +ms.date: 11/12/2024 |
| 8 | +ms.service: sql |
| 9 | +ms.subservice: security |
| 10 | +ms.topic: concept-article |
| 11 | +f1_keywords: |
| 12 | + - "sql13.swb.alwaysencryptedwizard.f1" |
| 13 | +helpviewer_keywords: |
| 14 | + - "Wizard, Always Encrypted" |
| 15 | +monikerRange: "=azuresqldb-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current" |
| 16 | +--- |
| 17 | + |
| 18 | +# Configure column encryption using Always Encrypted Wizard in SSMS 21 Preview |
| 19 | + |
| 20 | +[!INCLUDE [SQL Server Azure SQL Database Azure SQL Managed Instance](../../../includes/applies-to-version/sql-asdb-asdbmi.md)] |
| 21 | + |
| 22 | +The Always Encrypted Wizard is a powerful tool that allows you to set the desired [Always Encrypted](always-encrypted-database-engine.md) configuration for selected database columns. Depending on the current configuration and the desired target configuration, the wizard can encrypt a column, decrypt it (remove encryption), or re-encrypt it (for example, using a new column encryption key or an encryption type that is different from the current type, configured for the column). Multiple columns can be configured in a single run of the wizard. |
| 23 | + |
| 24 | +The wizard allows you to encrypt columns with existing encryption keys, generate a new column encryption key, or both a new column encryption key and a new column master key. |
| 25 | + |
| 26 | +The wizard's assessment allows you to evaluate the tables in a selected database or choose specific tables to analyze. It identifies columns suitable for encryption and highlights those incompatible with Always Encrypted due to their data type, constraints, and other factors. The wizard provides a detailed list of restrictions for each field, explaining why specific columns can't be encrypted. |
| 27 | + |
| 28 | +When your database is configured with a secure enclave, you can run cryptographic operations in place without moving data out of the database. The wizard removes all dependencies blocking the schema change of the column to be encrypted. It issues an in-place encryption for each column using the enclave within the database engine. When the encryption is finished, the wizard recreates the dependencies. For more information about Always Encrypted with secure enclaves, see [Always Encrypted with secure enclaves](always-encrypted-enclaves.md). |
| 29 | + |
| 30 | +When your database isn't configured with a secure enclave, the wizard allows you to enable a secure enclave. Suppose you choose not to enable a secure enclave or you aren't using enclave-enabled keys. In that case, the wizard moves data out of the database and performs cryptographic operations within the SSMS process. The wizard creates a new table (or tables) with the desired encryption configuration in the database, loads all data from the original tables, performs the requested cryptographic operations, uploads the data to the new tables, and then swaps one or more original tables with the new tables. |
| 31 | + |
| 32 | +> [!TIP] |
| 33 | +> Using in-place encryption using Always Encrypted with secure enclaves, if available in your environment, might substantially reduce the time and the reliability of cryptographic operations. |
| 34 | +
|
| 35 | +Running cryptographic operations can take a long time. During that time, your database isn't available to write transactions. PowerShell is a recommended tool for cryptographic operations on larger tables. See [Configure column encryption using Always Encrypted with PowerShell](configure-column-encryption-using-powershell.md) or [Configure column encryption in-place with PowerShell](always-encrypted-enclaves-configure-encryption-powershell.md). |
| 36 | + |
| 37 | +- For an end-to-end walk-through that shows how to configure Always Encrypted with the wizard and use it in a client application, see the following Azure SQL Database tutorials: |
| 38 | + |
| 39 | + - [Protect sensitive data in Azure SQL Database with Always Encrypted and column master keys in Windows certificate store](/azure/azure-sql/database/always-encrypted-certificate-store-configure) |
| 40 | + |
| 41 | + - [Protect sensitive data in Azure SQL Database with Always Encrypted and column master keys in Azure Key Vault](/azure/sql-database/sql-database-always-encrypted-azure-key-vault) |
| 42 | + |
| 43 | +- For information about Always Encrypted keys, see [Overview of key management for Always Encrypted](overview-of-key-management-for-always-encrypted.md). |
| 44 | + |
| 45 | +- For information about encryption types supported in Always Encrypted, see [Selecting Deterministic or Randomized Encryption](always-encrypted-database-engine.md#selecting--deterministic-or-randomized-encryption). |
| 46 | + |
| 47 | +## Permissions |
| 48 | + |
| 49 | +To perform cryptographic operations using the wizard, you must have the `VIEW ANY COLUMN MASTER KEY DEFINITION` and `VIEW ANY COLUMN ENCRYPTION KEY DEFINITION` permissions. You also need key store permissions to create, access, and use your column master key. For detailed information on key store permissions, go to [Create and store column master keys for Always Encrypted](create-and-store-column-master-keys-always-encrypted.md), or find a section relevant to your key store. |
| 50 | + |
| 51 | +## Open the Always Encrypted wizard |
| 52 | + |
| 53 | +You can launch the wizard at three different levels: |
| 54 | + |
| 55 | +- You can encrypt multiple columns in different tables at a database level. |
| 56 | +- At a table level, if you want ypt multiple columns in the same table. |
| 57 | +- At a column level, if you want ypt one specific column. |
| 58 | + |
| 59 | +1. Connect to your [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] with the Object Explorer component of [!INCLUDE [ssManStudioFull](../../../includes/ssmanstudiofull-md.md)]. |
| 60 | + |
| 61 | +1. To encrypt: |
| 62 | + |
| 63 | + - Multiple columns located in different tables in a database, right-click your database, point to **Tasks**, and then select **Always Encrypted Wizard**. |
| 64 | + |
| 65 | + - Multiple columns in the same table, navigate to the table, right-click on it, and then select **Always Encrypted Wizard**. |
| 66 | + |
| 67 | + - An individual column, navigate to the column, right-click on it, and then select **Always Encrypted Wizard**. |
| 68 | + |
| 69 | +## Column Selection page |
| 70 | + |
| 71 | +On this page, you select columns to encrypt, re-encrypt, or decrypt and define the target encryption configuration for them. |
| 72 | + |
| 73 | +To encrypt a plaintext column (a column that isn't encrypted), select an encryption type (**Deterministic** or **Randomized**) and an encryption key for the column. |
| 74 | + |
| 75 | +Select the desired encryption type and the key to change an encryption type or rotate (change) a column encryption key for an already encrypted column. |
| 76 | + |
| 77 | +If you want the wizard to encrypt or re-encrypt one or more columns using a new column encryption key, pick a key containing **(New)** in its name. The wizard generates the key. |
| 78 | + |
| 79 | +To decrypt a currently encrypted column, select **Plaintext** for the encryption type. |
| 80 | + |
| 81 | +> [!TIP] |
| 82 | +> If you want to use in-place encryption and you're using existing keys, make sure you select enclave-enabled keys, annotated with **(enclave-enabled)**. |
| 83 | +
|
| 84 | +The wizard doesn't support cryptographic operations on temporal and in-memory tables. You can create empty temporal or in-memory tables using Transact-SQL and insert data using your application. |
| 85 | + |
| 86 | +## Column Assessment page |
| 87 | + |
| 88 | +The selected tables and columns are assessed for suitability for Always Encrypted, or Always Encrypted with secure enclaves. The assessment starts automatically by showing a status bar and a list of the tables and columns it currently assesses, which are done, and which are to do. The assessment checks if a table column meets the requirements for Always Encrypted or Always Encrypted with secure enclaves based on the [limitations](../../../relational-databases/security/encryption/always-encrypted-database-engine.md#limitations). |
| 89 | + |
| 90 | +If a column doesn't meet the requirements, the assessment displays an "Error" status for that column. Selecting the Messages link lets you get detailed information about why that specific column can't be encrypted. |
| 91 | + |
| 92 | +You can encrypt the passed assessment columns by checking the checkbox. The wizard automatically skips any columns that don't pass the assessment. Additionally, you can export the results to a CSV or text file by selecting the Report button. |
| 93 | + |
| 94 | +## Master Key Configuration page |
| 95 | + |
| 96 | +If you selected an autogenerated column encryption key for any column on the previous page, you need to either select an existing column master key or configure a new column master key that encrypts the column encryption key on this page. |
| 97 | + |
| 98 | +When configuring a new column master key, you can either pick an existing key in Windows Certificate Store or Azure Key Vault and have the wizard create just a metadata object for the key in the database, or you can choose to generate both the key and the metadata object describing the key in the database. |
| 99 | + |
| 100 | +To use in-place encryption, select **Allow enclave computations** for a new column master key. Selecting this checkbox is allowed only if your database is configured with a secure enclave. |
| 101 | + |
| 102 | +For more information about creating and storing column master keys in Windows Certificate Store, Azure Key Vault or other key stores, see [Create and store column master keys for Always Encrypted](../../../relational-databases/security/encryption/create-and-store-column-master-keys-always-encrypted.md) or [Manage keys for Always Encrypted with secure enclaves](../../../relational-databases/security/encryption/always-encrypted-enclaves-manage-keys.md). |
| 103 | + |
| 104 | +> [!TIP] |
| 105 | +> The wizard allows you to browse and create keys only in the Windows Certificate Store and Azure Key Vault. It also auto-generates the names of the new keys and the database metadata objects describing them. Suppose you need more control over how your keys are provisioned (and more choices for a key store containing your column master key). In that case, you can use the **New Column Master Key** and **New Column Encryption Key** dialogs to create the keys first, and then run the wizard and pick the keys you have created. See [Provision Column Master Keys with the New Column Master Key Dialog](configure-always-encrypted-keys-using-ssms.md#provision-column-master-keys-with-the-new-column-master-key-dialog) or [Provision enclave-enabled keys](always-encrypted-enclaves-provision-keys.md) and [Provision Column Encryption Keys with the New Column Encryption Key Dialog](configure-always-encrypted-keys-using-ssms.md#provision-column-encryption-keys-with-the-new-column-encryption-key-dialog). |
| 106 | +
|
| 107 | +## In-Place Encryption Settings page |
| 108 | + |
| 109 | +If you have configured a secure enclave in your database and you're using enclave-enabled keys, this page allows you to specify the enclave attestation parameters required for in-place encryption. If you don't want to use in-place encryption, unselect **Use in-place encryption for eligible columns** to proceed with client-side encryption. We recommend leaving this checkbox enabled so that the wizard can use in-place encryption. |
| 110 | + |
| 111 | +For more information about enclave attestation, see [Configure attestation for Always Encrypted using Azure Attestation](/azure/azure-sql/database/always-encrypted-enclaves-configure-attestation) |
| 112 | + |
| 113 | +## Related content |
| 114 | + |
| 115 | +- [Always Encrypted](../../../relational-databases/security/encryption/always-encrypted-database-engine.md) |
| 116 | +- [Always Encrypted with secure enclaves](../../../relational-databases/security/encryption/always-encrypted-enclaves.md) |
| 117 | +- [Overview of key management for Always Encrypted](overview-of-key-management-for-always-encrypted.md) |
0 commit comments