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


##########
extensions/azure/processors/AzureBlobStorageProcessorBase.h:
##########
@@ -51,10 +51,13 @@ class AzureBlobStorageProcessorBase : public 
AzureStorageProcessorBase {
       .withDescription("The storage account key. This is an admin-like 
password providing access to every container in this account. "
           "It is recommended one uses Shared Access Signature (SAS) token 
instead for fine-grained control with policies.")
       .supportsExpressionLanguage(true)
+      .isSensitive(true)
       .build();
   EXTENSIONAPI static constexpr auto SASToken = 
core::PropertyDefinitionBuilder<>::createProperty("SAS Token")
       .withDescription("Shared Access Signature token. Specify either SAS 
Token (recommended) or Storage Account Key together with Storage Account Name 
if Managed Identity is not used.")
-      .supportsExpressionLanguage(true).build();
+      .supportsExpressionLanguage(true)

Review Comment:
   I don't think this supports EL. The EL extension only overrides the 
getProperty overloads that take a flow file for context, and the `onSchedule` 
of this class calls the overload without a flow file parameter.



##########
libminifi/src/core/FlowConfiguration.cpp:
##########
@@ -174,4 +181,22 @@ std::shared_ptr<core::controller::ControllerServiceNode> 
FlowConfiguration::crea
   return controllerServicesNode;
 }
 
+std::string FlowConfiguration::decryptProperty(const std::string& 
encrypted_value) const {
+  static const utils::Regex is_encrypted{R"(enc\{.*\})"};
+  if (!utils::regexMatch(encrypted_value, is_encrypted)) {

Review Comment:
   It may be premature optimization, but I'd avoid regex here, and use 
`starts_with("enc{")` and `ends_with('}')` instead.



-- 
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-unsubscr...@nifi.apache.org

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

Reply via email to