diff options
| author | 侯晋川 <[email protected]> | 2024-10-28 18:03:42 +0800 |
|---|---|---|
| committer | 侯晋川 <[email protected]> | 2024-10-28 18:03:42 +0800 |
| commit | 8055b40a031833562308e7d7fcae9c923eec9880 (patch) | |
| tree | 1a8fbb8cefc3ba14245d207d17705536829c08b8 /groot-common/src/main | |
| parent | 152fa429b30717cbb5964973f43c8ca0d5a22218 (diff) | |
[feature][core] 优化Encrypt和HMAC函数。新增Encrypt单元测试feature/udf-encrypt
Diffstat (limited to 'groot-common/src/main')
5 files changed, 7 insertions, 14 deletions
diff --git a/groot-common/src/main/java/com/geedgenetworks/common/Constants.java b/groot-common/src/main/java/com/geedgenetworks/common/Constants.java index b523591..27ce8fb 100644 --- a/groot-common/src/main/java/com/geedgenetworks/common/Constants.java +++ b/groot-common/src/main/java/com/geedgenetworks/common/Constants.java @@ -2,7 +2,7 @@ package com.geedgenetworks.common; public final class Constants { - public static final String DEFAULT_JOB_NAME="groot-stream-job"; + public static final String DEFAULT_JOB_NAME = "groot-stream-job"; public static final String SOURCES = "sources"; public static final String FILTERS = "filters"; public static final String PREPROCESSING_PIPELINES = "preprocessing_pipelines"; @@ -14,7 +14,7 @@ public final class Constants { public static final String PROPERTIES = "properties"; public static final String SPLITS = "splits"; - public static final String APPLICATION_ENV ="env"; + public static final String APPLICATION_ENV = "env"; public static final String APPLICATION_TOPOLOGY = "topology"; public static final String JOB_NAME = "name"; public static final String GROOT_LOGO = "\n" + @@ -49,6 +49,8 @@ public final class Constants { public static final String SLIDING_PROCESSING_TIME = "sliding_processing_time"; public static final String SLIDING_EVENT_TIME = "sliding_event_time"; - + public static final String SYSPROP_KMS_TYPE_CONFIG = "kms.type"; + public static final String SYSPROP_ENCRYPT_KMS_KEY_SCHEDULER_INTERVAL_NAME = "scheduler.encrypt.update.kms.key.minutes"; + public static final String SYSPROP_ENCRYPT_SENSITIVE_FIELDS_SCHEDULER_INTERVAL_NAME = "scheduler.encrypt.update.sensitive.fields.minutes"; } diff --git a/groot-common/src/main/java/com/geedgenetworks/common/config/CommonConfigDomProcessor.java b/groot-common/src/main/java/com/geedgenetworks/common/config/CommonConfigDomProcessor.java index 51e2ff0..b3b17e8 100644 --- a/groot-common/src/main/java/com/geedgenetworks/common/config/CommonConfigDomProcessor.java +++ b/groot-common/src/main/java/com/geedgenetworks/common/config/CommonConfigDomProcessor.java @@ -117,8 +117,6 @@ public class CommonConfigDomProcessor extends AbstractDomConfigProcessor { String name = cleanNodeName(node); if (CommonConfigOptions.KMS_TYPE.key().equals(name)) { kmsConfig.setType(getTextContent(node)); - } else if (CommonConfigOptions.KMS_SECRET_KEY.key().equals(name)) { - kmsConfig.setSecretKey(getTextContent(node)); } else if (CommonConfigOptions.KMS_URL.key().equals(name)) { kmsConfig.setUrl(getTextContent(node)); } else if (CommonConfigOptions.KMS_USERNAME.key().equals(name)) { diff --git a/groot-common/src/main/java/com/geedgenetworks/common/config/CommonConfigOptions.java b/groot-common/src/main/java/com/geedgenetworks/common/config/CommonConfigOptions.java index 1c3f4d0..167fcba 100644 --- a/groot-common/src/main/java/com/geedgenetworks/common/config/CommonConfigOptions.java +++ b/groot-common/src/main/java/com/geedgenetworks/common/config/CommonConfigOptions.java @@ -70,11 +70,6 @@ public class CommonConfigOptions { .defaultValue("local") .withDescription("The type of KMS."); - public static final Option<String> KMS_SECRET_KEY = Options.key("secret_key") - .stringType() - .defaultValue("") - .withDescription("The type of KMS."); - public static final Option<String> KMS_URL = Options.key("url") .stringType() .defaultValue("") diff --git a/groot-common/src/main/java/com/geedgenetworks/common/config/KmsConfig.java b/groot-common/src/main/java/com/geedgenetworks/common/config/KmsConfig.java index 75a5b4c..f0e213f 100644 --- a/groot-common/src/main/java/com/geedgenetworks/common/config/KmsConfig.java +++ b/groot-common/src/main/java/com/geedgenetworks/common/config/KmsConfig.java @@ -7,7 +7,6 @@ import java.io.Serializable; @Data public class KmsConfig implements Serializable { private String type = CommonConfigOptions.KMS_TYPE.defaultValue(); - private String secretKey = CommonConfigOptions.KMS_TYPE.defaultValue(); private String url = CommonConfigOptions.KMS_URL.defaultValue(); private String username = CommonConfigOptions.KMS_USERNAME.defaultValue(); private String password = CommonConfigOptions.KMS_PASSWORD.defaultValue(); diff --git a/groot-common/src/main/resources/grootstream.yaml b/groot-common/src/main/resources/grootstream.yaml index d7818ab..26752e3 100644 --- a/groot-common/src/main/resources/grootstream.yaml +++ b/groot-common/src/main/resources/grootstream.yaml @@ -13,9 +13,8 @@ grootstream: - 004390bc-3135-4a6f-a492-3662ecb9e289 kms: -# local: -# type: local -# secret_key: .geedgenetworks. + local: + type: local vault: type: vault url: https://192.168.40.223:8200 |
