Skip to content

Commit e1cc229

Browse files
authored
Add or modify encryption related codes (apache#13364)
Co-authored-by: zhujt <[email protected]>
1 parent 57c668c commit e1cc229

File tree

23 files changed

+1273
-34
lines changed

23 files changed

+1273
-34
lines changed

integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppCommonConfig.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,24 @@ public CommonConfig setCompressor(String compressor) {
9797
return this;
9898
}
9999

100+
@Override
101+
public CommonConfig setEncryptFlag(boolean encryptFlag) {
102+
setProperty("encrypt_flag", String.valueOf(encryptFlag));
103+
return this;
104+
}
105+
106+
@Override
107+
public CommonConfig setEncryptType(String encryptType) {
108+
setProperty("encrypt_type", encryptType);
109+
return this;
110+
}
111+
112+
@Override
113+
public CommonConfig setEncryptKeyPath(String encryptKeyPath) {
114+
setProperty("encrypt_key_path", encryptKeyPath);
115+
return this;
116+
}
117+
100118
@Override
101119
public CommonConfig setUdfMemoryBudgetInMB(float udfCollectorMemoryBudgetInMB) {
102120
// udf_memory_budget_in_mb

integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppSharedCommonConfig.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,27 @@ public CommonConfig setCompressor(String compressor) {
7575
return this;
7676
}
7777

78+
@Override
79+
public CommonConfig setEncryptFlag(boolean encryptFlag) {
80+
cnConfig.setProperty("encrypt_flag", String.valueOf(encryptFlag));
81+
dnConfig.setProperty("encrypt_flag", String.valueOf(encryptFlag));
82+
return this;
83+
}
84+
85+
@Override
86+
public CommonConfig setEncryptType(String encryptType) {
87+
cnConfig.setProperty("encrypt_type", encryptType);
88+
dnConfig.setProperty("encrypt_type", encryptType);
89+
return this;
90+
}
91+
92+
@Override
93+
public CommonConfig setEncryptKeyPath(String encryptKeyPath) {
94+
cnConfig.setProperty("encrypt_key_path", encryptKeyPath);
95+
dnConfig.setProperty("encrypt_key_path", encryptKeyPath);
96+
return this;
97+
}
98+
7899
@Override
79100
public CommonConfig setConfigRegionRatisRPCLeaderElectionTimeoutMaxMs(int maxMs) {
80101
cnConfig.setConfigRegionRatisRPCLeaderElectionTimeoutMaxMs(maxMs);

integration-test/src/main/java/org/apache/iotdb/it/env/remote/config/RemoteCommonConfig.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,21 @@ public CommonConfig setCompressor(String compressor) {
5454
return this;
5555
}
5656

57+
@Override
58+
public CommonConfig setEncryptFlag(boolean encryptFlag) {
59+
return this;
60+
}
61+
62+
@Override
63+
public CommonConfig setEncryptType(String encryptType) {
64+
return this;
65+
}
66+
67+
@Override
68+
public CommonConfig setEncryptKeyPath(String encryptKeyPath) {
69+
return this;
70+
}
71+
5772
@Override
5873
public CommonConfig setConfigRegionRatisRPCLeaderElectionTimeoutMaxMs(int maxMs) {
5974
return this;

integration-test/src/main/java/org/apache/iotdb/itbase/env/CommonConfig.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ public interface CommonConfig {
3636

3737
CommonConfig setCompressor(String compressor);
3838

39+
CommonConfig setEncryptFlag(boolean encryptFlag);
40+
41+
CommonConfig setEncryptType(String encryptType);
42+
43+
CommonConfig setEncryptKeyPath(String encryptKeyPath);
44+
3945
CommonConfig setConfigRegionRatisRPCLeaderElectionTimeoutMaxMs(int maxMs);
4046

4147
CommonConfig setUdfMemoryBudgetInMB(float udfCollectorMemoryBudgetInMB);

0 commit comments

Comments
 (0)