Updated at: 2022-12-09 03:49:50
Data desensitization is to protect the security of data information by masking or replacing some of the information in the confidential field values in the log data, while preserving certain data characteristics. After the log data desensitization, you can only view the desensitized log data in functional modules such as search, dashboard, visualization, machine learning and log grouping.
Note: In Resource Authorization Settings , you can assign log desensitization authorization control to different user roles to meet the requirements of different scenarios.
The desensitization rules can be applied to both the original log and the parsed field, as follows: 
1. In this example, the desensitization parsing is for the parsed field Event ID, click the Parsing Method drop-down list and select Desensitization.
2. Select Template: The system supports the default desensitization template, as well as custom regular expressions to define desensitization rule.
In this example, the regular expression for the desensitization content of the Event ID is: (?:S{1}(S+)S{1}|S{1}(S{1})), means to hide the first name for two words or hide the middle ones for more than two words .The desensitization result is as follows:

Preset Desensitization Fields Template Rules Preset Regular Expression
Chinese Name • For 2 names, hide the first name; example: *三
• For 3 or more names, show both the first and the last name, and hide the middle ones; example: 楚*磊
Mobile No. Keep the first 3 and last 4 bits, and hide the rest; example: 137***3456 d{3}(d{4})d{4}
Telephone No. Keep the last 4 bits, and hide the rest; example: ****5000 (d+[s-]?d+)d{4}
Company Name Hide the first 5 words; for example: ***** Co., Ltd. (S{5})S+
Identity Card No. Keep the first 6 and last 4 bits, and hide the rest; example: 212401********2810 d{6}(d+)w{4}
Organization Code Keep the first 2 digits and the last 1 digit, and hide the rest; example: 79******-8 w{2}(w+)-w{1}
Registration No. Keep the first 4 and last 2 digits, and hide the rest; example: 4403*********18 w{4}(w+)w{2}
Taxpayer Registration No. Keep first 6 digits, and hide the rest; example: 410305********* w{6}(w+)
Email Keep only the first letter of the mailbox prefix is displayed, hide the rest prefix, and keep @ and the rest content; example: d****@126.com S{1}(S+)@S+
Bank Account No. Keep the first 4 and last 4 digits, and hide the rest; example: 6217 **** **** ***5 555  [ds]{4}([ds]+)[ds]{4}