Skip to content

Commit 69ce325

Browse files
committed
refactoring
1 parent 9ae2cc2 commit 69ce325

3 files changed

Lines changed: 19 additions & 16 deletions

File tree

samples/features/security/always-encrypted-with-secure-enclaves/azure-sql-database/README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,20 @@ Before you begin, you need an Azure subscription. If you don't already have an A
3030
You also need to make sure the following software is installed on your machine:
3131

3232
1. PowerShell modules:
33+
3334
1. Az version 5.6 or later. For details on how to install the Az PowerShell module, see [Install the Azure Az PowerShell module](https://docs.microsoft.com/powershell/azure/install-az-ps). To determine the version of the Az module installed on your machine, run the following command from a PowerShell session.
3435

3536
```powershell
3637
Get-InstalledModule -Name Az
3738
```
38-
1. Az.Attestation 0.1.8 or later. For details on how to install the Az.Attestation PowerShell module, see [Install Az.Attestation PowerShell module](https://docs.microsoft.com/azure/attestation/quickstart-powershell#install-azattestation-powershell-module). To determine the version of the Az.Attestation module installed on your machine, run the following command from a PowerShell session.
39+
40+
2. Az.Attestation 0.1.8 or later. For details on how to install the Az.Attestation PowerShell module, see [Install Az.Attestation PowerShell module](https://docs.microsoft.com/azure/attestation/quickstart-powershell#install-azattestation-powershell-module). To determine the version of the Az.Attestation module installed on your machine, run the following command from a PowerShell session.
3941
4042
```powershell
4143
Get-InstalledModule -Name Az.Attestation
4244
```
4345
44-
1. SqlServer version 21.1.18245 or later. For details on how to install the SqlServer PowerShell module, see [Installing or updating the SqlServer module](https://docs.microsoft.com/sql/powershell/download-sql-server-ps-module#installing-or-updating-the-sqlserver-module). To determine the version the SqlServer module installed on your machine, run the following command from a PowerShell session.
46+
3. SqlServer version 21.1.18245 or later. For details on how to install the SqlServer PowerShell module, see [Installing or updating the SqlServer module](https://docs.microsoft.com/sql/powershell/download-sql-server-ps-module#installing-or-updating-the-sqlserver-module). To determine the version the SqlServer module installed on your machine, run the following command from a PowerShell session.
4547
4648
```powershell
4749
Get-InstalledModule -Name SqlServer
@@ -63,7 +65,7 @@ Setup steps:
6365
6466
1. Clone/download and unpack the repository.
6567
1. Open a PowerShell session.
66-
1. In the PowerShell session, change the directory to the setup folder within this demo's directory. For example, if you've unpacked the downloaded repository on a Windows machine in **C:\**, issue the following command:
68+
1. In the PowerShell session, change the directory to the setup folder within this demo's directory. For example, if you've unpacked the downloaded repository on a Windows machine in **C:\\**, issue the following command:
6769
6870
```powershell
6971
cd "C:\sql-server-samples\samples\features\security\always-encrypted-with-secure-enclaves\azure-sql-database\setup"
@@ -87,7 +89,7 @@ Setup steps:
8789

8890
## Demo 1
8991

90-
During this demo, you will take a tour of the demo environment, in which Always Encrypted with secure enclaves is already set up and sensitive data columns in the database are already encrypted.
92+
In this demo, you will take a tour of the demo environment, in which Always Encrypted with secure enclaves is already set up and sensitive data columns in the database are already encrypted.
9193

9294
### Prepare for the demo
9395

@@ -97,11 +99,11 @@ Perform the below steps before each demo presentation.
9799
1. Prepare a new instance of SSMS.
98100
1. Start SSMS.
99101
1. In the Connect to Server dialog:
100-
1. In the main page of the dialog, enter your database server name. Set **Authentication** to **Azure Active Directory – Universal with MFA**. In the **User Name** field, enter your Azure AD username. You should enter the same username, you've used to sign in to Azure, when you set up your demo environment.
102+
1. In the main page of the dialog, enter your database server name. Set **Authentication** to **Azure Active Directory – Universal with MFA**. In the **User Name** field, enter your Azure AD username. You should enter the same username, you used to sign in to Azure, when you set up your demo environment.
101103

102104
![Connect to Server](./img/ssms-connect-to-server-main-page.png)
103105

104-
1. Click Connect.
106+
1. Click **Connect**.
105107
1. When prompted, sign in to Azure.
106108
1. Prepare your web browser.
107109
1. Open a new tab in the browser and point it to Azure Portal: **https://portal.azure.com**.
@@ -117,7 +119,7 @@ Perform the below steps before each demo presentation.
117119
- `<project name>app`- an app service hosting the Contoso HR web application.
118120
- `<project name>attest`- an attestation provider in Microsoft Azure Attestation for attesting the secure enclave for the **ContosoHR** database.
119121
- `<project name>identity` - a user-assigned managed identity that was used to deploy the web application.
120-
- `<project name>plan` - am app service plan for the web application.
122+
- `<project name>plan` - an app service plan for the web application.
121123
- `<project name>server`- a logical server in Azure SQL Database.
122124
- `<project name>vault` - a key vault in Azure Key Vault, containing the column master key for Always Encrypted.
123125
- `ContosoHR` - a database.
@@ -132,14 +134,15 @@ Perform the below steps before each demo presentation.
132134

133135
1. Close the browser tab for the attestation provider. Right-click on the app service for the Contoso HR web application in your resource group and open its **Overview** blade in a new tab. Click on **Configuration** under **Settings**. In the **Connection strings** section, click **Advanced edit**. This will display the database connection string configured for the web application. There are three important things to call out in the database connection string:
134136

135-
- **Column Encryption Setting = Enabled** turns the Always Encrypted on in the client driver, allowing it to transparently encrypt query parameters and decrypt queries results.
137+
- **Column Encryption Setting = Enabled** turns the Always Encrypted on in the client driver, allowing it to transparently encrypt query parameters and decrypt query results.
136138
- **Attestation Protocol = AAS** specifies Microsoft Azure Attestation is used for attesting the secure enclave for the **ContosoHR** database.
137139
- **Enclave Attestation Url** is an attest URI of the attestation provider.
138140

139141
![Connection string](./img/portal-web-app-connection-string.png)
140142

141143
1. Close the browser tab for the app service. Right-click on the key vault in your resource group and open its **Overview** blade in a new tab.
142144
1. Click on **Keys** under **Settings**. You should see the entry for the key, named **CMK** - this is your column master key for Always Encrypted.
145+
143146
![Connection string](./img/portal-key-vault-key.png)
144147

145148
2. Click on **Access Policies** under **Settings**. You should see two access policy entries: one for your identity and one for the web app's identity. These policies grant you permissions necessary to perform key management operations and they grant the web app permissions required to decrypt column encryption keys, protecting the data.
@@ -166,7 +169,7 @@ Perform the below steps before you show the demo.
166169
1. Prepare a new instance of SSMS.
167170
1. Start SSMS.
168171
1. In the **Connect to Server** dialog:
169-
1. In the main page of the dialog, enter your database server name. Set **Authentication** to **Azure Active Directory – Universal with MFA**. In the **User Name** field, enter your Azure AD username. You should enter the same username, you've used to sign in to Azure, when you set up your demo environment.
172+
1. In the main page of the dialog, enter your database server name. Set **Authentication** to **Azure Active Directory – Universal with MFA**. In the **User Name** field, enter your Azure AD username. You should enter the same username, you used to sign in to Azure, when you set up your demo environment.
170173

171174
![Connect to Server](./img/ssms-connect-to-server-main-page.png)
172175

@@ -178,7 +181,7 @@ Perform the below steps before you show the demo.
178181

179182
![Always Encrypted disabled](./img/ssms-connect-to-server-always-encrypted-disabled.png)
180183

181-
1. Click Connect.
184+
1. Click **Connect**.
182185
1. When prompted, sign in to Azure.
183186
1. Configure query windows.
184187
1. In Object Explorer, find and select the **ContosoHR** database.
@@ -241,15 +244,15 @@ Perform the below steps before you show the demo.
241244

242245
![Connect to Server](./img/ssms-connect-to-server-main-page.png)
243246

244-
1. Click the **Options >>** button, select the **Connection Properties** tab and enter the database name(**ContosoHR**).
247+
1. Click the **Options >>** button, select the **Connection Properties** tab and enter the database name (**ContosoHR**).
245248

246249
![Connection Properties](./img/ssms-connect-to-server-connection-properties-page.png)
247250

248251
1. Select the **Always Encrypted** tab. Make sure the **Enable Always Encrypted** checkbox is **not** selected.
249252

250253
![Always Encrypted disabled](./img/ssms-connect-to-server-always-encrypted-disabled.png)
251254

252-
1. Click Connect.
255+
1. Click **Connect**.
253256
1. When prompted, sign in to Azure.
254257
1. Configure query windows.
255258
1. In Object Explorer, find and select the **ContosoHR** database.
@@ -265,15 +268,15 @@ Perform the below steps before you show the demo.
265268

266269
![Connect to Server](./img/ssms-connect-to-server-main-page.png)
267270

268-
1. Click the **Options >>** button, select the **Connection Properties** tab and enter the database name(**ContosoHR**).
271+
1. Click the **Options >>** button, select the **Connection Properties** tab and enter the database name (**ContosoHR**).
269272

270273
![Connection Properties](./img/ssms-connect-to-server-connection-properties-page.png)
271274

272275
1. Select the **Always Encrypted** tab. Make sure the **Enable Always Encrypted** checkbox **is** selected. Enter your attestation URL.
273276

274277
![Always Encrypted disabled](./img/ssms-connect-to-server-always-encrypted-enabled.png)
275278

276-
1. Click Connect.
279+
1. Click **Connect**.
277280
1. When prompted, sign in to Azure.
278281
1. Configure query windows.
279282
1. In Object Explorer, find and select the **ContosoHR** database.
Loading

samples/features/security/always-encrypted-with-secure-enclaves/sql-server-with-hgs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Perform the below steps before you show the demo.
7373
1. Start SSMS.
7474
1. In the **Connect to Server** dialog:
7575
1. In the main page of the dialog, enter your database server name. For example, enter `.` to connect to the default instance on the local machine. Set your authentication parameters.
76-
1. Click the **Options >>** button, select the **Connection Properties** tab and enter the database name(**ContosoHR**).
76+
1. Click the **Options >>** button, select the **Connection Properties** tab and enter the database name (**ContosoHR**).
7777

7878
![Connection Properties](./img/ssms-connect-to-server-connection-properties-page.png)
7979

@@ -97,7 +97,7 @@ Perform the below steps before you show the demo.
9797
1. Start SSMS.
9898
1. In the **Connect to Server** dialog:
9999
1. In the main page of the dialog, enter your database server name. For example, enter `.` to connect to the default instance on the local machine. Set your authentication parameters.
100-
1. Click the **Options >>** button, select the **Connection Properties** tab and enter the database name(**ContosoHR**).
100+
1. Click the **Options >>** button, select the **Connection Properties** tab and enter the database name (**ContosoHR**).
101101

102102
![Connection Properties](./img/ssms-connect-to-server-connection-properties-page.png)
103103

0 commit comments

Comments
 (0)