[nifi] branch main updated: NIFI-10071: Adding support for HashiCorp Vault K/V version 2 Secrets Engine (#6087)

2022-06-01 Thread bbende
This is an automated email from the ASF dual-hosted git repository.

bbende pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new 48de70a568 NIFI-10071: Adding support for HashiCorp Vault K/V version 
2 Secrets Engine (#6087)
48de70a568 is described below

commit 48de70a56883c69a7bc51545c7cd410563b995ec
Author: Joe Gresock 
AuthorDate: Wed Jun 1 15:09:01 2022 -0400

NIFI-10071: Adding support for HashiCorp Vault K/V version 2 Secrets Engine 
(#6087)
---
 .../HashiCorpVaultCommunicationService.java| 24 +-
 ...StandardHashiCorpVaultCommunicationService.java | 13 +++---
 .../config/HashiCorpVaultConfiguration.java| 26 +++
 .../hashicorp/config/HashiCorpVaultProperties.java | 54 ++
 .../config/lookup/BeanPropertyLookup.java  |  7 ++-
 ...andardHashiCorpVaultCommunicationServiceIT.java | 26 +--
 .../hashicorp/TestHashiCorpVaultConfiguration.java | 24 ++
 ...StandardHashiCorpVaultCommunicationService.java | 31 +++--
 .../src/main/asciidoc/administration-guide.adoc|  1 +
 .../resources/conf/bootstrap-hashicorp-vault.conf  |  2 +
 .../resources/conf/bootstrap-hashicorp-vault.conf  |  2 +
 11 files changed, 155 insertions(+), 55 deletions(-)

diff --git 
a/nifi-commons/nifi-vault-utils/src/main/java/org/apache/nifi/vault/hashicorp/HashiCorpVaultCommunicationService.java
 
b/nifi-commons/nifi-vault-utils/src/main/java/org/apache/nifi/vault/hashicorp/HashiCorpVaultCommunicationService.java
index 8e9f8c5594..840db72ffa 100644
--- 
a/nifi-commons/nifi-vault-utils/src/main/java/org/apache/nifi/vault/hashicorp/HashiCorpVaultCommunicationService.java
+++ 
b/nifi-commons/nifi-vault-utils/src/main/java/org/apache/nifi/vault/hashicorp/HashiCorpVaultCommunicationService.java
@@ -46,39 +46,39 @@ public interface HashiCorpVaultCommunicationService {
 byte[] decrypt(String transitPath, String cipherText);
 
 /**
- * Writes a single secret value using Vault's unversioned Key/Value 
Secrets Engine.
+ * Writes a single secret value using Vault's Key/Value Secrets Engine.
  *
- * @see https://www.vaultproject.io/api-docs/secret/kv/kv-v1;>https://www.vaultproject.io/api-docs/secret/kv/kv-v1
- * @param keyValuePath The Vault path to use for the configured Key/Value 
v1 Secrets Engine
+ * @see https://www.vaultproject.io/api-docs/secret/kv;>https://www.vaultproject.io/api-docs/secret/kv
+ * @param keyValuePath The Vault path to use for the configured Key/Value 
Secrets Engine
  * @param secretKey The secret key
  * @param value The secret value
  */
 void writeKeyValueSecret(String keyValuePath, String secretKey, String 
value);
 
 /**
- * Reads a single secret value from Vault's unversioned Key/Value Secrets 
Engine.
+ * Reads a single secret value from Vault's Key/Value Secrets Engine.
  *
- * @see https://www.vaultproject.io/api-docs/secret/kv/kv-v1;>https://www.vaultproject.io/api-docs/secret/kv/kv-v1
- * @param keyValuePath The Vault path to use for the configured Key/Value 
v1 Secrets Engine
+ * @see https://www.vaultproject.io/api-docs/secret/kv;>https://www.vaultproject.io/api-docs/secret/kv
+ * @param keyValuePath The Vault path to use for the configured Key/Value 
Secrets Engine
  * @param secretKey The secret key
  * @return The secret value, or empty if not found
  */
 Optional readKeyValueSecret(String keyValuePath, String secretKey);
 
 /**
- * Writes a secret with multiple key/value pairs using Vault's unversioned 
Key/Value Secrets Engine.
+ * Writes a secret with multiple key/value pairs using Vault's Key/Value 
Secrets Engine.
  *
- * @see https://www.vaultproject.io/api-docs/secret/kv/kv-v1;>https://www.vaultproject.io/api-docs/secret/kv/kv-v1
- * @param keyValuePath The Vault path to use for the configured Key/Value 
v1 Secrets Engine
+ * @see https://www.vaultproject.io/api-docs/secret/kv;>https://www.vaultproject.io/api-docs/secret/kv
+ * @param keyValuePath The Vault path to use for the configured Key/Value 
Secrets Engine
  * @param keyValues A map from key to value for keys/values that should be 
stored in the secret
  */
 void writeKeyValueSecretMap(String keyValuePath, String secretKey, 
Map keyValues);
 
 /**
- * Reads a secret with multiple key/value pairs from Vault's unversioned 
Key/Value Secrets Engine.
+ * Reads a secret with multiple key/value pairs from Vault's Key/Value 
Secrets Engine.
  *
- * @see https://www.vaultproject.io/api-docs/secret/kv/kv-v1;>https://www.vaultproject.io/api-docs/secret/kv/kv-v1
- * @param keyValuePath The Vault path to use for the configured Key/Value 
v1 Secrets Engine
+ * @see https://www.vaultproject.io/api-docs/secret/kv;>https://www.vaultproject.io/api-docs/secret/kv
+ * @param keyValuePath 

[nifi-minifi-cpp] branch main updated: MINIFICPP-1852 parameterize all docker builds, enable more extensions Closes #1341

2022-06-01 Thread martinzink
This is an automated email from the ASF dual-hosted git repository.

martinzink pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new d10268674 MINIFICPP-1852 parameterize all docker builds, enable more 
extensions Closes #1341
d10268674 is described below

commit d102686742a3694d1105977b0af50a0c82c8f347
Author: Marton Szasz 
AuthorDate: Wed Jun 1 20:37:00 2022 +0200

MINIFICPP-1852 parameterize all docker builds, enable more extensions
Closes #1341

Signed-off-by: Martin Zink 
---
 CMakeLists.txt   |  15 +++--
 cmake/DockerConfig.cmake | 157 +++
 docker/bionic/Dockerfile |  60 --
 docker/centos/Dockerfile |  60 --
 docker/fedora/Dockerfile |  60 --
 docker/focal/Dockerfile  |  57 -
 6 files changed, 386 insertions(+), 23 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a0830c18d..d7492af33 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -100,30 +100,29 @@ option(DISABLE_LZMA "Disables the liblzma build" OFF)
 option(DISABLE_BZIP2 "Disables the bzip2 build" OFF)
 option(ENABLE_GPS "Enables the GPS extension." OFF)
 option(ENABLE_COAP "Enables the CoAP extension." OFF)
-option(ENABLE_SQL "Enables the SQL Suite of Tools." OFF)
+option(ENABLE_SQL "Enables the SQL Suite of Tools." ON)
 option(ENABLE_MQTT "Enables the mqtt extension." OFF)
 option(ENABLE_PCAP "Enables the PCAP extension." OFF)
-option(ENABLE_LIBRDKAFKA "Enables the librdkafka extension." OFF)
+option(ENABLE_LIBRDKAFKA "Enables the librdkafka extension." ON)
 option(ENABLE_SCRIPTING "Enables the scripting extensions." OFF)
 option(ENABLE_SENSORS "Enables the Sensors package." OFF)
 option(ENABLE_USB_CAMERA "Enables USB camera support." OFF)
 option(ENABLE_TENSORFLOW "Enables the TensorFlow extensions." OFF)  ## 
Disabled by default because TF can be complex/environment-specific to build
-option(ENABLE_AWS "Enables AWS support." OFF)
+option(ENABLE_AWS "Enables AWS support." ON)
 option(ENABLE_OPENCV "Enables the OpenCV extensions." OFF)
 option(ENABLE_BUSTACHE "Enables Bustache (ApplyTemplate) support." OFF)
 option(ENABLE_SFTP "Enables SFTP support." OFF)
 option(ENABLE_OPENWSMAN "Enables the Openwsman extensions." OFF)
-option(ENABLE_AZURE "Enables Azure support." OFF)
+option(ENABLE_AZURE "Enables Azure support." ON)
 option(ENABLE_ENCRYPT_CONFIG "Enables build of encrypt-config binary." ON)
-option(ENABLE_SPLUNK "Enable Splunk support" OFF)
-option(ENABLE_GCP "Enable Google Cloud support" OFF)
-option(ENABLE_PROCFS "Enable ProcFs support" OFF)
+option(ENABLE_SPLUNK "Enable Splunk support" ON)
+option(ENABLE_GCP "Enable Google Cloud support" ON)
 option(DOCKER_BUILD_ONLY "Disables all targets except docker build scripts. 
Ideal for systems without an up-to-date compiler." OFF)
 option(ENABLE_KUBERNETES "Enables the Kubernetes extensions." OFF)
 option(ENABLE_TEST_PROCESSORS "Enables test processors" OFF)
 
 if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-   option(ENABLE_PROCFS "Enables the procfs extension." OFF)
+   option(ENABLE_PROCFS "Enables the procfs extension." ON)
 endif()
 
 ## Keep all option definitions above this line
diff --git a/cmake/DockerConfig.cmake b/cmake/DockerConfig.cmake
index 1e53b9dea..8e6387270 100644
--- a/cmake/DockerConfig.cmake
+++ b/cmake/DockerConfig.cmake
@@ -94,7 +94,46 @@ add_custom_target(
 -u 1000
 -g 1000
 -v 
${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
+-c ENABLE_ALL=${ENABLE_ALL}
+-c ENABLE_PYTHON=${ENABLE_PYTHON}
+-c ENABLE_OPS=${ENABLE_OPS}
 -c ENABLE_JNI=${ENABLE_JNI}
+-c ENABLE_OPENCV=${ENABLE_OPENCV}
+-c ENABLE_OPC=${ENABLE_OPC}
+-c ENABLE_GPS=${ENABLE_GPS}
+-c ENABLE_COAP=${ENABLE_COAP}
+-c ENABLE_SQL=${ENABLE_SQL}
+-c ENABLE_MQTT=${ENABLE_MQTT}
+-c ENABLE_PCAP=${ENABLE_PCAP}
+-c ENABLE_LIBRDKAFKA=${ENABLE_LIBRDKAFKA}
+-c ENABLE_SENSORS=${ENABLE_SENSORS}
+-c ENABLE_USB_CAMERA=${ENABLE_USB_CAMERA}
+-c ENABLE_TENSORFLOW=${ENABLE_TENSORFLOW}
+-c ENABLE_AWS=${ENABLE_AWS}
+-c ENABLE_BUSTACHE=${ENABLE_BUSTACHE}
+-c ENABLE_SFTP=${ENABLE_SFTP}
+-c ENABLE_OPENWSMAN=${ENABLE_OPENWSMAN}
+-c ENABLE_AZURE=${ENABLE_AZURE}
+-c ENABLE_ENCRYPT_CONFIG=${ENABLE_ENCRYPT_CONFIG}
+-c ENABLE_NANOFI=${ENABLE_NANOFI}
+-c ENABLE_SPLUNK=${ENABLE_SPLUNK}
+-c ENABLE_GCP=${ENABLE_GCP}
+-c ENABLE_SCRIPTING=${ENABLE_SCRIPTING}
+-c ENABLE_LUA_SCRIPTING=${ENABLE_LUA_SCRIPTING}
+-c ENABLE_KUBERNETES=${ENABLE_KUBERNETES}
+-c ENABLE_PROCFS=${ENABLE_PROCFS}
+-c ENABLE_SYSTEMD=${ENABLE_SYSTEMD}
+-c DISABLE_CURL=${DISABLE_CURL}
+-c 

[nifi] branch main updated: NIFI-10074 Fix potential UnsupportedOperationException in PutSmbFile.customValidate. (#6088)

2022-06-01 Thread markap14
This is an automated email from the ASF dual-hosted git repository.

markap14 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new 0d45fef702 NIFI-10074 Fix potential UnsupportedOperationException in 
PutSmbFile.customValidate. (#6088)
0d45fef702 is described below

commit 0d45fef7027758339b05d77b742a6bbdb398d6be
Author: tpalfy <53442425+tpa...@users.noreply.github.com>
AuthorDate: Wed Jun 1 20:27:07 2022 +0200

NIFI-10074 Fix potential UnsupportedOperationException in 
PutSmbFile.customValidate. (#6088)
---
 .../src/main/java/org/apache/nifi/processors/smb/PutSmbFile.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/PutSmbFile.java
 
b/nifi-nar-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/PutSmbFile.java
index 2accbbf499..6c6821fca4 100644
--- 
a/nifi-nar-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/PutSmbFile.java
+++ 
b/nifi-nar-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/PutSmbFile.java
@@ -229,7 +229,7 @@ public class PutSmbFile extends AbstractProcessor {
 
 @Override
 protected Collection customValidate(ValidationContext 
validationContext) {
-Collection set = Collections.emptySet();
+Collection set = new ArrayList<>();
 if (validationContext.getProperty(USERNAME).isSet() && 
!validationContext.getProperty(PASSWORD).isSet()) {
 set.add(new ValidationResult.Builder().explanation("Password must 
be set if username is supplied.").build());
 }



[nifi-minifi-cpp] annotated tag rel/minifi-cpp-0.12.0 updated (b2c23b1d7 -> 0097cb972)

2022-06-01 Thread martinzink
This is an automated email from the ASF dual-hosted git repository.

martinzink pushed a change to annotated tag rel/minifi-cpp-0.12.0
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


*** WARNING: tag rel/minifi-cpp-0.12.0 was modified! ***

from b2c23b1d7 (commit)
  to 0097cb972 (tag)
 tagging b2c23b1d7ae43d64e4cbfc88ae37fd6ac2883722 (commit)
 replaces rel/minifi-cpp-0.11.0
  by Martin Zink
  on Wed Jun 1 20:12:41 2022 +0200

- Log -
MINIFICPP-1844 signed release tag for approved release of NiFi MiNiFi C++ 0.12.0
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEE6y+NdO54rvYwD7IRhYhB6eWWGXoFAmKXrBkACgkQhYhB6eWW
GXoblBAAsf1FZffNniuMS2+X3BzCkgUIaFUo5Js7/YH0MFR3hbOs89qFqkOgWBoR
W3zLySfcsazwdgGdx9YaoR0624HzeTekEctoCY/FgV+rszfb/t0GyUTVObjnBHWz
NMEXyy7uERpUlGfEfoNCbbDAdDgh6O9egSI3V/3IxDna9iAQzRNxTg19pwJzhBYC
XRMIDT6K2WPzR5H3rBbrVCwS+WzbeS3pgeurKghRDnlw/EX4Cj4tGRRi/EbZL1As
6SwwbYIwR0yQ8DuAOhfD8ZlSDCj9adtpF2luj1gao2Syig7uvhG34CNdEVSL3Zoz
r9upgSYYXu2/EAXHoa3muFovrKgckODAgbvpNhDRQMMupg7fkRJdWPpOc3ZsFZrm
SRQ4uGE/MM8sle53KPuqImU62C3HcEr42RyEbJfYBEU+O9N2xnZysKR6bMCwI08D
Vc4jLA0PJsySBx3aKODPjatYH/8LDu7ptb/rQhY3Mnu9rnSSPmiDJQkrT9/97Gqs
wmg8BJ9uI2iHKrToT0IOBtWuz/7Ty3TVQenQew7ZLwv5aFngqeeqx9tyREhle2uV
4cHyD+YmrfZewLqtCA51MYhrkzHM0fTJrn98FlK8EZKCl2YTg+ZxH6nnDNdnPJv3
fzqoeG5UghHpVFyN+651kMkzCW+QaqUfJBnqTZN/aOt+SWiUR7g=
=1fRz
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:



[nifi-minifi-cpp] branch main updated: MINIFICPP-1832 Integrate first batch of clang-tidy checks in CI

2022-06-01 Thread szaszm
This is an automated email from the ASF dual-hosted git repository.

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new 232d08d59 MINIFICPP-1832 Integrate first batch of clang-tidy checks in 
CI
232d08d59 is described below

commit 232d08d5959bc2cf2abf579ba77f2301af008225
Author: Gabor Gyimesi 
AuthorDate: Wed Jun 1 17:14:33 2022 +0200

MINIFICPP-1832 Integrate first batch of clang-tidy checks in CI

- Fix clang-static-analyzer issues
- Fix issues of boost*,bugprone*,cert*,portability*
- Integrate clang-tidy to CI
- workaround libc++ duration operator<=>

Closes #1330
Signed-off-by: Marton Szasz 
Co-authored-by: Marton Szasz 
---
 .clang-tidy|  2 ++
 .github/workflows/ci.yml   | 25 ++---
 cmake/Asio.cmake   |  2 +-
 cmake/BundledOpenCV.cmake  |  4 ++-
 cmake/GoogleCloudCpp.cmake |  5 
 extensions/aws/utils/AWSSdkLogger.cpp  |  4 +--
 extensions/gcp/CMakeLists.txt  |  2 +-
 .../http-curl/tests/TimeoutHTTPSiteToSiteTests.cpp | 29 +++-
 extensions/libarchive/FocusArchiveEntry.cpp|  6 ++--
 extensions/opc/src/fetchopc.cpp|  4 +++
 extensions/opc/src/opc.cpp |  1 -
 .../SourceInitiatedSubscriptionListener.cpp|  2 +-
 extensions/pcap/CMakeLists.txt |  4 +--
 extensions/procfs/SystemClockDuration.h|  1 +
 extensions/sftp/processors/PutSFTP.cpp |  8 ++
 extensions/sql/processors/ExecuteSQL.cpp   |  2 +-
 extensions/sql/processors/QueryDatabaseTable.cpp   |  2 +-
 .../standard-processors/processors/ExtractText.cpp |  2 +-
 extensions/systemd/tests/ConsumeJournaldTest.cpp   |  5 ++--
 extensions/usb-camera/GetUSBCamera.cpp |  2 +-
 libminifi/include/utils/TimeUtil.h | 32 ++
 libminifi/src/FlowControlProtocol.cpp  |  6 ++--
 .../src/controllers/NetworkPrioritizerService.cpp  |  2 +-
 libminifi/src/controllers/SSLContextService.cpp|  2 +-
 .../AbstractCoreComponentStateManagerProvider.cpp  |  2 +-
 libminifi/src/core/FlowFile.cpp|  3 ++
 libminifi/src/core/ProcessSession.cpp  |  6 ++--
 libminifi/src/core/logging/LoggerConfiguration.cpp |  2 +-
 libminifi/src/io/tls/TLSSocket.cpp | 12 
 libminifi/src/sitetosite/SiteToSiteClient.cpp  |  2 +-
 libminifi/src/utils/Id.cpp |  2 +-
 libminifi/src/utils/SystemCpuUsageTracker.cpp  |  2 +-
 libminifi/src/utils/file/FileSystem.cpp|  2 +-
 libminifi/src/utils/file/FileUtils.cpp |  8 ++
 libminifi/test/unit/BackTraceTests.cpp |  4 +--
 libminifi/test/unit/ExtensionVerificationTests.cpp |  2 +-
 libminifi/test/unit/FilePatternTests.cpp   |  5 ++--
 libminifi/test/unit/SocketTests.cpp|  2 +-
 libminifi/test/unit/ThreadPoolTests.cpp|  4 +--
 run_clang_tidy.sh  | 15 ++
 thirdparty/google-styleguide/cpplint.py| 22 +++
 .../include/rapidjson/document.h   |  2 +-
 42 files changed, 161 insertions(+), 90 deletions(-)

diff --git a/.clang-tidy b/.clang-tidy
new file mode 100644
index 0..16e1a2ee6
--- /dev/null
+++ b/.clang-tidy
@@ -0,0 +1,2 @@
+Checks: 
'boost*,bugprone*,cert*,portability*,-clang-analyzer-optin.cplusplus.VirtualCall,-bugprone-narrowing-conversions,-bugprone-implicit-widening-of-multiplication-result,-bugprone-macro-parentheses,-bugprone-easily-swappable-parameters,-bugprone-exception-escape,-cert-err58-cpp,-cert-err33-c'
+FormatStyle: 'file'
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6b72d95fe..5345b156f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -146,22 +146,39 @@ jobs:
 ubuntu-20.04-all-clang-ccache-refs/heads/main-
   - id: install_deps
 run: |
+  wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key 
add -
+  echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main" | 
sudo tee -a /etc/apt/sources.list
+  echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main" 
| sudo tee -a /etc/apt/sources.list
+  echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main" | 
sudo tee -a /etc/apt/sources.list
+  echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-14 
main" | sudo tee -a /etc/apt/sources.list
   sudo apt update
-  sudo apt install -y ccache libfl-dev libpcap-dev libboost-all-dev 
openjdk-8-jdk maven libusb-1.0-0-dev libpng-dev libgps-dev clang-12 
libc++-12-dev libc++abi-12-dev
+   

[nifi] branch main updated: NIFI-10069 Updated multiple components to support Sensitive Dynamic Properties

2022-06-01 Thread kdoran
This is an automated email from the ASF dual-hosted git repository.

kdoran pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new 45cc3cefe5 NIFI-10069 Updated multiple components to support Sensitive 
Dynamic Properties
45cc3cefe5 is described below

commit 45cc3cefe5f94915d8665d962e1d6b326c8cca99
Author: exceptionfactory 
AuthorDate: Tue May 31 11:00:29 2022 -0500

NIFI-10069 Updated multiple components to support Sensitive Dynamic 
Properties

- ExecuteScript
- ExecuteStreamCommand
- InvokeScriptedProcessor
- HikariCPConnectionPool

This closes #6085.

Signed-off-by: Kevin Doran 
---
 .../nifi/processors/script/ExecuteScript.java  |  6 +-
 .../processors/script/InvokeScriptedProcessor.java | 10 ++-
 .../processors/standard/ExecuteStreamCommand.java  | 92 ++
 .../apache/nifi/dbcp/HikariCPConnectionPool.java   |  2 +
 4 files changed, 53 insertions(+), 57 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/ExecuteScript.java
 
b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/ExecuteScript.java
index 8d64dcf4e9..24c946474d 100644
--- 
a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/ExecuteScript.java
+++ 
b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/ExecuteScript.java
@@ -23,6 +23,7 @@ import 
org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
 import org.apache.nifi.annotation.behavior.Restricted;
 import org.apache.nifi.annotation.behavior.Restriction;
 import org.apache.nifi.annotation.behavior.Stateful;
+import org.apache.nifi.annotation.behavior.SupportsSensitiveDynamicProperties;
 import org.apache.nifi.annotation.documentation.CapabilityDescription;
 import org.apache.nifi.annotation.documentation.SeeAlso;
 import org.apache.nifi.annotation.documentation.Tags;
@@ -68,9 +69,10 @@ import java.util.Set;
 + "handling the incoming flow file (transfer to SUCCESS or remove, 
e.g.) as well as any flow files created by "
 + "the script. If the handling is incomplete or incorrect, the session 
will be rolled back. Experimental: "
 + "Impact of sustained usage not yet verified.")
+@SupportsSensitiveDynamicProperties
 @DynamicProperty(
-name = "A script engine property to update",
-value = "The value to set it to",
+name = "Script Engine Binding property",
+value = "Binding property value passed to Script Runner",
 expressionLanguageScope = ExpressionLanguageScope.FLOWFILE_ATTRIBUTES,
 description = "Updates a script engine property specified by the 
Dynamic Property's key with the value "
 + "specified by the Dynamic Property's value")
diff --git 
a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/InvokeScriptedProcessor.java
 
b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/InvokeScriptedProcessor.java
index 8c89233d88..d5172be8a7 100644
--- 
a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/InvokeScriptedProcessor.java
+++ 
b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/InvokeScriptedProcessor.java
@@ -22,6 +22,7 @@ import org.apache.nifi.annotation.behavior.DynamicProperty;
 import org.apache.nifi.annotation.behavior.Restricted;
 import org.apache.nifi.annotation.behavior.Restriction;
 import org.apache.nifi.annotation.behavior.Stateful;
+import org.apache.nifi.annotation.behavior.SupportsSensitiveDynamicProperties;
 import org.apache.nifi.annotation.documentation.CapabilityDescription;
 import org.apache.nifi.annotation.documentation.SeeAlso;
 import org.apache.nifi.annotation.documentation.Tags;
@@ -76,7 +77,8 @@ import java.util.concurrent.atomic.AtomicReference;
 + "public void onStopped(ProcessContext context) methods to be invoked 
when the parent InvokeScriptedProcessor is scheduled or stopped, respectively.  
"
 + "NOTE: The script will be loaded when the processor is populated 
with property values, see the Restrictions section for more security 
implications.  "
 + "Experimental: Impact of sustained usage not yet verified.")
-@DynamicProperty(name = "A script engine property to update", value = "The 
value to set it to",
+@SupportsSensitiveDynamicProperties
+@DynamicProperty(name = "Script Engine Binding property", value = "Binding 
property value passed to Script Runner",
 expressionLanguageScope = ExpressionLanguageScope.FLOWFILE_ATTRIBUTES,

[nifi-minifi-cpp] 02/03: MINIFICPP-1461 Enable Expression Languaage tests on Windows

2022-06-01 Thread fgerlits
This is an automated email from the ASF dual-hosted git repository.

fgerlits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit b41bed42305455e5006ce855cec86d47df344d0a
Author: Martin Zink 
AuthorDate: Thu Apr 14 09:32:07 2022 +0200

MINIFICPP-1461 Enable Expression Languaage tests on Windows

Signed-off-by: Ferenc Gerlits 
This closes #1337
---
 CMakeLists.txt |  5 +-
 cmake/Date.cmake   | 14 +++--
 extensions/expression-language/Expression.cpp  | 68 ++
 extensions/expression-language/common/Value.h  |  4 +-
 .../impl/expression/Expression.h   | 13 ++---
 .../expression-language/tests/CMakeLists.txt   | 43 +++---
 .../tests/ExpressionLanguageTests.cpp  | 34 +--
 .../tests/ProcessContextExprTests.cpp  |  4 +-
 8 files changed, 59 insertions(+), 126 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 871e061d3..a0830c18d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -646,10 +646,7 @@ set(CPACK_COMPONENTS_GROUPING "ALL_COMPONENTS_IN_ONE")
 
 list(APPEND CPACK_COMPONENTS_ALL bin)
 cpack_add_component(bin DISPLAY_NAME "MiNiFi C++ executables" REQUIRED)
-if(WIN32)
-   list(APPEND CPACK_COMPONENTS_ALL tzdata)
-   cpack_add_component(tzdata DISPLAY_NAME "Timezone database for 
Expression Language")
-else()
+if(NOT WIN32)
list(APPEND CPACK_COMPONENTS_ALL conf)
cpack_add_component(conf DISPLAY_NAME "Default configuration files" 
REQUIRED)
 endif()
diff --git a/cmake/Date.cmake b/cmake/Date.cmake
index fdec3d1f7..9b6e24948 100644
--- a/cmake/Date.cmake
+++ b/cmake/Date.cmake
@@ -28,15 +28,21 @@ if (WIN32)
 FetchContent_Populate(tzdata)
 endif()
 
+file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/tzdata)
+
+file(COPY 
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cldr-common-38.1/common/supplemental/windowsZones.xml
+DESTINATION ${CMAKE_BINARY_DIR}/tzdata)
+
+file(COPY ${tzdata_SOURCE_DIR}/
+DESTINATION ${CMAKE_BINARY_DIR}/tzdata)
+
 install(DIRECTORY ${tzdata_SOURCE_DIR}/
 DESTINATION tzdata
-COMPONENT tzdata
-)
+COMPONENT bin)
 
 install(FILES 
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cldr-common-38.1/common/supplemental/windowsZones.xml
 DESTINATION tzdata
-COMPONENT tzdata
-)
+COMPONENT bin)
 endif()
 
 FetchContent_Declare(date_src
diff --git a/extensions/expression-language/Expression.cpp 
b/extensions/expression-language/Expression.cpp
index fbce1b104..09a42c8f2 100644
--- a/extensions/expression-language/Expression.cpp
+++ b/extensions/expression-language/Expression.cpp
@@ -63,11 +63,7 @@
 
 #include "Driver.h"
 
-#ifdef EXPRESSION_LANGUAGE_USE_DATE
 #include "date/tz.h"
-#else
-#include 
-#endif  // EXPRESSION_LANGUAGE_USE_DATE
 
 namespace org {
 namespace apache {
@@ -610,8 +606,6 @@ Value expr_escapeCsv(const std::vector ) {
   return Value(result);
 }
 
-#ifdef EXPRESSION_LANGUAGE_USE_DATE
-
 Value expr_format(const std::vector ) {
   std::chrono::milliseconds dur(args[0].asUnsignedLong());
   std::chrono::system_clock::time_point dt(dur);
@@ -640,52 +634,6 @@ Value expr_toDate(const std::vector ) {
   return 
Value(int64_t{std::chrono::duration_cast(zt.get_sys_time().time_since_epoch()).count()});
 }
 
-#else
-
-Value expr_format(const std::vector& args) {
-  const std::chrono::milliseconds dur(args.at(0).asUnsignedLong());
-  const std::chrono::system_clock::time_point dt(dur);
-  const auto unix_time = std::chrono::system_clock::to_time_t(dt);
-  const auto zoned_time = [, unix_time] {
-std::tm buf{};
-const auto requested_timezone = args.size() > 2 ? args[2].asString() : 
std::string{};
-if (requested_timezone == "UTC" || requested_timezone == "GMT") {
-#ifdef WIN32
-  const auto err = gmtime_s(, _time);
-  if (!err) { return buf; }
-  throw std::system_error{err, std::generic_category()};
-#else
-  tzset();
-  const std::tm* const result = gmtime_r(_time, );
-  if (result) { return *result; }
-  throw std::system_error{errno, std::generic_category()};
-#endif /* WIN32 */
-} else if (!requested_timezone.empty()) {
-  throw std::domain_error{"format() with Non-UTC custom timezone is only 
supported when compiled with the date.h library"};
-} else {
-#ifdef WIN32
-  const auto err = localtime_s(, _time);
-  if (!err) { return buf; }
-  throw std::system_error{err, std::generic_category()};
-#else
-  tzset();
-  const std::tm* const result = localtime_r(_time, );
-  if (result) { return *result; }
-  throw std::system_error{errno, std::generic_category()};
-#endif /* WIN32 */
-}
-  }();
-  char result_buf[512] = {0};
-  std::strftime(result_buf, 512, args.at(1).asString().c_str(), _time);
-  return Value(std::string(result_buf));
-}
-
-Value expr_toDate(const 

[nifi-minifi-cpp] 03/03: MINIFICPP-1854 upgrade expected-lite to v0.6.0 (gcc-12 compilation fix)

2022-06-01 Thread fgerlits
This is an automated email from the ASF dual-hosted git repository.

fgerlits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 3599270180d3543487a77a758c1dea293aea7112
Author: Martin Zink 
AuthorDate: Fri May 27 16:57:37 2022 +0200

MINIFICPP-1854 upgrade expected-lite to v0.6.0 (gcc-12 compilation fix)

Signed-off-by: Ferenc Gerlits 
This closes #1342
---
 cmake/ExpectedLite.cmake | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake/ExpectedLite.cmake b/cmake/ExpectedLite.cmake
index c89551c2b..2a41fc226 100644
--- a/cmake/ExpectedLite.cmake
+++ b/cmake/ExpectedLite.cmake
@@ -18,7 +18,7 @@
 include(FetchContent)
 
 FetchContent_Declare(expected-lite
-URL  
https://github.com/martinmoene/expected-lite/archive/refs/tags/v0.5.0.tar.gz
-URL_HASH 
SHA256=80f8c91d228cdc5cac3698141c0321d51dcdb0239c2fdcdeae7d46a9a58f2297
+URL  
https://github.com/martinmoene/expected-lite/archive/refs/tags/v0.6.0.tar.gz
+URL_HASH 
SHA256=90478ff7345100bf7539b12ea2c5ff04a7b6290bc5c280f02b473d5c65165342
 )
 FetchContent_MakeAvailable(expected-lite)



[nifi-minifi-cpp] branch main updated (182e5b98a -> 359927018)

2022-06-01 Thread fgerlits
This is an automated email from the ASF dual-hosted git repository.

fgerlits pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


from 182e5b98a MINIFICPP-1850 update copyright years in NOTICE
 new da849f749 MINIFICPP-1855 Change libwebsockets source to github
 new b41bed423 MINIFICPP-1461 Enable Expression Languaage tests on Windows
 new 359927018 MINIFICPP-1854 upgrade expected-lite to v0.6.0 (gcc-12 
compilation fix)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CMakeLists.txt |  5 +-
 NOTICE |  2 +-
 cmake/Date.cmake   | 14 +++--
 cmake/ExpectedLite.cmake   |  4 +-
 cmake/KubernetesClientC.cmake  |  4 +-
 extensions/expression-language/Expression.cpp  | 68 ++
 extensions/expression-language/common/Value.h  |  4 +-
 .../impl/expression/Expression.h   | 13 ++---
 .../expression-language/tests/CMakeLists.txt   | 43 +++---
 .../tests/ExpressionLanguageTests.cpp  | 34 +--
 .../tests/ProcessContextExprTests.cpp  |  4 +-
 11 files changed, 64 insertions(+), 131 deletions(-)



[nifi-minifi-cpp] 01/03: MINIFICPP-1855 Change libwebsockets source to github

2022-06-01 Thread fgerlits
This is an automated email from the ASF dual-hosted git repository.

fgerlits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit da849f7498a92a1b0d8cd97ccb348ddf0f5394a4
Author: Ferenc Gerlits 
AuthorDate: Wed Jun 1 09:11:04 2022 +0200

MINIFICPP-1855 Change libwebsockets source to github

... and upgrade from v4.3.1 to v4.3.2

Signed-off-by: Ferenc Gerlits 
This closes #1343
---
 NOTICE| 2 +-
 cmake/KubernetesClientC.cmake | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/NOTICE b/NOTICE
index 2c6ff7584..3f81cc3e5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -62,7 +62,7 @@ This software includes third party software subject to the 
following copyrights:
 - asio - Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff 
dot com)
 - TartanLlama/expected - public domain, thanks to Sy Brand
 - libyaml - Copyright (c) 2006-2016 Kirill Simonov, Copyright (c) 2017-2020 
Ingy döt Net
-- libwebsockets - Copyright (C) 2010 - 2020 Andy Green 
+- libwebsockets - Copyright (C) 2010 - 2022 Andy Green 
 - kubernetes-client/c - Brendan Burns, Hui Yu and other contributors
 - nlohmann json - Copyright (c) 2013-2022 Niels Lohmann
 - abseil-cpp - Google Inc.
diff --git a/cmake/KubernetesClientC.cmake b/cmake/KubernetesClientC.cmake
index 69db6b2bc..4a6959109 100644
--- a/cmake/KubernetesClientC.cmake
+++ b/cmake/KubernetesClientC.cmake
@@ -36,8 +36,8 @@ set(WEBSOCKETS_PATCH_FILE 
"${CMAKE_SOURCE_DIR}/thirdparty/libwebsockets/fix-incl
 set(WEBSOCKETS_PC ${Bash_EXECUTABLE} -c "set -x &&\
 (${Patch_EXECUTABLE} -R -p1 -s -f --dry-run -i 
${WEBSOCKETS_PATCH_FILE} || ${Patch_EXECUTABLE} -p1 -i 
${WEBSOCKETS_PATCH_FILE})")
 FetchContent_Declare(websockets
-GIT_REPOSITORY  https://libwebsockets.org/repo/libwebsockets.git
-GIT_TAG v4.3.1
+GIT_REPOSITORY  https://github.com/warmcat/libwebsockets.git
+GIT_TAG b0a749c8e7a8294b68581ce4feac0e55045eb00b  # v4.3.2
 PATCH_COMMAND "${WEBSOCKETS_PC}"
 )