Skip to content

Commit 5b046ea

Browse files
sbernaueradwk67
andauthored
feat(nifi) Add version 2.7.2, remove 1.27.0 and 2.4.0 (#1411)
* Add logback 1.5.24 * WIP for Andrew :) * process group root ID patch for 2.7.2 * Add TODO file * Add patch for S3 endpoint and path style access * Update S3 endpoint patch * Add some docs on versions * Use released nifi-opa-plugin 0.4.0 * Remove TODO.md * Update patch name * Update patch --------- Co-authored-by: Andrew Kenworthy <andrew.kenworthy@stackable.tech>
1 parent 63b7cb3 commit 5b046ea

12 files changed

Lines changed: 519 additions & 31 deletions

nifi/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ COPY --chown=${STACKABLE_USER_UID}:0 nifi/nifi-iceberg-bundle/stackable/patches/
107107
RUN <<EOF
108108
mkdir -p /stackable
109109

110-
# NiFI 1.x natively supports Iceberg, no need to build an iceberg-bundle for it
111-
if [[ "${PRODUCT_VERSION}" != 1.* ]] ; then
110+
# Only build nifi-iceberg-bundle in case it is needed/supported
111+
if [[ -n "${NIFI_ICEBERG_BUNDLE_VERSION:-}" ]] ; then
112112
cd "$(/stackable/patchable --images-repo-root=src checkout nifi/nifi-iceberg-bundle ${NIFI_ICEBERG_BUNDLE_VERSION})"
113113

114114
# Create snapshot of the source code including custom patches

nifi/boil-config.toml

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,36 @@
1-
[versions."1.27.0".local-images]
2-
java-base = "11"
3-
java-devel = "11"
4-
"shared/logback" = "1.3.14"
5-
6-
[versions."1.27.0".build-arguments]
7-
git-sync-version = "v4.4.1"
8-
# Check for new versions at the upstream: https://github.com/DavidGitter/nifi-opa-plugin/tags
9-
# Checkout a Patchable version (patch-series) for the new tag
10-
nifi-opa-authorizer-plugin-version = "0.3.2"
11-
121
[versions."1.28.1".local-images]
132
java-base = "11"
143
java-devel = "11"
15-
"shared/logback" = "1.3.14"
4+
"shared/logback" = "1.3.14" # https://github.com/apache/nifi/blob/rel/nifi-1.28.1/pom.xml#L146
165

176
[versions."1.28.1".build-arguments]
187
git-sync-version = "v4.4.1"
19-
# Check for new versions at the upstream: https://github.com/DavidGitter/nifi-opa-plugin/tags
8+
# Check for new versions at the upstream: https://github.com/stackabletech/nifi-opa-plugin/tags
209
# Checkout a Patchable version (patch-series) for the new tag
21-
nifi-opa-authorizer-plugin-version = "0.3.2"
10+
nifi-opa-authorizer-plugin-version = "0.4.0"
2211

23-
[versions."2.4.0".local-images]
12+
[versions."2.6.0".local-images]
2413
java-base = "21"
2514
java-devel = "21"
26-
"shared/logback" = "1.5.18"
15+
"shared/logback" = "1.5.18" # https://github.com/apache/nifi/blob/rel/nifi-2.6.0/pom.xml#L156
2716

28-
[versions."2.4.0".build-arguments]
17+
[versions."2.6.0".build-arguments]
2918
git-sync-version = "v4.4.1"
30-
# Check for new versions at the upstream: https://github.com/DavidGitter/nifi-opa-plugin/tags
19+
# Check for new versions at the upstream: https://github.com/stackabletech/nifi-opa-plugin/tags
3120
# Checkout a Patchable version (patch-series) for the new tag
32-
nifi-opa-authorizer-plugin-version = "0.3.2"
21+
nifi-opa-authorizer-plugin-version = "0.4.0"
22+
3323
# Release a new version here: https://github.com/stackabletech/nifi-iceberg-bundle
3424
# Checkout a Patchable version (patch-series) for the new tag
3525
nifi-iceberg-bundle-version = "0.0.5"
3626

37-
[versions."2.6.0".local-images]
38-
java-base = "21"
27+
[versions."2.7.2".local-images]
28+
java-base = "21" # As stated in GitHub README
3929
java-devel = "21"
40-
"shared/logback" = "1.5.18"
30+
"shared/logback" = "1.5.24" # https://github.com/apache/nifi/blob/rel/nifi-2.7.2/pom.xml#L167
4131

