mcgilman commented on code in PR #8853:
URL: https://github.com/apache/nifi/pull/8853#discussion_r1607181814
##########
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:
I think the new UI should also be showing the same `Sensitive value set`
messaging. I don't think moving away from that behavior was intended. I'd need
to revisit it to be sure but I would assume we'd want to retain that behavior,
when not referencing a Parameter that is.
--
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]