Hisoka-X commented on code in PR #8527:
URL: https://github.com/apache/seatunnel/pull/8527#discussion_r1917607843
##########
docs/zh/connector-v2/Config-Encryption-Decryption.md:
##########
@@ -179,3 +179,42 @@ Base64编码支持加密以下参数:
5. 将其打成 jar 包, 并添加到 `${SEATUNNEL_HOME}/lib` 目录下。
6. 将选项 `shade.identifier` 的值更改为上面定义在配置文件中的 `ConfigShade#getIdentifier` 的值。
+### 在加密解密方法中使用自定义参数
+
+如果您想要使用自定义参数进行加密和解密,可以按照以下步骤操作:
+1. 在配置文件的env 中添加`shade.props`配置,该配置的值是键值对形式(键的类型必须是字符串) ,如下所示:
Review Comment:
```suggestion
1. 在配置文件的env 中添加`shade.properties`配置,该配置的值是键值对形式(键的类型必须是字符串) ,如下所示:
```
##########
docs/zh/connector-v2/Config-Encryption-Decryption.md:
##########
@@ -179,3 +179,42 @@ Base64编码支持加密以下参数:
5. 将其打成 jar 包, 并添加到 `${SEATUNNEL_HOME}/lib` 目录下。
6. 将选项 `shade.identifier` 的值更改为上面定义在配置文件中的 `ConfigShade#getIdentifier` 的值。
+### 在加密解密方法中使用自定义参数
+
+如果您想要使用自定义参数进行加密和解密,可以按照以下步骤操作:
+1. 在配置文件的env 中添加`shade.props`配置,该配置的值是键值对形式(键的类型必须是字符串) ,如下所示:
+
+ ```txt
+ "env" : {
+ "shade.props" : {
+ "suffix" : "666"
+ }
+
+ ```
Review Comment:
```suggestion
```hocon
env {
shade.properties = {
suffix = "666"
}
}
```
```
##########
seatunnel-core/seatunnel-core-starter/src/test/java/org/apache/seatunnel/core/starter/utils/ConfigShadeTest.java:
##########
@@ -263,6 +264,56 @@ public void testDecryptAndEncrypt() {
Assertions.assertEquals(decryptPassword, PASSWORD);
}
+ @Test
+ public void testDecryptWithProps() throws URISyntaxException {
+ URL resource =
ConfigShadeTest.class.getResource("/config.shade_with_props.json");
+ Assertions.assertNotNull(resource);
+ Config deprecatedConfig =
Review Comment:
why named `deprecatedConfig`?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]