szaszm commented on code in PR #1708:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1708#discussion_r1443124349


##########
libminifi/src/core/flow/StructuredConfiguration.cpp:
##########
@@ -620,20 +628,26 @@ void StructuredConfiguration::parseRPGPort(const Node& 
port_node, core::ProcessG
 }
 
 void StructuredConfiguration::parsePropertyValueSequence(const std::string& 
property_name, const Node& property_value_node, core::ConfigurableComponent& 
component) {
+  core::Property myProp(property_name, "", "");
+  component.getProperty(property_name, myProp);
+
   for (const auto& nodeVal : property_value_node) {
     if (nodeVal) {
       Node propertiesNode = nodeVal["value"];
-      // must insert the sequence in differently.
-      const auto rawValueString = propertiesNode.getString().value();
-      logger_->log_debug("Found {}={}", property_name, rawValueString);
+      auto rawValueString = propertiesNode.getString().value();
+      if (myProp.isSensitive()) {
+        rawValueString = decryptProperty(rawValueString);
+      }
+      logger_->log_debug("Found property {}", property_name);

Review Comment:
   Could this be changed in the future to allow decrypting properties that are 
_not_ marked as sensitive, without breaking backwards compatibility?
   I'm thinking about a scenario where we accidentally marked a property as 
sensitive that's not really sensitive, so we make the property non-sensitive, 
but existing configs have the encrypted value after upgrade to this 
hypothetical future version.
   
   I'm not requesting the change now, just want to make sure that should we 
ever make a property non-sensitive, we can also make this change then.



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

Reply via email to