ALTER ENCRYPT RULE
Description
The ALTER ENCRYPT RULE
syntax is used to alter encryption rules.
Syntax
Grammar Railroad diagram
AlterEncryptRule ::=
'ALTER' 'ENCRYPT' 'RULE' encryptDefinition (',' encryptDefinition)*
encryptDefinition ::=
ruleName '(' 'COLUMNS' '(' columnDefinition (',' columnDefinition)* ')' ')'
columnDefinition ::=
'(' 'NAME' '=' columnName ',' 'CIPHER' '=' cipherColumnName (',' 'ASSISTED_QUERY' '=' assistedQueryColumnName)? (',' 'LIKE_QUERY' '=' likeQueryColumnName)? ',' encryptAlgorithmDefinition (',' assistedQueryAlgorithmDefinition)? (',' likeQueryAlgorithmDefinition)? ')'
encryptAlgorithmDefinition ::=
'ENCRYPT_ALGORITHM' '(' 'TYPE' '(' 'NAME' '=' encryptAlgorithmType (',' propertiesDefinition)? ')'
assistedQueryAlgorithmDefinition ::=
'ASSISTED_QUERY_ALGORITHM' '(' 'TYPE' '(' 'NAME' '=' encryptAlgorithmType (',' propertiesDefinition)? ')'
likeQueryAlgorithmDefinition ::=
'LIKE_QUERY_ALGORITHM' '(' 'TYPE' '(' 'NAME' '=' encryptAlgorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
tableName ::=
identifier
columnName ::=
identifier
cipherColumnName ::=
identifier
assistedQueryColumnName ::=
identifier
likeQueryColumnName ::=
identifier
encryptAlgorithmType ::=
string
key ::=
string
value ::=
literal
Supplement
CIPHER
specifies the cipher column,ASSISTED_QUERY
specifies the assisted query column,LIKE_QUERY
specifies the like query columnencryptAlgorithmType
specifies the encryption algorithm type, please refer to Encryption Algorithm
Example
- Alter an encrypt rule
ALTER ENCRYPT RULE t_encrypt (
COLUMNS(
(NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
(NAME=order_id,CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc'))))
));
Reserved words
ALTER
, ENCRYPT
, RULE
, COLUMNS
, NAME
, CIPHER
, ASSISTED_QUERY
, LIKE_QUERY
, ENCRYPT_ALGORITHM
, ASSISTED_QUERY_ALGORITHM
, LIKE_QUERY_ALGORITHM
, TYPE
, TRUE
, FALSE
Related links
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .