jrsteinebrey commented on code in PR #8853:
URL: https://github.com/apache/nifi/pull/8853#discussion_r1607097336
##########
nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java:
##########
@@ -719,6 +720,15 @@ public boolean isSensitive() {
return sensitive;
}
+ // Pattern to match a parameter reference i.e. "#{anything}"
+ private static final Pattern PARAMETER_REFERENCE =
Pattern.compile("^#\\{.*}$");
+
+ public static boolean isSensitiveValueSafeToDisplay(String value) {
+ // If the value is a parameter reference, then it is safe to display
the parameter name.
+ // A parameter name is safe to display to users because the sensitive
info is stored in the parameter value.
+ return value != null && PARAMETER_REFERENCE.matcher(value).matches();
+ }
Review Comment:
Or if you prefer to make the change to show ******* instead of Sensitive
value set in both the new AND current UIs, then that is fine with me also.
--
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]