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 2021/09/15 13:38:44 UTC
[GitHub] [shardingsphere] cheese8 opened a new issue #12460: [Discuss] Do you need to exclude some SQL from NeedRewriteForEncrypt before rewrite it?
cheese8 opened a new issue #12460:
URL: https://github.com/apache/shardingsphere/issues/12460
The current situation is that:
1. SS's Parser and Encrypt module has some SQL statements that are not well supported, such as join, subQuery, insert select etc.
2. The systems in your company needs to meet compliance requirements (To ensure that the sensitive data is all stored by encryption.), but not all of the SQLs are simple CRUD, the sql simplification is in progress of course.
Now there are a few tables all involving sensitive data, INSERT / UPDATE and DELETE good to say but some of the SELECT that meet the encryption rewrite condition, and even if no encryption rewrite, the current business results are also right, but the SELECT was scheduled to the next release window.
Actually, for now exceptions may occurred currently with encrypt rewrite, and you may consider to exclude those SQLs from NeedRewriteForEncrypt before rewrite it, I think one of the solution should be as below:
1. Define an annotation such as EncryptRewriteManual to mark the methods as manual in mybatis/jpa interfaces.
2. Check whether it is manual or auto in isNeedRewriteForEncrypt method, If it is manual, exclude it from rewrited.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] cheese8 commented on issue #12460: [Discuss] Do you need to exclude some SQL from NeedRewriteForEncrypt before rewrite it?
Posted by GitBox <gi...@apache.org>.
cheese8 commented on issue #12460:
URL: https://github.com/apache/shardingsphere/issues/12460#issuecomment-938331197
Scenario Added:
We need to clear the plain value on sensitive column after encryption finished, so we write sql like
`update table set plain_column = ''`
but it was rewrite as
`update table set cipher_column='xxx', assisted_column='yyy', plain_column=''`
it was incorrect, we should keep it as original with no rewrite.
AS-IS:
`update table set plain_column = null` would not be rewrited, but column not null allowed on DBA‘s rule.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu closed issue #12460: [Discuss] Do you need to exclude some SQL from NeedRewriteForEncrypt before rewrite it?
Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #12460:
URL: https://github.com/apache/shardingsphere/issues/12460
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] cheese8 commented on issue #12460: [Discuss] Do you need to exclude some SQL from NeedRewriteForEncrypt before rewrite it?
Posted by GitBox <gi...@apache.org>.
cheese8 commented on issue #12460:
URL: https://github.com/apache/shardingsphere/issues/12460#issuecomment-920027814
@strongduanmu @tristaZero What do you think?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org