You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/12/14 13:07:08 UTC

[GitHub] [shardingsphere] tristaZero edited a comment on issue #8616: Support CREATE ENCRYPT RULE

tristaZero edited a comment on issue #8616:
URL: https://github.com/apache/shardingsphere/issues/8616#issuecomment-744426596


   Hi how about the following  one?
   ```yaml
   rules:
   - !ENCRYPT
     tables:
       t_order:
         columns:
           status:
             cipherColumn: status
             encryptorName: status_encryptor
     encryptors:
       status_encryptor:
         type: AES
         props:
           aes-key-value: 123456abc
   ```
   
   ```sql
   CREATE ENCRYPT RULE (
   t_user (
   pwd (cipher='pwdCipher', plain='pwdPlain', assist_query='pwdAssistQuery') AES (aes-key-value='xxxxx'),
   other_pwd  (cipher='otherPwdCipher')  MD5(xxx=xxxxx)
   ),
   t_order (
   pwd (cipher='pwdCipher', plain='pwdPlain', assist_query='pwdAssistQuery') AES (aes-key-value='xxxxx'),
   other_pwd  (cipher='otherPwdCipher')  MD5(xxx=xxxxx)
   )
   )
   ```
   Or
   
   ```sql
   CREATE ENCRYPT RULE (
   t_user (
   pwd=(cipher='pwdCipher', plain='pwdPlain', assist_query='pwdAssistQuery', encryptor=AES(aes-key-value='xxxxx')),
   other_pwd=(cipher='otherPwdCipher', encryptor=MD5(xxx=xxxxx))
   ),
   t_order (
   pwd=(cipher='pwdCipher', plain='pwdPlain', assist_query='pwdAssistQuery', encryptor=AES(aes-key-value='xxxxx')),
   other_pwd=(cipher='otherPwdCipher', encryptor=MD5(xxx=xxxxx))
   )
   )
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org