Configuring Privacy Data Protection Rules
To mask sensitive information in entered SQL statements, you can enable the function of masking privacy data and configure masking rules to prevent sensitive information leakage.
Prerequisites
- You have purchased a database audit instance and the Status is Running.
- Database audit has been enabled.
Procedure
- Log in to the management console.
- Select a region, click , and choose . The Dashboard page is displayed.
- In the navigation tree, choose Rules.
- In the Instance drop-down list, select the instance whose privacy data protection rule is to be configured.
- Click the Privacy Data Protection tab.
- Enable or disable Store Result Set and Mask Privacy Data.
- Store Result Set
You are advised to disable . After this function is disabled, database audit will not store the result sets of user SQL statements.
Do not enable this function if you want to prepare for PCI DSS/PCI 3DS CSS certification.
- Mask Privacy Data
You are advised to enable . After this function is enabled, you can configure masking rules to prevent privacy data leakage.
- Store Result Set
- Click Add Rule. In the displayed Add Rule dialog box, set the data masking rule, as shown in Figure 1. For details about related parameters, see Table 1.
- Click OK.
A masking rule in the Enabled status is added to the rule list.
Verifying a Rule
Perform the following steps to check whether a rule takes effect. The audit information about military officer card No. in a MySQL database is used as an example.
- Enable Mask Privacy Data, and ensure the "Military officer card NO." masking rule is enabled, as shown in Figure 2.
- Log in to the database as user root through the MySQL database client.
- On the database client, enter an SQL statement.
select * from db where HOST="Military officer card No.";
- In the navigation pane, choose Dashboard.
- In the Instance drop-down list, select the instance whose SQL statement information you want to view. Click the Statements tab.
- Set filtering conditions to find the entered SQL statement.
- In the row containing the SQL statement, click Details in the Operation column.
- Check the SQL statement information. The content of SQL Statement is shown in Figure 3, indicating that the masking function is normal.
Common Operations
After adding a user-defined masking rule, you can perform the following operations on it:
- Disable
Locate the row that contains the rule to be disabled and click Disable in the Operation column. A disabled rule cannot be used.
- Edit
Locate the row that contains the rule to be modified, click Edit in the Operation column, and modify the rule in the displayed dialog box.
- Delete
Locate the row that contains the rule to be deleted, click Delete in the Operation column, and click OK in the displayed dialog box.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.