Data masking is a key data security measure. DataWorks supports multiple methods, including static data masking, dynamic data masking, and engine-level masking, to protect sensitive data in various scenarios. By configuring specific masking rules and masking policies, you can apply precise masking to sensitive data and ensure its security during processes such as data development and analysis.
Introduction
Data masking protects sensitive data during its use and transfer and prevents unauthorized exposure. It applies masking or transformation algorithms to sensitive data, identified based on data classification and grading, to ensure secure data presentation in various scenarios.
Static desensitization
Purpose: Permanently replaces and masks sensitive data when it is written from a source to a destination. The destination stores the masked data, permanently replacing the original data.
Use cases: Primarily used for real-time synchronization tasks in DataWorks Data Integration. For example, you can mask real user data from a production database and then synchronize it to a development or test environment for developers to use securely.
Features:
Physical replacement: The replacement is permanent, providing a high level of security.
Data watermark: Supports embedding an invisible digital watermark during the masking process. If a data leak occurs, you can use the watermark to trace the source of the leak.
Dynamic desensitization
Purpose: Masks sensitive data in real time based on preset policies when users query or access the data. The physically stored original data remains unchanged. Different users see different results when accessing the same data.
Use cases: Used to control data visibility for different user roles in a production environment. For example, when a customer service representative queries a user table, a phone number is displayed as "138****1234", whereas their supervisor can see the complete phone number.
Features:
On-demand masking: Does not alter the original data, offering high flexibility and balancing data security with business usability.
Multi-layered protection:
Application-level masking: The policy takes effect only when data is accessed through specific DataWorks modules.
Engine-level masking (MaxCompute/Hologres): The policy is enforced at the database engine layer. It takes effect regardless of the access tool and has the highest priority.
Core configuration: For both static and dynamic data masking, you create masking rules. A rule specifies a Desensitization mode, such as hashing, masking, or replacement, for a specific Data Type, such as 'phone number'. For dynamic data masking, you also configure a Desensitization strategy to define who triggers these rules and under what conditions.
Limitations
Applicable users: This feature is available to DataWorks Professional Edition or Enterprise Edition users who have enabled the new version of data security in Security Center.
-
Supported regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Shenzhen), China (Chengdu), China (Hong Kong), Japan (Tokyo), Singapore, and Indonesia (Jakarta).
Supported compute engines: MaxCompute and Hologres.
Prerequisites
The Alibaba Cloud account or a RAM user that you use must meet one of the following conditions:
The Alibaba Cloud account or RAM user is attached with the AliyunDataWorksFullAccess policy.
The Alibaba Cloud account or RAM user is assigned the tenant security administrator role of DataWorks.
The Alibaba Cloud account or RAM user is assigned the tenant administrator role of DataWorks.
Complete the tasks in the New user guide.
Accessing the data masking page
Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose . On the page that appears, click Go to Security Center.
In the left-side navigation pane, choose .
Dynamic data masking policies
Add a desensitization rule
DataWorks industry templates provide predefined masking rules for common data types. If you want to create your own masking rules, you must first disable the predefined rules for the relevant data types in the industry templates.
On the Data Masking page, click the Dynamic desensitization tab to go to the settings page.
On the Dynamic Data Masking tab, click the Rules tab.
In the upper-left corner, click New Rule and configure the following parameters.
Field
Description
Data Type
The data type to which the rule applies.
Desensitization mode
The method for masking this data type during user access.
NoteEnter sample data in the Raw data field to verify that the Data after desensitization output is correct.
Apply to desensitization strategy
The scope to which the masking rule applies, including the User Scope, feature scope, and data scope.
Click Confirm to save the masking rule.
Add a masking policy
Click the Dynamic desensitization tab, and then go to the Desensitization strategy tab.
In the upper-left corner, click New Policy to configure the policy.
Configuration Effective Conditions.
A masking policy takes effect when its effective conditions are met. The following table describes the parameters.
Parameter
Description
Policy name
The name of the masking policy.
User Scope
Specifies whether the policy applies to all users or only specific users.
DataWorks function
The policy takes effect when sensitive data is accessed through specified DataWorks features: Data Map, Data analysis, or Data development.
Covered Items
The masking rule takes effect when a user accesses sensitive data in the specified projects or databases.
Data Type
The masking rule takes effect when a user accesses the specified sensitive data types. The rule can include one or more sensitive data types.
ImportantA masking rule for this data type must be configured and enabled first.
Configuration Exception conditions (whitelist).
A policy is bypassed if the following exception conditions are met. The following table describes the parameters.
Parameter
Description
Data Type
The data types to exclude from this policy. Masking is not performed on data of these types.
NoteA masking rule must be configured and enabled for the data type.
Whitelisted users
RAM users or user groups who are exempt from the policy. Masking is not performed when these users access the specified data types.
Effective Time Range
The period during which the exception (whitelist) is active. You can configure a specific Time period or set it to Permanent.
To adjust policy priority, click More and select Move Up or Move Down in the Operation column. This changes the order in which policies are matched.
Enable dynamic data masking
For data types with masking rules configured in an enabled workspace, DataWorks evaluates masking policies sequentially and applies the first one that matches.
You must enable dynamic data masking for the workspace. Once enabled, the policies take effect in Data Studio and DataAnalysis.
On the Dynamic desensitization tab, click the Workspace management tab.
On the Workspace management tab, you can Open or disable a single workspace in the Status column. You can also select multiple workspaces and click Batch open or Batch Disable in the lower-left corner.
Engine desensitization
Engine-level masking is supported for MaxCompute and Hologres. The configuration process is similar to that for dynamic data masking policies, but the supported masking methods differ. For more information, see Dynamic data masking policies.
Static desensitization
Static data masking physically replaces sensitive data at the destination, permanently overwriting the original data.
Static masking rules apply only to real-time synchronization tasks in DataWorks Data Integration where this feature is configured. The feature is enabled by default but can be disabled.
On the Data Masking page, click the Static desensitization tab to go to the list of static masking rules.
In the upper-left corner, click New Rule to configure a static masking rule. The following table describes the key parameters.
Parameter
Description
Data Type
Select the data type to which you want to apply the masking rule, such as "Bank Card Number". You can select an existing type or create a new one.
Desensitization rule name
Specify a clear and descriptive name for the rule.
Desensitization mode
Select a masking method, such as Masking desensitization, Hash Desensitization, or Custom Paohenge transformation.
Masking desensitization: Precisely define the character ranges to mask or preserve. For example, for
Left to right,maskcharacters 1 to 2, anddo not maskcharacters 3 to 4.Hash Desensitization: Set a salt value to increase the security of the hash.
Custom Paohenge transformation: Set the feature value and the character set for replacement.
Data watermark
If enabled, the system embeds an invisible watermark into the data during the masking operation. This watermark helps trace the source of sensitive data. For more information, see Data Traceability.
Enabled
Select Enable Now or Not Enabled. Only enabled rules take effect in relevant synchronization tasks.
Effect Verification
Use the verification tool to check the masking effect. Enter sample data in the Raw data box, click Verify now, and verify that the Data after desensitization is correct.
Click Confirm to save the rule.