Data Encryption #
Configuration Entry #
Class name: org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration
configurable properties:
| Name | Data type | Description | Default value |
|---|---|---|---|
| tables (+) | Collection<EncryptTableRuleConfiguration> | Encrypt table rule configuration | |
| encryptors (+) | Map<String, ShardingSphereAlgorithmConfiguration> | Encryption and decryption algorithm name and configuration | |
| queryWithCipherColumn (?) | boolean | Whether to use encrypted columns for queries. In the case of the plain text column, you can use the plain text column to query | true |
Encrypt Table Rule Configuration #
Class name: org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration
configurable properties:
| Name | Data type | Description | Default value |
|---|---|---|---|
| name | String | Table name | |
| columns (+) | Collection<EncryptColumnRuleConfiguration> | Encrypt column rule configuration list | |
| queryWithCipherColumn (?) | boolean | Whether the table uses encrypt columns for queries | true |
Encrypt column rule configuration #
Class name: org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration
configurable properties:
| Name | Data type | Description |
|---|---|---|
| logicColumn | String | Logical column name, required |
| dataType | String | Logical column type, Optional (Required if other encrypted column, assist query column or plaintext column types are configured) |
| cipherColumn | String | Cipher column name, required |
| cipherDataType | String | Cipher column type, Optional (Required if logical column type is configured) |
| assistedQueryColumn | String | Assist query column name, Optional |
| assistedQueryDataType | String | Assist query column type, Optional (Required if assist query column and logical column types are configured) |
| plainColumn | String | Plain column name, Optional |
| plainDataType | String | Plain column type, Optional (Required if plain text column and logical column type are configured) |
| encryptorName | String | Encrypt algorithm name, required |
Encryption And Decryption Algorithm Configuration #
Class name: org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration
configurable properties:
| Name | Data type | Description |
|---|---|---|
| name | String | Encryption and decryption algorithm name |
| type | String | Encryption and decryption algorithm type |
| properties | Properties | Encryption and decryption algorithm properties configuration |
For details of encrypt algorithm types, please refer to Built-in encrypt algorithm list.