From 804d4ef421ac083081e6d9f630d0a5640cfb1e1a Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Tue, 20 Jan 2026 09:42:33 +0100 Subject: [PATCH 1/3] Create a single Sink and Source Kamelets for Kafka now that CAMEL-22864 is part of 4.18.0 Signed-off-by: Andrea Cosentino --- ...-batch-not-secured-source-description.adoc | 44 ---- .../kafka-batch-scram-source-description.adoc | 44 ---- .../kafka-batch-ssl-source-description.adoc | 44 ---- .../kafka-not-secured-sink-description.adoc | 27 --- .../kafka-not-secured-source-description.adoc | 44 ---- .../kafka-scram-sink-description.adoc | 21 -- .../kafka-scram-source-description.adoc | 44 ---- .../partials/kafka-ssl-sink-description.adoc | 25 --- .../kafka-ssl-source-description.adoc | 44 ---- ...afka-batch-not-secured-source.kamelet.yaml | 131 ------------ .../kafka-batch-scram-source.kamelet.yaml | 159 -------------- kamelets/kafka-batch-source.kamelet.yaml | 95 +++++++-- kamelets/kafka-batch-ssl-source.kamelet.yaml | 198 ------------------ kamelets/kafka-not-secured-sink.kamelet.yaml | 82 -------- .../kafka-not-secured-source.kamelet.yaml | 105 ---------- kamelets/kafka-scram-sink.kamelet.yaml | 110 ---------- kamelets/kafka-scram-source.kamelet.yaml | 133 ------------ kamelets/kafka-sink.kamelet.yaml | 91 ++++++-- kamelets/kafka-source.kamelet.yaml | 95 +++++++-- kamelets/kafka-ssl-sink.kamelet.yaml | 171 --------------- kamelets/kafka-ssl-source.kamelet.yaml | 181 ---------------- .../kamelets/catalog/KameletsCatalogTest.java | 4 - ...afka-batch-not-secured-source.kamelet.yaml | 131 ------------ .../kafka-batch-scram-source.kamelet.yaml | 159 -------------- .../kamelets/kafka-batch-source.kamelet.yaml | 95 +++++++-- .../kafka-batch-ssl-source.kamelet.yaml | 198 ------------------ .../kafka-not-secured-sink.kamelet.yaml | 82 -------- .../kafka-not-secured-source.kamelet.yaml | 105 ---------- .../kamelets/kafka-scram-sink.kamelet.yaml | 110 ---------- .../kamelets/kafka-scram-source.kamelet.yaml | 133 ------------ .../kamelets/kafka-sink.kamelet.yaml | 91 ++++++-- .../kamelets/kafka-source.kamelet.yaml | 95 +++++++-- .../kamelets/kafka-ssl-sink.kamelet.yaml | 171 --------------- .../kamelets/kafka-ssl-source.kamelet.yaml | 181 ---------------- .../maven/plugin/ValidateKameletsMojo.java | 2 +- .../camel-k/kafka-not-secured-sink-pipe.yaml | 19 -- .../kafka-not-secured-source-pipe.yaml | 19 -- templates/pipes/camel-k/kafka-sink-pipe.yaml | 4 +- .../pipes/camel-k/kafka-source-pipe.yaml | 4 +- .../core/kafka-not-secured-sink-pipe.yaml | 12 -- .../core/kafka-not-secured-source-pipe.yaml | 9 - templates/pipes/core/kafka-sink-pipe.yaml | 3 +- templates/pipes/core/kafka-source-pipe.yaml | 3 +- 43 files changed, 433 insertions(+), 3085 deletions(-) delete mode 100644 docs/modules/ROOT/partials/kafka-batch-not-secured-source-description.adoc delete mode 100644 docs/modules/ROOT/partials/kafka-batch-scram-source-description.adoc delete mode 100644 docs/modules/ROOT/partials/kafka-batch-ssl-source-description.adoc delete mode 100644 docs/modules/ROOT/partials/kafka-not-secured-sink-description.adoc delete mode 100644 docs/modules/ROOT/partials/kafka-not-secured-source-description.adoc delete mode 100644 docs/modules/ROOT/partials/kafka-scram-sink-description.adoc delete mode 100644 docs/modules/ROOT/partials/kafka-scram-source-description.adoc delete mode 100644 docs/modules/ROOT/partials/kafka-ssl-sink-description.adoc delete mode 100644 docs/modules/ROOT/partials/kafka-ssl-source-description.adoc delete mode 100644 kamelets/kafka-batch-not-secured-source.kamelet.yaml delete mode 100644 kamelets/kafka-batch-scram-source.kamelet.yaml delete mode 100644 kamelets/kafka-batch-ssl-source.kamelet.yaml delete mode 100644 kamelets/kafka-not-secured-sink.kamelet.yaml delete mode 100644 kamelets/kafka-not-secured-source.kamelet.yaml delete mode 100644 kamelets/kafka-scram-sink.kamelet.yaml delete mode 100644 kamelets/kafka-scram-source.kamelet.yaml delete mode 100644 kamelets/kafka-ssl-sink.kamelet.yaml delete mode 100644 kamelets/kafka-ssl-source.kamelet.yaml delete mode 100644 library/camel-kamelets/src/main/resources/kamelets/kafka-batch-not-secured-source.kamelet.yaml delete mode 100644 library/camel-kamelets/src/main/resources/kamelets/kafka-batch-scram-source.kamelet.yaml delete mode 100644 library/camel-kamelets/src/main/resources/kamelets/kafka-batch-ssl-source.kamelet.yaml delete mode 100644 library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-sink.kamelet.yaml delete mode 100644 library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-source.kamelet.yaml delete mode 100644 library/camel-kamelets/src/main/resources/kamelets/kafka-scram-sink.kamelet.yaml delete mode 100644 library/camel-kamelets/src/main/resources/kamelets/kafka-scram-source.kamelet.yaml delete mode 100644 library/camel-kamelets/src/main/resources/kamelets/kafka-ssl-sink.kamelet.yaml delete mode 100644 library/camel-kamelets/src/main/resources/kamelets/kafka-ssl-source.kamelet.yaml delete mode 100644 templates/pipes/camel-k/kafka-not-secured-sink-pipe.yaml delete mode 100644 templates/pipes/camel-k/kafka-not-secured-source-pipe.yaml delete mode 100644 templates/pipes/core/kafka-not-secured-sink-pipe.yaml delete mode 100644 templates/pipes/core/kafka-not-secured-source-pipe.yaml diff --git a/docs/modules/ROOT/partials/kafka-batch-not-secured-source-description.adoc b/docs/modules/ROOT/partials/kafka-batch-not-secured-source-description.adoc deleted file mode 100644 index f72f6ff9a..000000000 --- a/docs/modules/ROOT/partials/kafka-batch-not-secured-source-description.adoc +++ /dev/null @@ -1,44 +0,0 @@ -== Kafka-batch-not-secured-source Kamelet Description - -=== Authentication methods - -This Kamelet connects to Kafka using appropriate security mechanisms based on the configuration type: - -- Security settings as indicated by the kamelet name (SSL, SCRAM, not-secured) -- Schema registry integration where applicable -- Bootstrap servers configuration - -=== Output format - -The Kamelet consumes messages from Kafka topics and produces the message data in the configured format. - -=== Configuration - -The Kamelet requires Kafka connection parameters: - -- `topic`: The Kafka topic to consume from -- `bootstrapServers`: Comma separated list of Kafka Broker URLs -- Security-specific parameters based on the authentication method - -=== Usage example - -```yaml -apiVersion: camel.apache.org/v1alpha1 -kind: KameletBinding -metadata: - name: kafka-batch-not-secured-source-binding -spec: - source: - ref: - kind: Kamelet - apiVersion: camel.apache.org/v1alpha1 - name: kafka-batch-not-secured-source - properties: - topic: "my-topic" - bootstrapServers: "kafka-broker1:9092,kafka-broker2:9092" - sink: - ref: - kind: Service - apiVersion: v1 - name: my-service -``` diff --git a/docs/modules/ROOT/partials/kafka-batch-scram-source-description.adoc b/docs/modules/ROOT/partials/kafka-batch-scram-source-description.adoc deleted file mode 100644 index b391c6270..000000000 --- a/docs/modules/ROOT/partials/kafka-batch-scram-source-description.adoc +++ /dev/null @@ -1,44 +0,0 @@ -== Kafka-batch-scram-source Kamelet Description - -=== Authentication methods - -This Kamelet connects to Kafka using appropriate security mechanisms based on the configuration type: - -- Security settings as indicated by the kamelet name (SSL, SCRAM, not-secured) -- Schema registry integration where applicable -- Bootstrap servers configuration - -=== Output format - -The Kamelet consumes messages from Kafka topics and produces the message data in the configured format. - -=== Configuration - -The Kamelet requires Kafka connection parameters: - -- `topic`: The Kafka topic to consume from -- `bootstrapServers`: Comma separated list of Kafka Broker URLs -- Security-specific parameters based on the authentication method - -=== Usage example - -```yaml -apiVersion: camel.apache.org/v1alpha1 -kind: KameletBinding -metadata: - name: kafka-batch-scram-source-binding -spec: - source: - ref: - kind: Kamelet - apiVersion: camel.apache.org/v1alpha1 - name: kafka-batch-scram-source - properties: - topic: "my-topic" - bootstrapServers: "kafka-broker1:9092,kafka-broker2:9092" - sink: - ref: - kind: Service - apiVersion: v1 - name: my-service -``` diff --git a/docs/modules/ROOT/partials/kafka-batch-ssl-source-description.adoc b/docs/modules/ROOT/partials/kafka-batch-ssl-source-description.adoc deleted file mode 100644 index c97ec6bb1..000000000 --- a/docs/modules/ROOT/partials/kafka-batch-ssl-source-description.adoc +++ /dev/null @@ -1,44 +0,0 @@ -== Kafka-batch-ssl-source Kamelet Description - -=== Authentication methods - -This Kamelet connects to Kafka using appropriate security mechanisms based on the configuration type: - -- Security settings as indicated by the kamelet name (SSL, SCRAM, not-secured) -- Schema registry integration where applicable -- Bootstrap servers configuration - -=== Output format - -The Kamelet consumes messages from Kafka topics and produces the message data in the configured format. - -=== Configuration - -The Kamelet requires Kafka connection parameters: - -- `topic`: The Kafka topic to consume from -- `bootstrapServers`: Comma separated list of Kafka Broker URLs -- Security-specific parameters based on the authentication method - -=== Usage example - -```yaml -apiVersion: camel.apache.org/v1alpha1 -kind: KameletBinding -metadata: - name: kafka-batch-ssl-source-binding -spec: - source: - ref: - kind: Kamelet - apiVersion: camel.apache.org/v1alpha1 - name: kafka-batch-ssl-source - properties: - topic: "my-topic" - bootstrapServers: "kafka-broker1:9092,kafka-broker2:9092" - sink: - ref: - kind: Service - apiVersion: v1 - name: my-service -``` diff --git a/docs/modules/ROOT/partials/kafka-not-secured-sink-description.adoc b/docs/modules/ROOT/partials/kafka-not-secured-sink-description.adoc deleted file mode 100644 index 4b9d1020f..000000000 --- a/docs/modules/ROOT/partials/kafka-not-secured-sink-description.adoc +++ /dev/null @@ -1,27 +0,0 @@ -== Kafka Not Secured Sink Kamelet Description - -=== Basic Kafka Integration - -This Kamelet provides a simple integration with Kafka topics using an unsecured connection. It's designed for development environments or internal networks where security is not a primary concern. - -=== Message Headers - -The Kamelet supports both standard and CloudEvents headers for message routing: - -- Message key headers: `key` or `ce-key` -- Partition key headers: `partition-key` or `ce-partitionkey` - -=== Minimal Configuration - -Only requires the essential configuration parameters: topic names and bootstrap servers. No authentication or encryption is configured. - -=== Use Cases - -Suitable for: -- Development and testing environments -- Internal network communications -- Proof-of-concept implementations - -=== Security Warning - -This Kamelet does not provide any security mechanisms. Do not use in production environments where data protection is required. \ No newline at end of file diff --git a/docs/modules/ROOT/partials/kafka-not-secured-source-description.adoc b/docs/modules/ROOT/partials/kafka-not-secured-source-description.adoc deleted file mode 100644 index 31a32dbf5..000000000 --- a/docs/modules/ROOT/partials/kafka-not-secured-source-description.adoc +++ /dev/null @@ -1,44 +0,0 @@ -== Kafka-not-secured-source Kamelet Description - -=== Authentication methods - -This Kamelet connects to Kafka using appropriate security mechanisms based on the configuration type: - -- Security settings as indicated by the kamelet name (SSL, SCRAM, not-secured) -- Schema registry integration where applicable -- Bootstrap servers configuration - -=== Output format - -The Kamelet consumes messages from Kafka topics and produces the message data in the configured format. - -=== Configuration - -The Kamelet requires Kafka connection parameters: - -- `topic`: The Kafka topic to consume from -- `bootstrapServers`: Comma separated list of Kafka Broker URLs -- Security-specific parameters based on the authentication method - -=== Usage example - -```yaml -apiVersion: camel.apache.org/v1alpha1 -kind: KameletBinding -metadata: - name: kafka-not-secured-source-binding -spec: - source: - ref: - kind: Kamelet - apiVersion: camel.apache.org/v1alpha1 - name: kafka-not-secured-source - properties: - topic: "my-topic" - bootstrapServers: "kafka-broker1:9092,kafka-broker2:9092" - sink: - ref: - kind: Service - apiVersion: v1 - name: my-service -``` diff --git a/docs/modules/ROOT/partials/kafka-scram-sink-description.adoc b/docs/modules/ROOT/partials/kafka-scram-sink-description.adoc deleted file mode 100644 index 015b0b5f2..000000000 --- a/docs/modules/ROOT/partials/kafka-scram-sink-description.adoc +++ /dev/null @@ -1,21 +0,0 @@ -== Kafka Scram Sink Kamelet Description - -=== SCRAM Authentication - -This Kamelet uses SCRAM (Salted Challenge Response Authentication Mechanism) for secure authentication with Kafka brokers. SCRAM provides a secure method for username/password authentication. - -=== Authentication Mechanism - -The Kamelet supports SCRAM-SHA-512 by default, which provides strong cryptographic security. The authentication mechanism can be configured based on the Kafka broker's security configuration. - -=== Security Protocol - -Uses SASL_SSL security protocol by default, ensuring both authentication and encryption for data in transit. This provides comprehensive security for Kafka communications. - -=== Credential Management - -Requires username and password credentials that should be securely managed and rotated according to security best practices. - -=== Production Ready - -This Kamelet is suitable for production environments requiring secure authentication without the complexity of certificate-based authentication. \ No newline at end of file diff --git a/docs/modules/ROOT/partials/kafka-scram-source-description.adoc b/docs/modules/ROOT/partials/kafka-scram-source-description.adoc deleted file mode 100644 index c59cb899c..000000000 --- a/docs/modules/ROOT/partials/kafka-scram-source-description.adoc +++ /dev/null @@ -1,44 +0,0 @@ -== Kafka-scram-source Kamelet Description - -=== Authentication methods - -This Kamelet connects to Kafka using appropriate security mechanisms based on the configuration type: - -- Security settings as indicated by the kamelet name (SSL, SCRAM, not-secured) -- Schema registry integration where applicable -- Bootstrap servers configuration - -=== Output format - -The Kamelet consumes messages from Kafka topics and produces the message data in the configured format. - -=== Configuration - -The Kamelet requires Kafka connection parameters: - -- `topic`: The Kafka topic to consume from -- `bootstrapServers`: Comma separated list of Kafka Broker URLs -- Security-specific parameters based on the authentication method - -=== Usage example - -```yaml -apiVersion: camel.apache.org/v1alpha1 -kind: KameletBinding -metadata: - name: kafka-scram-source-binding -spec: - source: - ref: - kind: Kamelet - apiVersion: camel.apache.org/v1alpha1 - name: kafka-scram-source - properties: - topic: "my-topic" - bootstrapServers: "kafka-broker1:9092,kafka-broker2:9092" - sink: - ref: - kind: Service - apiVersion: v1 - name: my-service -``` diff --git a/docs/modules/ROOT/partials/kafka-ssl-sink-description.adoc b/docs/modules/ROOT/partials/kafka-ssl-sink-description.adoc deleted file mode 100644 index 83e4c68b4..000000000 --- a/docs/modules/ROOT/partials/kafka-ssl-sink-description.adoc +++ /dev/null @@ -1,25 +0,0 @@ -== Kafka SSL Sink Kamelet Description - -=== TLS/SSL Encryption - -This Kamelet provides secure communication with Kafka brokers using TLS/SSL encryption. It supports both one-way and mutual (two-way) SSL authentication. - -=== Certificate Configuration - -Requires configuration of SSL keystores and truststores: - -- Keystore: Contains the client's private key and certificate (for mutual authentication) -- Truststore: Contains trusted certificate authorities and broker certificates -- Password protection for both keystores and private keys - -=== SSL Protocol Support - -Supports modern TLS protocols (TLSv1.2 by default) with configurable enabled protocols. Older SSL versions are discouraged due to security vulnerabilities. - -=== Hostname Verification - -Includes endpoint identification algorithm for server hostname verification using server certificates, ensuring protection against man-in-the-middle attacks. - -=== Production Security - -Designed for production environments requiring strong encryption and certificate-based authentication. Provides comprehensive security for sensitive data transmission. \ No newline at end of file diff --git a/docs/modules/ROOT/partials/kafka-ssl-source-description.adoc b/docs/modules/ROOT/partials/kafka-ssl-source-description.adoc deleted file mode 100644 index bac5e645e..000000000 --- a/docs/modules/ROOT/partials/kafka-ssl-source-description.adoc +++ /dev/null @@ -1,44 +0,0 @@ -== Kafka-ssl-source Kamelet Description - -=== Authentication methods - -This Kamelet connects to Kafka using appropriate security mechanisms based on the configuration type: - -- Security settings as indicated by the kamelet name (SSL, SCRAM, not-secured) -- Schema registry integration where applicable -- Bootstrap servers configuration - -=== Output format - -The Kamelet consumes messages from Kafka topics and produces the message data in the configured format. - -=== Configuration - -The Kamelet requires Kafka connection parameters: - -- `topic`: The Kafka topic to consume from -- `bootstrapServers`: Comma separated list of Kafka Broker URLs -- Security-specific parameters based on the authentication method - -=== Usage example - -```yaml -apiVersion: camel.apache.org/v1alpha1 -kind: KameletBinding -metadata: - name: kafka-ssl-source-binding -spec: - source: - ref: - kind: Kamelet - apiVersion: camel.apache.org/v1alpha1 - name: kafka-ssl-source - properties: - topic: "my-topic" - bootstrapServers: "kafka-broker1:9092,kafka-broker2:9092" - sink: - ref: - kind: Service - apiVersion: v1 - name: my-service -``` diff --git a/kamelets/kafka-batch-not-secured-source.kamelet.yaml b/kamelets/kafka-batch-not-secured-source.kamelet.yaml deleted file mode 100644 index f2f9c554f..000000000 --- a/kamelets/kafka-batch-not-secured-source.kamelet.yaml +++ /dev/null @@ -1,131 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-batch-not-secured-source - annotations: - camel.apache.org/kamelet.support.level: "Stable" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8ZyBpZD0iWE1MSURfMV8iPg0KCTxwYXRoIGlkPSJYTUxJRF85XyIgZD0iTTMxNC44LDI2OS43Yy0xNC4yLDAtMjcsNi4zLTM1LjcsMTYuMkwyNTYuOCwyNzBjMi40LTYuNSwzLjctMTMuNiwzLjctMjAuOWMwLTcuMi0xLjMtMTQuMS0zLjYtMjAuNg0KCQlsMjIuMy0xNS43YzguNyw5LjksMjEuNCwxNi4xLDM1LjYsMTYuMWMyNi4yLDAsNDcuNi0yMS4zLDQ3LjYtNDcuNnMtMjEuMy00Ny42LTQ3LjYtNDcuNnMtNDcuNiwyMS4zLTQ3LjYsNDcuNg0KCQljMCw0LjcsMC43LDk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uNy0xMC4zLDIzLjEtMjMuMSwyMy4xDQoJCWMtMTIuNywwLTIzLjEtMTAuNC0yMy4xLTIzLjFjMC0xMi43LDEwLjMtMjMuMSwyMy4xLTIzLjFDMjExLjgsMzYxLjgsMjIyLjEsMzcyLjIsMjIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "source" -spec: - definition: - title: "Kafka Batch Not Secured Source" - description: Receive data from Kafka topics in batch on an insecure broker and commit them manually through KafkaManualCommit. - required: - - topic - - bootstrapServers - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs - type: string - autoCommitEnable: - title: Auto Commit Enable - description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer - type: boolean - default: true - allowManualCommit: - title: Allow Manual Commit - description: Whether to allow doing manual commits - type: boolean - default: false - pollOnError: - title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` - type: string - default: "ERROR_HANDLER" - autoOffsetReset: - title: Auto Offset Reset - description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none - type: string - default: "latest" - consumerGroup: - title: Consumer Group - description: A string that uniquely identifies the group of consumers to which this source belongs - type: string - example: "my-group-id" - deserializeHeaders: - title: Automatically Deserialize Headers - description: When enabled the Kamelet source will deserialize all message headers to String representation. - type: boolean - default: true - batchSize: - title: Batch Dimension - description: The maximum number of records returned in a single call to poll() - type: integer - default: 500 - pollTimeout: - title: Poll Timeout Interval - description: The timeout used when polling the KafkaConsumer - type: integer - default: 5000 - maxPollIntervalMs: - title: Max Poll Interval - description: The maximum delay between invocations of poll() when using consumer group management - type: integer - batchingIntervalMs: - title: Batching Interval - description: In consumer batching mode, then this option is specifying a time in millis, to trigger batch completion eager when the current batch size has not reached the maximum size defined by maxPollRecords. Notice the trigger is not exact at the given interval, as this can only happen between kafka polls (see pollTimeoutMs option). - type: integer - topicIsPattern: - title: Topic Is Pattern - description: Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. - type: boolean - default: false - dependencies: - - "camel:kafka" - - "camel:core" - - "camel:kamelet" - template: - beans: - - name: kafkaHeaderDeserializer - type: "#class:org.apache.camel.component.kafka.KafkaHeaderDeserializer" - properties: - enabled: '{{deserializeHeaders}}' - - name: manualCommitFactory - type: "#class:org.apache.camel.component.kafka.consumer.DefaultKafkaManualCommitFactory" - from: - uri: "kafka:{{topic}}" - parameters: - brokers: "{{bootstrapServers}}" - autoCommitEnable: "{{autoCommitEnable}}" - allowManualCommit: "{{allowManualCommit}}" - pollOnError: "{{pollOnError}}" - autoOffsetReset: "{{autoOffsetReset}}" - groupId: "{{?consumerGroup}}" - maxPollRecords: "{{batchSize}}" - pollTimeoutMs: "{{pollTimeout}}" - maxPollIntervalMs: "{{?maxPollIntervalMs}}" - batchingIntervalMs: "{{?batchingIntervalMs}}" - batching: true - kafkaManualCommitFactory: "#bean:{{manualCommitFactory}}" - topicIsPattern: "{{topicIsPattern}}" - steps: - - process: - ref: "{{kafkaHeaderDeserializer}}" - - to: "kamelet:sink" diff --git a/kamelets/kafka-batch-scram-source.kamelet.yaml b/kamelets/kafka-batch-scram-source.kamelet.yaml deleted file mode 100644 index 23c19172b..000000000 --- a/kamelets/kafka-batch-scram-source.kamelet.yaml +++ /dev/null @@ -1,159 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-batch-scram-source - annotations: - camel.apache.org/kamelet.support.level: "Preview" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNT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zNDEuMSwyNjkuNywzMTQuOCwyNjkuN3ogTTMxNC44LDE1OC40YzEyLjcsMCwyMy4xLDEwLjQsMjMuMSwyMy4xYzAsMTIuNy0xMC4zLDIzLjEtMjMuMSwyMy4xcy0yMy4xLTEwLjQtMjMuMS0yMy4xDQoJCUMyOTEuOCwxNjguOCwzMDIuMSwxNTguNCwzMTQuOCwxNTguNHogTTE3NiwxMTUuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMWMxMi43LDAsMjMuMSwxMC40LDIzLjEsMjMuMQ0KCQljMCwxMi43LTEwLjMsMjMuMS0yMy4xLDIzLjFDMTg2LjMsMTM4LjIsMTc2LDEyNy44LDE3NiwxMTUuMXogTTIyMi4xLDM4NC45YzAsMTIuNy0xMC4zLDIzLjEtMjMuMSwyMy4xDQoJCWMtMTIuNywwLTIzLjEtMTAuNC0yMy4xLTIzLjFjMC0xMi43LDEwLjMtMjMuMSwyMy4xLTIzLjFDMjExLjgsMzYxLjgsMjIyLjEsMzcyLjIsMjIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "source" -spec: - definition: - title: "Kafka Batch Scram Source" - description: Receive data from Kafka topics in batch through SCRAM login module and commit them manually through KafkaManualCommit. This provides complete control over when messages are committed, allowing for custom processing logic before acknowledgment. - required: - - topic - - bootstrapServers - - user - - password - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs - type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported - type: string - default: SASL_SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: SCRAM-SHA-512 - user: - title: Username - description: Username to authenticate to Kafka - type: string - x-descriptors: - - urn:camel:group:credentials - password: - title: Password - description: Password to authenticate to kafka - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - autoCommitEnable: - title: Auto Commit Enable - description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer - type: boolean - default: true - allowManualCommit: - title: Allow Manual Commit - description: Whether to allow doing manual commits - type: boolean - default: false - pollOnError: - title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` - type: string - default: "ERROR_HANDLER" - autoOffsetReset: - title: Auto Offset Reset - description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none - type: string - default: "latest" - consumerGroup: - title: Consumer Group - description: A string that uniquely identifies the group of consumers to which this source belongs - type: string - example: "my-group-id" - deserializeHeaders: - title: Automatically Deserialize Headers - description: When enabled the Kamelet source will deserialize all message headers to String representation. - type: boolean - default: true - batchSize: - title: Batch Dimension - description: The maximum number of records returned in a single call to poll() - type: integer - default: 500 - pollTimeout: - title: Poll Timeout Interval - description: The timeout used when polling the KafkaConsumer - type: integer - default: 5000 - maxPollIntervalMs: - title: Max Poll Interval - description: The maximum delay between invocations of poll() when using consumer group management - type: integer - batchingIntervalMs: - title: Batching Interval - description: In consumer batching mode, then this option is specifying a time in millis, to trigger batch completion eager when the current batch size has not reached the maximum size defined by maxPollRecords. Notice the trigger is not exact at the given interval, as this can only happen between kafka polls (see pollTimeoutMs option). - type: integer - topicIsPattern: - title: Topic Is Pattern - description: Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. - type: boolean - default: false - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - beans: - - name: kafkaHeaderDeserializer - type: "#class:org.apache.camel.component.kafka.KafkaHeaderDeserializer" - properties: - enabled: '{{deserializeHeaders}}' - - name: manualCommitFactory - type: "#class:org.apache.camel.component.kafka.consumer.DefaultKafkaManualCommitFactory" - from: - uri: "kafka:{{topic}}" - parameters: - brokers: "{{?bootstrapServers}}" - securityProtocol: "{{securityProtocol}}" - saslMechanism: "{{saslMechanism}}" - saslJaasConfig: 'org.apache.kafka.common.security.scram.ScramLoginModule required username="{{user}}" password="{{password}}";' - autoCommitEnable: "{{autoCommitEnable}}" - allowManualCommit: "{{allowManualCommit}}" - pollOnError: "{{pollOnError}}" - autoOffsetReset: "{{autoOffsetReset}}" - groupId: "{{?consumerGroup}}" - maxPollRecords: "{{batchSize}}" - pollTimeoutMs: "{{pollTimeout}}" - maxPollIntervalMs: "{{?maxPollIntervalMs}}" - batchingIntervalMs: "{{?batchingIntervalMs}}" - batching: true - kafkaManualCommitFactory: "#bean:{{manualCommitFactory}}" - topicIsPattern: "{{topicIsPattern}}" - steps: - - process: - ref: "{{kafkaHeaderDeserializer}}" - - to: "kamelet:sink" diff --git a/kamelets/kafka-batch-source.kamelet.yaml b/kamelets/kafka-batch-source.kamelet.yaml index 255ae68f9..7c0b3ad54 100644 --- a/kamelets/kafka-batch-source.kamelet.yaml +++ b/kamelets/kafka-batch-source.kamelet.yaml @@ -30,12 +30,10 @@ metadata: spec: definition: title: "Kafka Batch Source" - description: Receive data from Kafka topics in batch through Plain Login Module and commit them manually through KafkaManualCommit. This provides complete control over when messages are committed, allowing for custom processing logic before acknowledgment. + description: Receive data from Kafka topics in batch and commit them manually through KafkaManualCommit. This provides complete control over when messages are committed, allowing for custom processing logic before acknowledgment. required: - topic - bootstrapServers - - user - - password type: object properties: topic: @@ -46,29 +44,71 @@ spec: title: Bootstrap Servers description: Comma separated list of Kafka Broker URLs type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported + saslAuthType: + title: Authentication Type + description: Authentication type to use. Use NONE for no authentication, PLAIN or SCRAM_SHA_256/SCRAM_SHA_512 for username/password, SSL for certificate-based, OAUTH for OAuth 2.0, AWS_MSK_IAM for MSK, or KERBEROS for Kerberos. type: string - default: SASL_SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: PLAIN - user: + default: NONE + enum: ["NONE", "PLAIN", "SCRAM_SHA_256", "SCRAM_SHA_512", "SSL", "OAUTH", "AWS_MSK_IAM", "KERBEROS"] + saslUsername: title: Username - description: Username to authenticate to Kafka + description: Username for SASL authentication. Required when saslAuthType is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. type: string x-descriptors: - - urn:camel:group:credentials - password: + - urn:camel:group:credentials + saslPassword: title: Password - description: Password to authenticate to kafka + description: Password for SASL authentication. Required when saslAuthType is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + oauthClientId: + title: OAuth Client ID + description: OAuth client ID. Required when saslAuthType is OAUTH. + type: string + oauthClientSecret: + title: OAuth Client Secret + description: OAuth client secret. Required when saslAuthType is OAUTH. type: string format: password x-descriptors: - - urn:camel:group:credentials + - urn:camel:group:credentials + oauthTokenEndpointUri: + title: OAuth Token Endpoint + description: OAuth token endpoint URI. Required when saslAuthType is OAUTH. + type: string + oauthScope: + title: OAuth Scope + description: OAuth scope. Optional when saslAuthType is OAUTH. + type: string + sslTruststoreLocation: + title: SSL Truststore Location + description: The location of the trust store file. + type: string + sslTruststorePassword: + title: SSL Truststore Password + description: The password for the trust store file. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + sslKeystoreLocation: + title: SSL Keystore Location + description: The location of the key store file. Used for mTLS authentication. + type: string + sslKeystorePassword: + title: SSL Keystore Password + description: The password for the key store file. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + sslKeyPassword: + title: SSL Key Password + description: The password of the private key in the key store file. + type: string + format: password autoCommitEnable: title: Auto Commit Enable description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer @@ -81,7 +121,7 @@ spec: default: false pollOnError: title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` + description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of DISCARD, ERROR_HANDLER, RECONNECT, RETRY, STOP type: string default: "ERROR_HANDLER" autoOffsetReset: @@ -137,10 +177,19 @@ spec: from: uri: "kafka:{{topic}}" parameters: - brokers: "{{?bootstrapServers}}" - securityProtocol: "{{securityProtocol}}" - saslMechanism: "{{saslMechanism}}" - saslJaasConfig: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="{{user}}" password="{{password}}";' + brokers: "{{bootstrapServers}}" + saslAuthType: "{{saslAuthType}}" + saslUsername: "{{?saslUsername}}" + saslPassword: "{{?saslPassword}}" + oauthClientId: "{{?oauthClientId}}" + oauthClientSecret: "{{?oauthClientSecret}}" + oauthTokenEndpointUri: "{{?oauthTokenEndpointUri}}" + oauthScope: "{{?oauthScope}}" + sslTruststoreLocation: "{{?sslTruststoreLocation}}" + sslTruststorePassword: "{{?sslTruststorePassword}}" + sslKeystoreLocation: "{{?sslKeystoreLocation}}" + sslKeystorePassword: "{{?sslKeystorePassword}}" + sslKeyPassword: "{{?sslKeyPassword}}" autoCommitEnable: "{{autoCommitEnable}}" allowManualCommit: "{{allowManualCommit}}" pollOnError: "{{pollOnError}}" diff --git a/kamelets/kafka-batch-ssl-source.kamelet.yaml b/kamelets/kafka-batch-ssl-source.kamelet.yaml deleted file mode 100644 index bd5d47ba5..000000000 --- a/kamelets/kafka-batch-ssl-source.kamelet.yaml +++ /dev/null @@ -1,198 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-batch-ssl-source - annotations: - camel.apache.org/kamelet.support.level: "Stable" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNTAwOyIgeG1sOnNwYWNlPSJwcmVz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kuN3ogTTMxNC44LDE1OC40YzEyLjcsMCwyMy4xLDEwLjQsMjMuMSwyMy4xYzAsMTIuNy0xMC4zLDIzLjEtMjMuMSwyMy4xcy0yMy4xLTEwLjQtMjMuMS0yMy4xDQoJCUMyOTEuOCwxNjguOCwzMDIuMSwxNTguNCwzMTQuOCwxNTguNHogTTE3NiwxMTUuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMWMxMi43LDAsMjMuMSwxMC40LDIzLjEsMjMuMQ0KCQljMCwxMi43LTEwLjMsMjMuMS0yMy4xLDIzLjFDMTg2LjMsMTM4LjIsMTc2LDEyNy44LDE3NiwxMTUuMXogTTIyMi4xLDM4NC45YzAsMTIuNy0xMC4zLDIzLjEtMjMuMSwyMy4xDQoJCWMtMTIuNywwLTIzLjEtMTAuNC0yMy4xLTIzLjFjMC0xMi43LDEwLjMtMjMuMSwyMy4xLTIzLjFDMjExLjgsMzYxLjgsMjIyLjEsMzcyLjIsMjIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "source" -spec: - definition: - title: "Kafka Batch SSL Source" - description: Receive data from Kafka topics in batch with SSL/TLS support and commit them manually through KafkaManualCommit or automatically. - required: - - topic - - bootstrapServers - - sslTruststoreLocation - - sslKeyPassword - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs - type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported - type: string - default: SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: GSSAPI - autoCommitEnable: - title: Auto Commit Enable - description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer - type: boolean - default: true - allowManualCommit: - title: Allow Manual Commit - description: Whether to allow doing manual commits - type: boolean - default: false - pollOnError: - title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` - type: string - default: "ERROR_HANDLER" - autoOffsetReset: - title: Auto Offset Reset - description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none - type: string - default: "latest" - consumerGroup: - title: Consumer Group - description: A string that uniquely identifies the group of consumers to which this source belongs - type: string - example: "my-group-id" - deserializeHeaders: - title: Automatically Deserialize Headers - description: When enabled the Kamelet source will deserialize all message headers to String representation. - type: boolean - default: true - sslKeyPassword: - description: The password of the private key in the key store file. - title: SSL Key Password - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - sslKeystorePassword: - description: The store password for the key store file.This is optional for client and only needed if ssl.keystore.location is configured. - title: SSL Keystore Password - type: string - format: password - sslEndpointAlgorithm: - description: The endpoint identification algorithm to validate server hostname using server certificate. Use none or false to disable server hostname verification. - title: SSL Endpoint Algorithm - type: string - default: https - sslProtocol: - description: The SSL protocol used to generate the SSLContext. Default setting is TLS, which is fine for most cases. Allowed values in recent JVMs are TLS, TLSv1.1 and TLSv1.2. SSL, SSLv2 and SSLv3 may be supported in older JVMs, but their usage is discouraged due to known security vulnerabilities. - title: SSL Protocol - type: string - default: TLSv1.2 - sslKeystoreLocation: - description: The location of the key store file. This is optional for client and can be used for two-way authentication for client. - title: SSL Keystore Location - type: string - sslTruststoreLocation: - description: The location of the trust store file. - title: SSL Truststore Location - type: string - sslEnabledProtocols: - description: The list of protocols enabled for SSL connections. TLSv1.2, TLSv1.1 and TLSv1 are enabled by default. - title: SSL Enabled Protocols - type: string - default: TLSv1.2,TLSv1.1,TLSv1 - saslJaasConfig: - description: Java Authentication and Authorization Service (JAAS) for Simple Authentication and Security Layer (SASL) configuration. - title: JAAS Configuration - type: string - batchSize: - title: Batch Dimension - description: The maximum number of records returned in a single call to poll() - type: integer - default: 500 - pollTimeout: - title: Poll Timeout Interval - description: The timeout used when polling the KafkaConsumer - type: integer - default: 5000 - maxPollIntervalMs: - title: Max Poll Interval - description: The maximum delay between invocations of poll() when using consumer group management - type: integer - batchingIntervalMs: - title: Batching Interval - description: In consumer batching mode, then this option is specifying a time in millis, to trigger batch completion eager when the current batch size has not reached the maximum size defined by maxPollRecords. Notice the trigger is not exact at the given interval, as this can only happen between kafka polls (see pollTimeoutMs option). - type: integer - topicIsPattern: - title: Topic Is Pattern - description: Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. - type: boolean - default: false - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - beans: - - name: kafka-ssl-source-local - type: '#class:org.apache.camel.component.kafka.KafkaComponent' - - name: manualCommitFactory - type: "#class:org.apache.camel.component.kafka.consumer.DefaultKafkaManualCommitFactory" - - name: kafka-ssl-source-configuration-local - properties: - brokers: '{{bootstrapServers}}' - securityProtocol: '{{securityProtocol}}' - sslKeystoreLocation: '{{sslKeystoreLocation}}' - sslKeyPassword: '{{sslKeyPassword}}' - sslKeystorePassword: '{{sslKeystorePassword}}' - sslTruststoreLocation: '{{sslTruststoreLocation}}' - sslProtocol: '{{sslProtocol}}' - sslEnabledProtocols: '{{sslEnabledProtocols}}' - sslEndpointAlgorithm: '{{sslEndpointAlgorithm}}' - saslMechanism: '{{saslMechanism}}' - groupId: '{{?consumerGroup}}' - autoOffsetReset: '{{autoOffsetReset}}' - pollOnError: '{{pollOnError}}' - allowManualCommit: '{{allowManualCommit}}' - autoCommitEnable: '{{autoCommitEnable}}' - saslJaasConfig: '{{?saslJaasConfig}}' - maxPollRecords: "{{batchSize}}" - pollTimeoutMs: "{{pollTimeout}}" - maxPollIntervalMs: "{{?maxPollIntervalMs}}" - batchingIntervalMs: "{{?batchingIntervalMs}}" - batching: true - kafkaManualCommitFactory: "#bean:{{manualCommitFactory}}" - topicIsPattern: "{{topicIsPattern}}" - type: '#class:org.apache.camel.component.kafka.KafkaConfiguration' - - name: kafkaHeaderDeserializer - type: "#class:org.apache.camel.component.kafka.KafkaHeaderDeserializer" - properties: - enabled: '{{deserializeHeaders}}' - from: - uri: "{{kafka-ssl-source-local}}:{{topic}}" - parameters: - configuration: '#bean:{{kafka-ssl-source-configuration-local}}' - steps: - - process: - ref: "{{kafkaHeaderDeserializer}}" - - to: "kamelet:sink" diff --git a/kamelets/kafka-not-secured-sink.kamelet.yaml b/kamelets/kafka-not-secured-sink.kamelet.yaml deleted file mode 100644 index 33b638c66..000000000 --- a/kamelets/kafka-not-secured-sink.kamelet.yaml +++ /dev/null @@ -1,82 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-not-secured-sink - annotations: - camel.apache.org/kamelet.support.level: "Stable" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8ZyBpZD0iWE1MSURfMV8iPg0KCTxwYXRoIGlkPSJYTUxJRF85XyIgZD0iTTMxNC44LDI2OS43Yy0xNC4yLDAtMjcsNi4zLTM1LjcsMTYuMkwyNTYuOCwyNzBjMi40LTYuNSwzLjctMTMuNiwzLjctMjAuOWMwLTcuMi0xLjMtMTQuMS0zLjYtMjAuNg0KCQlsMjIuMy0xNS43YzguNyw5LjksMjEuNCwxNi4xLDM1LjYsMTYuMWMyNi4yLDAsNDcuNi0yMS4zLDQ3LjYtNDcuNnMtMjEuMy00Ny42LTQ3LjYtNDcuNnMtNDcuNiwyMS4zLTQ3LjYsNDcuNg0KCQljMCw0LjcsMC43LDkuMiwyLDEzLjVsLTIyLjMsMTUuN2MtOS4zLTExLjYtMjIuOC0xOS42LTM4LjEtMjIuMXYtMjYuOWMyMS42LTQuNSwzNy44LTIzLjcsMzcuOC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LjFDMjExLjgsMzYxLjgsMjIyLjEsMzcyLjIsMjIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "sink" -spec: - definition: - title: "Kafka Not Secured Sink" - description: Send data to Kafka topics on an insecure broker. - required: - - topic - - bootstrapServers - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs - type: string - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - from: - uri: "kamelet:source" - steps: - - choice: - when: - - simple: "${header[key]}" - steps: - - setHeader: - name: kafka.KEY - simple: "${header[key]}" - - simple: "${header[ce-key]}" - steps: - - setHeader: - name: kafka.KEY - simple: "${header[ce-key]}" - - choice: - when: - - simple: "${header[partition-key]}" - steps: - - setHeader: - name: kafka.PARTITION_KEY - simple: "${header[partition-key]}" - - simple: "${header[ce-partitionkey]}" - steps: - - setHeader: - name: kafka.PARTITION_KEY - simple: "${header[ce-partitionkey]}" - - to: - uri: "kafka:{{topic}}" - parameters: - brokers: "{{bootstrapServers}}" diff --git a/kamelets/kafka-not-secured-source.kamelet.yaml b/kamelets/kafka-not-secured-source.kamelet.yaml deleted file mode 100644 index 67b2a2749..000000000 --- a/kamelets/kafka-not-secured-source.kamelet.yaml +++ /dev/null @@ -1,105 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-not-secured-source - annotations: - camel.apache.org/kamelet.support.level: "Stable" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8ZyBpZD0iWE1MSURfMV8iP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xLDEwLjQsMjMuMSwyMy4xYzAsMTIuNy0xMC4zLDIzLjEtMjMuMSwyMy4xcy0yMy4xLTEwLjQtMjMuMS0yMy4xDQoJCUMyOTEuOCwxNjguOCwzMDIuMSwxNTguNCwzMTQuOCwxNTguNHogTTE3NiwxMTUuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMWMxMi43LDAsMjMuMSwxMC40LDIzLjEsMjMuMQ0KCQljMCwxMi43LTEwLjMsMjMuMS0yMy4xLDIzLjFDMTg2LjMsMTM4LjIsMTc2LDEyNy44LDE3NiwxMTUuMXogTTIyMi4xLDM4NC45YzAsMTIuNy0xMC4zLDIzLjEtMjMuMSwyMy4xDQoJCWMtMTIuNywwLTIzLjEtMTAuNC0yMy4xLTIzLjFjMC0xMi43LDEwLjMtMjMuMSwyMy4xLTIzLjFDMjExLjgsMzYxLjgsMjIyLjEsMzcyLjIsMjIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "source" -spec: - definition: - title: "Kafka Not Secured Source" - description: Receive data from Kafka topics on an insecure broker. - required: - - topic - - bootstrapServers - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs - type: string - autoCommitEnable: - title: Auto Commit Enable - description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer - type: boolean - default: true - allowManualCommit: - title: Allow Manual Commit - description: Whether to allow doing manual commits - type: boolean - default: false - pollOnError: - title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` - type: string - default: "ERROR_HANDLER" - autoOffsetReset: - title: Auto Offset Reset - description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none - type: string - default: "latest" - consumerGroup: - title: Consumer Group - description: A string that uniquely identifies the group of consumers to which this source belongs - type: string - example: "my-group-id" - deserializeHeaders: - title: Automatically Deserialize Headers - description: When enabled the Kamelet source will deserialize all message headers to String representation. - type: boolean - default: true - topicIsPattern: - title: Topic Is Pattern - description: Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. - type: boolean - default: false - dependencies: - - "camel:kafka" - - "camel:core" - - "camel:kamelet" - template: - beans: - - name: kafkaHeaderDeserializer - type: "#class:org.apache.camel.component.kafka.KafkaHeaderDeserializer" - properties: - enabled: '{{deserializeHeaders}}' - from: - uri: "kafka:{{topic}}" - parameters: - brokers: "{{bootstrapServers}}" - autoCommitEnable: "{{autoCommitEnable}}" - allowManualCommit: "{{allowManualCommit}}" - pollOnError: "{{pollOnError}}" - autoOffsetReset: "{{autoOffsetReset}}" - groupId: "{{?consumerGroup}}" - topicIsPattern: "{{topicIsPattern}}" - steps: - - process: - ref: "{{kafkaHeaderDeserializer}}" - - to: "kamelet:sink" diff --git a/kamelets/kafka-scram-sink.kamelet.yaml b/kamelets/kafka-scram-sink.kamelet.yaml deleted file mode 100644 index 6313ae20e..000000000 --- a/kamelets/kafka-scram-sink.kamelet.yaml +++ /dev/null @@ -1,110 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-scram-sink - annotations: - camel.apache.org/kamelet.support.level: "Preview" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8ZyBpZD0iWE1MSURfMV8iPg0KCTxwYXRoIGlkPSJYTUxJRF85XyIgZD0iTTMxNC44LDI2OS43Yy0xNC4yLDAtMjcsNi4zLTM1LjcsMTYuMkwyNTYuOCwyNzBjMi40LTYuNSwzLjct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uMSwxNTguNCwzMTQuOCwxNTguNHogTTE3NiwxMTUuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMWMxMi43LDAsMjMuMSwxMC40LDIzLjEsMjMuMQ0KCQljMCwxMi43LTEwLjMsMjMuMS0yMy4xLDIzLjFDMTg2LjMsMTM4LjIsMTc2LDEyNy44LDE3NiwxMTUuMXogTTIyMi4xLDM4NC45YzAsMTIuNy0xMC4zLDIzLjEtMjMuMSwyMy4xDQoJCWMtMTIuNywwLTIzLjEtMTAuNC0yMy4xLTIzLjFjMC0xMi43LDEwLjMtMjMuMSwyMy4xLTIzLjFDMjExLjgsMzYxLjgsMjIyLjEsMzcyLjIsMjIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "sink" -spec: - definition: - title: "Kafka Scram Sink" - description: Send data to Kafka topics through SCRAM login module. - required: - - topic - - bootstrapServers - - user - - password - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names. - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs. - type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported. - type: string - default: SASL_SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: SCRAM-SHA-512 - user: - title: Username - description: Username to authenticate to Kafka . - type: string - x-descriptors: - - urn:camel:group:credentials - password: - title: Password - description: Password to authenticate to kafka. - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - from: - uri: "kamelet:source" - steps: - - choice: - when: - - simple: "${header[key]}" - steps: - - setHeader: - name: kafka.KEY - simple: "${header[key]}" - - simple: "${header[ce-key]}" - steps: - - setHeader: - name: kafka.KEY - simple: "${header[ce-key]}" - - choice: - when: - - simple: "${header[partition-key]}" - steps: - - setHeader: - name: kafka.PARTITION_KEY - simple: "${header[partition-key]}" - - simple: "${header[ce-partitionkey]}" - steps: - - setHeader: - name: kafka.PARTITION_KEY - simple: "${header[ce-partitionkey]}" - - to: - uri: "kafka:{{topic}}" - parameters: - brokers: "{{bootstrapServers}}" - securityProtocol: "{{securityProtocol}}" - saslMechanism: "{{saslMechanism}}" - saslJaasConfig: 'org.apache.kafka.common.security.scram.ScramLoginModule required username="{{user}}" password="{{password}}";' diff --git a/kamelets/kafka-scram-source.kamelet.yaml b/kamelets/kafka-scram-source.kamelet.yaml deleted file mode 100644 index e417069ff..000000000 --- a/kamelets/kafka-scram-source.kamelet.yaml +++ /dev/null @@ -1,133 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-scram-source - annotations: - camel.apache.org/kamelet.support.level: "Preview" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8ZyBpZD0iWE1MSURfMV8iPg0KCTxwYXRoIGlkPSJYTUxJRF85XyIgZD0iTTMxNC44LDI2OS43Yy0xNC4yLDAtMjcsNi4zLTM1LjcsMTYuMkwyNTYuOCwyNzBjMi40LTYuNSwzLjctMTMuNiwzLjctMjAuOWMwLTcuMi0xLjMtMTQuMS0zLjYtMjAuNg0KCQlsMjIuMy0xNS43YzguNyw5LjksMjEuNCwxNi4xLDM1LjYsMTYuMWMyNi4yLDAsNDcuNi0yMS4zLDQ3LjYtNDcuNnMtMjEuMy00Ny42LTQ3LjYtNDcuNnMtNDcuNiwyMS4zLTQ3LjYsNDcuNg0KCQljMCw0LjcsMC43LDkuMiwyLDEzLjVsLTIyLjMsMTUuN2MtOS4zLTEx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tMTIuNywwLTIzLjEtMTAuNC0yMy4xLTIzLjFjMC0xMi43LDEwLjMtMjMuMSwyMy4xLTIzLjFDMjExLjgsMzYxLjgsMjIyLjEsMzcyLjIsMjIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "source" -spec: - definition: - title: "Kafka Scram Source" - description: Receive data from Kafka topics through SCRAM login module. - required: - - topic - - bootstrapServers - - user - - password - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs - type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported - type: string - default: SASL_SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: SCRAM-SHA-512 - user: - title: Username - description: Username to authenticate to Kafka - type: string - x-descriptors: - - urn:camel:group:credentials - password: - title: Password - description: Password to authenticate to kafka - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - autoCommitEnable: - title: Auto Commit Enable - description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer - type: boolean - default: true - allowManualCommit: - title: Allow Manual Commit - description: Whether to allow doing manual commits - type: boolean - default: false - pollOnError: - title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` - type: string - default: "ERROR_HANDLER" - autoOffsetReset: - title: Auto Offset Reset - description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none - type: string - default: "latest" - consumerGroup: - title: Consumer Group - description: A string that uniquely identifies the group of consumers to which this source belongs - type: string - example: "my-group-id" - deserializeHeaders: - title: Automatically Deserialize Headers - description: When enabled the Kamelet source will deserialize all message headers to String representation. - type: boolean - default: true - topicIsPattern: - title: Topic Is Pattern - description: Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. - type: boolean - default: false - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - beans: - - name: kafkaHeaderDeserializer - type: "#class:org.apache.camel.component.kafka.KafkaHeaderDeserializer" - properties: - enabled: '{{deserializeHeaders}}' - from: - uri: "kafka:{{topic}}" - parameters: - brokers: "{{?bootstrapServers}}" - securityProtocol: "{{securityProtocol}}" - saslMechanism: "{{saslMechanism}}" - saslJaasConfig: 'org.apache.kafka.common.security.scram.ScramLoginModule required username="{{user}}" password="{{password}}";' - autoCommitEnable: "{{autoCommitEnable}}" - allowManualCommit: "{{allowManualCommit}}" - pollOnError: "{{pollOnError}}" - autoOffsetReset: "{{autoOffsetReset}}" - groupId: "{{?consumerGroup}}" - topicIsPattern: "{{topicIsPattern}}" - steps: - - process: - ref: "{{kafkaHeaderDeserializer}}" - - to: "kamelet:sink" diff --git a/kamelets/kafka-sink.kamelet.yaml b/kamelets/kafka-sink.kamelet.yaml index 85df64e83..79fe101d3 100644 --- a/kamelets/kafka-sink.kamelet.yaml +++ b/kamelets/kafka-sink.kamelet.yaml @@ -30,12 +30,10 @@ metadata: spec: definition: title: "Kafka Sink" - description: Send data to Kafka topics through Plain Login Module. + description: Send data to Kafka topics. required: - topic - bootstrapServers - - user - - password type: object properties: topic: @@ -46,29 +44,71 @@ spec: title: Bootstrap Servers description: Comma separated list of Kafka Broker URLs type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported + saslAuthType: + title: Authentication Type + description: Authentication type to use. Use NONE for no authentication, PLAIN or SCRAM_SHA_256/SCRAM_SHA_512 for username/password, SSL for certificate-based, OAUTH for OAuth 2.0, AWS_MSK_IAM for MSK, or KERBEROS for Kerberos. type: string - default: SASL_SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: PLAIN - user: + default: NONE + enum: ["NONE", "PLAIN", "SCRAM_SHA_256", "SCRAM_SHA_512", "SSL", "OAUTH", "AWS_MSK_IAM", "KERBEROS"] + saslUsername: title: Username - description: Username to authenticate to Kafka + description: Username for SASL authentication. Required when saslAuthType is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. type: string x-descriptors: - - urn:camel:group:credentials - password: + - urn:camel:group:credentials + saslPassword: title: Password - description: Password to authenticate to kafka + description: Password for SASL authentication. Required when saslAuthType is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + oauthClientId: + title: OAuth Client ID + description: OAuth client ID. Required when saslAuthType is OAUTH. + type: string + oauthClientSecret: + title: OAuth Client Secret + description: OAuth client secret. Required when saslAuthType is OAUTH. type: string format: password x-descriptors: - - urn:camel:group:credentials + - urn:camel:group:credentials + oauthTokenEndpointUri: + title: OAuth Token Endpoint + description: OAuth token endpoint URI. Required when saslAuthType is OAUTH. + type: string + oauthScope: + title: OAuth Scope + description: OAuth scope. Optional when saslAuthType is OAUTH. + type: string + sslTruststoreLocation: + title: SSL Truststore Location + description: The location of the trust store file. + type: string + sslTruststorePassword: + title: SSL Truststore Password + description: The password for the trust store file. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + sslKeystoreLocation: + title: SSL Keystore Location + description: The location of the key store file. Used for mTLS authentication. + type: string + sslKeystorePassword: + title: SSL Keystore Password + description: The password for the key store file. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + sslKeyPassword: + title: SSL Key Password + description: The password of the private key in the key store file. + type: string + format: password dependencies: - "camel:core" - "camel:kafka" @@ -105,6 +145,15 @@ spec: uri: "kafka:{{topic}}" parameters: brokers: "{{bootstrapServers}}" - securityProtocol: "{{securityProtocol}}" - saslMechanism: "{{saslMechanism}}" - saslJaasConfig: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="{{user}}" password="{{password}}";' + saslAuthType: "{{saslAuthType}}" + saslUsername: "{{?saslUsername}}" + saslPassword: "{{?saslPassword}}" + oauthClientId: "{{?oauthClientId}}" + oauthClientSecret: "{{?oauthClientSecret}}" + oauthTokenEndpointUri: "{{?oauthTokenEndpointUri}}" + oauthScope: "{{?oauthScope}}" + sslTruststoreLocation: "{{?sslTruststoreLocation}}" + sslTruststorePassword: "{{?sslTruststorePassword}}" + sslKeystoreLocation: "{{?sslKeystoreLocation}}" + sslKeystorePassword: "{{?sslKeystorePassword}}" + sslKeyPassword: "{{?sslKeyPassword}}" diff --git a/kamelets/kafka-source.kamelet.yaml b/kamelets/kafka-source.kamelet.yaml index fea4188db..5d10a9990 100644 --- a/kamelets/kafka-source.kamelet.yaml +++ b/kamelets/kafka-source.kamelet.yaml @@ -30,12 +30,10 @@ metadata: spec: definition: title: "Kafka Source" - description: Receive data from Kafka topics through Plain Login Module. + description: Receive data from Kafka topics. required: - topic - bootstrapServers - - user - - password type: object properties: topic: @@ -46,29 +44,71 @@ spec: title: Bootstrap Servers description: Comma separated list of Kafka Broker URLs type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported + saslAuthType: + title: Authentication Type + description: Authentication type to use. Use NONE for no authentication, PLAIN or SCRAM_SHA_256/SCRAM_SHA_512 for username/password, SSL for certificate-based, OAUTH for OAuth 2.0, AWS_MSK_IAM for MSK, or KERBEROS for Kerberos. type: string - default: SASL_SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: PLAIN - user: + default: NONE + enum: ["NONE", "PLAIN", "SCRAM_SHA_256", "SCRAM_SHA_512", "SSL", "OAUTH", "AWS_MSK_IAM", "KERBEROS"] + saslUsername: title: Username - description: Username to authenticate to Kafka + description: Username for SASL authentication. Required when saslAuthType is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. type: string x-descriptors: - - urn:camel:group:credentials - password: + - urn:camel:group:credentials + saslPassword: title: Password - description: Password to authenticate to kafka + description: Password for SASL authentication. Required when saslAuthType is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + oauthClientId: + title: OAuth Client ID + description: OAuth client ID. Required when saslAuthType is OAUTH. + type: string + oauthClientSecret: + title: OAuth Client Secret + description: OAuth client secret. Required when saslAuthType is OAUTH. type: string format: password x-descriptors: - - urn:camel:group:credentials + - urn:camel:group:credentials + oauthTokenEndpointUri: + title: OAuth Token Endpoint + description: OAuth token endpoint URI. Required when saslAuthType is OAUTH. + type: string + oauthScope: + title: OAuth Scope + description: OAuth scope. Optional when saslAuthType is OAUTH. + type: string + sslTruststoreLocation: + title: SSL Truststore Location + description: The location of the trust store file. + type: string + sslTruststorePassword: + title: SSL Truststore Password + description: The password for the trust store file. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + sslKeystoreLocation: + title: SSL Keystore Location + description: The location of the key store file. Used for mTLS authentication. + type: string + sslKeystorePassword: + title: SSL Keystore Password + description: The password for the key store file. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + sslKeyPassword: + title: SSL Key Password + description: The password of the private key in the key store file. + type: string + format: password autoCommitEnable: title: Auto Commit Enable description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer @@ -81,7 +121,7 @@ spec: default: false pollOnError: title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` + description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of DISCARD, ERROR_HANDLER, RECONNECT, RETRY, STOP type: string default: "ERROR_HANDLER" autoOffsetReset: @@ -117,10 +157,19 @@ spec: from: uri: "kafka:{{topic}}" parameters: - brokers: "{{?bootstrapServers}}" - securityProtocol: "{{securityProtocol}}" - saslMechanism: "{{saslMechanism}}" - saslJaasConfig: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="{{user}}" password="{{password}}";' + brokers: "{{bootstrapServers}}" + saslAuthType: "{{saslAuthType}}" + saslUsername: "{{?saslUsername}}" + saslPassword: "{{?saslPassword}}" + oauthClientId: "{{?oauthClientId}}" + oauthClientSecret: "{{?oauthClientSecret}}" + oauthTokenEndpointUri: "{{?oauthTokenEndpointUri}}" + oauthScope: "{{?oauthScope}}" + sslTruststoreLocation: "{{?sslTruststoreLocation}}" + sslTruststorePassword: "{{?sslTruststorePassword}}" + sslKeystoreLocation: "{{?sslKeystoreLocation}}" + sslKeystorePassword: "{{?sslKeystorePassword}}" + sslKeyPassword: "{{?sslKeyPassword}}" autoCommitEnable: "{{autoCommitEnable}}" allowManualCommit: "{{allowManualCommit}}" pollOnError: "{{pollOnError}}" diff --git a/kamelets/kafka-ssl-sink.kamelet.yaml b/kamelets/kafka-ssl-sink.kamelet.yaml deleted file mode 100644 index 003e10d69..000000000 --- a/kamelets/kafka-ssl-sink.kamelet.yaml +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-ssl-sink - annotations: - camel.apache.org/kamelet.support.level: "Stable" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8ZyBpZD0iWE1MSURfMV8iPg0KCTxwYXRoIGlkPSJYTUxJRF85XyIgZD0iTTMxNC44LDI2OS43Yy0xNC4yLDAtMjcsNi4zLTM1LjcsMTYuMkwyNTYuOCwyNzBjMi40LTYuNSwzLjctMTMuNiwzLjctMjAuOWMwLTcuMi0xLjMtMTQuMS0zLjYtMjAuNg0KCQlsMjIuMy0xNS43YzguNyw5LjksMjEuNCwxNi4xLDM1LjYsMTYuMWMyNi4yLDAsNDcuNi0yMS4zLDQ3L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sMjMuMS0yMy4xLDIzLjFDMTg2LjMsMTM4LjIsMTc2LDEyNy44LDE3NiwxMTUuMXogTTIyMi4xLDM4NC45YzAsMTIuNy0xMC4zLDIzLjEtMjMuMSwyMy4xDQoJCWMtMTIuNywwLTIzLjEtMTAuNC0yMy4xLTIzLjFjMC0xMi43LDEwLjMtMjMuMSwyMy4xLTIzLjFDMjExLjgsMzYxLjgsMjIyLjEsMzcyLjIsMjIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "sink" -spec: - definition: - description: Send data to Kafka topics wit TLS/SSL support. - required: - - topic - - bootstrapServers - - sslKeystoreLocation - - sslKeystorePassword - - sslTruststoreLocation - - sslTruststorePassword - - sslKeyPassword - properties: - bootstrapServers: - description: Comma separated list of Kafka Broker URLs - title: Brokers - type: string - sslKeystoreLocation: - description: >- - The location of the key store file. This is optional for client and - can be used for two-way authentication for client. - title: SSL Keystore Location - type: string - sslProtocol: - default: TLSv1.2 - description: >- - The SSL protocol used to generate the SSLContext. Default setting is - TLS, which is fine for most cases. Allowed values in recent JVMs are - TLS, TLSv1.1 and TLSv1.2. SSL, SSLv2 and SSLv3 may be supported in - older JVMs, but their usage is discouraged due to known security - vulnerabilities. - title: SSL Protocol - type: string - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: GSSAPI - sslEnabledProtocols: - default: TLSv1.2,TLSv1.1,TLSv1 - description: >- - The list of protocols enabled for SSL connections. TLSv1.2, TLSv1.1 - and TLSv1 are enabled by default. - title: SSL Enabled Protocols - type: string - sslKeystorePassword: - description: >- - The store password for the key store file.This is optional for client - and only needed if ssl.keystore.location is configured. - title: SSL Keystore Password - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - sslTruststoreLocation: - description: The location of the trust store file. - title: SSL Truststore Location - type: string - sslTruststorePassword: - description: The store password for the trust store file. - title: SSL Truststore Password - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - sslKeyPassword: - description: The password of the private key in the key store file. - title: SSL Key Password - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - sslEndpointAlgorithm: - description: The endpoint identification algorithm to validate server hostname using server certificate. Use none or false to disable server hostname verification. - title: SSL Endpoint Algorithm - type: string - default: https - topic: - description: Comma separated list of Kafka topic names - title: Topic Names - type: string - securityProtocol: - default: SSL - description: >- - Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, - SASL_SSL and SSL are supported - title: Security Protocol - type: string - title: Kafka SSL Sink - type: object - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - beans: - - name: kafka-ssl-sink-local - type: '#class:org.apache.camel.component.kafka.KafkaComponent' - - name: kafka-ssl-sink-configuration-local - properties: - brokers: '{{bootstrapServers}}' - securityProtocol: '{{securityProtocol}}' - sslKeystoreLocation: '{{sslKeystoreLocation}}' - sslKeyPassword: '{{sslKeyPassword}}' - sslKeystorePassword: '{{sslKeystorePassword}}' - sslTruststoreLocation: '{{sslTruststoreLocation}}' - sslTruststorePassword: '{{sslTruststorePassword}}' - sslProtocol: '{{sslProtocol}}' - sslEnabledProtocols: '{{sslEnabledProtocols}}' - sslEndpointAlgorithm: '{{sslEndpointAlgorithm}}' - saslMechanism: '{{saslMechanism}}' - type: '#class:org.apache.camel.component.kafka.KafkaConfiguration' - from: - uri: "kamelet:source" - steps: - - choice: - when: - - simple: ${header[key]} - steps: - - setHeader: - name: kafka.KEY - simple: ${header[key]} - - simple: ${header[ce-key]} - steps: - - setHeader: - name: kafka.KEY - simple: ${header[ce-key]} - - choice: - when: - - simple: ${header[partition-key]} - steps: - - setHeader: - name: kafka.PARTITION_KEY - simple: ${header[partition-key]} - - simple: ${header[ce-partitionkey]} - steps: - - setHeader: - name: kafka.PARTITION_KEY - simple: ${header[ce-partitionkey]} - - to: - uri: '{{kafka-ssl-sink-local}}:{{topic}}' - parameters: - configuration: '#bean:{{kafka-ssl-sink-configuration-local}}' diff --git a/kamelets/kafka-ssl-source.kamelet.yaml b/kamelets/kafka-ssl-source.kamelet.yaml deleted file mode 100644 index 8be42b234..000000000 --- a/kamelets/kafka-ssl-source.kamelet.yaml +++ /dev/null @@ -1,181 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-ssl-source - annotations: - camel.apache.org/kamelet.support.level: "Stable" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZ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zMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "source" -spec: - definition: - title: "Kafka SSL Source" - description: Receive data from Kafka topics with SSL/TLS support - required: - - topic - - bootstrapServers - - sslTruststoreLocation - - sslTruststorePassword - - sslKeyPassword - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names. - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs. - type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. `SASL_PLAINTEXT`, `PLAINTEXT`, `SASL_SSL` and `SSL` are supported. - type: string - default: SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: GSSAPI - autoCommitEnable: - title: Auto Commit Enable - description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer. - type: boolean - default: true - allowManualCommit: - title: Allow Manual Commit - description: Whether to allow doing manual commits. - type: boolean - default: false - pollOnError: - title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP`. - type: string - default: "ERROR_HANDLER" - autoOffsetReset: - title: Auto Offset Reset - description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none. - type: string - default: "latest" - consumerGroup: - title: Consumer Group - description: A string that uniquely identifies the group of consumers to which this source belongs. - type: string - example: "my-group-id" - deserializeHeaders: - title: Automatically Deserialize Headers - description: When enabled the Kamelet source will deserialize all message headers to String representation. - type: boolean - default: true - sslKeyPassword: - description: The password of the private key in the key store file. - title: SSL Key Password - type: string - format: password - sslKeystorePassword: - description: The store password for the key store file.This is optional for client and only needed if ssl.keystore.location is configured. - title: SSL Keystore Password - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - sslEndpointAlgorithm: - description: The endpoint identification algorithm to validate server hostname using server certificate. Use none or false to disable server hostname verification. - title: SSL Endpoint Algorithm - type: string - default: https - sslProtocol: - description: The SSL protocol used to generate the SSLContext. Default setting is TLS, which is fine for most cases. Allowed values in recent JVMs are TLS, TLSv1.1 and TLSv1.2. SSL, SSLv2 and SSLv3 may be supported in older JVMs, but their usage is discouraged due to known security vulnerabilities. - title: SSL Protocol - type: string - default: TLSv1.2 - sslKeystoreLocation: - description: The location of the key store file. This is optional for client and can be used for two-way authentication for client. - title: SSL Keystore Location - type: string - sslTruststoreLocation: - description: The location of the trust store file. - title: SSL Truststore Location - type: string - sslTruststorePassword: - description: The store password for the trust store file. - title: SSL Truststore Password - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - sslEnabledProtocols: - description: The list of protocols enabled for SSL connections. TLSv1.2, TLSv1.1 and TLSv1 are enabled by default. - title: SSL Enabled Protocols - type: string - default: TLSv1.2,TLSv1.1,TLSv1 - saslJaasConfig: - description: Java Authentication and Authorization Service (JAAS) for Simple Authentication and Security Layer (SASL) configuration. - title: JAAS Configuration - type: string - topicIsPattern: - title: Topic Is Pattern - description: Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. - type: boolean - default: false - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - beans: - - name: kafka-ssl-source-local - type: '#class:org.apache.camel.component.kafka.KafkaComponent' - - name: kafka-ssl-source-configuration-local - properties: - brokers: '{{bootstrapServers}}' - securityProtocol: '{{securityProtocol}}' - sslKeystoreLocation: '{{sslKeystoreLocation}}' - sslKeyPassword: '{{sslKeyPassword}}' - sslKeystorePassword: '{{sslKeystorePassword}}' - sslTruststoreLocation: '{{sslTruststoreLocation}}' - sslTruststorePassword: '{{sslTruststorePassword}}' - sslProtocol: '{{sslProtocol}}' - sslEnabledProtocols: '{{sslEnabledProtocols}}' - sslEndpointAlgorithm: '{{sslEndpointAlgorithm}}' - saslMechanism: '{{saslMechanism}}' - groupId: '{{?consumerGroup}}' - autoOffsetReset: '{{autoOffsetReset}}' - pollOnError: '{{pollOnError}}' - allowManualCommit: '{{allowManualCommit}}' - autoCommitEnable: '{{autoCommitEnable}}' - saslJaasConfig: '{{?saslJaasConfig}}' - topicIsPattern: '{{topicIsPattern}}' - type: '#class:org.apache.camel.component.kafka.KafkaConfiguration' - - name: kafkaHeaderDeserializer - type: "#class:org.apache.camel.component.kafka.KafkaHeaderDeserializer" - properties: - enabled: '{{deserializeHeaders}}' - from: - uri: "{{kafka-ssl-source-local}}:{{topic}}" - parameters: - configuration: '#bean:{{kafka-ssl-source-configuration-local}}' - steps: - - process: - ref: "{{kafkaHeaderDeserializer}}" - - to: "kamelet:sink" diff --git a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java index b706f9121..5c2afd295 100644 --- a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java +++ b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java @@ -215,10 +215,6 @@ void testSupportedHeaders() throws Exception { verifyHeaders("jms-ibm-mq-sink", 18); verifyHeaders("kafka-source", 9); verifyHeaders("kafka-sink", 5); - verifyHeaders("kafka-ssl-source", 9); - verifyHeaders("kafka-ssl-sink", 5); - verifyHeaders("kafka-not-secured-source", 9); - verifyHeaders("kafka-not-secured-sink", 5); verifyHeaders("kubernetes-namespaces-source", 2); verifyHeaders("kubernetes-nodes-source", 2); verifyHeaders("kubernetes-pods-source", 2); diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-not-secured-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-not-secured-source.kamelet.yaml deleted file mode 100644 index f2f9c554f..000000000 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-not-secured-source.kamelet.yaml +++ /dev/null @@ -1,131 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-batch-not-secured-source - annotations: - camel.apache.org/kamelet.support.level: "Stable" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1M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kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "source" -spec: - definition: - title: "Kafka Batch Not Secured Source" - description: Receive data from Kafka topics in batch on an insecure broker and commit them manually through KafkaManualCommit. - required: - - topic - - bootstrapServers - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs - type: string - autoCommitEnable: - title: Auto Commit Enable - description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer - type: boolean - default: true - allowManualCommit: - title: Allow Manual Commit - description: Whether to allow doing manual commits - type: boolean - default: false - pollOnError: - title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` - type: string - default: "ERROR_HANDLER" - autoOffsetReset: - title: Auto Offset Reset - description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none - type: string - default: "latest" - consumerGroup: - title: Consumer Group - description: A string that uniquely identifies the group of consumers to which this source belongs - type: string - example: "my-group-id" - deserializeHeaders: - title: Automatically Deserialize Headers - description: When enabled the Kamelet source will deserialize all message headers to String representation. - type: boolean - default: true - batchSize: - title: Batch Dimension - description: The maximum number of records returned in a single call to poll() - type: integer - default: 500 - pollTimeout: - title: Poll Timeout Interval - description: The timeout used when polling the KafkaConsumer - type: integer - default: 5000 - maxPollIntervalMs: - title: Max Poll Interval - description: The maximum delay between invocations of poll() when using consumer group management - type: integer - batchingIntervalMs: - title: Batching Interval - description: In consumer batching mode, then this option is specifying a time in millis, to trigger batch completion eager when the current batch size has not reached the maximum size defined by maxPollRecords. Notice the trigger is not exact at the given interval, as this can only happen between kafka polls (see pollTimeoutMs option). - type: integer - topicIsPattern: - title: Topic Is Pattern - description: Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. - type: boolean - default: false - dependencies: - - "camel:kafka" - - "camel:core" - - "camel:kamelet" - template: - beans: - - name: kafkaHeaderDeserializer - type: "#class:org.apache.camel.component.kafka.KafkaHeaderDeserializer" - properties: - enabled: '{{deserializeHeaders}}' - - name: manualCommitFactory - type: "#class:org.apache.camel.component.kafka.consumer.DefaultKafkaManualCommitFactory" - from: - uri: "kafka:{{topic}}" - parameters: - brokers: "{{bootstrapServers}}" - autoCommitEnable: "{{autoCommitEnable}}" - allowManualCommit: "{{allowManualCommit}}" - pollOnError: "{{pollOnError}}" - autoOffsetReset: "{{autoOffsetReset}}" - groupId: "{{?consumerGroup}}" - maxPollRecords: "{{batchSize}}" - pollTimeoutMs: "{{pollTimeout}}" - maxPollIntervalMs: "{{?maxPollIntervalMs}}" - batchingIntervalMs: "{{?batchingIntervalMs}}" - batching: true - kafkaManualCommitFactory: "#bean:{{manualCommitFactory}}" - topicIsPattern: "{{topicIsPattern}}" - steps: - - process: - ref: "{{kafkaHeaderDeserializer}}" - - to: "kamelet:sink" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-scram-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-scram-source.kamelet.yaml deleted file mode 100644 index 23c19172b..000000000 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-scram-source.kamelet.yaml +++ /dev/null @@ -1,159 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-batch-scram-source - annotations: - camel.apache.org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jIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "source" -spec: - definition: - title: "Kafka Batch Scram Source" - description: Receive data from Kafka topics in batch through SCRAM login module and commit them manually through KafkaManualCommit. This provides complete control over when messages are committed, allowing for custom processing logic before acknowledgment. - required: - - topic - - bootstrapServers - - user - - password - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs - type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported - type: string - default: SASL_SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: SCRAM-SHA-512 - user: - title: Username - description: Username to authenticate to Kafka - type: string - x-descriptors: - - urn:camel:group:credentials - password: - title: Password - description: Password to authenticate to kafka - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - autoCommitEnable: - title: Auto Commit Enable - description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer - type: boolean - default: true - allowManualCommit: - title: Allow Manual Commit - description: Whether to allow doing manual commits - type: boolean - default: false - pollOnError: - title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` - type: string - default: "ERROR_HANDLER" - autoOffsetReset: - title: Auto Offset Reset - description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none - type: string - default: "latest" - consumerGroup: - title: Consumer Group - description: A string that uniquely identifies the group of consumers to which this source belongs - type: string - example: "my-group-id" - deserializeHeaders: - title: Automatically Deserialize Headers - description: When enabled the Kamelet source will deserialize all message headers to String representation. - type: boolean - default: true - batchSize: - title: Batch Dimension - description: The maximum number of records returned in a single call to poll() - type: integer - default: 500 - pollTimeout: - title: Poll Timeout Interval - description: The timeout used when polling the KafkaConsumer - type: integer - default: 5000 - maxPollIntervalMs: - title: Max Poll Interval - description: The maximum delay between invocations of poll() when using consumer group management - type: integer - batchingIntervalMs: - title: Batching Interval - description: In consumer batching mode, then this option is specifying a time in millis, to trigger batch completion eager when the current batch size has not reached the maximum size defined by maxPollRecords. Notice the trigger is not exact at the given interval, as this can only happen between kafka polls (see pollTimeoutMs option). - type: integer - topicIsPattern: - title: Topic Is Pattern - description: Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. - type: boolean - default: false - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - beans: - - name: kafkaHeaderDeserializer - type: "#class:org.apache.camel.component.kafka.KafkaHeaderDeserializer" - properties: - enabled: '{{deserializeHeaders}}' - - name: manualCommitFactory - type: "#class:org.apache.camel.component.kafka.consumer.DefaultKafkaManualCommitFactory" - from: - uri: "kafka:{{topic}}" - parameters: - brokers: "{{?bootstrapServers}}" - securityProtocol: "{{securityProtocol}}" - saslMechanism: "{{saslMechanism}}" - saslJaasConfig: 'org.apache.kafka.common.security.scram.ScramLoginModule required username="{{user}}" password="{{password}}";' - autoCommitEnable: "{{autoCommitEnable}}" - allowManualCommit: "{{allowManualCommit}}" - pollOnError: "{{pollOnError}}" - autoOffsetReset: "{{autoOffsetReset}}" - groupId: "{{?consumerGroup}}" - maxPollRecords: "{{batchSize}}" - pollTimeoutMs: "{{pollTimeout}}" - maxPollIntervalMs: "{{?maxPollIntervalMs}}" - batchingIntervalMs: "{{?batchingIntervalMs}}" - batching: true - kafkaManualCommitFactory: "#bean:{{manualCommitFactory}}" - topicIsPattern: "{{topicIsPattern}}" - steps: - - process: - ref: "{{kafkaHeaderDeserializer}}" - - to: "kamelet:sink" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-source.kamelet.yaml index 255ae68f9..7c0b3ad54 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-source.kamelet.yaml @@ -30,12 +30,10 @@ metadata: spec: definition: title: "Kafka Batch Source" - description: Receive data from Kafka topics in batch through Plain Login Module and commit them manually through KafkaManualCommit. This provides complete control over when messages are committed, allowing for custom processing logic before acknowledgment. + description: Receive data from Kafka topics in batch and commit them manually through KafkaManualCommit. This provides complete control over when messages are committed, allowing for custom processing logic before acknowledgment. required: - topic - bootstrapServers - - user - - password type: object properties: topic: @@ -46,29 +44,71 @@ spec: title: Bootstrap Servers description: Comma separated list of Kafka Broker URLs type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported + saslAuthType: + title: Authentication Type + description: Authentication type to use. Use NONE for no authentication, PLAIN or SCRAM_SHA_256/SCRAM_SHA_512 for username/password, SSL for certificate-based, OAUTH for OAuth 2.0, AWS_MSK_IAM for MSK, or KERBEROS for Kerberos. type: string - default: SASL_SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: PLAIN - user: + default: NONE + enum: ["NONE", "PLAIN", "SCRAM_SHA_256", "SCRAM_SHA_512", "SSL", "OAUTH", "AWS_MSK_IAM", "KERBEROS"] + saslUsername: title: Username - description: Username to authenticate to Kafka + description: Username for SASL authentication. Required when saslAuthType is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. type: string x-descriptors: - - urn:camel:group:credentials - password: + - urn:camel:group:credentials + saslPassword: title: Password - description: Password to authenticate to kafka + description: Password for SASL authentication. Required when saslAuthType is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + oauthClientId: + title: OAuth Client ID + description: OAuth client ID. Required when saslAuthType is OAUTH. + type: string + oauthClientSecret: + title: OAuth Client Secret + description: OAuth client secret. Required when saslAuthType is OAUTH. type: string format: password x-descriptors: - - urn:camel:group:credentials + - urn:camel:group:credentials + oauthTokenEndpointUri: + title: OAuth Token Endpoint + description: OAuth token endpoint URI. Required when saslAuthType is OAUTH. + type: string + oauthScope: + title: OAuth Scope + description: OAuth scope. Optional when saslAuthType is OAUTH. + type: string + sslTruststoreLocation: + title: SSL Truststore Location + description: The location of the trust store file. + type: string + sslTruststorePassword: + title: SSL Truststore Password + description: The password for the trust store file. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + sslKeystoreLocation: + title: SSL Keystore Location + description: The location of the key store file. Used for mTLS authentication. + type: string + sslKeystorePassword: + title: SSL Keystore Password + description: The password for the key store file. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + sslKeyPassword: + title: SSL Key Password + description: The password of the private key in the key store file. + type: string + format: password autoCommitEnable: title: Auto Commit Enable description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer @@ -81,7 +121,7 @@ spec: default: false pollOnError: title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` + description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of DISCARD, ERROR_HANDLER, RECONNECT, RETRY, STOP type: string default: "ERROR_HANDLER" autoOffsetReset: @@ -137,10 +177,19 @@ spec: from: uri: "kafka:{{topic}}" parameters: - brokers: "{{?bootstrapServers}}" - securityProtocol: "{{securityProtocol}}" - saslMechanism: "{{saslMechanism}}" - saslJaasConfig: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="{{user}}" password="{{password}}";' + brokers: "{{bootstrapServers}}" + saslAuthType: "{{saslAuthType}}" + saslUsername: "{{?saslUsername}}" + saslPassword: "{{?saslPassword}}" + oauthClientId: "{{?oauthClientId}}" + oauthClientSecret: "{{?oauthClientSecret}}" + oauthTokenEndpointUri: "{{?oauthTokenEndpointUri}}" + oauthScope: "{{?oauthScope}}" + sslTruststoreLocation: "{{?sslTruststoreLocation}}" + sslTruststorePassword: "{{?sslTruststorePassword}}" + sslKeystoreLocation: "{{?sslKeystoreLocation}}" + sslKeystorePassword: "{{?sslKeystorePassword}}" + sslKeyPassword: "{{?sslKeyPassword}}" autoCommitEnable: "{{autoCommitEnable}}" allowManualCommit: "{{allowManualCommit}}" pollOnError: "{{pollOnError}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-ssl-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-ssl-source.kamelet.yaml deleted file mode 100644 index bd5d47ba5..000000000 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-ssl-source.kamelet.yaml +++ /dev/null @@ -1,198 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-batch-ssl-source - annotations: - camel.apache.org/kamelet.support.level: "Stable" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8ZyBpZD0iWE1MSURfMV8iPg0KCTxwYXRoIGlkPSJYTUxJRF85XyIgZD0iTTMxNC44LDI2OS43Yy0xNC4yLDAtMjcsNi4zLTM1LjcsMTYuMkwyNTYuOCwyNzBjMi40LTYuNSwzLjctMTMuNiwzLjctMjAuOWMwLTcuMi0xLjMtMTQuMS0zLjYtMjAuNg0KCQlsMjIuMy0xNS43YzguNyw5LjksMjEuNCwxNi4xLDM1LjYsMTYuMWMyNi4yLDAsNDcuNi0yMS4zLDQ3LjYtNDcuNnMtMjEuMy00Ny42LTQ3LjYtNDcuNnMtNDcuNiwyMS4zLTQ3LjYsNDcuNg0KCQljMCw0LjcsMC43LDkuMiwyLDEzLjVsLTIyLjMsMTUuN2MtOS4zLTExLjYtMjIuOC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IzLjEtMTAuNC0yMy4xLTIzLjFjMC0xMi43LDEwLjMtMjMuMSwyMy4xLTIzLjFDMjExLjgsMzYxLjgsMjIyLjEsMzcyLjIsMjIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "source" -spec: - definition: - title: "Kafka Batch SSL Source" - description: Receive data from Kafka topics in batch with SSL/TLS support and commit them manually through KafkaManualCommit or automatically. - required: - - topic - - bootstrapServers - - sslTruststoreLocation - - sslKeyPassword - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs - type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported - type: string - default: SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: GSSAPI - autoCommitEnable: - title: Auto Commit Enable - description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer - type: boolean - default: true - allowManualCommit: - title: Allow Manual Commit - description: Whether to allow doing manual commits - type: boolean - default: false - pollOnError: - title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` - type: string - default: "ERROR_HANDLER" - autoOffsetReset: - title: Auto Offset Reset - description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none - type: string - default: "latest" - consumerGroup: - title: Consumer Group - description: A string that uniquely identifies the group of consumers to which this source belongs - type: string - example: "my-group-id" - deserializeHeaders: - title: Automatically Deserialize Headers - description: When enabled the Kamelet source will deserialize all message headers to String representation. - type: boolean - default: true - sslKeyPassword: - description: The password of the private key in the key store file. - title: SSL Key Password - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - sslKeystorePassword: - description: The store password for the key store file.This is optional for client and only needed if ssl.keystore.location is configured. - title: SSL Keystore Password - type: string - format: password - sslEndpointAlgorithm: - description: The endpoint identification algorithm to validate server hostname using server certificate. Use none or false to disable server hostname verification. - title: SSL Endpoint Algorithm - type: string - default: https - sslProtocol: - description: The SSL protocol used to generate the SSLContext. Default setting is TLS, which is fine for most cases. Allowed values in recent JVMs are TLS, TLSv1.1 and TLSv1.2. SSL, SSLv2 and SSLv3 may be supported in older JVMs, but their usage is discouraged due to known security vulnerabilities. - title: SSL Protocol - type: string - default: TLSv1.2 - sslKeystoreLocation: - description: The location of the key store file. This is optional for client and can be used for two-way authentication for client. - title: SSL Keystore Location - type: string - sslTruststoreLocation: - description: The location of the trust store file. - title: SSL Truststore Location - type: string - sslEnabledProtocols: - description: The list of protocols enabled for SSL connections. TLSv1.2, TLSv1.1 and TLSv1 are enabled by default. - title: SSL Enabled Protocols - type: string - default: TLSv1.2,TLSv1.1,TLSv1 - saslJaasConfig: - description: Java Authentication and Authorization Service (JAAS) for Simple Authentication and Security Layer (SASL) configuration. - title: JAAS Configuration - type: string - batchSize: - title: Batch Dimension - description: The maximum number of records returned in a single call to poll() - type: integer - default: 500 - pollTimeout: - title: Poll Timeout Interval - description: The timeout used when polling the KafkaConsumer - type: integer - default: 5000 - maxPollIntervalMs: - title: Max Poll Interval - description: The maximum delay between invocations of poll() when using consumer group management - type: integer - batchingIntervalMs: - title: Batching Interval - description: In consumer batching mode, then this option is specifying a time in millis, to trigger batch completion eager when the current batch size has not reached the maximum size defined by maxPollRecords. Notice the trigger is not exact at the given interval, as this can only happen between kafka polls (see pollTimeoutMs option). - type: integer - topicIsPattern: - title: Topic Is Pattern - description: Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. - type: boolean - default: false - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - beans: - - name: kafka-ssl-source-local - type: '#class:org.apache.camel.component.kafka.KafkaComponent' - - name: manualCommitFactory - type: "#class:org.apache.camel.component.kafka.consumer.DefaultKafkaManualCommitFactory" - - name: kafka-ssl-source-configuration-local - properties: - brokers: '{{bootstrapServers}}' - securityProtocol: '{{securityProtocol}}' - sslKeystoreLocation: '{{sslKeystoreLocation}}' - sslKeyPassword: '{{sslKeyPassword}}' - sslKeystorePassword: '{{sslKeystorePassword}}' - sslTruststoreLocation: '{{sslTruststoreLocation}}' - sslProtocol: '{{sslProtocol}}' - sslEnabledProtocols: '{{sslEnabledProtocols}}' - sslEndpointAlgorithm: '{{sslEndpointAlgorithm}}' - saslMechanism: '{{saslMechanism}}' - groupId: '{{?consumerGroup}}' - autoOffsetReset: '{{autoOffsetReset}}' - pollOnError: '{{pollOnError}}' - allowManualCommit: '{{allowManualCommit}}' - autoCommitEnable: '{{autoCommitEnable}}' - saslJaasConfig: '{{?saslJaasConfig}}' - maxPollRecords: "{{batchSize}}" - pollTimeoutMs: "{{pollTimeout}}" - maxPollIntervalMs: "{{?maxPollIntervalMs}}" - batchingIntervalMs: "{{?batchingIntervalMs}}" - batching: true - kafkaManualCommitFactory: "#bean:{{manualCommitFactory}}" - topicIsPattern: "{{topicIsPattern}}" - type: '#class:org.apache.camel.component.kafka.KafkaConfiguration' - - name: kafkaHeaderDeserializer - type: "#class:org.apache.camel.component.kafka.KafkaHeaderDeserializer" - properties: - enabled: '{{deserializeHeaders}}' - from: - uri: "{{kafka-ssl-source-local}}:{{topic}}" - parameters: - configuration: '#bean:{{kafka-ssl-source-configuration-local}}' - steps: - - process: - ref: "{{kafkaHeaderDeserializer}}" - - to: "kamelet:sink" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-sink.kamelet.yaml deleted file mode 100644 index 33b638c66..000000000 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-sink.kamelet.yaml +++ /dev/null @@ -1,82 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-not-secured-sink - annotations: - camel.apache.org/kamelet.support.level: "Stable" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3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DMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "sink" -spec: - definition: - title: "Kafka Not Secured Sink" - description: Send data to Kafka topics on an insecure broker. - required: - - topic - - bootstrapServers - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs - type: string - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - from: - uri: "kamelet:source" - steps: - - choice: - when: - - simple: "${header[key]}" - steps: - - setHeader: - name: kafka.KEY - simple: "${header[key]}" - - simple: "${header[ce-key]}" - steps: - - setHeader: - name: kafka.KEY - simple: "${header[ce-key]}" - - choice: - when: - - simple: "${header[partition-key]}" - steps: - - setHeader: - name: kafka.PARTITION_KEY - simple: "${header[partition-key]}" - - simple: "${header[ce-partitionkey]}" - steps: - - setHeader: - name: kafka.PARTITION_KEY - simple: "${header[ce-partitionkey]}" - - to: - uri: "kafka:{{topic}}" - parameters: - brokers: "{{bootstrapServers}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-source.kamelet.yaml deleted file mode 100644 index 67b2a2749..000000000 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-source.kamelet.yaml +++ /dev/null @@ -1,105 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-not-secured-source - annotations: - camel.apache.org/kamelet.support.level: "Stable" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8ZyBpZD0iWE1MSURfMV8iPg0KCTxwYXRoIGlkPSJYTUxJRF85XyIgZD0iTTMxNC44LDI2OS43Yy0xNC4yLDAtMjcsNi4zLTM1LjcsMTYuMkwyNTYuOCwyNzBjMi40LTYuNSwzLjctMTMuNiwzLjctMjAuOWMwLTcuMi0xLjMtMTQuMS0zLjYtMjAuNg0KCQlsMjIuMy0xNS43YzguNyw5LjksMjEuNCwxNi4xLDM1LjYsMTYuMWMyNi4yLDAsNDcuNi0yMS4zLDQ3LjYtNDcuNnMtMjEuMy00Ny42LTQ3LjYtNDcuNnMtNDcuNiwyMS4zLTQ3LjYsNDcu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TIyMi4xLDM4NC45YzAsMTIuNy0xMC4zLDIzLjEtMjMuMSwyMy4xDQoJCWMtMTIuNywwLTIzLjEtMTAuNC0yMy4xLTIzLjFjMC0xMi43LDEwLjMtMjMuMSwyMy4xLTIzLjFDMjExLjgsMzYxLjgsMjIyLjEsMzcyLjIsMjIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "source" -spec: - definition: - title: "Kafka Not Secured Source" - description: Receive data from Kafka topics on an insecure broker. - required: - - topic - - bootstrapServers - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs - type: string - autoCommitEnable: - title: Auto Commit Enable - description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer - type: boolean - default: true - allowManualCommit: - title: Allow Manual Commit - description: Whether to allow doing manual commits - type: boolean - default: false - pollOnError: - title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` - type: string - default: "ERROR_HANDLER" - autoOffsetReset: - title: Auto Offset Reset - description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none - type: string - default: "latest" - consumerGroup: - title: Consumer Group - description: A string that uniquely identifies the group of consumers to which this source belongs - type: string - example: "my-group-id" - deserializeHeaders: - title: Automatically Deserialize Headers - description: When enabled the Kamelet source will deserialize all message headers to String representation. - type: boolean - default: true - topicIsPattern: - title: Topic Is Pattern - description: Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. - type: boolean - default: false - dependencies: - - "camel:kafka" - - "camel:core" - - "camel:kamelet" - template: - beans: - - name: kafkaHeaderDeserializer - type: "#class:org.apache.camel.component.kafka.KafkaHeaderDeserializer" - properties: - enabled: '{{deserializeHeaders}}' - from: - uri: "kafka:{{topic}}" - parameters: - brokers: "{{bootstrapServers}}" - autoCommitEnable: "{{autoCommitEnable}}" - allowManualCommit: "{{allowManualCommit}}" - pollOnError: "{{pollOnError}}" - autoOffsetReset: "{{autoOffsetReset}}" - groupId: "{{?consumerGroup}}" - topicIsPattern: "{{topicIsPattern}}" - steps: - - process: - ref: "{{kafkaHeaderDeserializer}}" - - to: "kamelet:sink" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-scram-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-scram-sink.kamelet.yaml deleted file mode 100644 index 6313ae20e..000000000 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-scram-sink.kamelet.yaml +++ /dev/null @@ -1,110 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-scram-sink - annotations: - camel.apache.org/kamelet.support.level: "Preview" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8ZyBpZD0iWE1MSURfMV8iPg0KCTxwYXRoIGlkPSJYTUxJRF85XyIgZD0iTTMxNC44LDI2OS43Yy0xNC4yLDAtMjcsNi4zLTM1LjcsMTYuMkwyNTYuOCwyNzBjMi40LTYuNSwzLjctMTMuNiwzLjctMjAuOWMwLTcuMi0xLjMtMTQuMS0zLjYtMjAuNg0KCQlsMjIuMy0xNS43YzguNyw5LjksMjEuNCwxNi4xLDM1LjYsMTYuMWMyNi4yLDAsNDcuNi0yMS4zLDQ3LjYtNDcuNnMtMjEuMy00Ny42LTQ3LjYtNDcuNnMtNDcuNiwyMS4zLTQ3LjYsNDcuNg0KCQljMCw0LjcsMC43LDkuMiwyLDEzLjVsLTIyLjMsMTUuN2MtOS4zLTExLjY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IuNywwLTIzLjEtMTAuNC0yMy4xLTIzLjFjMC0xMi43LDEwLjMtMjMuMSwyMy4xLTIzLjFDMjExLjgsMzYxLjgsMjIyLjEsMzcyLjIsMjIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "sink" -spec: - definition: - title: "Kafka Scram Sink" - description: Send data to Kafka topics through SCRAM login module. - required: - - topic - - bootstrapServers - - user - - password - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names. - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs. - type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported. - type: string - default: SASL_SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: SCRAM-SHA-512 - user: - title: Username - description: Username to authenticate to Kafka . - type: string - x-descriptors: - - urn:camel:group:credentials - password: - title: Password - description: Password to authenticate to kafka. - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - from: - uri: "kamelet:source" - steps: - - choice: - when: - - simple: "${header[key]}" - steps: - - setHeader: - name: kafka.KEY - simple: "${header[key]}" - - simple: "${header[ce-key]}" - steps: - - setHeader: - name: kafka.KEY - simple: "${header[ce-key]}" - - choice: - when: - - simple: "${header[partition-key]}" - steps: - - setHeader: - name: kafka.PARTITION_KEY - simple: "${header[partition-key]}" - - simple: "${header[ce-partitionkey]}" - steps: - - setHeader: - name: kafka.PARTITION_KEY - simple: "${header[ce-partitionkey]}" - - to: - uri: "kafka:{{topic}}" - parameters: - brokers: "{{bootstrapServers}}" - securityProtocol: "{{securityProtocol}}" - saslMechanism: "{{saslMechanism}}" - saslJaasConfig: 'org.apache.kafka.common.security.scram.ScramLoginModule required username="{{user}}" password="{{password}}";' diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-scram-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-scram-source.kamelet.yaml deleted file mode 100644 index e417069ff..000000000 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-scram-source.kamelet.yaml +++ /dev/null @@ -1,133 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-scram-source - annotations: - camel.apache.org/kamelet.support.level: "Preview" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4w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Mi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "source" -spec: - definition: - title: "Kafka Scram Source" - description: Receive data from Kafka topics through SCRAM login module. - required: - - topic - - bootstrapServers - - user - - password - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs - type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported - type: string - default: SASL_SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: SCRAM-SHA-512 - user: - title: Username - description: Username to authenticate to Kafka - type: string - x-descriptors: - - urn:camel:group:credentials - password: - title: Password - description: Password to authenticate to kafka - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - autoCommitEnable: - title: Auto Commit Enable - description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer - type: boolean - default: true - allowManualCommit: - title: Allow Manual Commit - description: Whether to allow doing manual commits - type: boolean - default: false - pollOnError: - title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` - type: string - default: "ERROR_HANDLER" - autoOffsetReset: - title: Auto Offset Reset - description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none - type: string - default: "latest" - consumerGroup: - title: Consumer Group - description: A string that uniquely identifies the group of consumers to which this source belongs - type: string - example: "my-group-id" - deserializeHeaders: - title: Automatically Deserialize Headers - description: When enabled the Kamelet source will deserialize all message headers to String representation. - type: boolean - default: true - topicIsPattern: - title: Topic Is Pattern - description: Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. - type: boolean - default: false - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - beans: - - name: kafkaHeaderDeserializer - type: "#class:org.apache.camel.component.kafka.KafkaHeaderDeserializer" - properties: - enabled: '{{deserializeHeaders}}' - from: - uri: "kafka:{{topic}}" - parameters: - brokers: "{{?bootstrapServers}}" - securityProtocol: "{{securityProtocol}}" - saslMechanism: "{{saslMechanism}}" - saslJaasConfig: 'org.apache.kafka.common.security.scram.ScramLoginModule required username="{{user}}" password="{{password}}";' - autoCommitEnable: "{{autoCommitEnable}}" - allowManualCommit: "{{allowManualCommit}}" - pollOnError: "{{pollOnError}}" - autoOffsetReset: "{{autoOffsetReset}}" - groupId: "{{?consumerGroup}}" - topicIsPattern: "{{topicIsPattern}}" - steps: - - process: - ref: "{{kafkaHeaderDeserializer}}" - - to: "kamelet:sink" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-sink.kamelet.yaml index 85df64e83..79fe101d3 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-sink.kamelet.yaml @@ -30,12 +30,10 @@ metadata: spec: definition: title: "Kafka Sink" - description: Send data to Kafka topics through Plain Login Module. + description: Send data to Kafka topics. required: - topic - bootstrapServers - - user - - password type: object properties: topic: @@ -46,29 +44,71 @@ spec: title: Bootstrap Servers description: Comma separated list of Kafka Broker URLs type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported + saslAuthType: + title: Authentication Type + description: Authentication type to use. Use NONE for no authentication, PLAIN or SCRAM_SHA_256/SCRAM_SHA_512 for username/password, SSL for certificate-based, OAUTH for OAuth 2.0, AWS_MSK_IAM for MSK, or KERBEROS for Kerberos. type: string - default: SASL_SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: PLAIN - user: + default: NONE + enum: ["NONE", "PLAIN", "SCRAM_SHA_256", "SCRAM_SHA_512", "SSL", "OAUTH", "AWS_MSK_IAM", "KERBEROS"] + saslUsername: title: Username - description: Username to authenticate to Kafka + description: Username for SASL authentication. Required when saslAuthType is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. type: string x-descriptors: - - urn:camel:group:credentials - password: + - urn:camel:group:credentials + saslPassword: title: Password - description: Password to authenticate to kafka + description: Password for SASL authentication. Required when saslAuthType is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + oauthClientId: + title: OAuth Client ID + description: OAuth client ID. Required when saslAuthType is OAUTH. + type: string + oauthClientSecret: + title: OAuth Client Secret + description: OAuth client secret. Required when saslAuthType is OAUTH. type: string format: password x-descriptors: - - urn:camel:group:credentials + - urn:camel:group:credentials + oauthTokenEndpointUri: + title: OAuth Token Endpoint + description: OAuth token endpoint URI. Required when saslAuthType is OAUTH. + type: string + oauthScope: + title: OAuth Scope + description: OAuth scope. Optional when saslAuthType is OAUTH. + type: string + sslTruststoreLocation: + title: SSL Truststore Location + description: The location of the trust store file. + type: string + sslTruststorePassword: + title: SSL Truststore Password + description: The password for the trust store file. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + sslKeystoreLocation: + title: SSL Keystore Location + description: The location of the key store file. Used for mTLS authentication. + type: string + sslKeystorePassword: + title: SSL Keystore Password + description: The password for the key store file. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + sslKeyPassword: + title: SSL Key Password + description: The password of the private key in the key store file. + type: string + format: password dependencies: - "camel:core" - "camel:kafka" @@ -105,6 +145,15 @@ spec: uri: "kafka:{{topic}}" parameters: brokers: "{{bootstrapServers}}" - securityProtocol: "{{securityProtocol}}" - saslMechanism: "{{saslMechanism}}" - saslJaasConfig: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="{{user}}" password="{{password}}";' + saslAuthType: "{{saslAuthType}}" + saslUsername: "{{?saslUsername}}" + saslPassword: "{{?saslPassword}}" + oauthClientId: "{{?oauthClientId}}" + oauthClientSecret: "{{?oauthClientSecret}}" + oauthTokenEndpointUri: "{{?oauthTokenEndpointUri}}" + oauthScope: "{{?oauthScope}}" + sslTruststoreLocation: "{{?sslTruststoreLocation}}" + sslTruststorePassword: "{{?sslTruststorePassword}}" + sslKeystoreLocation: "{{?sslKeystoreLocation}}" + sslKeystorePassword: "{{?sslKeystorePassword}}" + sslKeyPassword: "{{?sslKeyPassword}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-source.kamelet.yaml index fea4188db..5d10a9990 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-source.kamelet.yaml @@ -30,12 +30,10 @@ metadata: spec: definition: title: "Kafka Source" - description: Receive data from Kafka topics through Plain Login Module. + description: Receive data from Kafka topics. required: - topic - bootstrapServers - - user - - password type: object properties: topic: @@ -46,29 +44,71 @@ spec: title: Bootstrap Servers description: Comma separated list of Kafka Broker URLs type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported + saslAuthType: + title: Authentication Type + description: Authentication type to use. Use NONE for no authentication, PLAIN or SCRAM_SHA_256/SCRAM_SHA_512 for username/password, SSL for certificate-based, OAUTH for OAuth 2.0, AWS_MSK_IAM for MSK, or KERBEROS for Kerberos. type: string - default: SASL_SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: PLAIN - user: + default: NONE + enum: ["NONE", "PLAIN", "SCRAM_SHA_256", "SCRAM_SHA_512", "SSL", "OAUTH", "AWS_MSK_IAM", "KERBEROS"] + saslUsername: title: Username - description: Username to authenticate to Kafka + description: Username for SASL authentication. Required when saslAuthType is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. type: string x-descriptors: - - urn:camel:group:credentials - password: + - urn:camel:group:credentials + saslPassword: title: Password - description: Password to authenticate to kafka + description: Password for SASL authentication. Required when saslAuthType is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + oauthClientId: + title: OAuth Client ID + description: OAuth client ID. Required when saslAuthType is OAUTH. + type: string + oauthClientSecret: + title: OAuth Client Secret + description: OAuth client secret. Required when saslAuthType is OAUTH. type: string format: password x-descriptors: - - urn:camel:group:credentials + - urn:camel:group:credentials + oauthTokenEndpointUri: + title: OAuth Token Endpoint + description: OAuth token endpoint URI. Required when saslAuthType is OAUTH. + type: string + oauthScope: + title: OAuth Scope + description: OAuth scope. Optional when saslAuthType is OAUTH. + type: string + sslTruststoreLocation: + title: SSL Truststore Location + description: The location of the trust store file. + type: string + sslTruststorePassword: + title: SSL Truststore Password + description: The password for the trust store file. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + sslKeystoreLocation: + title: SSL Keystore Location + description: The location of the key store file. Used for mTLS authentication. + type: string + sslKeystorePassword: + title: SSL Keystore Password + description: The password for the key store file. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + sslKeyPassword: + title: SSL Key Password + description: The password of the private key in the key store file. + type: string + format: password autoCommitEnable: title: Auto Commit Enable description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer @@ -81,7 +121,7 @@ spec: default: false pollOnError: title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP` + description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of DISCARD, ERROR_HANDLER, RECONNECT, RETRY, STOP type: string default: "ERROR_HANDLER" autoOffsetReset: @@ -117,10 +157,19 @@ spec: from: uri: "kafka:{{topic}}" parameters: - brokers: "{{?bootstrapServers}}" - securityProtocol: "{{securityProtocol}}" - saslMechanism: "{{saslMechanism}}" - saslJaasConfig: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="{{user}}" password="{{password}}";' + brokers: "{{bootstrapServers}}" + saslAuthType: "{{saslAuthType}}" + saslUsername: "{{?saslUsername}}" + saslPassword: "{{?saslPassword}}" + oauthClientId: "{{?oauthClientId}}" + oauthClientSecret: "{{?oauthClientSecret}}" + oauthTokenEndpointUri: "{{?oauthTokenEndpointUri}}" + oauthScope: "{{?oauthScope}}" + sslTruststoreLocation: "{{?sslTruststoreLocation}}" + sslTruststorePassword: "{{?sslTruststorePassword}}" + sslKeystoreLocation: "{{?sslKeystoreLocation}}" + sslKeystorePassword: "{{?sslKeystorePassword}}" + sslKeyPassword: "{{?sslKeyPassword}}" autoCommitEnable: "{{autoCommitEnable}}" allowManualCommit: "{{allowManualCommit}}" pollOnError: "{{pollOnError}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-ssl-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-ssl-sink.kamelet.yaml deleted file mode 100644 index 003e10d69..000000000 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-ssl-sink.kamelet.yaml +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-ssl-sink - annotations: - camel.apache.org/kamelet.support.level: "Stable" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8ZyBpZD0iWE1MSURfMV8iPg0KCTxwYXRoIGlkPSJYTUxJRF85XyIgZD0iTTMxNC44LDI2OS43Yy0xNC4yLDAtMjcsNi4zLTM1LjcsMTYuMkwyNTYuOCwyNzBjMi40LTYuNSwzLjctMTMuNiwzLjctMjAuOWMwLTcuMi0xLjMtMTQuMS0zLjYtMjAuNg0KCQlsMjIuMy0xNS43YzguNyw5LjksMjEuNCwxNi4xLDM1LjYsMTYuMWMyNi4yLDAsNDcuNi0yMS4zLDQ3LjYtNDcuNnMtMjEuM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zLjFDMTg2LjMsMTM4LjIsMTc2LDEyNy44LDE3NiwxMTUuMXogTTIyMi4xLDM4NC45YzAsMTIuNy0xMC4zLDIzLjEtMjMuMSwyMy4xDQoJCWMtMTIuNywwLTIzLjEtMTAuNC0yMy4xLTIzLjFjMC0xMi43LDEwLjMtMjMuMSwyMy4xLTIzLjFDMjExLjgsMzYxLjgsMjIyLjEsMzcyLjIsMjIyLjEsMzg0Ljl6IE0xOTkuMSwyODEuMw0KCQljLTE3LjcsMC0zMi4yLTE0LjQtMzIuMi0zMi4yYzAtMTcuNywxNC40LTMyLjIsMzIuMi0zMi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "sink" -spec: - definition: - description: Send data to Kafka topics wit TLS/SSL support. - required: - - topic - - bootstrapServers - - sslKeystoreLocation - - sslKeystorePassword - - sslTruststoreLocation - - sslTruststorePassword - - sslKeyPassword - properties: - bootstrapServers: - description: Comma separated list of Kafka Broker URLs - title: Brokers - type: string - sslKeystoreLocation: - description: >- - The location of the key store file. This is optional for client and - can be used for two-way authentication for client. - title: SSL Keystore Location - type: string - sslProtocol: - default: TLSv1.2 - description: >- - The SSL protocol used to generate the SSLContext. Default setting is - TLS, which is fine for most cases. Allowed values in recent JVMs are - TLS, TLSv1.1 and TLSv1.2. SSL, SSLv2 and SSLv3 may be supported in - older JVMs, but their usage is discouraged due to known security - vulnerabilities. - title: SSL Protocol - type: string - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: GSSAPI - sslEnabledProtocols: - default: TLSv1.2,TLSv1.1,TLSv1 - description: >- - The list of protocols enabled for SSL connections. TLSv1.2, TLSv1.1 - and TLSv1 are enabled by default. - title: SSL Enabled Protocols - type: string - sslKeystorePassword: - description: >- - The store password for the key store file.This is optional for client - and only needed if ssl.keystore.location is configured. - title: SSL Keystore Password - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - sslTruststoreLocation: - description: The location of the trust store file. - title: SSL Truststore Location - type: string - sslTruststorePassword: - description: The store password for the trust store file. - title: SSL Truststore Password - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - sslKeyPassword: - description: The password of the private key in the key store file. - title: SSL Key Password - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - sslEndpointAlgorithm: - description: The endpoint identification algorithm to validate server hostname using server certificate. Use none or false to disable server hostname verification. - title: SSL Endpoint Algorithm - type: string - default: https - topic: - description: Comma separated list of Kafka topic names - title: Topic Names - type: string - securityProtocol: - default: SSL - description: >- - Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, - SASL_SSL and SSL are supported - title: Security Protocol - type: string - title: Kafka SSL Sink - type: object - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - beans: - - name: kafka-ssl-sink-local - type: '#class:org.apache.camel.component.kafka.KafkaComponent' - - name: kafka-ssl-sink-configuration-local - properties: - brokers: '{{bootstrapServers}}' - securityProtocol: '{{securityProtocol}}' - sslKeystoreLocation: '{{sslKeystoreLocation}}' - sslKeyPassword: '{{sslKeyPassword}}' - sslKeystorePassword: '{{sslKeystorePassword}}' - sslTruststoreLocation: '{{sslTruststoreLocation}}' - sslTruststorePassword: '{{sslTruststorePassword}}' - sslProtocol: '{{sslProtocol}}' - sslEnabledProtocols: '{{sslEnabledProtocols}}' - sslEndpointAlgorithm: '{{sslEndpointAlgorithm}}' - saslMechanism: '{{saslMechanism}}' - type: '#class:org.apache.camel.component.kafka.KafkaConfiguration' - from: - uri: "kamelet:source" - steps: - - choice: - when: - - simple: ${header[key]} - steps: - - setHeader: - name: kafka.KEY - simple: ${header[key]} - - simple: ${header[ce-key]} - steps: - - setHeader: - name: kafka.KEY - simple: ${header[ce-key]} - - choice: - when: - - simple: ${header[partition-key]} - steps: - - setHeader: - name: kafka.PARTITION_KEY - simple: ${header[partition-key]} - - simple: ${header[ce-partitionkey]} - steps: - - setHeader: - name: kafka.PARTITION_KEY - simple: ${header[ce-partitionkey]} - - to: - uri: '{{kafka-ssl-sink-local}}:{{topic}}' - parameters: - configuration: '#bean:{{kafka-ssl-sink-configuration-local}}' diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-ssl-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-ssl-source.kamelet.yaml deleted file mode 100644 index 8be42b234..000000000 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-ssl-source.kamelet.yaml +++ /dev/null @@ -1,181 +0,0 @@ -# --------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# --------------------------------------------------------------------------- -apiVersion: camel.apache.org/v1 -kind: Kamelet -metadata: - name: kafka-ssl-source - annotations: - camel.apache.org/kamelet.support.level: "Stable" - camel.apache.org/catalog.version: "4.18.0-SNAPSHOT" - camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBl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Mi4yYzE3LjcsMCwzMi4yLDE0LjQsMzIuMiwzMi4yQzIzMS4yLDI2Ni45LDIxNi44LDI4MS4zLDE5OS4xLDI4MS4zeg0KCQkgTTMxNC44LDM0MC4zYy0xMi43LDAtMjMuMS0xMC40LTIzLjEtMjMuMWMwLTEyLjcsMTAuMy0yMy4xLDIzLjEtMjMuMXMyMy4xLDEwLjQsMjMuMSwyMy4xQzMzNy45LDMzMCwzMjcuNSwzNDAuMywzMTQuOCwzNDAuM3oiLz4NCjwvZz4NCjwvc3ZnPg0K" - camel.apache.org/provider: "Apache Software Foundation" - camel.apache.org/kamelet.group: "Kafka" - camel.apache.org/kamelet.namespace: "Kafka" - labels: - camel.apache.org/kamelet.type: "source" -spec: - definition: - title: "Kafka SSL Source" - description: Receive data from Kafka topics with SSL/TLS support - required: - - topic - - bootstrapServers - - sslTruststoreLocation - - sslTruststorePassword - - sslKeyPassword - type: object - properties: - topic: - title: Topic Names - description: Comma separated list of Kafka topic names. - type: string - bootstrapServers: - title: Bootstrap Servers - description: Comma separated list of Kafka Broker URLs. - type: string - securityProtocol: - title: Security Protocol - description: Protocol used to communicate with brokers. `SASL_PLAINTEXT`, `PLAINTEXT`, `SASL_SSL` and `SSL` are supported. - type: string - default: SSL - saslMechanism: - title: SASL Mechanism - description: The Simple Authentication and Security Layer (SASL) Mechanism used. - type: string - default: GSSAPI - autoCommitEnable: - title: Auto Commit Enable - description: If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer. - type: boolean - default: true - allowManualCommit: - title: Allow Manual Commit - description: Whether to allow doing manual commits. - type: boolean - default: false - pollOnError: - title: Poll On Error Behavior - description: What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of `DISCARD`, `ERROR_HANDLER`, `RECONNECT`, `RETRY`, `STOP`. - type: string - default: "ERROR_HANDLER" - autoOffsetReset: - title: Auto Offset Reset - description: What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none. - type: string - default: "latest" - consumerGroup: - title: Consumer Group - description: A string that uniquely identifies the group of consumers to which this source belongs. - type: string - example: "my-group-id" - deserializeHeaders: - title: Automatically Deserialize Headers - description: When enabled the Kamelet source will deserialize all message headers to String representation. - type: boolean - default: true - sslKeyPassword: - description: The password of the private key in the key store file. - title: SSL Key Password - type: string - format: password - sslKeystorePassword: - description: The store password for the key store file.This is optional for client and only needed if ssl.keystore.location is configured. - title: SSL Keystore Password - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - sslEndpointAlgorithm: - description: The endpoint identification algorithm to validate server hostname using server certificate. Use none or false to disable server hostname verification. - title: SSL Endpoint Algorithm - type: string - default: https - sslProtocol: - description: The SSL protocol used to generate the SSLContext. Default setting is TLS, which is fine for most cases. Allowed values in recent JVMs are TLS, TLSv1.1 and TLSv1.2. SSL, SSLv2 and SSLv3 may be supported in older JVMs, but their usage is discouraged due to known security vulnerabilities. - title: SSL Protocol - type: string - default: TLSv1.2 - sslKeystoreLocation: - description: The location of the key store file. This is optional for client and can be used for two-way authentication for client. - title: SSL Keystore Location - type: string - sslTruststoreLocation: - description: The location of the trust store file. - title: SSL Truststore Location - type: string - sslTruststorePassword: - description: The store password for the trust store file. - title: SSL Truststore Password - type: string - format: password - x-descriptors: - - urn:camel:group:credentials - sslEnabledProtocols: - description: The list of protocols enabled for SSL connections. TLSv1.2, TLSv1.1 and TLSv1 are enabled by default. - title: SSL Enabled Protocols - type: string - default: TLSv1.2,TLSv1.1,TLSv1 - saslJaasConfig: - description: Java Authentication and Authorization Service (JAAS) for Simple Authentication and Security Layer (SASL) configuration. - title: JAAS Configuration - type: string - topicIsPattern: - title: Topic Is Pattern - description: Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. - type: boolean - default: false - dependencies: - - "camel:core" - - "camel:kafka" - - "camel:kamelet" - template: - beans: - - name: kafka-ssl-source-local - type: '#class:org.apache.camel.component.kafka.KafkaComponent' - - name: kafka-ssl-source-configuration-local - properties: - brokers: '{{bootstrapServers}}' - securityProtocol: '{{securityProtocol}}' - sslKeystoreLocation: '{{sslKeystoreLocation}}' - sslKeyPassword: '{{sslKeyPassword}}' - sslKeystorePassword: '{{sslKeystorePassword}}' - sslTruststoreLocation: '{{sslTruststoreLocation}}' - sslTruststorePassword: '{{sslTruststorePassword}}' - sslProtocol: '{{sslProtocol}}' - sslEnabledProtocols: '{{sslEnabledProtocols}}' - sslEndpointAlgorithm: '{{sslEndpointAlgorithm}}' - saslMechanism: '{{saslMechanism}}' - groupId: '{{?consumerGroup}}' - autoOffsetReset: '{{autoOffsetReset}}' - pollOnError: '{{pollOnError}}' - allowManualCommit: '{{allowManualCommit}}' - autoCommitEnable: '{{autoCommitEnable}}' - saslJaasConfig: '{{?saslJaasConfig}}' - topicIsPattern: '{{topicIsPattern}}' - type: '#class:org.apache.camel.component.kafka.KafkaConfiguration' - - name: kafkaHeaderDeserializer - type: "#class:org.apache.camel.component.kafka.KafkaHeaderDeserializer" - properties: - enabled: '{{deserializeHeaders}}' - from: - uri: "{{kafka-ssl-source-local}}:{{topic}}" - parameters: - configuration: '#bean:{{kafka-ssl-source-configuration-local}}' - steps: - - process: - ref: "{{kafkaHeaderDeserializer}}" - - to: "kamelet:sink" diff --git a/library/kamelets-maven-plugin/src/main/java/org/apache/camel/kamelets/maven/plugin/ValidateKameletsMojo.java b/library/kamelets-maven-plugin/src/main/java/org/apache/camel/kamelets/maven/plugin/ValidateKameletsMojo.java index da14a8301..4ae922104 100644 --- a/library/kamelets-maven-plugin/src/main/java/org/apache/camel/kamelets/maven/plugin/ValidateKameletsMojo.java +++ b/library/kamelets-maven-plugin/src/main/java/org/apache/camel/kamelets/maven/plugin/ValidateKameletsMojo.java @@ -114,7 +114,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { StringBuilder availableParams = new StringBuilder(); ceInternal.forEach(_param -> availableParams.append(_param).append(" ")); for (Map.Entry entry : p.entrySet()) { - if (!entry.getKey().equals("period") && (!name.equals("set-kafka-key-action") && !name.equals("sftp-source") && !name.equals("kafka-ssl-source") && !name.equals("timer-source") && !name.equals("cron-source") && !name.equals("fhir-source") && !name.equals("beer-source") && !name.equals("cassandra-source") && !name.equals("cassandra-sink") && !name.equals("kafka-azure-schema-registry-source" ) && !name.equals("kafka-azure-schema-registy-sink") && !name.equals("aws-kinesis-source") && !name.equals("kafka-apicurio-registry-not-secured-source") && !name.equals("kafka-batch-apicurio-registry-not-secured-source") && !name.equals("kafka-batch-azure-schema-registry-source") && !name.equals("kafka-batch-apicurio-registry-source") && !name.equals("kafka-batch-ssl-source") && !name.equals("kafka-not-secured-apicurio-registry-json-source") && !name.equals("kafka-not-secured-apicurio-registry-source"))) { + if (!entry.getKey().equals("period") && (!name.equals("set-kafka-key-action") && !name.equals("sftp-source") && !name.equals("timer-source") && !name.equals("cron-source") && !name.equals("fhir-source") && !name.equals("beer-source") && !name.equals("cassandra-source") && !name.equals("cassandra-sink") && !name.equals("kafka-azure-schema-registry-source" ) && !name.equals("kafka-azure-schema-registy-sink") && !name.equals("aws-kinesis-source") && !name.equals("kafka-apicurio-registry-not-secured-source") && !name.equals("kafka-batch-apicurio-registry-not-secured-source") && !name.equals("kafka-batch-azure-schema-registry-source") && !name.equals("kafka-batch-apicurio-registry-source") && !name.equals("kafka-not-secured-apicurio-registry-json-source") && !name.equals("kafka-not-secured-apicurio-registry-source"))) { if (!ceInternal.contains(entry.getKey())) { getLog().error("Kamelet Name: " + name); getLog().error("Scheme Name: " + cleanName); diff --git a/templates/pipes/camel-k/kafka-not-secured-sink-pipe.yaml b/templates/pipes/camel-k/kafka-not-secured-sink-pipe.yaml deleted file mode 100644 index 881fd7531..000000000 --- a/templates/pipes/camel-k/kafka-not-secured-sink-pipe.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: camel.apache.org/v1 -kind: Pipe -metadata: - name: kafka-not-secured-sink-pipe -spec: - source: - ref: - kind: KafkaTopic - apiVersion: kafka.strimzi.io/v1beta1 - name: my-topic - sink: - ref: - kind: Kamelet - apiVersion: camel.apache.org/v1 - name: kafka-not-secured-sink - properties: - bootstrapServers: "The Bootstrap Servers" - topic: "The Topic Names" - \ No newline at end of file diff --git a/templates/pipes/camel-k/kafka-not-secured-source-pipe.yaml b/templates/pipes/camel-k/kafka-not-secured-source-pipe.yaml deleted file mode 100644 index c34d01b45..000000000 --- a/templates/pipes/camel-k/kafka-not-secured-source-pipe.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: camel.apache.org/v1 -kind: Pipe -metadata: - name: kafka-not-secured-source-pipe -spec: - source: - ref: - kind: Kamelet - apiVersion: camel.apache.org/v1 - name: kafka-not-secured-source - properties: - bootstrapServers: "The Bootstrap Servers" - topic: "The Topic Names" - sink: - ref: - kind: KafkaTopic - apiVersion: kafka.strimzi.io/v1beta1 - name: my-topic - \ No newline at end of file diff --git a/templates/pipes/camel-k/kafka-sink-pipe.yaml b/templates/pipes/camel-k/kafka-sink-pipe.yaml index cfb2af909..dbad49fbb 100644 --- a/templates/pipes/camel-k/kafka-sink-pipe.yaml +++ b/templates/pipes/camel-k/kafka-sink-pipe.yaml @@ -15,7 +15,5 @@ spec: name: kafka-sink properties: bootstrapServers: "The Bootstrap Servers" - password: "The Password" topic: "The Topic Names" - user: "The Username" - \ No newline at end of file + saslAuthType: "NONE" diff --git a/templates/pipes/camel-k/kafka-source-pipe.yaml b/templates/pipes/camel-k/kafka-source-pipe.yaml index 406bf3194..d314e61d6 100644 --- a/templates/pipes/camel-k/kafka-source-pipe.yaml +++ b/templates/pipes/camel-k/kafka-source-pipe.yaml @@ -10,12 +10,10 @@ spec: name: kafka-source properties: bootstrapServers: "The Bootstrap Servers" - password: "The Password" topic: "The Topic Names" - user: "The Username" + saslAuthType: "NONE" sink: ref: kind: KafkaTopic apiVersion: kafka.strimzi.io/v1beta1 name: my-topic - \ No newline at end of file diff --git a/templates/pipes/core/kafka-not-secured-sink-pipe.yaml b/templates/pipes/core/kafka-not-secured-sink-pipe.yaml deleted file mode 100644 index dafe97649..000000000 --- a/templates/pipes/core/kafka-not-secured-sink-pipe.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- route: - from: - uri: "kamelet:timer-source" - parameters: - period: 1000 - message: "Hello Camel JBang" - steps: - - to: - uri: "kamelet:kafka-not-secured-sink" - parameters: - bootstrapServers: "The Bootstrap Servers" - topic: "The Topic Names" diff --git a/templates/pipes/core/kafka-not-secured-source-pipe.yaml b/templates/pipes/core/kafka-not-secured-source-pipe.yaml deleted file mode 100644 index 32af86eb2..000000000 --- a/templates/pipes/core/kafka-not-secured-source-pipe.yaml +++ /dev/null @@ -1,9 +0,0 @@ -- route: - from: - uri: "kamelet:kafka-not-secured-source" - parameters: - bootstrapServers: "The Bootstrap Servers" - topic: "The Topic Names" - steps: - - to: - uri: "log:info" diff --git a/templates/pipes/core/kafka-sink-pipe.yaml b/templates/pipes/core/kafka-sink-pipe.yaml index cbfa1638b..5ab8978d2 100644 --- a/templates/pipes/core/kafka-sink-pipe.yaml +++ b/templates/pipes/core/kafka-sink-pipe.yaml @@ -9,6 +9,5 @@ uri: "kamelet:kafka-sink" parameters: bootstrapServers: "The Bootstrap Servers" - password: "The Password" topic: "The Topic Names" - user: "The Username" + saslAuthType: "NONE" diff --git a/templates/pipes/core/kafka-source-pipe.yaml b/templates/pipes/core/kafka-source-pipe.yaml index a93a4d48d..7067461b9 100644 --- a/templates/pipes/core/kafka-source-pipe.yaml +++ b/templates/pipes/core/kafka-source-pipe.yaml @@ -3,9 +3,8 @@ uri: "kamelet:kafka-source" parameters: bootstrapServers: "The Bootstrap Servers" - password: "The Password" topic: "The Topic Names" - user: "The Username" + saslAuthType: "NONE" steps: - to: uri: "log:info" From bf05090f18f34854c702be086b5ae5d57f9e10a2 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Tue, 20 Jan 2026 10:50:15 +0100 Subject: [PATCH 2/3] Create a single Sink and Source Kamelets for Kafka now that CAMEL-22864 is part of 4.18.0 Signed-off-by: Andrea Cosentino --- docs/modules/ROOT/nav.adoc | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index c852922c3..7e7bea1de 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -146,22 +146,13 @@ * xref:kafka-batch-apicurio-registry-source.adoc[] * xref:kafka-batch-azure-schema-registry-source.adoc[] * xref:kafka-batch-manual-commit-action.adoc[] -* xref:kafka-batch-not-secured-source.adoc[] -* xref:kafka-batch-scram-source.adoc[] * xref:kafka-batch-source.adoc[] -* xref:kafka-batch-ssl-source.adoc[] * xref:kafka-manual-commit-action.adoc[] * xref:kafka-not-secured-apicurio-registry-json-source.adoc[] * xref:kafka-not-secured-apicurio-registry-sink.adoc[] * xref:kafka-not-secured-apicurio-registry-source.adoc[] -* xref:kafka-not-secured-sink.adoc[] -* xref:kafka-not-secured-source.adoc[] -* xref:kafka-scram-sink.adoc[] -* xref:kafka-scram-source.adoc[] * xref:kafka-sink.adoc[] * xref:kafka-source.adoc[] -* xref:kafka-ssl-sink.adoc[] -* xref:kafka-ssl-source.adoc[] * xref:kubernetes-namespaces-source.adoc[] * xref:kubernetes-nodes-source.adoc[] * xref:kubernetes-pods-source.adoc[] From 144e7e3465f736cc49c2a3c4c6c17977db5b8cab Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Tue, 20 Jan 2026 11:14:25 +0100 Subject: [PATCH 3/3] Create a single Sink and Source Kamelets for Kafka now that CAMEL-22864 is part of 4.18.0 Signed-off-by: Andrea Cosentino --- .../src/test/resources/kafka/kafka-router-pipe.it.yaml | 6 ++---- .../src/test/resources/kafka/kafka-router-pipe.yaml | 6 +++--- .../src/test/resources/kafka/kafka-sink-pipe.it.yaml | 6 ++---- .../src/test/resources/kafka/kafka-sink-pipe.yaml | 6 +++--- .../src/test/resources/kafka/kafka-source-pipe.it.yaml | 6 ++---- .../src/test/resources/kafka/kafka-source-pipe.yaml | 6 +++--- 6 files changed, 15 insertions(+), 21 deletions(-) diff --git a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.it.yaml b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.it.yaml index 023336a67..82fed4d88 100644 --- a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.it.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.it.yaml @@ -17,8 +17,6 @@ name: kafka-router-pipe-test variables: - - name: "kafka.securityProtocol" - value: "PLAINTEXT" - name: "kafka.deserializeHeaders" value: "true" - name: "kafka.topic" @@ -29,9 +27,9 @@ variables: value: "citrus:unixTimestamp()000" - name: "topic" value: "${kafka.topic}_citrus:currentDate('YYYY-MM-dd')" - - name: "kafka.user" + - name: "kafka.saslUsername" value: "redpanda" - - name: "kafka.password" + - name: "kafka.saslPassword" value: "admin" actions: # Create Kafka infrastructure diff --git a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.yaml b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.yaml index eda38ad6e..4dbe0dd6d 100644 --- a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.yaml @@ -54,7 +54,7 @@ spec: name: kafka-sink properties: bootstrapServers: '{{kafka.bootstrapServers}}' - user: '{{kafka.user}}' - password: '{{kafka.password}}' topic: dummy - securityProtocol: '{{kafka.securityProtocol}}' + saslAuthType: 'PLAIN' + saslUsername: '{{kafka.saslUsername}}' + saslPassword: '{{kafka.saslPassword}}' diff --git a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-sink-pipe.it.yaml b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-sink-pipe.it.yaml index 49f3ab6fd..3fc20d69f 100644 --- a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-sink-pipe.it.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-sink-pipe.it.yaml @@ -17,8 +17,6 @@ name: kafka-sink-pipe-test variables: - - name: "kafka.securityProtocol" - value: "PLAINTEXT" - name: "kafka.deserializeHeaders" value: "true" - name: "kafka.topic" @@ -27,9 +25,9 @@ variables: value: "citrus:randomNumber(4)" - name: "kafka.message" value: "Camel rocks!" - - name: "kafka.user" + - name: "kafka.saslUsername" value: "redpanda" - - name: "kafka.password" + - name: "kafka.saslPassword" value: "admin" actions: # Create Kafka infrastructure diff --git a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-sink-pipe.yaml b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-sink-pipe.yaml index 35ba778ec..8345cd803 100644 --- a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-sink-pipe.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-sink-pipe.yaml @@ -36,7 +36,7 @@ spec: name: kafka-sink properties: bootstrapServers: '{{kafka.bootstrapServers}}' - user: '{{kafka.user}}' - password: '{{kafka.password}}' topic: '{{kafka.topic}}' - securityProtocol: '{{kafka.securityProtocol}}' + saslAuthType: 'PLAIN' + saslUsername: '{{kafka.saslUsername}}' + saslPassword: '{{kafka.saslPassword}}' diff --git a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-source-pipe.it.yaml b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-source-pipe.it.yaml index 81b05b810..fa08d0ab8 100644 --- a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-source-pipe.it.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-source-pipe.it.yaml @@ -17,8 +17,6 @@ name: kafka-source-pipe-test variables: - - name: "kafka.securityProtocol" - value: "PLAINTEXT" - name: "kafka.deserializeHeaders" value: "true" - name: "kafka.topic" @@ -29,9 +27,9 @@ variables: value: "citrus:randomNumber(4)" - name: "kafka.message" value: "Camel rocks!" - - name: "kafka.user" + - name: "kafka.saslUsername" value: "redpanda" - - name: "kafka.password" + - name: "kafka.saslPassword" value: "admin" actions: # Create Kafka infrastructure diff --git a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-source-pipe.yaml b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-source-pipe.yaml index 97690177e..57a303758 100644 --- a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-source-pipe.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-source-pipe.yaml @@ -27,10 +27,10 @@ spec: name: kafka-source properties: bootstrapServers: '{{kafka.bootstrapServers}}' - user: '{{kafka.user}}' - password: '{{kafka.password}}' topic: '{{kafka.topic}}' - securityProtocol: '{{kafka.securityProtocol}}' + saslAuthType: 'PLAIN' + saslUsername: '{{kafka.saslUsername}}' + saslPassword: '{{kafka.saslPassword}}' deserializeHeaders: '{{kafka.deserializeHeaders}}' sink: uri: "{{http.sink.url}}"