Skip to content

Commit b5e6af7

Browse files
committed
update
1 parent 8cdab45 commit b5e6af7

9 files changed

Lines changed: 38 additions & 34 deletions

learn-pr/wwl-data-ai/implement-data-security-compliance/includes/1-introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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.
22

33
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.
44

learn-pr/wwl-data-ai/implement-data-security-compliance/includes/10-exercise-implement-security-features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Now it's your chance to implement data security and compliance features in Azure SQL Database.
22

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.
44

55
> [!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).
77
88
Launch the exercise and follow the instructions.
99

learn-pr/wwl-data-ai/implement-data-security-compliance/includes/2-design-implement-data-encryption.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Database encryption operates at different layers, each addressing specific secur
88

99
:::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.":::
1010

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.
1212

1313
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.
1414

1515
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.
1616

1717
## Configure Always Encrypted
1818

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.
2020

2121
:::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.":::
2222

learn-pr/wwl-data-ai/implement-data-security-compliance/includes/3-design-implement-dynamic-data-masking.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Dynamic Data Masking supports four masking functions, each designed for differen
88

99
:::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.":::
1010

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.
1212

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.
1414

1515
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.
1616

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"*.
1818

1919
## Configure column masks
2020

@@ -38,8 +38,8 @@ CREATE TABLE Customers (
3838
Each column uses a masking function appropriate for its data:
3939

4040
- `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
4343
- `Income` displays a random value between 10,000 and 100,000
4444
- `SSN` uses default masking for complete obfuscation
4545

@@ -120,4 +120,4 @@ Consider these scenarios where masking excels:
120120
> [!NOTE]
121121
> 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.
122122
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.

learn-pr/wwl-data-ai/implement-data-security-compliance/includes/4-design-implement-row-level-security.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ This capability proves valuable when multiple users or tenants share the same ta
66

77
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.
88

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.":::
1010

1111
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.
1212

1313
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.
1414

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.
1616

1717
## Create filter predicates
1818

1919
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.
2020

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:
2222

2323
```sql
2424
CREATE SCHEMA Security;
@@ -80,7 +80,7 @@ ADD BLOCK PREDICATE Security.fn_SalesRepPredicate(SalesRepID)
8080
WITH (STATE = ON);
8181
```
8282

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 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.
8484

8585
## Implement hierarchical access patterns
8686

@@ -112,7 +112,7 @@ RETURN
112112
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.
113113

114114
> [!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.
116116
117117
## Manage security policies
118118

learn-pr/wwl-data-ai/implement-data-security-compliance/includes/5-design-implement-object-level-permissions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Designing effective permission strategies requires understanding the permission
66

77
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.
88

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.
1010

1111
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.
1212

learn-pr/wwl-data-ai/implement-data-security-compliance/includes/6-implement-secure-database-access.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff 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.
22

33
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.
44

@@ -10,11 +10,11 @@ SQL authentication uses a username and password stored in the database. While st
1010

1111
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.
1212

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.
1414

1515
## Configure Microsoft Entra authentication
1616

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:
1818

1919
```sql
2020
-- Connect using the Entra admin account, then create database users
@@ -23,7 +23,7 @@ CREATE USER [[email protected]] FROM EXTERNAL PROVIDER;
2323
CREATE USER [DataAnalystsGroup] FROM EXTERNAL PROVIDER;
2424
```
2525

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.
2727

2828
Grant permissions to these Entra-based users just like SQL users:
2929

@@ -32,7 +32,7 @@ ALTER ROLE db_datareader ADD MEMBER [[email protected]];
3232
ALTER ROLE db_datawriter ADD MEMBER [app-service-identity];
3333
```
3434

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:
3636

3737
```sql
3838
-- Enable Azure AD authentication on SQL Server 2022
@@ -59,7 +59,7 @@ ALTER ROLE db_datareader ADD MEMBER [MyWebApp];
5959
ALTER ROLE db_datawriter ADD MEMBER [MyWebApp];
6060
```
6161

62-
Update your application connection string to use Entra authentication:
62+
Update your application connection string to use Microsoft Entra authentication:
6363

6464
```
6565
Server=myserver.database.windows.net;Database=mydb;Authentication=Active Directory Managed Identity;
@@ -111,9 +111,9 @@ await connection.OpenAsync();
111111
112112
## Implement contained database users
113113

114-
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.
115115

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:
117117

118118
```sql
119119
CREATE USER AppUser WITH PASSWORD = 'ComplexPassword123!';
@@ -154,4 +154,4 @@ A secure connection string for Azure SQL with managed identity:
154154
Server=tcp:myserver.database.windows.net,1433;Database=mydb;Authentication=Active Directory Managed Identity;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
155155
```
156156

157-
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

Comments
 (0)