You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/04/08 14:21:52 UTC

[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a diff in pull request #1296: MINIFICPP-1794 Remove sensitive properties from agent manifest

adamdebreceni commented on code in PR #1296:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1296#discussion_r846163209


##########
libminifi/src/core/state/nodes/SupportedOperations.cpp:
##########
@@ -62,11 +63,27 @@ void SupportedOperations::addProperty(SerializedResponseNode& properties, const
   properties.children.push_back(operand_node);
 }
 
+std::vector<std::string> SupportedOperations::getSensitiveProperties() const {
+  std::vector<std::string> sensitive_properties;
+  sensitive_properties.assign(Configuration::DEFAULT_SENSITIVE_PROPERTIES.begin(), Configuration::DEFAULT_SENSITIVE_PROPERTIES.end());
+  if (configuration_reader_) {
+    const auto additional_sensitive_props_list = configuration_reader_(Configuration::nifi_sensitive_props_additional_keys);
+    if (additional_sensitive_props_list) {
+      std::vector<std::string> additional_sensitive_properties = utils::StringUtils::split(*additional_sensitive_props_list, ",");
+      return Configuration::mergeProperties(sensitive_properties, additional_sensitive_properties);
+    }
+  }
+  return sensitive_properties;
+}

Review Comment:
   it seems to me, that there are three separate instances of building up the sensitive properties list, could we somehow unify these?



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org