[
https://issues.apache.org/jira/browse/CAMEL-27582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151885#comment-18151885
]
Guillaume Nodet commented on CAMEL-27582:
-----------------------------------------
This issue is being investigated by a coding agent (on behalf of gnodet).
Code analysis confirms the bug: ThriftProducer.initializeSslTransport() builds
TSSLTransportFactory.TSSLTransportParameters using only the trust store from
sslContextParameters (calls sslParams.setTrustStore() but never
sslParams.setKeyStore()), completely ignoring the key managers. This means
client certificate authentication (mTLS) is not possible with the producer. In
contrast, ThriftConsumer correctly uses sslParameters.createSSLContext() which
applies all SSL settings including key managers.
Fix approach: modify initializeSslTransport() to use the full SSLContext like
the consumer does, then create the TSocket from that SSLContext.
_Note: This comment was generated by an AI coding agent and requires manual
verification._
> camel-thrift - the producer ignores the key managers of sslContextParameters,
> so it cannot authenticate with a client certificate
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27582
> URL: https://issues.apache.org/jira/browse/CAMEL-27582
> Project: Camel
> Issue Type: Bug
> Reporter: Claus Ibsen
> Assignee: Guillaume Nodet
> Priority: Major
> Fix For: 4.25.0
>
>
> Found while working on CAMEL-26546. ThriftProducer builds
> TSSLTransportFactory.TSSLTransportParameters from the trust store of
> sslContextParameters only (path and password), so the key managers are
> dropped: the producer never sends a client certificate, and mutual TLS
> against a Thrift server that requires one fails. The named groups and
> signature schemes are dropped as well (now with a WARN, CAMEL-26546).
> The consumer already uses the decorated SSLContext of sslContextParameters
> (createSSLContext). The producer could do the same with a socket from that
> SSLContext, but note two changes: a trust store path without a scheme is
> resolved differently (Thrift tries the file system first, Camel the
> classpath), and the producer then starts to send a client certificate when
> key managers are configured.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)