Skip to content

Commit 7b8853f

Browse files
authored
Fix NIFI-14858 patch (#1231)
1 parent ac68cc9 commit 7b8853f

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

nifi/stackable/patches/2.4.0/0004-NIFI-14858-Make-SNI-checking-configurable.patch

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1-
From 6f36be44f82a759fe7f4604839b5e528e5037fea Mon Sep 17 00:00:00 2001
1+
From d91597ab5d3410cb3955b1bad5a750a3b99f7126 Mon Sep 17 00:00:00 2001
22
From: Lars Francke <[email protected]>
33
Date: Wed, 13 Aug 2025 14:16:55 +0200
44
Subject: NIFI-14858: Make SNI checking configurable
55

66
Introduces two new properties:
7-
- nifi.web.https.sni.required
8-
- nifi.web.https.sni.host.check
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.
911
---
1012
.../StandardServerConnectorFactory.java | 24 +++++++++++++++++++
1113
.../org/apache/nifi/util/NiFiProperties.java | 10 ++++++++
1214
.../FrameworkServerConnectorFactory.java | 4 ++++
1315
3 files changed, 38 insertions(+)
1416

1517
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
16-
index 26d09706a1..37fda0929d 100644
18+
index 26d09706a1..132973cad5 100644
1719
--- a/nifi-commons/nifi-jetty-configuration/src/main/java/org/apache/nifi/jetty/configuration/connector/StandardServerConnectorFactory.java
1820
+++ b/nifi-commons/nifi-jetty-configuration/src/main/java/org/apache/nifi/jetty/configuration/connector/StandardServerConnectorFactory.java
1921
@@ -70,6 +70,10 @@ public class StandardServerConnectorFactory implements ServerConnectorFactory {
2022

2123
private int requestHeaderSize = 8192;
2224

23-
+ private boolean sniRequired = true;
25+
+ private boolean sniRequired = false;
2426
+
2527
+ private boolean sniHostCheck = true;
2628
+
@@ -32,7 +34,7 @@ index 26d09706a1..37fda0929d 100644
3234
}
3335

3436
+ /**
35-
+ * Set SNI Required controls whether SNI is required for TLS connections
37+
+ * Set to true if a SNI certificate is required, else requests will be rejected with 400 response.
3638
+ *
3739
+ * @param sniRequired SNI Required status
3840
+ */
@@ -41,7 +43,7 @@ index 26d09706a1..37fda0929d 100644
4143
+ }
4244
+
4345
+ /**
44-
+ * Set SNI Host Check controls whether SNI host checking is enabled for TLS connections
46+
+ * Set to true if the SNI Host name must match when there is an SNI certificate.
4547
+ *
4648
+ * @param sniHostCheck SNI Host Check status
4749
+ */

0 commit comments

Comments
 (0)