42-
[versions."2.6.0".build-arguments]
32+
[versions."2.7.2".build-arguments]
4333
git-sync-version = "v4.4.1"
44-
# Check for new versions at the upstream: https://github.com/DavidGitter/nifi-opa-plugin/tags
34+
# Check for new versions at the upstream: https://github.com/stackabletech/nifi-opa-plugin/tags
4535
# Checkout a Patchable version (patch-series) for the new tag
46-
nifi-opa-authorizer-plugin-version = "0.3.2"
47-
48-
# Release a new version here: https://github.com/stackabletech/nifi-iceberg-bundle
49-
# Checkout a Patchable version (patch-series) for the new tag
50-
nifi-iceberg-bundle-version = "0.0.5"
36+
nifi-opa-authorizer-plugin-version = "0.4.0"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mirror = "https://github.com/stackabletech/nifi-opa-plugin.git"
2+
base = "46963de3522d04461c8b21b71629736279b9f653"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
From 2e6ee7afe50f032cde26f9242094fd19c388fea0 Mon Sep 17 00:00:00 2001
2+
From: Nick Larsen <nick.larsen@stackable.tech>
3+
Date: Mon, 17 Feb 2025 17:26:20 +0100
4+
Subject: no zip assembly
5+
6+
---
7+
nifi-assembly/pom.xml | 1 -
8+
1 file changed, 1 deletion(-)
9+
10+
diff --git a/nifi-assembly/pom.xml b/nifi-assembly/pom.xml
11+
index fa08b8b4af..5db9e3c08f 100644
12+
--- a/nifi-assembly/pom.xml
13+
+++ b/nifi-assembly/pom.xml
14+
@@ -66,7 +66,6 @@ language governing permissions and limitations under the License. -->
15+
<tarLongFileMode>posix</tarLongFileMode>
16+
<formats>
17+
<format>dir</format>
18+
- <format>zip</format>
19+
</formats>
20+
</configuration>
21+
</execution>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 720ac307ebbf577e01c7b0365582284ede86933a Mon Sep 17 00:00:00 2001
2+
From: Nick Larsen <nick.larsen@stackable.tech>
3+
Date: Mon, 17 Feb 2025 17:31:17 +0100
4+
Subject: add cyclonedx plugin
5+
6+
---
7+
pom.xml | 18 ++++++++++++++++++
8+
1 file changed, 18 insertions(+)
9+
10+
diff --git a/pom.xml b/pom.xml
11+
index e6fa490bc1..e8a6249f53 100644
12+
--- a/pom.xml
13+
+++ b/pom.xml
14+
@@ -1038,6 +1038,24 @@
15+
</rulesets>
16+
</configuration>
17+
</plugin>
18+
+ <plugin>
19+
+ <groupId>org.cyclonedx</groupId>
20+
+ <artifactId>cyclonedx-maven-plugin</artifactId>
21+
+ <version>2.8.0</version>
22+
+ <configuration>
23+
+ <projectType>application</projectType>
24+
+ <schemaVersion>1.5</schemaVersion>
25+
+ <skipNotDeployed>false</skipNotDeployed>
26+
+ </configuration>
27+
+ <executions>
28+
+ <execution>
29+
+ <phase>package</phase>
30+
+ <goals>
31+
+ <goal>makeBom</goal>
32+
+ </goals>
33+
+ </execution>
34+
+ </executions>
35+
+ </plugin>
36+
</plugins>
37+
</build>
38+
<profiles>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
From b8c61bd2e862eef615b2a4c8c2e4aa7d1756e469 Mon Sep 17 00:00:00 2001
2+
From: Benedikt Labrenz <benedikt@labrenz.org>
3+
Date: Thu, 22 May 2025 14:47:24 +0200
4+
Subject: disable host port validation if list of allowed hosts only contains
5+
'*'
6+
7+
---
8+
.../connector/FrameworkServerConnectorFactory.java | 13 +++++++++++--
9+
1 file changed, 11 insertions(+), 2 deletions(-)
10+
11+
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/FrameworkServerConnectorFactory.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/FrameworkServerConnectorFactory.java
12+
index 1b28722a3f..72986669d5 100644
13+
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/FrameworkServerConnectorFactory.java
14+
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/FrameworkServerConnectorFactory.java
15+
@@ -54,6 +54,8 @@ public class FrameworkServerConnectorFactory extends StandardServerConnectorFact
16+
17+
private final String excludeCipherSuites;
18+
19+
+ private final boolean disableHostPortValidator;
20+
+
21+
private final Set<Integer> validPorts;
22+
23+
private SslContextFactory.Server sslContextFactory;
24+
@@ -72,6 +74,11 @@ public class FrameworkServerConnectorFactory extends StandardServerConnectorFact
25+
headerSize = DataUnit.parseDataSize(properties.getWebMaxHeaderSize(), DataUnit.B).intValue();
26+
validPorts = getValidPorts(properties);
27+
28+
+ // Check if the property for allowed hosts has only the wildcard entry and
29+
+ // if so store this in disableHostPortValidator for later use
30+
+ List<String> configuredHostNames = properties.getAllowedHostsAsList();
31+
+ disableHostPortValidator = configuredHostNames.size() == 1 && configuredHostNames.contains("*");
32+
+
33+
if (properties.isHTTPSConfigured()) {
34+
if (properties.isClientAuthRequiredForRestApi()) {
35+
setNeedClientAuth(true);
36+
@@ -102,8 +109,10 @@ public class FrameworkServerConnectorFactory extends StandardServerConnectorFact
37+
// Add HostHeaderCustomizer to set Host Header for HTTP/2 and HostHeaderHandler
38+
httpConfiguration.addCustomizer(new HostHeaderCustomizer());
39+
40+
- final HostPortValidatorCustomizer hostPortValidatorCustomizer = new HostPortValidatorCustomizer(validPorts);
41+
- httpConfiguration.addCustomizer(hostPortValidatorCustomizer);
42+
+ if (!disableHostPortValidator) {
43+
+ final HostPortValidatorCustomizer hostPortValidatorCustomizer = new HostPortValidatorCustomizer(validPorts);
44+
+ httpConfiguration.addCustomizer(hostPortValidatorCustomizer);
45+
+ }
46+
47+
return httpConfiguration;
48+
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
From bad76f4eb8703301b6233d8057e3157305a85e2e Mon Sep 17 00:00:00 2001
2+
From: Lars Francke <git@lars-francke.de>
3+
Date: Wed, 13 Aug 2025 14:16:55 +0200
4+
Subject: NIFI-14858: Make SNI checking configurable
5+
6+
Introduces two new properties:
7+
- nifi.web.https.sni.required (default: false)
8+
- nifi.web.https.sni.host.check (default: true)
9+
10+
These defaults mean that SNI is not required (this is the current behavior already) but if SNI is provided then the host has to match.
11+
---
12+
.../StandardServerConnectorFactory.java | 24 +++++++++++++++++++
13+
.../org/apache/nifi/util/NiFiProperties.java | 10 ++++++++
14+
.../FrameworkServerConnectorFactory.java | 4 ++++
15+
3 files changed, 38 insertions(+)
16+
17+
diff --git a/nifi-commons/nifi-jetty-configuration/src/main/java/org/apache/nifi/jetty/configuration/connector/StandardServerConnectorFactory.java b/nifi-commons/nifi-jetty-configuration/src/main/java/org/apache/nifi/jetty/configuration/connector/StandardServerConnectorFactory.java
18+
index 26d09706a1..132973cad5 100644
19+
--- a/nifi-commons/nifi-jetty-configuration/src/main/java/org/apache/nifi/jetty/configuration/connector/StandardServerConnectorFactory.java
20+
+++ b/nifi-commons/nifi-jetty-configuration/src/main/java/org/apache/nifi/jetty/configuration/connector/StandardServerConnectorFactory.java
21+
@@ -70,6 +70,10 @@ public class StandardServerConnectorFactory implements ServerConnectorFactory {
22+
23+
private int requestHeaderSize = 8192;
24+
25+
+ private boolean sniRequired = false;
26+
+
27+
+ private boolean sniHostCheck = true;
28+
+
29+
/**
30+
* Standard Server Connector Factory Constructor with required properties
31+
*
32+
@@ -181,6 +185,24 @@ public class StandardServerConnectorFactory implements ServerConnectorFactory {
33+
this.requestHeaderSize = requestHeaderSize;
34+
}
35+
36+
+ /**
37+
+ * Set to true if a SNI certificate is required, else requests will be rejected with 400 response.
38+
+ *
39+
+ * @param sniRequired SNI Required status
40+
+ */
41+
+ public void setSniRequired(final boolean sniRequired) {
42+
+ this.sniRequired = sniRequired;
43+
+ }
44+
+
45+
+ /**
46+
+ * Set to true if the SNI Host name must match when there is an SNI certificate.
47+
+ *
48+
+ * @param sniHostCheck SNI Host Check status
49+
+ */
50+
+ public void setSniHostCheck(final boolean sniHostCheck) {
51+
+ this.sniHostCheck = sniHostCheck;
52+
+ }
53+
+
54+
protected Server getServer() {
55+
return server;
56+
}
57+
@@ -195,6 +217,8 @@ public class StandardServerConnectorFactory implements ServerConnectorFactory {
58+
httpConfiguration.setSendServerVersion(SEND_SERVER_VERSION);
59+
60+
final SecureRequestCustomizer secureRequestCustomizer = new SecureRequestCustomizer();
61+
+ secureRequestCustomizer.setSniRequired(sniRequired);
62+
+ secureRequestCustomizer.setSniHostCheck(sniHostCheck);
63+
httpConfiguration.addCustomizer(secureRequestCustomizer);
64+
}
65+
66+
diff --git a/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java b/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
67+
index b9456a98a0..45262a8f4f 100644
68+
--- a/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
69+
+++ b/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
70+
@@ -203,6 +203,8 @@ public class NiFiProperties extends ApplicationProperties {
71+
public static final String WEB_HTTPS_CIPHERSUITES_INCLUDE = "nifi.web.https.ciphersuites.include";
72+
public static final String WEB_HTTPS_CIPHERSUITES_EXCLUDE = "nifi.web.https.ciphersuites.exclude";
73+
public static final String WEB_HTTPS_NETWORK_INTERFACE_PREFIX = "nifi.web.https.network.interface.";
74+
+ public static final String WEB_HTTPS_SNI_REQUIRED = "nifi.web.https.sni.required";
75+
+ public static final String WEB_HTTPS_SNI_HOST_CHECK = "nifi.web.https.sni.host.check";
76+
public static final String WEB_WORKING_DIR = "nifi.web.jetty.working.directory";
77+
public static final String WEB_THREADS = "nifi.web.jetty.threads";
78+
public static final String WEB_MAX_HEADER_SIZE = "nifi.web.max.header.size";
79+
@@ -706,6 +708,14 @@ public class NiFiProperties extends ApplicationProperties {
80+
return Arrays.stream(protocols.split("\\s+")).collect(Collectors.toSet());
81+
}
82+
83+
+ public boolean isWebHttpsSniRequired() {
84+
+ return Boolean.parseBoolean(getProperty(WEB_HTTPS_SNI_REQUIRED, "false"));
85+
+ }
86+
+
87+
+ public boolean isWebHttpsSniHostCheck() {
88+
+ return Boolean.parseBoolean(getProperty(WEB_HTTPS_SNI_HOST_CHECK, "true"));
89+
+ }
90+
+
91+
public String getWebMaxHeaderSize() {
92+
return getProperty(WEB_MAX_HEADER_SIZE, DEFAULT_WEB_MAX_HEADER_SIZE);
93+
}
94+
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/FrameworkServerConnectorFactory.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/FrameworkServerConnectorFactory.java
95+
index 72986669d5..993b23889c 100644
96+
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/FrameworkServerConnectorFactory.java
97+
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/FrameworkServerConnectorFactory.java
98+
@@ -90,6 +90,10 @@ public class FrameworkServerConnectorFactory extends StandardServerConnectorFact
99+
100+
// Set Transport Layer Security Protocols based on platform configuration
101+
setIncludeSecurityProtocols(TlsPlatform.getPreferredProtocols().toArray(new String[0]));
102+
+
103+
+ // Set SNI configuration from properties
104+
+ setSniRequired(properties.isWebHttpsSniRequired());
105+
+ setSniHostCheck(properties.isWebHttpsSniHostCheck());
106+
}
107+
}
108+

0 commit comments

Comments
 (0)