DSC supports static data masking and dynamic data masking. You can configure masking rules for specified data assets to implement static masking. Data Masking Algorithms lists the data masking algorithms supported by DSC.
Static data masking: DSC can help mask a large amount of data at one time based on the configured data masking rules. Static data masking is used when sensitive data in the production environment is delivered to the development, testing, or external environment for development and testing and data sharing and research. You can create an data masking task on the DSC console to quickly mask sensitive data in databases and big data assets.
Dynamic data masking: DSC provides dynamic data masking APIs to mask the data accessed from the external systems. Dynamic data masking applies to scenarios where data is queried from the external system, such as production applications, data exchange, O&M applications, and precision marketing.
Data Masking Algorithms
Table 1 Masking algorithms
Algorithm |
Description |
Application Scenario |
Hash |
Use Hash functions to mask sensitive data. DSC supports SHA-256 and SHA-512.
- SHA-256
SHA-256, a message-digest algorithm, is used by DSC to compute a digest from a string in the database table.
It takes a block of data and returns a fixed-size bit string (hash value). As the value length may exceed the maximum column width allowed in the original table, you can adjust the column width to adapt to the returned SHA-256 hash values.
- SHA-512
SHA-512, a message-digest algorithm, is used by DSC to compute a digest from a string in the database table.
It takes a block of data and returns a fixed-size bit string (hash value). As the value length may exceed the maximum column width allowed in the original table, you can adjust the column width to adapt to the returned SHA-512 hash values.
|
- Sensitive data: Key information
- Application scenario: data storage
|
Character Masking |
Use the specified character * or random characters (including numbers, letters, and both number and letters) to cover part of the original content. The following six data masking approaches are supported:
- Retain first N and last M
- Retain from X to Y
- Mask first N and last M
- Mask from X to Y
- Mask data ahead of special characters
- Mask data followed by special characters
NOTE:
DSC has multiple character masking templates.
|
- Sensitive data: Personal data
- Application scenarios:
|
Keyword Replacement |
Search for keywords in a specified column and replace them.
For example, the specified characters are "Zhang San eats at home". After replacement, the characters become "Mr. Zhang eats at home". In the example, "Zhang San" is replaced with "Mr. Zhang".
After this algorithm is executed, the value length may exceed the maximum length allowed by the database. In this case, the excess part will be truncated and inserted into the database. |
- Sensitive data:
- Personal data
- Enterprise data
- Device data
- Application scenarios:
- Data storage
- Data sharing
|
Value Change |
Set a specified field to Null or left it blank for data masking.
- Masking Using the Null Value
Set a field of any type to NULL.
If a field is set to NOT NULL, this algorithm changes the attribute of the file to NULL when copying the column.
- Masking Using a Custom Value
Set the target field to a default value.
Specifically, a character field is left blank, a numeric field is set to 0, a date field is set to 1970, and time field is set to 00:00.
|
- Sensitive data:
- Personal data
- Enterprise data
- Device data
- Applicable scenarios
- Data storage
- Data sharing
|
Roundup |
Round a date or number.
- Date Roundup
Roundup of fields after the year field
Example: 2019-05-12 -> 2019-01-01 or 2019-05-12 08:08:08 -> 2019-01-01 00:00:00
Roundup of fields after the month field
Example: 2019-05-12 -> 2019-05-01 or 2019-05-12 08:08:08 -> 2019-05-01 00:00:00
Roundup of fields after the day field
Example: 2019-05-12 -> 2019-05-12 or 2019-05-12 08:08:08 -> 2019-05-12 00:00:00
Roundup of fields after the hour field
Example: 08:08:08 -> 08:00:00 or 2019-05-12 08:08:08 -> 2019-05-12 08:00:00
Roundup of fields after the minute field
Example: 08:08:08 -> 08:08:00 or 2019-05-12 08:08:08 -> 2019-05-12 08:08:00
Roundup of fields after the second field
Example: 08:08:08.123 -> 08:08:08.000 or 1575612731312 -> 1575612731000
- Number roundup
Rounds a specified number.
|
- Sensitive data: General data
- Applicable scenarios
|