1
- From 6f36be44f82a759fe7f4604839b5e528e5037fea Mon Sep 17 00:00:00 2001
1
+ From d91597ab5d3410cb3955b1bad5a750a3b99f7126 Mon Sep 17 00:00:00 2001
2
2
From: Lars Francke <
[email protected] >
3
3
Date: Wed, 13 Aug 2025 14:16:55 +0200
4
4
Subject: NIFI-14858: Make SNI checking configurable
5
5
6
6
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.
9
11
---
10
12
.../StandardServerConnectorFactory.java | 24 +++++++++++++++++++
11
13
.../org/apache/nifi/util/NiFiProperties.java | 10 ++++++++
12
14
.../FrameworkServerConnectorFactory.java | 4 ++++
13
15
3 files changed, 38 insertions(+)
14
16
15
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
16
- index 26d09706a1..37fda0929d 100644
18
+ index 26d09706a1..132973cad5 100644
17
19
--- a/nifi-commons/nifi-jetty-configuration/src/main/java/org/apache/nifi/jetty/configuration/connector/StandardServerConnectorFactory.java
18
20
+++ b/nifi-commons/nifi-jetty-configuration/src/main/java/org/apache/nifi/jetty/configuration/connector/StandardServerConnectorFactory.java
19
21
@@ -70,6 +70,10 @@ public class StandardServerConnectorFactory implements ServerConnectorFactory {
20
22
21
23
private int requestHeaderSize = 8192;
22
24
23
- + private boolean sniRequired = true ;
25
+ + private boolean sniRequired = false ;
24
26
+
25
27
+ private boolean sniHostCheck = true;
26
28
+
@@ -32,7 +34,7 @@ index 26d09706a1..37fda0929d 100644
32
34
}
33
35
34
36
+ /**
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.
36
38
+ *
37
39
+ * @param sniRequired SNI Required status
38
40
+ */
@@ -41,7 +43,7 @@ index 26d09706a1..37fda0929d 100644
41
43
+ }
42
44
+
43
45
+ /**
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.
45
47
+ *
46
48
+ * @param sniHostCheck SNI Host Check status
47
49
+ */
0 commit comments