You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/features/security/contoso-clinic/README.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,33 +1,33 @@
1
-
#Contoso Clinic Demo Application
1
+
#Contoso Clinic Demo Application
2
2
3
3
Sample application with database that showcases security features of SQL Server 2016.
4
4
5
5
## About this sample
6
-
-**Applies to:** SQL Database 2016
6
+
-**Applies to:** SQL Server 2016
7
7
-**Programming Language:** .NET C#, T-SQL
8
8
-**Authors:** Jakub Szymaszek [jaszymas-MSFT]
9
9
10
10
This project has adopted the [Microsoft Open Source Code of Conduct](http://microsoft.github.io/codeofconduct). For more information see the [Code of Conduct FAQ](http://microsoft.github.io/codeofconduct/faq.md) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
11
11
12
-
##Contents
13
-
1.[Prerequisites](#prerequisites)
14
-
2.[Setup](#setup)
12
+
##Contents
13
+
1.[Prerequisites](#prerequisites)
14
+
2.[Setup](#setup)
15
15
* Set up the Demo Database
16
16
* Modify the Sample Application
17
-
4.[SQL 2016 Security Features in this demo](#sql-2016-security-features-in-this-demo)
17
+
4.[SQL 2016 Security Features in this demo](#sql-2016-security-features-in-this-demo)
18
18
* Always Encrypted
19
19
* Row Level Security
20
20
* Dynamic Data Masking
21
-
5.[Application Notes](#application-notes)
21
+
5.[Application Notes](#application-notes)
22
22
23
23
24
24
25
-
##Prerequisites
25
+
##Prerequisites
26
26
1. Visual Studio 2015 (or newer)
27
27
2.[SQL Server 2016](https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2016)
28
28
3.[SQL Server Management Studio](https://msdn.microsoft.com/en-us/library/mt238290.aspx)
29
29
30
-
##Setup
30
+
##Setup
31
31
### Set up the Demo Database
32
32
1. Clone/Download the repository
33
33
2. Import the *Clinic* database
@@ -75,7 +75,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct](http://micr
75
75
76
76
## SQL 2016 Security Features in this Demo
77
77
### Always Encrypted
78
-
####Enable Always Encrypted
78
+
####Enable Always Encrypted
79
79
+ Connect to your database using SSMS:
80
80
- For more information on using SSMS to connect to a Database, [click here](https://azure.microsoft.com/en-us/documentation/articles/sql-database-connect-query-ssms/)
81
81
+ Encrypt Sensitive Data Columns using the Column Encryption Wizard
@@ -114,16 +114,16 @@ This project has adopted the [Microsoft Open Source Code of Conduct](http://micr
114
114
- Run the ContosoClinic application from Visual Studio (by hitting *F5* OR select *Debug* > *Start Debugging*)
115
115
- Click on the *Patients* tab. You should see a list of patients again.
116
116
117
-
####How did that work?
117
+
####How did that work?
118
118
##### Connection String
119
119
Our connection string for our application now contains `Column Encryption Setting=Enabled` which instructs the driver to automatically encrypt parameters targeting encrypted columns and decrypt any results retrieved from encrypted columns, without code changes. Don't forget this for your app if you intend to use Always Encrypted functonality. For more information this feature, [see our blog](https://blogs.msdn.microsoft.com/sqlsecurity/2016/07/11/always-encrypted-in-azure-sql-database-is-generally-available/).
120
120
121
121
### Row Level Security (RLS)
122
122
123
-
####Login to the application
123
+
####Login to the application
124
124
Sign in using (Rachel@contoso.com/Password1!) or (alice@contoso.com/Password1!)
+ Open Enable-RLS.sql ( [Find it here](tsql-scripts/Enable-RLS.sql))
@@ -132,7 +132,7 @@ Sign in using (Rachel@contoso.com/Password1!) or (alice@contoso.com/Password1!)
132
132
133
133
#### How did that work?
134
134
135
-
#####The application leverages an Entity Framework feature called **interceptors**
135
+
#####The application leverages an Entity Framework feature called **interceptors**
136
136
Specifically, we used a `DbConnectionInterceptor`. The `Opened()` function is called whenever Entity Framework opens a connection and we set SESSION_CONTEXT with the current application `UserId` there.
0 commit comments