This is an automated email from the ASF dual-hosted git repository.
oscerd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new ff312d54b Fix #2791: expose sslContextParameters on the opensearch
Kamelets (#3000)
ff312d54b is described below
commit ff312d54ba5019248ebd71e99aa548043820c179
Author: Andrea Cosentino <[email protected]>
AuthorDate: Thu Sep 3 18:36:20 2026 +0200
Fix #2791: expose sslContextParameters on the opensearch Kamelets (#3000)
The issue suggested mapping the component's SSL parameters onto Kamelet
properties. camel-opensearch has no such parameters: its entire TLS surface
beyond enableSSL and certificatePath is one option, sslContextParameters,
typed org.apache.camel.support.jsse.SSLContextParameters. There is nothing
scalar for cipher suites, protocol version, keystores or hostname
verification to map to.
So this takes the issue's second suggestion and lets the operator point at
a pre-configured bean, which reaches all of those at once.
Building the SSLContextParameters inside the template from scalar
properties -- the pattern aws-redshift-sink uses for its data source --
does not work here. Kamelet beans are created unconditionally, and
sslContextParameters takes precedence over certificatePath, so an
always-present bean would silently disable the existing certificate
property for everyone.
The property is optional and passed with {{?sslContextParameters}}, so when
unset the parameter is omitted entirely and behaviour is unchanged.
Verified against the real component: with sslContextParameters set to
"#bean:mySsl" the endpoint resolves the registry bean and connects over
https, failing only with connection refused as there is no cluster; a
second route on the same run with the property unset starts unaffected.
Claude-Session: https://claude.ai/code/session_013cgbAH6uDsSJDhMdunDzTS
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
---
kamelets/opensearch-index-sink.kamelet.yaml | 10 ++++++++++
kamelets/opensearch-search-source.kamelet.yaml | 10 ++++++++++
2 files changed, 20 insertions(+)
diff --git a/kamelets/opensearch-index-sink.kamelet.yaml
b/kamelets/opensearch-index-sink.kamelet.yaml
index 17c264a90..4a78056fb 100644
--- a/kamelets/opensearch-index-sink.kamelet.yaml
+++ b/kamelets/opensearch-index-sink.kamelet.yaml
@@ -69,6 +69,15 @@ spec:
description: The name of the OpenSearch index.
type: string
example: data
+ sslContextParameters:
+ title: SSL Context Parameters
+ description: >-
+ Reference to a registry bean of type
org.apache.camel.support.jsse.SSLContextParameters,
+ written as "#bean:myBeanName". Use this for anything the certificate
property cannot
+ express - mutual TLS with a client keystore, a custom trust store, a
specific TLS protocol
+ version, or cipher suite selection. When set it takes precedence
over certificate, so
+ configure one or the other rather than both.
+ type: string
certificate:
title: Certificate
description: The Certificate for accessing the OpenSearch cluster. You
must encode this value in base64.
@@ -129,3 +138,4 @@ spec:
enableSSL: "{{enableSSL}}"
indexName: "{{?indexName}}"
certificatePath: "base64:{{?certificate}}"
+ sslContextParameters: "{{?sslContextParameters}}"
diff --git a/kamelets/opensearch-search-source.kamelet.yaml
b/kamelets/opensearch-search-source.kamelet.yaml
index 7249283d0..3786383cf 100644
--- a/kamelets/opensearch-search-source.kamelet.yaml
+++ b/kamelets/opensearch-search-source.kamelet.yaml
@@ -77,6 +77,15 @@ spec:
title: OpenSearch Cluster Name
description: The name of the cluster.
type: string
+ sslContextParameters:
+ title: SSL Context Parameters
+ description: >-
+ Reference to a registry bean of type
org.apache.camel.support.jsse.SSLContextParameters,
+ written as "#bean:myBeanName". Use this for anything the certificate
property cannot
+ express - mutual TLS with a client keystore, a custom trust store, a
specific TLS protocol
+ version, or cipher suite selection. When set it takes precedence
over certificate, so
+ configure one or the other rather than both.
+ type: string
certificate:
title: Certificate
description: The Certificate for accessing the Opensearch cluster. You
must encode this value in base64.
@@ -112,6 +121,7 @@ spec:
hostAddresses: "{{hostAddresses}}"
enableSSL: "{{enableSSL}}"
certificatePath: "base64:{{?certificate}}"
+ sslContextParameters: "{{?sslContextParameters}}"
- marshal:
json:
library: Gson