Sanket created CAMEL-22321:
------------------------------
Summary: OpenSearch SSL Fallback Issue
Key: CAMEL-22321
URL: https://issues.apache.org/jira/browse/CAMEL-22321
Project: Camel
Issue Type: Bug
Components: camel-opensearch
Reporter: Sanket
Problem:
The OpenSearch component's SSL configuration lacks a fallback mechanism to the
default JVM SSL context when SSL context creation fails or returns null. This
is inconsistent with other Camel components like HTTP which have proper
fallback handling.
{code:java}
if (ObjectHelper.isNotEmpty(configuration.getCertificatePath())) {
final TlsStrategy tlsStrategy =
ClientTlsStrategyBuilder.create()
.setSslContext(createSslContextFromCa())
.setHostnameVerifier(configuration.getHostnameVerifier())
.setTlsDetailsFactory(
sslEngine -> new
TlsDetails(sslEngine.getSession(), sslEngine.getApplicationProtocol()))
.build();
}{code}
If certificate is empty we are not using any TlsStrategy.
we should fallback to JVM's default ssl config incase custom CA is not provided.
{code:java}
return SSLContext.getDefault(); {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)