jrsteinebrey commented on code in PR #8853:
URL: https://github.com/apache/nifi/pull/8853#discussion_r1607086040
##########
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:
It makes sense to have the server-side compute the appropriate value. To do
that we could continue to return ******* for sensitive values and that would
change the UI to display ******** instead of Sensitive value set in the
property config dialog table of properties. This is a bit of a change for users
so can we make that change in the new UI and not change the current UI in this
special case (even though we usually keep current and new equivalent)?
The new UI property dialog already differs from the current UI in that new
Ui opens with ******* instead of current UI which shows Sensitive value set in
the edit dialog.
Look specifically at the nf-editor property value dialog initial value and
how it differs between new and current UIs.
New UI before my changes

Current UI before my changes


--
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]