Skip to content

Commit b1dd749

Browse files
committed
Merge branch 'main' into release-2022-cu1
2 parents 4003221 + 2e00016 commit b1dd749

75 files changed

Lines changed: 2466 additions & 1351 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.openpublishing.redirection.azure-sql.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,11 @@
480480
"redirect_url": "/azure/security-center/defender-for-sql-on-machines-vulnerability-assessment",
481481
"redirect_document_id": false
482482
},
483+
{
484+
"source_path_from_root": "/azure-sql/database/always-encrypted-enclaves-enable-sgx.md",
485+
"redirect_url": "/azure/azure-sql/database/always-encrypted-enclaves-enable",
486+
"redirect_document_id": false
487+
},
483488
{
484489
"source_path_from_root": "/azure-sql/database/machine-learning-services-add-r-packages.md",
485490
"redirect_url": "/sql/machine-learning/package-management/install-additional-r-packages-on-sql-server?context=/azure/azure-sql/managed-instance/context/ml-context&view=azuresqldb-mi-current",

azure-sql/database/active-geo-replication-configure-portal.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ This operation permanently stops the replication to the secondary database, and
151151
1. In the [Azure portal](https://portal.azure.com), browse to the primary database in the geo-replication partnership.
152152
2. Select **Replicas**.
153153
3. In the **Geo replicas** list, select the database you want to remove from the geo-replication partnership, select the ellipsis, and then select **Stop replication**.
154-
155-
:::image type="content" source="./media/active-geo-replication-configure-portal/azure-portal-select-stop-replication.png" alt-text="Screenshot that shows selecting stop replication from the drop-down.":::
156154
5. A confirmation window opens. Click **Yes** to remove the database from the geo-replication partnership. (Set it to a read-write database not part of any replication.)
157155

158156
# [Azure CLI](#tab/azure-cli)

azure-sql/database/always-encrypted-enclaves-configure-attestation.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Configure Azure Attestation for Always Encrypted with secure enclav
44
author: jaszymas
55
ms.author: jaszymas
66
ms.reviewer: vanto
7-
ms.date: 07/14/2021
7+
ms.date: 02/01/2023
88
ms.service: sql-database
99
ms.subservice: security
1010
ms.topic: how-to
@@ -24,25 +24,29 @@ keywords:
2424

2525
[!INCLUDE[appliesto-sqldb](../includes/appliesto-sqldb.md)]
2626

27-
[Microsoft Azure Attestation](/azure/attestation/overview) is a solution for attesting Trusted Execution Environments (TEEs), including Intel Software Guard Extensions (Intel SGX) enclaves.
27+
[Microsoft Azure Attestation](/azure/attestation/overview) is a solution for attesting Trusted Execution Environments (TEEs), including Intel Software Guard Extensions (Intel SGX) enclaves.
2828

2929
To use Azure Attestation for attesting Intel SGX enclaves used for [Always Encrypted with secure enclaves](/sql/relational-databases/security/encryption/always-encrypted-enclaves) in Azure SQL Database, you need to:
3030

3131
1. Create an [attestation provider](/azure/attestation/basic-concepts#attestation-provider) and configure it with the recommended attestation policy.
3232

3333
2. Determine the attestation URL and share it with application administrators.
3434

35+
> [!IMPORTANT]
36+
>With Intel SGX enclaves in Azure SQL Database, attestation is mandatory and it requires Microsoft Azure Attestation.
37+
VBS enclaves in Azure SQL Database (in preview) currently do not support attestation. This document only applies to Intel SGX enclaves.
38+
3539
> [!NOTE]
36-
> Configuring attestation is the responsibility of the attestation administrator. See [Roles and responsibilities when configuring SGX enclaves and attestation](always-encrypted-enclaves-plan.md#roles-and-responsibilities-when-configuring-sgx-enclaves-and-attestation).
40+
> Configuring attestation is the responsibility of the attestation administrator. See [Roles and responsibilities when configuring Intel SGX enclaves and attestation](always-encrypted-enclaves-plan.md#roles-and-responsibilities-when-configuring-intel-sgx-enclaves-and-attestation).
3741
3842
## Create and configure an attestation provider
3943

40-
An [attestation provider](/azure/attestation/basic-concepts#attestation-provider) is a resource in Azure Attestation that evaluates [attestation requests](/azure/attestation/basic-concepts#attestation-request) against [attestation policies](/azure/attestation/basic-concepts#attestation-request) and issues [attestation tokens](/azure/attestation/basic-concepts#attestation-token).
44+
An [attestation provider](/azure/attestation/basic-concepts#attestation-provider) is a resource in Azure Attestation that evaluates [attestation requests](/azure/attestation/basic-concepts#attestation-request) against [attestation policies](/azure/attestation/basic-concepts#attestation-request) and issues [attestation tokens](/azure/attestation/basic-concepts#attestation-token).
4145

4246
Attestation policies are specified using the [claim rule grammar](/azure/attestation/claim-rule-grammar).
4347

4448
> [!IMPORTANT]
45-
> An attestation provider gets created with the default policy for Intel SGX enclaves, which does not validate the code running inside the enclave. Microsoft strongly advises you set the below recommended policy, and not use the default policy, for Always Encrypted with secure enclaves.
49+
> An attestation provider gets created with the default policy for Intel SGX enclaves, which does not validate the code running inside the enclave. Microsoft strongly advises you set the recommended policy used in the following output, and not use the default policy for Always Encrypted with secure enclaves.
4650
4751
Microsoft recommends the following policy for attesting Intel SGX enclaves used for Always Encrypted in Azure SQL Database:
4852

@@ -58,16 +62,23 @@ authorizationrules
5862
};
5963
```
6064

61-
The above policy verifies:
65+
The policy verifies:
66+
67+
- The enclave inside Azure SQL Database doesn't support debugging.
68+
69+
Enclaves can be loaded with debugging disabled or enabled. Debugging support is designed to allow developers to troubleshoot the code running in an enclave. In a production system, debugging could enable an administrator to examine the content of the enclave, which would reduce the level of protection the enclave provides. The recommended policy disables debugging to ensure that if a malicious admin tries to turn on debugging support by taking over the enclave machine, attestation will fail.
6270

63-
- The enclave inside Azure SQL Database doesn't support debugging.
64-
> Enclaves can be loaded with debugging disabled or enabled. Debugging support is designed to allow developers to troubleshoot the code running in an enclave. In a production system, debugging could enable an administrator to examine the content of the enclave, which would reduce the level of protection the enclave provides. The recommended policy disables debugging to ensure that if a malicious admin tries to turn on debugging support by taking over the enclave machine, attestation will fail.
6571
- The product ID of the enclave matches the product ID assigned to Always Encrypted with secure enclaves.
66-
> Each enclave has a unique product ID that differentiates the enclave from other enclaves. The product ID assigned to the Always Encrypted enclave is 4639.
67-
- The security version number (SVN) of the library is greater than 0.
68-
> The SVN allows Microsoft to respond to potential security bugs identified in the enclave code. In case a security issue is dicovered and fixed, Microsoft will deploy a new version of the enclave with a new (incremented) SVN. The above recommended policy will be updated to reflect the new SVN. By updating your policy to match the recommended policy you can ensure that if a malicious administrator tries to load an older and insecure enclave, attestation will fail.
72+
73+
Each enclave has a unique product ID that differentiates the enclave from other enclaves. The product ID assigned to the Always Encrypted enclave is 4639.
74+
75+
- The security version number (SVN) of the library is greater than or equal to 2.
76+
77+
The SVN allows Microsoft to respond to potential security bugs identified in the enclave code. In case a security issue is discovered and fixed, Microsoft will deploy a new version of the enclave with a new (incremented) SVN. The recommended policy is updated to reflect the new SVN. By updating your policy to match the recommended policy, you can ensure that if a malicious administrator tries to load an older and insecure enclave, attestation will fail.
78+
6979
- The library in the enclave has been signed using the Microsoft signing key (the value of the x-ms-sgx-mrsigner claim is the hash of the signing key).
70-
> One of the main goals of attestation is to convince clients that the binary running in the enclave is the binary that is supposed to run. Attestation policies provide two mechanisms for this purpose. One is the **mrenclave** claim which is the hash of the binary that is supposed to run in an enclave. The problem with the **mrenclave** is that the binary hash changes even with trivial changes to the code, which makes it hard to rev the code running in the enclave. Hence, we recommend the use of the **mrsigner**, which is a hash of a key that is used to sign the enclave binary. When Microsoft revs the enclave, the **mrsigner** stays the same as long as the signing key does not change. In this way, it becomes feasible to deploy updated binaries without breaking customers' applications.
80+
81+
One of the main goals of attestation is to convince clients that the binary running in the enclave is the binary that is supposed to run. Attestation policies provide two mechanisms for this purpose. One is the **mrenclave** claim, which is the hash of the binary that is supposed to run in an enclave. The problem with the **mrenclave** is that the binary hash changes even with trivial changes to the code, which makes it hard to rev the code running in the enclave. Hence, we recommend the use of the **mrsigner**, which is a hash of a key that is used to sign the enclave binary. When Microsoft revs the enclave, the **mrsigner** stays the same as long as the signing key doesn't change. In this way, it becomes feasible to deploy updated binaries without breaking customers' applications.
7182

7283
> [!IMPORTANT]
7384
> Microsoft may need to rotate the key used to sign the Always Encrypted enclave binary, which is expected to be a rare event. Before a new version of the enclave binary, signed with a new key, is deployed to Azure SQL Database, this article will be updated to provide a new recommended attestation policy and instructions on how you should update the policy in your attestation providers to ensure your applications continue to work uninterrupted.
@@ -84,14 +95,13 @@ For instructions for how to create an attestation provider and configure with an
8495
> [!IMPORTANT]
8596
> When you configure your attestation policy with Azure CLI, set the `attestation-type` parameter to `SGX-IntelSDK`.
8697
87-
8898
## Determine the attestation URL for your attestation policy
8999

90100
After you've configured an attestation policy, you need to share the attestation URL with administrators of applications that use Always Encrypted with secure enclaves in Azure SQL Database. The attestation URL is the `Attest URI` of the attestation provider containing the attestation policy, which looks like this: `https://MyAttestationProvider.wus.attest.azure.net`.
91101

92102
### Use Azure portal to determine the attestation URL
93103

94-
In the Overview pane for your attestation provider, copy the value of the `Attest URI` property to clipboard.
104+
In the Overview pane for your attestation provider, copy the value of the `Attest URI` property to clipboard.
95105

96106
### Use PowerShell to determine the attestation URL
97107

@@ -103,10 +113,10 @@ Get-AzAttestation -Name $attestationProviderName -ResourceGroupName $attestation
103113

104114
For more information, see [Create and manage an attestation provider](/azure/attestation/quickstart-powershell#create-and-manage-an-attestation-provider).
105115

106-
## Next Steps
116+
## Next steps
107117

108118
- [Manage keys for Always Encrypted with secure enclaves](/sql/relational-databases/security/encryption/always-encrypted-enclaves-manage-keys)
109119

110120
## See also
111121

112-
- [Tutorial: Getting started with Always Encrypted with secure enclaves in Azure SQL Database](always-encrypted-enclaves-getting-started.md)
122+
- [Getting started using Always Encrypted with secure enclaves](always-encrypted-enclaves-getting-started.md)

azure-sql/database/always-encrypted-enclaves-enable-sgx.md

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
title: "Enable Always Encrypted with secure enclaves in Azure SQL Database"
3+
description: Learn how to enable secure enclaves in Azure SQL Database by selecting Intel SGX-enabled hardware or virtualization-based security (VBS)
4+
author: jaszymas
5+
ms.author: jaszymas
6+
ms.reviewer: vanto
7+
ms.date: 02/15/2023
8+
ms.service: sql-database
9+
ms.subservice: security
10+
ms.topic: conceptual
11+
---
12+
# Enable Always Encrypted with secure enclaves in Azure SQL Database
13+
14+
[!INCLUDE[appliesto-sqldb](../includes/appliesto-sqldb.md)]
15+
16+
In Azure SQL Database, [Always Encrypted with secure enclaves](/sql/relational-databases/security/encryption/always-encrypted-enclaves) can use either [Intel Software Guard Extensions (Intel SGX) enclaves](https://www.intel.com/content/www/us/en/architecture-and-technology/software-guard-extensions.html) or [Virtualization-based Security (VBS) enclaves](https://www.microsoft.com/security/blog/2018/06/05/virtualization-based-security-vbs-memory-enclaves-data-protection-through-isolation/). For more information, see [Plan for secure enclaves in Azure SQL Database](always-encrypted-enclaves-plan.md).
17+
18+
## [Intel SGX enclaves](#tab/IntelSGXenclaves)
19+
20+
For Intel SGX to be available, the database must use the [vCore model](service-tiers-vcore.md) and [DC-series](service-tiers-sql-database-vcore.md#dc-series) hardware.
21+
22+
Configuring the DC-series hardware to enable Intel SGX enclaves is the responsibility of the Azure SQL Database administrator. For more information, see [Roles and responsibilities when configuring Intel SGX enclaves and attestation](always-encrypted-enclaves-plan.md#roles-and-responsibilities-when-configuring-intel-sgx-enclaves-and-attestation).
23+
24+
> [!NOTE]
25+
> Intel SGX is not available in hardware configurations other than DC-series. For example, Intel SGX is not available for standard-series (Gen5) hardware, and it is not available for databases using the [DTU model](service-tiers-dtu.md).
26+
27+
> [!IMPORTANT]
28+
> Before you configure the DC-series hardware for your database, check the regional availability of DC-series and make sure you understand its performance limitations. For more information, see [DC-series](service-tiers-sql-database-vcore.md#dc-series).
29+
30+
For detailed instructions on how to configure a new or existing database to use a specific hardware configuration, see [Hardware configuration](service-tiers-sql-database-vcore.md#hardware-configuration).
31+
32+
## Next steps
33+
34+
- [Configure Azure Attestation for your Azure SQL database server](always-encrypted-enclaves-configure-attestation.md)
35+
36+
## [VBS enclaves](#tab/VBSenclaves)
37+
38+
> [!IMPORTANT]
39+
> The VBS enclaves feature in Azure SQL Database is currently in preview. The [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) include additional legal terms that apply to Azure features that are in beta, in preview, or otherwise not yet released into general availability.
40+
41+
To enable a VBS enclave in your database, you need to set the **preferredEnclaveType** [database property](/azure/templates/microsoft.sql/2022-05-01-preview/servers/databases?pivots=deployment-language-bicep#databaseproperties) to **VBS**, which activates the VBS enclave for the database. You can set **preferredEnclaveType** when you create a new database or by updating an existing database.
42+
43+
> [!NOTE]
44+
> By default, a new database is created with **preferredEnclaveType** set to **Default**, which doesn't support VBS enclaves.
45+
46+
You can set the **preferredEnclaveType** using Azure PowerShell or the Azure CLI.
47+
48+
## Enabling VBS enclaves with Azure PowerShell
49+
50+
Create a new database with a VBS enclave with the [New-AzSqlDatabase](/powershell/module/az.sql/New-AzSqlDatabase) cmdlet. The following example creates a serverless database with a VBS enclave.
51+
52+
```azurepowershell-interactive
53+
New-AzSqlDatabase -ResourceGroupName "ResourceGroup01" `
54+
-ServerName "Server01" `
55+
-DatabaseName "Database01" `
56+
-Edition GeneralPurpose `
57+
-ComputeModel Serverless `
58+
-ComputeGeneration Gen5 `
59+
-VCore 2 `
60+
-MinimumCapacity 2 `
61+
-PreferredEnclaveType VBS
62+
```
63+
64+
To enable a VBS enclave for an existing database, use the [Set-AzSqlDatabase](/powershell/module/az.sql/Set-AzSqlDatabase) cmdlet. Here's an example:
65+
66+
```azurepowershell-interactive
67+
Set-AzSqlDatabase -ResourceGroupName "ResourceGroup01" `
68+
-DatabaseName "Database01" `
69+
-ServerName "Server01" `
70+
-PreferredEnclaveType VBS
71+
```
72+
73+
## Enabling VBS enclaves with Azure CLI
74+
75+
Create a new database with a VBS enclave with the [az sql db create](/cli/azure/sql/db) cmdlet. The following example creates a serverless database with a VBS enclave.
76+
77+
```azurecli-interactive
78+
az sql db create -g ResourceGroup01 `
79+
-s Server01 `
80+
-n Database01 `
81+
-e GeneralPurpose `
82+
--compute-model Serverless `
83+
-f Gen5 `
84+
-c 2 `
85+
--min-capacity 2 `
86+
--preferred-enclave-type VBS
87+
```
88+
89+
To enable a VBS enclave for an existing database, use the [az sql db update](/cli/azure/sql/db) cmdlet. Here's an example:
90+
91+
```azurecli-interactive
92+
az sql db update -g ResourceGroup01 `
93+
-s Server01 `
94+
-n Database01 `
95+
--preferred-enclave-type VBS
96+
```
97+
98+
---
99+
100+
## See also
101+
102+
- [Getting started using Always Encrypted with secure enclaves](always-encrypted-enclaves-getting-started.md)

0 commit comments

Comments
 (0)