xleoken commented on code in PR #2899:
URL: https://github.com/apache/amoro/pull/2899#discussion_r1625701837
##########
amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/dashboard/utils/DesensitizationUtil.java:
##########
@@ -22,11 +22,26 @@
public class DesensitizationUtil {
public static String COMMON_SECRET_FORMAT = "********";
+ private static final String[] SENSITIVE_CONF_KEYWORDS = {"secret", "token",
"password"};
+
public static String desensitize(Object data) {
return COMMON_SECRET_FORMAT;
}
public static boolean isDesensitized(Object data) {
return COMMON_SECRET_FORMAT.equals(data);
}
+
+ public static boolean containsSensitiveVal(String input) {
Review Comment:
We can define `SENSITIVE_CONF_KEYWORDS` as a list, then use contains method.
--
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]