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: learn-pr/wwl-data-ai/implement-data-security-compliance/includes/1-introduction.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
Data security isn't just about preventing external attackers. You must protect sensitive information from unauthorized internal access, maintain compliance with regulations like HIPAA and GDPR, and create accountability through detailed audit trails. Microsoft's SQL platforms provide built-in security features that address these requirements without requiring extensive application changes.
1
+
Data security isn't just about preventing external attackers. You must protect sensitive information from unauthorized internal access, maintain compliance with regulations, and create accountability through detailed audit trails. Microsoft's SQL platforms provide built-in security features that address these requirements without requiring extensive application changes.
2
2
3
3
Modern development practices require you to build security into your database designs from the start. When you create tables that store personal information, you need to consider who should see that data and how to protect it. When you write stored procedures, you must think about what permissions they require and whether they could expose sensitive information. Security decisions made during development are far easier to implement than adding them later.
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/implement-data-security-compliance/includes/10-exercise-implement-security-features.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
Now it's your chance to implement data security and compliance features in Azure SQL Database.
2
2
3
-
In this exercise, you'll configure Dynamic Data Masking to protect sensitive data, implement Row-Level Security for multi-tenant data isolation, and set up auditing to track database activity for compliance purposes.
3
+
In this exercise, you'll configure Dynamic Data Masking to protect sensitive data, implement Row-Level Security for multitenant data isolation, and set up auditing to track database activity for compliance purposes.
4
4
5
5
> [!NOTE]
6
-
> To complete this exercise, you will need an [Azure subscription](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
6
+
> To complete this exercise, you'll need an [Azure subscription](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/implement-data-security-compliance/includes/2-design-implement-data-encryption.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,15 @@ Database encryption operates at different layers, each addressing specific secur
8
8
9
9
:::image type="content" source="../media/encryption.png" alt-text="Diagram comparing three encryption layers: TDE at the database file level, column-level encryption at specific columns, and Always Encrypted with encryption keys held outside the database at the client application level.":::
10
10
11
-
With TDE enabled, SQL Server automatically encrypts the database files, transaction logs, and backups. The encryption happens transparently to applications, requiring no code changes. TDE uses a database encryption key protected by a certificate stored in the master database.
11
+
With TDE enabled, SQL Server automatically encrypts the database files, transaction logs, and backups. The encryption happens transparently to applications, requiring no code changes. TDE uses a database encryption key protected by a certificate stored in the `master` database.
12
12
13
13
Unlike TDE, column-level encryption requires you to explicitly encrypt and decrypt data in your T-SQL code or application. This approach gives you granular control over which columns contain sensitive data and who can decrypt them.
14
14
15
15
Always Encrypted takes a different approach by keeping encryption keys outside the database engine. The database never sees plaintext data, providing protection even from database administrators with high-level access.
16
16
17
17
## Configure Always Encrypted
18
18
19
-
Always Encrypted protects sensitive data by ensuring the database engine never processes plaintext values. Client applications hold the encryption keys and perform all encryption and decryption operations. This separation means that even users with administrative access to the database cannot view the protected data.
19
+
Always Encrypted protects sensitive data by ensuring the database engine never processes plaintext values. Client applications hold the encryption keys and perform all encryption and decryption operations. This separation means that even users with administrative access to the database can't view the protected data.
20
20
21
21
:::image type="content" source="../media/ae-data-flow.png" alt-text="Diagram showing the data flow for Always Encrypted, where client applications encrypt and decrypt data while the database engine only processes ciphertext.":::
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/implement-data-security-compliance/includes/3-design-implement-dynamic-data-masking.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@ Dynamic Data Masking supports four masking functions, each designed for differen
8
8
9
9
:::image type="content" source="../media/masking.png" alt-text="Table showing the four Dynamic Data Masking functions with before and after comparisons: Default shows XXXX, Email shows [email protected], Random shows random numbers, and Partial shows 206-XXX-XX89.":::
10
10
11
-
The default masking function replaces the entire value with a fixed string. For string data types, it shows "XXXX" (or fewer X characters for shorter columns). Numeric values display as zero, and date values show 01-01-1900. This function works for any data type and provides complete obfuscation.
11
+
The default masking function replaces the entire value with a fixed string. For string data types, it shows *"XXXX"* (or fewer X characters for shorter columns). Numeric values display as zero, and date values show *"01-01-1900"*. This function works for any data type and provides complete obfuscation.
12
12
13
-
The email masking function reveals the first character of an email address, replaces the rest with "XXX", and preserves the domain suffix. For example, "[email protected]" appears as "[email protected]". This format maintains the appearance of valid email data while protecting the actual address.
13
+
The email masking function reveals the first character of an email address, replaces the rest with "XXX", and preserves the domain suffix. For example, *"[email protected]"* appears as *"[email protected]"*. This format maintains the appearance of valid email data while protecting the actual address.
14
14
15
15
With the random masking function, numeric values display as a random number within a specified range. You define minimum and maximum values, and each query returns a different random value. This approach works well for financial or statistical data where maintaining realistic-looking numbers matters.
16
16
17
-
The partial masking function (also called custom string masking) gives you precise control over which characters to reveal. You specify a prefix length to show, padding characters to use, and a suffix length to display. For example, masking a phone number might show "206-XXX-XX89".
17
+
The partial masking function (also called custom string masking) gives you precise control over which characters to reveal. You specify a prefix length to show, padding characters to use, and a suffix length to display. For example, masking a phone number might show *"206-XXX-XX89"*.
18
18
19
19
## Configure column masks
20
20
@@ -38,8 +38,8 @@ CREATE TABLE Customers (
38
38
Each column uses a masking function appropriate for its data:
39
39
40
40
-`Email` uses email masking to preserve the email format
41
-
-`Phone` shows the first 3 digits and last 2 digits
42
-
-`CreditCardNumber` reveals only the last 4 digits
41
+
-`Phone` shows the first 3 digits and last two digits
42
+
-`CreditCardNumber` reveals only the last four digits
43
43
-`Income` displays a random value between 10,000 and 100,000
44
44
-`SSN` uses default masking for complete obfuscation
45
45
@@ -120,4 +120,4 @@ Consider these scenarios where masking excels:
120
120
> [!NOTE]
121
121
> Dynamic Data Masking in SQL databases in Microsoft Fabric follows the same syntax and behavior as Azure SQL Database. Configure masks using T-SQL statements through the SQL analytics endpoint.
122
122
123
-
Masking provides an additional layer of defense but shouldn't be your only protection for sensitive data. Use it alongside encryption, Row-Level Security, and proper permission management for comprehensive data protection.
123
+
Masking provides an extra layer of defense but shouldn't be your only protection for sensitive data. Use it alongside encryption, Row-Level Security, and proper permission management for comprehensive data protection.
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/implement-data-security-compliance/includes/4-design-implement-row-level-security.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,19 +6,19 @@ This capability proves valuable when multiple users or tenants share the same ta
6
6
7
7
Row-Level Security in SQL Server and Azure SQL uses two components working together: security predicates and security policies. Understanding how these components interact helps you design effective RLS implementations.
8
8
9
-
:::image type="content" source="../media/row-level-security.png" alt-text="Diagram showing Row-Level Security in a multi-tenant database where three users query the same Customers table but each sees only their tenant's rows, filtered by a Security Policy component.":::
9
+
:::image type="content" source="../media/row-level-security.png" alt-text="Diagram showing Row-Level Security in a multitenant database where three users query the same Customers table but each sees only their tenant's rows, filtered by a Security Policy component.":::
10
10
11
11
A security predicate is an inline table-valued function that returns 1 (true) or 0 (false) for each row. This function receives the current user context and row values as input, then determines whether that user should see the row. The predicate function encapsulates your business logic for data access.
12
12
13
13
A security policy binds predicate functions to tables and specifies the type of filtering to apply. You can create filter predicates that silently exclude unauthorized rows from query results, or block predicates that prevent unauthorized insert, update, and delete operations.
14
14
15
-
Filter predicates affect `SELECT`, `UPDATE`, and `DELETE` statements by removing rows the user cannot access. Users don't receive errors; they simply see a filtered result set. Block predicates prevent data modifications that would violate the security rules, raising an error when users attempt unauthorized changes.
15
+
Filter predicates affect `SELECT`, `UPDATE`, and `DELETE` statements by removing rows the user can't access. Users don't receive errors; they see a filtered result set. Block predicates prevent data modifications that would violate the security rules, raising an error when users attempt unauthorized changes.
16
16
17
17
## Create filter predicates
18
18
19
19
Start by creating a predicate function that evaluates row access. The function accepts parameters representing the column values to check and returns a table containing a single row when access is allowed.
20
20
21
-
Consider a multi-tenant application where each row has a `TenantID` column:
21
+
Consider a multitenant application where each row has a `TenantID` column:
The block predicates ensure users can only insert or update rows they would be able to see. Without block predicates, a user could potentially insert rows with a different `SalesRepID` and lose access to data they just created.
83
+
The block predicates ensure users can only insert or update rows they would be able to see. Without block predicates, a user could potentially insert rows with a different `SalesRepID` and lose access to data they created.
84
84
85
85
## Implement hierarchical access patterns
86
86
@@ -112,7 +112,7 @@ RETURN
112
112
This recursive common table expression (CTE) builds the complete chain of employees reporting to the current user. The predicate allows access to any row owned by someone in that hierarchy.
113
113
114
114
> [!NOTE]
115
-
> Recursive predicates can impact query performance on large datasets. Consider caching hierarchy relationships or limiting recursion depth for better performance.
115
+
> Recursive predicates can affect query performance on large datasets. Consider caching hierarchy relationships or limiting recursion depth for better performance.
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/implement-data-security-compliance/includes/5-design-implement-object-level-permissions.md
SQL Server uses a hierarchical permission model where permissions granted at higher levels flow down to lower levels. The hierarchy flows from server to database to schema to individual objects. Understanding this hierarchy helps you grant permissions efficiently without excessive administrative burden.
8
8
9
-
At the server level, permissions control login management, database creation, and server configuration. Database-level permissions govern actions within a specific database, such as creating tables or managing users. Schema-level permissions apply to all objects within a schema, while object-level permissions target specific tables, views, or procedures.
9
+
At the server level, permissions control sign-in management, database creation, and server configuration. Database-level permissions govern actions within a specific database, such as creating tables or managing users. Schema-level permissions apply to all objects within a schema, while object-level permissions target specific tables, views, or procedures.
10
10
11
11
When you grant `SELECT` permission on a schema, users can select from all tables and views in that schema, including objects created in the future. This approach simplifies administration compared to granting permissions on each object individually.
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/implement-data-security-compliance/includes/6-implement-secure-database-access.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
Secure database access extends beyond granting permissions to the right users. Modern applications require authentication methods that minimize credential exposure while maintaining operational flexibility. Passwordless authentication using Microsoft Entra ID (formerly Azure Active Directory) provides a more secure approach than traditional SQL authentication with usernames and passwords.
1
+
Secure database access extends beyond granting permissions to the right users. Modern applications require authentication methods that minimize credential exposure while maintaining operational flexibility. Passwordless authentication using Microsoft Entra ID provides a more secure approach than traditional SQL authentication with usernames and passwords.
2
2
3
3
Moving to passwordless authentication eliminates the risks associated with password management, including credential theft, password reuse, and the operational burden of rotating secrets. This unit explores how to implement secure, passwordless database access across SQL Server, Azure SQL, and SQL databases in Microsoft Fabric.
4
4
@@ -10,11 +10,11 @@ SQL authentication uses a username and password stored in the database. While st
10
10
11
11
Windows authentication (for on-premises SQL Server) uses Active Directory credentials. Users authenticate to the domain, and SQL Server trusts that authentication. This approach works well for applications running on domain-joined servers.
12
12
13
-
Microsoft Entra authentication extends identity integration to cloud scenarios. Applications can authenticate using Entra ID credentials, managed identities, or service principals. This method works with Azure SQL Database, Azure SQL Managed Instance, SQL Server 2022+, and SQL databases in Microsoft Fabric.
13
+
Microsoft Entra authentication extends identity integration to cloud scenarios. Applications can authenticate using Microsoft Entra ID credentials, managed identities, or service principals. This method works with Azure SQL Database, Azure SQL Managed Instance, SQL Server 2022+, and SQL databases in Microsoft Fabric.
14
14
15
15
## Configure Microsoft Entra authentication
16
16
17
-
To use Entra authentication with Azure SQL Database, first set an Entra administrator for the logical server:
17
+
To use Microsoft Entra authentication with Azure SQL Database, first set a Microsoft Entra administrator for the logical server:
18
18
19
19
```sql
20
20
-- Connect using the Entra admin account, then create database users
@@ -23,7 +23,7 @@ CREATE USER [[email protected]] FROM EXTERNAL PROVIDER;
23
23
CREATE USER [DataAnalystsGroup] FROM EXTERNAL PROVIDER;
24
24
```
25
25
26
-
The `FROM EXTERNAL PROVIDER` clause tells SQL to look up the identity in Microsoft Entra ID. You can create users for individual accounts, managed identities, or Entra groups.
26
+
The `FROM EXTERNAL PROVIDER` clause tells SQL to look up the identity in Microsoft Entra ID. You can create users for individual accounts, managed identities, or Microsoft Entra groups.
27
27
28
28
Grant permissions to these Entra-based users just like SQL users:
29
29
@@ -32,7 +32,7 @@ ALTER ROLE db_datareader ADD MEMBER [[email protected]];
32
32
ALTER ROLE db_datawriter ADD MEMBER [app-service-identity];
33
33
```
34
34
35
-
For SQL Server 2022 and later, enable Entra authentication through server configuration:
35
+
For SQL Server 2022 and later, enable Microsoft Entra authentication through server configuration:
36
36
37
37
```sql
38
38
-- Enable Azure AD authentication on SQL Server 2022
@@ -59,7 +59,7 @@ ALTER ROLE db_datareader ADD MEMBER [MyWebApp];
59
59
ALTER ROLE db_datawriter ADD MEMBER [MyWebApp];
60
60
```
61
61
62
-
Update your application connection string to use Entra authentication:
62
+
Update your application connection string to use Microsoft Entra authentication:
Contained database users exist only within the database, without requiring a server-level login. This approach simplifies deployment and supports database portability across servers.
114
+
Contained database users exist only within the database, without requiring a server-level sign-in. This approach simplifies deployment and supports database portability across servers.
115
115
116
-
Create a contained user with a password when Entra authentication isn't available:
116
+
Create a contained user with a password when Microsoft Entra authentication isn't available:
117
117
118
118
```sql
119
119
CREATEUSERAppUser WITH PASSWORD ='ComplexPassword123!';
@@ -154,4 +154,4 @@ A secure connection string for Azure SQL with managed identity:
For SQL databases in Microsoft Fabric, connections use Entra authentication through the workspace identity. Configure access by adding Entra users or groups to workspace roles, which automatically grants appropriate database permissions.
157
+
For SQL databases in Microsoft Fabric, connections use Microsoft Entra authentication through the workspace identity. Configure access by adding Microsoft Entra users or groups to workspace roles, which automatically grant appropriate database permissions.
0 commit comments