You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2022/12/01 09:52:16 UTC
[shardingsphere] branch master updated: Update distsql-rdl rules on encrypt document (#22559)
This is an automated email from the ASF dual-hosted git repository.
jianglongtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 187ec4a0715 Update distsql-rdl rules on encrypt document (#22559)
187ec4a0715 is described below
commit 187ec4a071528e0a126e136cab9f154e7d0de119
Author: gxxiong <xi...@foxmail.com>
AuthorDate: Thu Dec 1 17:52:10 2022 +0800
Update distsql-rdl rules on encrypt document (#22559)
Signed-off-by: gxxiong <xi...@foxmail.com>
Signed-off-by: gxxiong <xi...@foxmail.com>
---
.../syntax/rdl/rule-definition/encrypt.cn.md | 20 +++++++++++++-------
.../syntax/rdl/rule-definition/encrypt.en.md | 22 ++++++++++++++--------
2 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt.cn.md
index dca3cefdd0b..8ba87ffcb82 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt.cn.md
@@ -16,10 +16,16 @@ encryptRuleDefinition:
tableName(COLUMNS(columnDefinition [, columnDefinition] ...), QUERY_WITH_CIPHER_COLUMN=queryWithCipherColumn)
columnDefinition:
- (NAME=columnName [, PLAIN=plainColumnName] , CIPHER=cipherColumnName [, ASSISTED_QUERY_COLUMN=assistedQueryColumnName] [, LIKE_QUERY_COLUMN=likeQueryColumnName], encryptAlgorithm [, encryptAlgorithm] ...)
+ (NAME=columnName [, PLAIN=plainColumnName] , CIPHER=cipherColumnName [, ASSISTED_QUERY_COLUMN=assistedQueryColumnName] [, LIKE_QUERY_COLUMN=likeQueryColumnName], encryptAlgorithm [, assistedQueryAlgorithm] [, likeQueryAlgorithm])
encryptAlgorithm:
- TYPE(NAME=encryptAlgorithmType [, PROPERTIES([algorithmProperties] )] )
+ ENCRYPT_ALGORITHM(TYPE(NAME=encryptAlgorithmType [, PROPERTIES([algorithmProperties] )] ))
+
+assistedQueryAlgorithm
+ ASSISTED_QUERY_ALGORITHM(TYPE(NAME=encryptAlgorithmType [, PROPERTIES([algorithmProperties] )] ))
+
+likeQueryAlgorithm
+ LIKE_QUERY_ALGORITHM(TYPE(NAME=encryptAlgorithmType [, PROPERTIES([algorithmProperties] )] ))
algorithmProperties:
algorithmProperty [, algorithmProperty] ...
@@ -51,19 +57,19 @@ algorithmProperty:
```sql
CREATE ENCRYPT RULE t_encrypt (
COLUMNS(
-(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,ASSISTED_QUERY_COLUMN=user_assisted,LIKE_QUERY_COLUMN=user_like,TYPE(NAME='MD5'),TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc'),TYPE(NAME='CHAR_DIGEST_LIKE'))),
+(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,ASSISTED_QUERY_COLUMN=user_assisted,LIKE_QUERY_COLUMN=user_like,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')),ASSISTED_QUERY_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')),LIKE_QUERY_ALGORITHM(TYPE(NAME='CHAR_DIGEST_LIKE')))),
(NAME=order_id, CIPHER =order_cipher,TYPE(NAME='MD5'))
),QUERY_WITH_CIPHER_COLUMN=true),
t_encrypt_2 (
COLUMNS(
-(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc'))),
-(NAME=order_id, CIPHER=order_cipher,TYPE(NAME='MD5'))
+(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
+(NAME=order_id, CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
), QUERY_WITH_CIPHER_COLUMN=FALSE);
ALTER ENCRYPT RULE t_encrypt (
COLUMNS(
-(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,ASSISTED_QUERY_COLUMN=user_assisted,LIKE_QUERY_COLUMN=user_like,TYPE(NAME='MD5'),TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc'),TYPE(NAME='CHAR_DIGEST_LIKE'))),
-(NAME=order_id,CIPHER=order_cipher,TYPE(NAME='MD5'))
+(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,ASSISTED_QUERY_COLUMN=user_assisted,LIKE_QUERY_COLUMN=user_like,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')),ASSISTED_QUERY_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')),LIKE_QUERY_ALGORITHM(TYPE(NAME='CHAR_DIGEST_LIKE')))),
+(NAME=order_id,CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
), QUERY_WITH_CIPHER_COLUMN=TRUE);
DROP ENCRYPT RULE t_encrypt,t_encrypt_2;
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt.en.md
index 38ceba41fed..88d1f7e09f9 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt.en.md
@@ -16,10 +16,16 @@ encryptRuleDefinition:
tableName(COLUMNS(columnDefinition [, columnDefinition] ...), QUERY_WITH_CIPHER_COLUMN=queryWithCipherColumn)
columnDefinition:
- (NAME=columnName [, PLAIN=plainColumnName] , CIPHER=cipherColumnName [, ASSISTED_QUERY_COLUMN=assistedQueryColumnName] [, LIKE_QUERY_COLUMN=likeQueryColumnName], encryptAlgorithm [, encryptAlgorithm] ...)
+ (NAME=columnName [, PLAIN=plainColumnName] , CIPHER=cipherColumnName [, ASSISTED_QUERY_COLUMN=assistedQueryColumnName] [, LIKE_QUERY_COLUMN=likeQueryColumnName], encryptAlgorithm [, assistedQueryAlgorithm] [, likeQueryAlgorithm])
encryptAlgorithm:
- TYPE(NAME=encryptAlgorithmType [, PROPERTIES([algorithmProperties] )] )
+ ENCRYPT_ALGORITHM(TYPE(NAME=encryptAlgorithmType [, PROPERTIES([algorithmProperties] )] ))
+
+assistedQueryAlgorithm
+ ASSISTED_QUERY_ALGORITHM(TYPE(NAME=encryptAlgorithmType [, PROPERTIES([algorithmProperties] )] ))
+
+likeQueryAlgorithm
+ LIKE_QUERY_ALGORITHM(TYPE(NAME=encryptAlgorithmType [, PROPERTIES([algorithmProperties] )] ))
algorithmProperties:
algorithmProperty [, algorithmProperty] ...
@@ -51,19 +57,19 @@ algorithmProperty:
```sql
CREATE ENCRYPT RULE t_encrypt (
COLUMNS(
-(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,ASSISTED_QUERY_COLUMN=user_assisted,LIKE_QUERY_COLUMN=user_like,TYPE(NAME='MD5'),TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc'),TYPE(NAME='CHAR_DIGEST_LIKE'))),
+(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,ASSISTED_QUERY_COLUMN=user_assisted,LIKE_QUERY_COLUMN=user_like,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')),ASSISTED_QUERY_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')),LIKE_QUERY_ALGORITHM(TYPE(NAME='CHAR_DIGEST_LIKE')))),
(NAME=order_id, CIPHER =order_cipher,TYPE(NAME='MD5'))
-), QUERY_WITH_CIPHER_COLUMN=true),
+),QUERY_WITH_CIPHER_COLUMN=true),
t_encrypt_2 (
COLUMNS(
-(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc'))),
-(NAME=order_id, CIPHER=order_cipher,TYPE(NAME='MD5'))
+(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
+(NAME=order_id, CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
), QUERY_WITH_CIPHER_COLUMN=FALSE);
ALTER ENCRYPT RULE t_encrypt (
COLUMNS(
-(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,ASSISTED_QUERY_COLUMN=user_assisted,LIKE_QUERY_COLUMN=user_like,TYPE(NAME='MD5'),TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc'),TYPE(NAME='CHAR_DIGEST_LIKE'))),
-(NAME=order_id,CIPHER=order_cipher,TYPE(NAME='MD5'))
+(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,ASSISTED_QUERY_COLUMN=user_assisted,LIKE_QUERY_COLUMN=user_like,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')),ASSISTED_QUERY_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')),LIKE_QUERY_ALGORITHM(TYPE(NAME='CHAR_DIGEST_LIKE')))),
+(NAME=order_id,CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
), QUERY_WITH_CIPHER_COLUMN=TRUE);
DROP ENCRYPT RULE t_encrypt,t_encrypt_2;