You can create, modify, delete, enable, and disable encryption rules in the PolarDB console. This topic describes how to manage encryption rules.
Prerequisites
The PolarProxy version in PolarDB is 2.8.18 or later. For information about how to view or update the version of your PolarProxy, see Minor version update.
Limitations
The encryption rules do not take effect on primary endpoints. You need to use the cluster endpoint or a custom cluster endpoint.
The PolarDB Always Encrypted feature supports only
COM_QUERY
commands. Other command types such asCOM_STMT_PREPARE
are not supported. EncJDBC only supports Text Protocol. Binary Protocol is not supported. Operations that leverage prepared statements are always completed through Text Protocol queries.PolarDB Always Encrypted and dynamic masking cannot be enabled at the same time.
If dynamic masking rules exist, to enable PolarDB Always Encrypted, you need to delete all existing masking rules and create new rules whose type is encryption.
CMKs cannot be modified after they are specified. The entire cluster uses the same CMK.
If you bypass SecureGW and directly connect to the native MySQL kernel, the encryption feature does not take effect. We recommend that you avoid doing this. To minimize the impact of unauthorized access, we also recommend that you enable other security features like log auditing.
Create an encryption rule
Log on to the PolarDB console.
In the message that appears, click OK.
Enable or disable a rule
Log on to the PolarDB console.
Find the rule and turn the switch in the Enable/Disable column on or off.
NoteYou can select multiple rules in the list and then click Enable or Disable at the bottom of the list to batch enable or disable the rules.
Disabled rules are not deleted. You can enable disabled rules when needed. Disable You can Enable disabled rules when needed.
In the dialog box that appears, click OK.
Modify an encryption rule
Log on to the PolarDB console.
Find the target rule and click Modify in the Actions column. In the dialog box that appears, configure the parameters.
Click OK.
Delete an encryption rule
Log on to the PolarDB console.
Find the target rule and click Delete in the Actions column.
In the dialog box that appears, click OK.