lordgamez commented on code in PR #1915:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1915#discussion_r1981487289
##########
libminifi/test/unit/JsonFlowSerializerTests.cpp:
##########
@@ -901,4 +901,93 @@ TEST_CASE("Parameter provider generated parameter context
is not serialized if p
}
}
+TEST_CASE("Parameter provider generated parameter context is reserialized if
Reload Values On Restart is set to true") {
+ ConfigurationTestController test_controller;
+ auto configuration_context = test_controller.getContext();
+ configuration_context.sensitive_values_encryptor = encryption_provider;
+ core::flow::AdaptiveConfiguration
json_configuration_before{configuration_context};
+
+ const auto schema = core::flow::FlowSchema::getNiFiFlowJson();
+ static const std::string config_json_with_nifi_schema =
+ R"(
+{
+ "parameterProviders": [
+ {
+ "identifier": "d26ee5f5-0192-1000-0482-4e333725e089",
+ "name": "EnvironmentVariableParameterProvider",
+ "type": "EnvironmentVariableParameterProvider",
+ "properties": {
+ "Environment Variable Inclusion Strategy": "Comma-Separated",
+ "Include Environment Variables": "MINIFI_DATA,SECRET_MINIFI_DATA",
+ "Sensitive Parameter Scope": "selected",
+ "Sensitive Parameter List": "SECRET_MINIFI_DATA",
+ "Parameter Group Name": "environment-variable-parameter-context",
+ "Reload Values On Restart": "true"
+ }
+ }
+ ],
+ "parameterContexts": [
+ {
+ "identifier": "123ee5f5-0192-1000-0482-4e333725e345",
+ "name": "environment-variable-parameter-context",
+ "description": "my parameter context",
+ "parameters": [
+ {
+ "name": "SECRET_MINIFI_DATA",
+ "description": "",
+ "sensitive": true,
+ "provided": true,
+ "value": "old_secret_minifi_data_value"
Review Comment:
In this scenario it should not be an encrypted value, as the encryption is
done after the root process group is loaded and the process group is serialized
again.
--
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]