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/01 13:46:09 UTC

[GitHub] [shardingsphere] cheese8 opened a new pull request #12162: Enhance EncryptAlgorithm and QueryAssistedEncryptAlgorithm

cheese8 opened a new pull request #12162:
URL: https://github.com/apache/shardingsphere/pull/12162


   @tristaZero Please help to review, thanks.
   
   Fixes #11689.
   
   Changes proposed in this pull request:
   - modify encrypt method and add parameter Map<String, String> encryptContextMap
   - modify queryAssistedEncrypt method and add parameter Map<String, String> encryptContextMap
   - migrate RuleConfigurationLogger to log and debug the value set on EncryptConfiguration, will refactoring it later
   


-- 
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 commented on pull request #12162: Enhance EncryptAlgorithm and QueryAssistedEncryptAlgorithm

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on pull request #12162:
URL: https://github.com/apache/shardingsphere/pull/12162#issuecomment-911043884


   Hi @cheese8 , can you fix ci error first?


-- 
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 commented on a change in pull request #12162: Enhance EncryptAlgorithm and QueryAssistedEncryptAlgorithm

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on a change in pull request #12162:
URL: https://github.com/apache/shardingsphere/pull/12162#discussion_r700822752



##########
File path: shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/AlterDatabaseDiscoveryRuleStatementUpdater.java
##########
@@ -107,7 +107,7 @@ private void checkToBeAlteredDiscoveryType(final AlterDatabaseDiscoveryRuleState
     }
     
     @Override
-    public RuleConfiguration buildToBeAlteredRuleConfiguration(final AlterDatabaseDiscoveryRuleStatement sqlStatement) {
+    public RuleConfiguration buildToBeAlteredRuleConfiguration(final ShardingSphereMetaData shardingSphereMetaData, final AlterDatabaseDiscoveryRuleStatement sqlStatement) {

Review comment:
       @cheese8 Why add this param? 

##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptRuleConfiguration.java
##########
@@ -34,13 +34,15 @@
 @Getter
 public final class EncryptRuleConfiguration implements SchemaRuleConfiguration, EnhancedRuleConfiguration {
     
+    private final String dataSourceName;

Review comment:
       @cheese8 Why add dataSourceName in EncryptRuleConfiguration? It seems to have an impact on the encrypt api.




-- 
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] taojintianxia commented on a change in pull request #12162: Enhance EncryptAlgorithm and QueryAssistedEncryptAlgorithm

Posted by GitBox <gi...@apache.org>.
taojintianxia commented on a change in pull request #12162:
URL: https://github.com/apache/shardingsphere/pull/12162#discussion_r700664070



##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/spi/EncryptAlgorithm.java
##########
@@ -29,9 +31,10 @@
      * Encode.
      *
      * @param plaintext plaintext
+     * @param encryptContextMap encrypt context map which include keys: database, table and column etc
      * @return ciphertext
      */
-    String encrypt(Object plaintext);
+    String encrypt(Object plaintext, Map<String, String> encryptContextMap);

Review comment:
       what does this and following several maps use for ? and why not final this time




-- 
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 closed pull request #12162: Enhance EncryptAlgorithm and QueryAssistedEncryptAlgorithm

Posted by GitBox <gi...@apache.org>.
cheese8 closed pull request #12162:
URL: https://github.com/apache/shardingsphere/pull/12162


   


-- 
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