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/08 15:22:33 UTC
[GitHub] [shardingsphere] cheese8 opened a new pull request #12300: Enhance EncryptAlgorithm and QueryAssistedEncryptAlgorithm
cheese8 opened a new pull request #12300:
URL: https://github.com/apache/shardingsphere/pull/12300
@tristaZero Please help to review, thanks.
Fixes #11689.
Changes proposed in this pull request:
add SchemaAvailable to collect schemaName from dml StatementContext;
modify directly on EncryptAlgorithm & QueryAssistedEncryptAlgorithm, 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] codecov-commenter commented on pull request #12300: Enhance EncryptAlgorithm and QueryAssistedEncryptAlgorithm
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #12300:
URL: https://github.com/apache/shardingsphere/pull/12300#issuecomment-916705052
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/12300?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#12300](https://codecov.io/gh/apache/shardingsphere/pull/12300?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f79b80b) into [master](https://codecov.io/gh/apache/shardingsphere/commit/0cdf80a0a38c6699462fdc543c38d94c110dcb7a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0cdf80a) will **increase** coverage by `0.02%`.
> The diff coverage is `18.86%`.
[](https://codecov.io/gh/apache/shardingsphere/pull/12300?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #12300 +/- ##
============================================
+ Coverage 63.83% 63.86% +0.02%
Complexity 1272 1272
============================================
Files 2365 2367 +2
Lines 35879 35901 +22
Branches 6232 6232
============================================
+ Hits 22905 22928 +23
- Misses 11129 11134 +5
+ Partials 1845 1839 -6
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/12300?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...gsphere/encrypt/algorithm/AESEncryptAlgorithm.java](https://codecov.io/gh/apache/shardingsphere/pull/12300/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvYWxnb3JpdGhtL0FFU0VuY3J5cHRBbGdvcml0aG0uamF2YQ==) | `90.00% <ø> (ø)` | |
| [...meter/impl/EncryptAssignmentParameterRewriter.java](https://codecov.io/gh/apache/shardingsphere/pull/12300/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcmV3cml0ZS9wYXJhbWV0ZXIvaW1wbC9FbmNyeXB0QXNzaWdubWVudFBhcmFtZXRlclJld3JpdGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...ertOnDuplicateKeyUpdateValueParameterRewriter.java](https://codecov.io/gh/apache/shardingsphere/pull/12300/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcmV3cml0ZS9wYXJhbWV0ZXIvaW1wbC9FbmNyeXB0SW5zZXJ0T25EdXBsaWNhdGVLZXlVcGRhdGVWYWx1ZVBhcmFtZXRlclJld3JpdGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...eter/impl/EncryptInsertValueParameterRewriter.java](https://codecov.io/gh/apache/shardingsphere/pull/12300/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcmV3cml0ZS9wYXJhbWV0ZXIvaW1wbC9FbmNyeXB0SW5zZXJ0VmFsdWVQYXJhbWV0ZXJSZXdyaXRlci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...ameter/impl/EncryptPredicateParameterRewriter.java](https://codecov.io/gh/apache/shardingsphere/pull/12300/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcmV3cml0ZS9wYXJhbWV0ZXIvaW1wbC9FbmNyeXB0UHJlZGljYXRlUGFyYW1ldGVyUmV3cml0ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...enerator/impl/EncryptAssignmentTokenGenerator.java](https://codecov.io/gh/apache/shardingsphere/pull/12300/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcmV3cml0ZS90b2tlbi9nZW5lcmF0b3IvaW1wbC9FbmNyeXB0QXNzaWdubWVudFRva2VuR2VuZXJhdG9yLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...ator/impl/EncryptInsertOnUpdateTokenGenerator.java](https://codecov.io/gh/apache/shardingsphere/pull/12300/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcmV3cml0ZS90b2tlbi9nZW5lcmF0b3IvaW1wbC9FbmNyeXB0SW5zZXJ0T25VcGRhdGVUb2tlbkdlbmVyYXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...erator/impl/EncryptInsertValuesTokenGenerator.java](https://codecov.io/gh/apache/shardingsphere/pull/12300/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcmV3cml0ZS90b2tlbi9nZW5lcmF0b3IvaW1wbC9FbmNyeXB0SW5zZXJ0VmFsdWVzVG9rZW5HZW5lcmF0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...impl/EncryptPredicateRightValueTokenGenerator.java](https://codecov.io/gh/apache/shardingsphere/pull/12300/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcmV3cml0ZS90b2tlbi9nZW5lcmF0b3IvaW1wbC9FbmNyeXB0UHJlZGljYXRlUmlnaHRWYWx1ZVRva2VuR2VuZXJhdG9yLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...phere/infra/binder/SQLStatementContextFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/12300/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtYmluZGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9iaW5kZXIvU1FMU3RhdGVtZW50Q29udGV4dEZhY3RvcnkuamF2YQ==) | `8.69% <0.00%> (ø)` | |
| ... and [85 more](https://codecov.io/gh/apache/shardingsphere/pull/12300/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/12300?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/12300?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0cdf80a...f79b80b](https://codecov.io/gh/apache/shardingsphere/pull/12300?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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 #12300: Enhance EncryptAlgorithm and QueryAssistedEncryptAlgorithm
Posted by GitBox <gi...@apache.org>.
cheese8 closed pull request #12300:
URL: https://github.com/apache/shardingsphere/pull/12300
--
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 pull request #12300: Enhance EncryptAlgorithm and QueryAssistedEncryptAlgorithm
Posted by GitBox <gi...@apache.org>.
cheese8 commented on pull request #12300:
URL: https://github.com/apache/shardingsphere/pull/12300#issuecomment-915342925
Please review on reimplementation with SchemaAvailable which different from previous hardcoding way, and rePR this ticket, sorry for inconvenience.
--
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 #12300: Enhance EncryptAlgorithm and QueryAssistedEncryptAlgorithm
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on a change in pull request #12300:
URL: https://github.com/apache/shardingsphere/pull/12300#discussion_r705006363
##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/spi/EncryptAlgorithm.java
##########
@@ -28,10 +30,11 @@
/**
* Encode.
*
+ * @param encryptContextMap encrypt context map which includes schema, owner, table and column keys.
* @param plaintext plaintext
* @return ciphertext
*/
- String encrypt(Object plaintext);
+ String encrypt(Object plaintext, Map<String, String> encryptContextMap);
Review comment:
@cheese8 Why only encrypt adds parameters, but decrypt remains the same?
##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptContext.java
##########
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.encrypt.rule;
+
+import java.util.Map;
+
+import com.google.common.collect.ImmutableMap;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * Encrypt context.
+ */
+@Getter
+@Setter
+public final class EncryptContext {
+
+ private String schema;
+
+ private String owner = "";
+
+ private String table;
+
+ private String column;
+
+ public EncryptContext(String schema, String table, String column) {
+ this.schema = schema;
+ this.table = table;
+ this.column = column;
+ }
+
+ public Map<String, String> of(){
Review comment:
@cheese8 Can we change this result type to Properties?
##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/spi/EncryptAlgorithm.java
##########
@@ -28,10 +30,11 @@
/**
* Encode.
*
+ * @param encryptContextMap encrypt context map which includes schema, owner, table and column keys.
Review comment:
@cheese8 Can we change this param type to Properties?
##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptContext.java
##########
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.encrypt.rule;
+
+import java.util.Map;
+
+import com.google.common.collect.ImmutableMap;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * Encrypt context.
+ */
+@Getter
+@Setter
+public final class EncryptContext {
+
+ private String schema;
+
+ private String owner = "";
Review comment:
@cheese8 Please remove this default value and add final for this field.
##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/parameter/impl/EncryptInsertOnDuplicateKeyUpdateValueParameterRewriter.java
##########
@@ -55,15 +59,16 @@ public void rewrite(final ParameterBuilder parameterBuilder, final InsertStateme
int columnIndex = index;
String encryptLogicColumnName = onDuplicateKeyUpdateValueContext.getColumn(columnIndex).getIdentifier().getValue();
Optional<EncryptAlgorithm> encryptorOptional = getEncryptRule().findEncryptor(tableName, encryptLogicColumnName);
+ Map<String, String> encryptContextMap = new EncryptContext(insertStatementContext.getSchemaName(), tableName, encryptLogicColumnName).of();
Review comment:
@cheese8 Can we consider that the logic of encryption and decryption parameters is implemented by the user in the form of SPI?
--
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 #12300: Enhance EncryptAlgorithm and QueryAssistedEncryptAlgorithm
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on a change in pull request #12300:
URL: https://github.com/apache/shardingsphere/pull/12300#discussion_r705914741
##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptPropertiesBuilder.java
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.encrypt.rewrite.token;
+
+import java.util.Properties;
+
+import org.apache.commons.collections4.MapUtils;
+
+import com.google.common.collect.ImmutableMap;
+
+public final class EncryptPropertiesBuilder {
+
+ /**
+ * Construct properties from schema, owner, table and column.
+ *
+ * @param schema schema
+ * @param owner owner
+ * @param table table
+ * @param column column
+ * @return Properties which include schema, owner, table and column keys.
+ */
+ public static Properties getProperties(final String schema, final String owner, final String table, final String column) {
+ return MapUtils.toProperties(ImmutableMap.of("schema", schema, "owner", owner, "table", table, "column", column));
Review comment:
@cheese8 Can we try to remove the dependence on guava?
##########
File path: shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/log/RuleConfigurationLogger.java
##########
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.driver.jdbc.core.log;
+
+import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
+import org.apache.shardingsphere.encrypt.yaml.swapper.EncryptRuleConfigurationYamlSwapper;
+import org.apache.shardingsphere.infra.config.RuleConfiguration;
+import org.apache.shardingsphere.infra.yaml.engine.YamlEngine;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * Rule configuration logger.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+@Slf4j
+public final class RuleConfigurationLogger {
Review comment:
@cheese8 Can we remove this class?
##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptPropertiesBuilder.java
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.encrypt.rewrite.token;
+
+import java.util.Properties;
+
+import org.apache.commons.collections4.MapUtils;
+
+import com.google.common.collect.ImmutableMap;
+
+public final class EncryptPropertiesBuilder {
Review comment:
@cheese8 Please add java doc for `EncryptPropertiesBuilder`.
##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptPropertiesBuilder.java
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.encrypt.rewrite.token;
+
+import java.util.Properties;
+
+import org.apache.commons.collections4.MapUtils;
+
+import com.google.common.collect.ImmutableMap;
+
+public final class EncryptPropertiesBuilder {
+
+ /**
+ * Construct properties from schema, owner, table and column.
+ *
+ * @param schema schema
+ * @param owner owner
+ * @param table table
+ * @param column column
+ * @return Properties which include schema, owner, table and column keys.
+ */
+ public static Properties getProperties(final String schema, final String owner, final String table, final String column) {
Review comment:
@cheese8 `buildEncryptProperties` may be better.
--
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