Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafka source authenticated #207

Merged
merged 5 commits into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/modules/ROOT/pages/kafka-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ The following table summarizes the configuration options available for the `kafk
|===
| Property| Name| Description| Type| Default| Example
| *brokers {empty}* *| Brokers| Comma separated list of Kafka Broker URLs| string| |
| *password {empty}* *| Password| Password to authenticate to kafka| string| |
| *topic {empty}* *| Topic Names| Comma separated list of Kafka topic names| string| |
| *username {empty}* *| Username| Username to authenticate to Kafka| string| |
| saslMechanism| SASL Mechanism| The Simple Authentication and Security Layer (SASL) Mechanism used.| string| `"PLAIN"`|
| securityProtocol| Security Protocol| Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported| string| `"SASL_SSL"`|
|===

NOTE: Fields marked with ({empty}*) are mandatory.
Expand Down Expand Up @@ -40,7 +44,9 @@ spec:
name: kafka-source
properties:
brokers: "The Brokers"
password: "The Password"
topic: "The Topic Names"
username: "The Username"
sink:
ref:
kind: InMemoryChannel
Expand Down
26 changes: 26 additions & 0 deletions kafka-source.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ spec:
required:
- topic
- brokers
- username
- password
type: object
properties:
topic:
Expand All @@ -25,10 +27,34 @@ spec:
title: Brokers
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: PLAIN
username:
title: Username
description: Username to authenticate to Kafka
type: string
password:
title: Password
description: Password to authenticate to kafka
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
flow:
from:
uri: "kafka:{{topic}}"
parameters:
brokers: "{{brokers}}"
securityProtocol: "{{securityProtocol}}"
saslMechanism: "{{saslMechanism}}"
saslJaasConfig: "org.apache.kafka.common.security.plain.PlainLoginModule required username='{{username}}' password='{{password}}';"
steps:
- to: "kamelet:sink"