[
https://issues.apache.org/jira/browse/CAMEL-25604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-25604.
---------------------------------
Resolution: Fixed
> camel-mllp - Add hostname verification for TLS producer connections
> -------------------------------------------------------------------
>
> Key: CAMEL-25604
> URL: https://issues.apache.org/jira/browse/CAMEL-25604
> Project: Camel
> Issue Type: Improvement
> Components: camel-mllp
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.24.0
>
>
> camel-netty has a {{hostnameVerification}} option that sets the {{HTTPS}}
> endpoint identification algorithm on its client {{SSLEngine}}. camel-mllp has
> no equivalent: {{MllpTcpClientProducer.createNewSocket}} creates the client
> {{SSLSocket}} from the {{SSLContext}} built from {{sslContextParameters}} and
> never sets an endpoint identification algorithm, and there is no option to
> set one.
> Proposed change:
> * In {{createNewSocket}}, when the socket is an {{SSLSocket}}, read its
> {{SSLParameters}}, set the endpoint identification algorithm to {{HTTPS}} and
> set them back before the first write, keeping the protocols, cipher suites
> and SNI names configured through {{SSLContextParameters}}.
> * Add a {{hostnameVerification}} endpoint option, enabled by default, to turn
> the check off (label {{security}}, {{security = "insecure:ssl"}},
> {{insecureValue = "false"}}, as in camel-netty).
> * Add a TLS section to {{mllp-component.adoc}}, which does not describe TLS
> today.
> * Upgrade guide notes for 4.24, 4.22.2 and 4.18.6: a producer that connects
> by IP address, or to a server whose certificate does not list the configured
> host name, needs a matching certificate or {{hostnameVerification=false}}.
> * Tests: the handshake fails by default when the server certificate does not
> match the configured host, and succeeds with the option off or with a
> matching certificate.
> To be backported to 4.22.x and 4.18.x once merged on main.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)