You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/03/08 14:17:19 UTC
[camel] 02/03: CAMEL-16315 - Camel-Netty: Support Hostname
verification even though we are on Netty 4.1.x
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 3b02bcd6b910951ce11d86c0db27dbc0d77e35c6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Mar 8 14:25:46 2021 +0100
CAMEL-16315 - Camel-Netty: Support Hostname verification even though we are on Netty 4.1.x
---
.../apache/camel/catalog/docs/netty-component.adoc | 6 +-
.../component/netty/NettyComponentConfigurer.java | 6 ++
.../netty/NettyConfigurationConfigurer.java | 6 ++
.../component/netty/NettyEndpointConfigurer.java | 6 ++
.../component/netty/NettyEndpointUriFactory.java | 3 +-
.../org/apache/camel/component/netty/netty.json | 2 +
.../camel-netty/src/main/docs/netty-component.adoc | 6 +-
.../camel/component/netty/NettyConfiguration.java | 6 +-
.../component/netty/ssl/SSLEngineFactory.java | 1 -
.../apache/camel/component/netty/NettySSLTest.java | 2 +-
.../dsl/NettyComponentBuilderFactory.java | 17 ++++
.../endpoint/dsl/NettyEndpointBuilderFactory.java | 99 ++++++++++++++++++++++
.../modules/ROOT/pages/netty-component.adoc | 6 +-
13 files changed, 154 insertions(+), 12 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/netty-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/netty-component.adoc
index f1c80ae..833284a 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/netty-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/netty-component.adoc
@@ -59,7 +59,7 @@ You can append query options to the URI in the following format,
== Options
// component options: START
-The Netty component supports 72 options, which are listed below.
+The Netty component supports 73 options, which are listed below.
@@ -68,6 +68,7 @@ The Netty component supports 72 options, which are listed below.
| Name | Description | Default | Type
| *configuration* (common) | To use the NettyConfiguration as configuration when creating endpoints. | | NettyConfiguration
| *disconnect* (common) | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | false | boolean
+| *hostnameVerification* (common) | To enable/disable hostname verification on SSLEngine | false | boolean
| *keepAlive* (common) | Setting to ensure socket is not closed due to inactivity | true | boolean
| *reuseAddress* (common) | Setting to facilitate socket multiplexing | true | boolean
| *reuseChannel* (common) | This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecycle of processing the Exchange. This is useful if you need to call a server multiple times in a Camel route and want to use the same network connection. When using this, the channel is not returned to the connection pool until the Exchange is done; or disconnected if the disconnect option is set to true. The reused Channel is stored on the Exchange as an e [...]
@@ -163,13 +164,14 @@ with the following path and query parameters:
|===
-=== Query Parameters (70 parameters):
+=== Query Parameters (71 parameters):
[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Type
| *disconnect* (common) | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | false | boolean
+| *hostnameVerification* (common) | To enable/disable hostname verification on SSLEngine | false | boolean
| *keepAlive* (common) | Setting to ensure socket is not closed due to inactivity | true | boolean
| *reuseAddress* (common) | Setting to facilitate socket multiplexing | true | boolean
| *reuseChannel* (common) | This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecycle of processing the Exchange. This is useful if you need to call a server multiple times in a Camel route and want to use the same network connection. When using this, the channel is not returned to the connection pool until the Exchange is done; or disconnected if the disconnect option is set to true. The reused Channel is stored on the Exchange as an e [...]
diff --git a/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyComponentConfigurer.java b/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyComponentConfigurer.java
index a045076..a8a7416 100644
--- a/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyComponentConfigurer.java
+++ b/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyComponentConfigurer.java
@@ -68,6 +68,8 @@ public class NettyComponentConfigurer extends PropertyConfigurerSupport implemen
case "encoding": getOrCreateConfiguration(target).setEncoding(property(camelContext, java.lang.String.class, value)); return true;
case "executorservice":
case "executorService": target.setExecutorService(property(camelContext, io.netty.util.concurrent.EventExecutorGroup.class, value)); return true;
+ case "hostnameverification":
+ case "hostnameVerification": getOrCreateConfiguration(target).setHostnameVerification(property(camelContext, boolean.class, value)); return true;
case "keepalive":
case "keepAlive": getOrCreateConfiguration(target).setKeepAlive(property(camelContext, boolean.class, value)); return true;
case "keystorefile":
@@ -205,6 +207,8 @@ public class NettyComponentConfigurer extends PropertyConfigurerSupport implemen
case "encoding": return java.lang.String.class;
case "executorservice":
case "executorService": return io.netty.util.concurrent.EventExecutorGroup.class;
+ case "hostnameverification":
+ case "hostnameVerification": return boolean.class;
case "keepalive":
case "keepAlive": return boolean.class;
case "keystorefile":
@@ -343,6 +347,8 @@ public class NettyComponentConfigurer extends PropertyConfigurerSupport implemen
case "encoding": return getOrCreateConfiguration(target).getEncoding();
case "executorservice":
case "executorService": return target.getExecutorService();
+ case "hostnameverification":
+ case "hostnameVerification": return getOrCreateConfiguration(target).isHostnameVerification();
case "keepalive":
case "keepAlive": return getOrCreateConfiguration(target).isKeepAlive();
case "keystorefile":
diff --git a/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyConfigurationConfigurer.java b/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyConfigurationConfigurer.java
index b2aa719..86f45c0 100644
--- a/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyConfigurationConfigurer.java
+++ b/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyConfigurationConfigurer.java
@@ -65,6 +65,8 @@ public class NettyConfigurationConfigurer extends org.apache.camel.support.compo
case "Encoding": target.setEncoding(property(camelContext, java.lang.String.class, value)); return true;
case "host":
case "Host": target.setHost(property(camelContext, java.lang.String.class, value)); return true;
+ case "hostnameverification":
+ case "HostnameVerification": target.setHostnameVerification(property(camelContext, boolean.class, value)); return true;
case "keepalive":
case "KeepAlive": target.setKeepAlive(property(camelContext, boolean.class, value)); return true;
case "keystorefile":
@@ -212,6 +214,8 @@ public class NettyConfigurationConfigurer extends org.apache.camel.support.compo
case "Encoding": return java.lang.String.class;
case "host":
case "Host": return java.lang.String.class;
+ case "hostnameverification":
+ case "HostnameVerification": return boolean.class;
case "keepalive":
case "KeepAlive": return boolean.class;
case "keystorefile":
@@ -360,6 +364,8 @@ public class NettyConfigurationConfigurer extends org.apache.camel.support.compo
case "Encoding": return target.getEncoding();
case "host":
case "Host": return target.getHost();
+ case "hostnameverification":
+ case "HostnameVerification": return target.isHostnameVerification();
case "keepalive":
case "KeepAlive": return target.isKeepAlive();
case "keystorefile":
diff --git a/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyEndpointConfigurer.java b/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyEndpointConfigurer.java
index 2da99df..35808d2 100644
--- a/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyEndpointConfigurer.java
+++ b/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyEndpointConfigurer.java
@@ -60,6 +60,8 @@ public class NettyEndpointConfigurer extends PropertyConfigurerSupport implement
case "exceptionHandler": target.setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangepattern":
case "exchangePattern": target.setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
+ case "hostnameverification":
+ case "hostnameVerification": target.getConfiguration().setHostnameVerification(property(camelContext, boolean.class, value)); return true;
case "keepalive":
case "keepAlive": target.getConfiguration().setKeepAlive(property(camelContext, boolean.class, value)); return true;
case "keystorefile":
@@ -193,6 +195,8 @@ public class NettyEndpointConfigurer extends PropertyConfigurerSupport implement
case "exceptionHandler": return org.apache.camel.spi.ExceptionHandler.class;
case "exchangepattern":
case "exchangePattern": return org.apache.camel.ExchangePattern.class;
+ case "hostnameverification":
+ case "hostnameVerification": return boolean.class;
case "keepalive":
case "keepAlive": return boolean.class;
case "keystorefile":
@@ -327,6 +331,8 @@ public class NettyEndpointConfigurer extends PropertyConfigurerSupport implement
case "exceptionHandler": return target.getExceptionHandler();
case "exchangepattern":
case "exchangePattern": return target.getExchangePattern();
+ case "hostnameverification":
+ case "hostnameVerification": return target.getConfiguration().isHostnameVerification();
case "keepalive":
case "keepAlive": return target.getConfiguration().isKeepAlive();
case "keystorefile":
diff --git a/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyEndpointUriFactory.java b/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyEndpointUriFactory.java
index 42f7857..6c0d733 100644
--- a/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyEndpointUriFactory.java
+++ b/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyEndpointUriFactory.java
@@ -20,11 +20,12 @@ public class NettyEndpointUriFactory extends org.apache.camel.support.component.
private static final Set<String> PROPERTY_NAMES;
private static final Set<String> SECRET_PROPERTY_NAMES;
static {
- Set<String> props = new HashSet<>(73);
+ Set<String> props = new HashSet<>(74);
props.add("usingExecutorService");
props.add("disconnect");
props.add("enabledProtocols");
props.add("synchronous");
+ props.add("hostnameVerification");
props.add("keyStoreFormat");
props.add("producerPoolMinIdle");
props.add("ssl");
diff --git a/components/camel-netty/src/generated/resources/org/apache/camel/component/netty/netty.json b/components/camel-netty/src/generated/resources/org/apache/camel/component/netty/netty.json
index 1c1958d..de5f869 100644
--- a/components/camel-netty/src/generated/resources/org/apache/camel/component/netty/netty.json
+++ b/components/camel-netty/src/generated/resources/org/apache/camel/component/netty/netty.json
@@ -24,6 +24,7 @@
"componentProperties": {
"configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.netty.NettyConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "To use the NettyConfiguration as configuration when creating endpoints." },
"disconnect": { "kind": "property", "displayName": "Disconnect", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer." },
+ "hostnameVerification": { "kind": "property", "displayName": "Hostname Verification", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "To enable\/disable hostname verification on SSLEngine" },
"keepAlive": { "kind": "property", "displayName": "Keep Alive", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Setting to ensure socket is not closed due to inactivity" },
"reuseAddress": { "kind": "property", "displayName": "Reuse Address", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Setting to facilitate socket multiplexing" },
"reuseChannel": { "kind": "property", "displayName": "Reuse Channel", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecy [...]
@@ -100,6 +101,7 @@
"host": { "kind": "path", "displayName": "Host", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "The hostname. For the consumer the hostname is localhost or 0.0.0.0. For the producer the hostname is the remote host to conne [...]
"port": { "kind": "path", "displayName": "Port", "group": "common", "label": "", "required": true, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "The host port number" },
"disconnect": { "kind": "parameter", "displayName": "Disconnect", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer." },
+ "hostnameVerification": { "kind": "parameter", "displayName": "Hostname Verification", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "To enable\/disable hostname verification on SSLEngine" },
"keepAlive": { "kind": "parameter", "displayName": "Keep Alive", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Setting to ensure socket is not closed due to inactivity" },
"reuseAddress": { "kind": "parameter", "displayName": "Reuse Address", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Setting to facilitate socket multiplexing" },
"reuseChannel": { "kind": "parameter", "displayName": "Reuse Channel", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifec [...]
diff --git a/components/camel-netty/src/main/docs/netty-component.adoc b/components/camel-netty/src/main/docs/netty-component.adoc
index f1c80ae..833284a 100644
--- a/components/camel-netty/src/main/docs/netty-component.adoc
+++ b/components/camel-netty/src/main/docs/netty-component.adoc
@@ -59,7 +59,7 @@ You can append query options to the URI in the following format,
== Options
// component options: START
-The Netty component supports 72 options, which are listed below.
+The Netty component supports 73 options, which are listed below.
@@ -68,6 +68,7 @@ The Netty component supports 72 options, which are listed below.
| Name | Description | Default | Type
| *configuration* (common) | To use the NettyConfiguration as configuration when creating endpoints. | | NettyConfiguration
| *disconnect* (common) | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | false | boolean
+| *hostnameVerification* (common) | To enable/disable hostname verification on SSLEngine | false | boolean
| *keepAlive* (common) | Setting to ensure socket is not closed due to inactivity | true | boolean
| *reuseAddress* (common) | Setting to facilitate socket multiplexing | true | boolean
| *reuseChannel* (common) | This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecycle of processing the Exchange. This is useful if you need to call a server multiple times in a Camel route and want to use the same network connection. When using this, the channel is not returned to the connection pool until the Exchange is done; or disconnected if the disconnect option is set to true. The reused Channel is stored on the Exchange as an e [...]
@@ -163,13 +164,14 @@ with the following path and query parameters:
|===
-=== Query Parameters (70 parameters):
+=== Query Parameters (71 parameters):
[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Type
| *disconnect* (common) | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | false | boolean
+| *hostnameVerification* (common) | To enable/disable hostname verification on SSLEngine | false | boolean
| *keepAlive* (common) | Setting to ensure socket is not closed due to inactivity | true | boolean
| *reuseAddress* (common) | Setting to facilitate socket multiplexing | true | boolean
| *reuseChannel* (common) | This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecycle of processing the Exchange. This is useful if you need to call a server multiple times in a Camel route and want to use the same network connection. When using this, the channel is not returned to the connection pool until the Exchange is done; or disconnected if the disconnect option is set to true. The reused Channel is stored on the Exchange as an e [...]
diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
index e9e9bc9..805e1da 100644
--- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
+++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
@@ -67,8 +67,8 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem
private List<ChannelHandler> encoders = new ArrayList<>();
@UriParam(label = "codec")
private List<ChannelHandler> decoders = new ArrayList<>();
- @UriParam(label = "common", defaultValue = "true")
- private boolean hostnameVerification = true;
+ @UriParam(label = "common", defaultValue = "false")
+ private boolean hostnameVerification;
@UriParam
private boolean disconnect;
@UriParam(label = "producer,advanced", defaultValue = "true")
@@ -732,7 +732,7 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem
*/
public void setHostnameVerification(boolean hostnameVerification) {
this.hostnameVerification = hostnameVerification;
- }
+ }
private static <T> void addToHandlersList(List<T> configured, List<T> handlers, Class<T> handlerType) {
if (handlers != null) {
diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/ssl/SSLEngineFactory.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/ssl/SSLEngineFactory.java
index ae99ecf..ef77e79 100644
--- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/ssl/SSLEngineFactory.java
+++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/ssl/SSLEngineFactory.java
@@ -22,7 +22,6 @@ import java.security.KeyStore;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
-import javax.net.ssl.SSLParameters;
import javax.net.ssl.TrustManagerFactory;
import org.apache.camel.CamelContext;
diff --git a/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLTest.java b/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLTest.java
index 8347ddc..0f17dd5 100644
--- a/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLTest.java
+++ b/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLTest.java
@@ -58,7 +58,7 @@ public class NettySSLTest extends BaseNettyTest {
public void configure() {
// needClientAuth=true so we can get the client certificate
// details
- from("netty:tcp://localhost:{{port}}?sync=true&ssl=true&passphrase=changeit&keyStoreResource=#ksf&trustStoreResource=#tsf&needClientAuth=true")
+ from("netty:tcp://127.0.0.1:{{port}}?sync=true&ssl=true&passphrase=changeit&keyStoreResource=#ksf&trustStoreResource=#tsf&needClientAuth=true")
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
SSLSession session
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/NettyComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/NettyComponentBuilderFactory.java
index 78f2b23..5928c55 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/NettyComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/NettyComponentBuilderFactory.java
@@ -82,6 +82,22 @@ public interface NettyComponentBuilderFactory {
return this;
}
/**
+ * To enable/disable hostname verification on SSLEngine.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: common
+ *
+ * @param hostnameVerification the value to set
+ * @return the dsl builder
+ */
+ default NettyComponentBuilder hostnameVerification(
+ boolean hostnameVerification) {
+ doSetProperty("hostnameVerification", hostnameVerification);
+ return this;
+ }
+ /**
* Setting to ensure socket is not closed due to inactivity.
*
* The option is a: <code>boolean</code> type.
@@ -1329,6 +1345,7 @@ public interface NettyComponentBuilderFactory {
switch (name) {
case "configuration": ((NettyComponent) component).setConfiguration((org.apache.camel.component.netty.NettyConfiguration) value); return true;
case "disconnect": getOrCreateConfiguration((NettyComponent) component).setDisconnect((boolean) value); return true;
+ case "hostnameVerification": getOrCreateConfiguration((NettyComponent) component).setHostnameVerification((boolean) value); return true;
case "keepAlive": getOrCreateConfiguration((NettyComponent) component).setKeepAlive((boolean) value); return true;
case "reuseAddress": getOrCreateConfiguration((NettyComponent) component).setReuseAddress((boolean) value); return true;
case "reuseChannel": getOrCreateConfiguration((NettyComponent) component).setReuseChannel((boolean) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/NettyEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/NettyEndpointBuilderFactory.java
index 6132062..e134819 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/NettyEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/NettyEndpointBuilderFactory.java
@@ -79,6 +79,39 @@ public interface NettyEndpointBuilderFactory {
return this;
}
/**
+ * To enable/disable hostname verification on SSLEngine.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: common
+ *
+ * @param hostnameVerification the value to set
+ * @return the dsl builder
+ */
+ default NettyEndpointConsumerBuilder hostnameVerification(
+ boolean hostnameVerification) {
+ doSetProperty("hostnameVerification", hostnameVerification);
+ return this;
+ }
+ /**
+ * To enable/disable hostname verification on SSLEngine.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: common
+ *
+ * @param hostnameVerification the value to set
+ * @return the dsl builder
+ */
+ default NettyEndpointConsumerBuilder hostnameVerification(
+ String hostnameVerification) {
+ doSetProperty("hostnameVerification", hostnameVerification);
+ return this;
+ }
+ /**
* Setting to ensure socket is not closed due to inactivity.
*
* The option is a: <code>boolean</code> type.
@@ -1946,6 +1979,39 @@ public interface NettyEndpointBuilderFactory {
return this;
}
/**
+ * To enable/disable hostname verification on SSLEngine.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: common
+ *
+ * @param hostnameVerification the value to set
+ * @return the dsl builder
+ */
+ default NettyEndpointProducerBuilder hostnameVerification(
+ boolean hostnameVerification) {
+ doSetProperty("hostnameVerification", hostnameVerification);
+ return this;
+ }
+ /**
+ * To enable/disable hostname verification on SSLEngine.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: common
+ *
+ * @param hostnameVerification the value to set
+ * @return the dsl builder
+ */
+ default NettyEndpointProducerBuilder hostnameVerification(
+ String hostnameVerification) {
+ doSetProperty("hostnameVerification", hostnameVerification);
+ return this;
+ }
+ /**
* Setting to ensure socket is not closed due to inactivity.
*
* The option is a: <code>boolean</code> type.
@@ -3668,6 +3734,39 @@ public interface NettyEndpointBuilderFactory {
return this;
}
/**
+ * To enable/disable hostname verification on SSLEngine.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: common
+ *
+ * @param hostnameVerification the value to set
+ * @return the dsl builder
+ */
+ default NettyEndpointBuilder hostnameVerification(
+ boolean hostnameVerification) {
+ doSetProperty("hostnameVerification", hostnameVerification);
+ return this;
+ }
+ /**
+ * To enable/disable hostname verification on SSLEngine.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: common
+ *
+ * @param hostnameVerification the value to set
+ * @return the dsl builder
+ */
+ default NettyEndpointBuilder hostnameVerification(
+ String hostnameVerification) {
+ doSetProperty("hostnameVerification", hostnameVerification);
+ return this;
+ }
+ /**
* Setting to ensure socket is not closed due to inactivity.
*
* The option is a: <code>boolean</code> type.
diff --git a/docs/components/modules/ROOT/pages/netty-component.adoc b/docs/components/modules/ROOT/pages/netty-component.adoc
index 71bea8f..da604ac 100644
--- a/docs/components/modules/ROOT/pages/netty-component.adoc
+++ b/docs/components/modules/ROOT/pages/netty-component.adoc
@@ -61,7 +61,7 @@ You can append query options to the URI in the following format,
== Options
// component options: START
-The Netty component supports 72 options, which are listed below.
+The Netty component supports 73 options, which are listed below.
@@ -70,6 +70,7 @@ The Netty component supports 72 options, which are listed below.
| Name | Description | Default | Type
| *configuration* (common) | To use the NettyConfiguration as configuration when creating endpoints. | | NettyConfiguration
| *disconnect* (common) | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | false | boolean
+| *hostnameVerification* (common) | To enable/disable hostname verification on SSLEngine | false | boolean
| *keepAlive* (common) | Setting to ensure socket is not closed due to inactivity | true | boolean
| *reuseAddress* (common) | Setting to facilitate socket multiplexing | true | boolean
| *reuseChannel* (common) | This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecycle of processing the Exchange. This is useful if you need to call a server multiple times in a Camel route and want to use the same network connection. When using this, the channel is not returned to the connection pool until the Exchange is done; or disconnected if the disconnect option is set to true. The reused Channel is stored on the Exchange as an e [...]
@@ -165,13 +166,14 @@ with the following path and query parameters:
|===
-=== Query Parameters (70 parameters):
+=== Query Parameters (71 parameters):
[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Type
| *disconnect* (common) | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | false | boolean
+| *hostnameVerification* (common) | To enable/disable hostname verification on SSLEngine | false | boolean
| *keepAlive* (common) | Setting to ensure socket is not closed due to inactivity | true | boolean
| *reuseAddress* (common) | Setting to facilitate socket multiplexing | true | boolean
| *reuseChannel* (common) | This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecycle of processing the Exchange. This is useful if you need to call a server multiple times in a Camel route and want to use the same network connection. When using this, the channel is not returned to the connection pool until the Exchange is done; or disconnected if the disconnect option is set to true. The reused Channel is stored on the Exchange as an e [...]