You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2026/01/19 10:27:19 UTC
(camel) branch 22864-kafka created (now 5aa70b7e2114)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch 22864-kafka
in repository https://gitbox.apache.org/repos/asf/camel.git
at 5aa70b7e2114 CAMEL-22863 - Camel-Kafka: Add KafkaSecurityConfigurer utility class to simplify Kafka authentication configuration
This branch includes the following new commits:
new 5aa70b7e2114 CAMEL-22863 - Camel-Kafka: Add KafkaSecurityConfigurer utility class to simplify Kafka authentication configuration
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(camel) 01/01: CAMEL-22863 - Camel-Kafka: Add KafkaSecurityConfigurer utility class to simplify Kafka authentication configuration
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch 22864-kafka
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 5aa70b7e2114e19f44d4b51e69004bc3f073bfcb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jan 19 11:24:09 2026 +0100
CAMEL-22863 - Camel-Kafka: Add KafkaSecurityConfigurer utility class to simplify Kafka authentication configuration
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../org/apache/camel/catalog/components/kafka.json | 92 ++--
.../apache/camel/catalog/main/sensitive-keys.json | 1 +
.../component/kafka/KafkaComponentConfigurer.java | 42 ++
.../component/kafka/KafkaEndpointConfigurer.java | 42 ++
.../component/kafka/KafkaEndpointUriFactory.java | 13 +-
.../org/apache/camel/component/kafka/kafka.json | 92 ++--
.../camel-kafka/src/main/docs/kafka-component.adoc | 62 +++
.../camel/component/kafka/KafkaConfiguration.java | 183 ++++++++
.../component/kafka/security/KafkaAuthType.java | 200 ++++++++
.../kafka/security/KafkaSecurityConfigurer.java | 504 +++++++++++++++++++++
.../camel/component/kafka/KafkaComponentTest.java | 146 ++++++
.../integration/KafkaConsumerSaslAuthTypeIT.java | 224 +++++++++
.../integration/KafkaProducerSaslAuthTypeIT.java | 211 +++++++++
.../security/KafkaSecurityConfigurerTest.java | 481 ++++++++++++++++++++
.../java/org/apache/camel/util/SensitiveUtils.java | 2 +
.../dsl/KafkaComponentBuilderFactory.java | 120 +++++
.../endpoint/dsl/KafkaEndpointBuilderFactory.java | 384 ++++++++++++++++
17 files changed, 2719 insertions(+), 80 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json
index 836027386e43..567eda888800 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json
@@ -124,26 +124,33 @@
"kerberosPrincipalToLocalRules": { "index": 97, "kind": "property", "displayName": "Kerberos Principal To Local Rules", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "DEFAULT", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "A list of rules for mapping from [...]
"kerberosRenewJitter": { "index": 98, "kind": "property", "displayName": "Kerberos Renew Jitter", "group": "security", "label": "common,security", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0.05", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Percentage of random jitter added to the renewal time." },
"kerberosRenewWindowFactor": { "index": 99, "kind": "property", "displayName": "Kerberos Renew Window Factor", "group": "security", "label": "common,security", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0.8", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Login thread will sleep until the specified wi [...]
- "saslJaasConfig": { "index": 100, "kind": "property", "displayName": "Sasl Jaas Config", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Expose the kafka sasl.jaas.config parameter Example: org.apache.kafka.common.security.plain. [...]
- "saslKerberosServiceName": { "index": 101, "kind": "property", "displayName": "Sasl Kerberos Service Name", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Kerberos principal name that Kafka runs as. This can be defined eith [...]
- "saslMechanism": { "index": 102, "kind": "property", "displayName": "Sasl Mechanism", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GSSAPI", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Simple Authentication and Security Layer (SASL) Mechanism used. [...]
- "securityProtocol": { "index": 103, "kind": "property", "displayName": "Security Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PLAINTEXT", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Protocol used to communicate with brokers. SASL_PLAINTEXT, [...]
- "sslCipherSuites": { "index": 104, "kind": "property", "displayName": "Ssl Cipher Suites", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "A list of cipher suites. This is a named combination of authentication, encryption, MAC a [...]
- "sslContextParameters": { "index": 105, "kind": "property", "displayName": "Ssl Context Parameters", "group": "security", "label": "common,security", "required": false, "type": "object", "javaType": "org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "SSL configuration using a Camel SSLContextPar [...]
- "sslEnabledProtocols": { "index": 106, "kind": "property", "displayName": "Ssl Enabled Protocols", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The list of protocols enabled for SSL connections. The default is TLSv1.2,TLSv1.3 [...]
- "sslEndpointAlgorithm": { "index": 107, "kind": "property", "displayName": "Ssl Endpoint Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The endpoint identification algorithm to validate serv [...]
- "sslKeymanagerAlgorithm": { "index": 108, "kind": "property", "displayName": "Ssl Keymanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "SunX509", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by key manager factory for SS [...]
- "sslKeyPassword": { "index": 109, "kind": "property", "displayName": "Ssl Key Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password of the private key in the key store file or the PEM key specified in sslKeystor [...]
- "sslKeystoreLocation": { "index": 110, "kind": "property", "displayName": "Ssl Keystore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the key store file. This is optional for the client and can be us [...]
- "sslKeystorePassword": { "index": 111, "kind": "property", "displayName": "Ssl Keystore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The store password for the key store file. This is optional for the client and onl [...]
- "sslKeystoreType": { "index": 112, "kind": "property", "displayName": "Ssl Keystore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the key store file. This is optional for the cl [...]
- "sslProtocol": { "index": 113, "kind": "property", "displayName": "Ssl Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The SSL protocol used to generate the SSLContext. The default is TLSv1.3 when running with Java 11 [...]
- "sslProvider": { "index": 114, "kind": "property", "displayName": "Ssl Provider", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The name of the security provider used for SSL connections. Default value is the default security [...]
- "sslTrustmanagerAlgorithm": { "index": 115, "kind": "property", "displayName": "Ssl Trustmanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PKIX", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by trust manager factory for [...]
- "sslTruststoreLocation": { "index": 116, "kind": "property", "displayName": "Ssl Truststore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the trust store file." },
- "sslTruststorePassword": { "index": 117, "kind": "property", "displayName": "Ssl Truststore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password for the trust store file. If a password is not set, trust store f [...]
- "sslTruststoreType": { "index": 118, "kind": "property", "displayName": "Ssl Truststore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the trust store file. The default value is [...]
- "useGlobalSslContextParameters": { "index": 119, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." }
+ "oauthClientId": { "index": 100, "kind": "property", "displayName": "Oauth Client Id", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth client ID. Used when saslAuthType is set to OAUTH." },
+ "oauthClientSecret": { "index": 101, "kind": "property", "displayName": "Oauth Client Secret", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth client secret. Used when saslAuthType is set to OAUTH." },
+ "oauthScope": { "index": 102, "kind": "property", "displayName": "Oauth Scope", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth scope. Used when saslAuthType is set to OAUTH." },
+ "oauthTokenEndpointUri": { "index": 103, "kind": "property", "displayName": "Oauth Token Endpoint Uri", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth token endpoint URI. Used when saslAuthType is set to OAUTH." },
+ "saslAuthType": { "index": 104, "kind": "property", "displayName": "Sasl Auth Type", "group": "security", "label": "common,security", "required": false, "type": "enum", "javaType": "org.apache.camel.component.kafka.security.KafkaAuthType", "enum": [ "NONE", "PLAIN", "SCRAM_SHA_256", "SCRAM_SHA_512", "SSL", "OAUTH", "AWS_MSK_IAM", "KERBEROS" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "config [...]
+ "saslJaasConfig": { "index": 105, "kind": "property", "displayName": "Sasl Jaas Config", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Expose the kafka sasl.jaas.config parameter Example: org.apache.kafka.common.security.plain. [...]
+ "saslKerberosServiceName": { "index": 106, "kind": "property", "displayName": "Sasl Kerberos Service Name", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Kerberos principal name that Kafka runs as. This can be defined eith [...]
+ "saslMechanism": { "index": 107, "kind": "property", "displayName": "Sasl Mechanism", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GSSAPI", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Simple Authentication and Security Layer (SASL) Mechanism used. [...]
+ "saslPassword": { "index": 108, "kind": "property", "displayName": "Sasl Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Password for SASL authentication. Used when saslAuthType is set to PLAIN, SCRAM_SHA_256, or SCRAM [...]
+ "saslUsername": { "index": 109, "kind": "property", "displayName": "Sasl Username", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Username for SASL authentication. Used when saslAuthType is set to PLAIN, SCRAM_SHA_256, or SCRA [...]
+ "securityProtocol": { "index": 110, "kind": "property", "displayName": "Security Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PLAINTEXT", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Protocol used to communicate with brokers. SASL_PLAINTEXT, [...]
+ "sslCipherSuites": { "index": 111, "kind": "property", "displayName": "Ssl Cipher Suites", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "A list of cipher suites. This is a named combination of authentication, encryption, MAC a [...]
+ "sslContextParameters": { "index": 112, "kind": "property", "displayName": "Ssl Context Parameters", "group": "security", "label": "common,security", "required": false, "type": "object", "javaType": "org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "SSL configuration using a Camel SSLContextPar [...]
+ "sslEnabledProtocols": { "index": 113, "kind": "property", "displayName": "Ssl Enabled Protocols", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The list of protocols enabled for SSL connections. The default is TLSv1.2,TLSv1.3 [...]
+ "sslEndpointAlgorithm": { "index": 114, "kind": "property", "displayName": "Ssl Endpoint Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The endpoint identification algorithm to validate serv [...]
+ "sslKeymanagerAlgorithm": { "index": 115, "kind": "property", "displayName": "Ssl Keymanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "SunX509", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by key manager factory for SS [...]
+ "sslKeyPassword": { "index": 116, "kind": "property", "displayName": "Ssl Key Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password of the private key in the key store file or the PEM key specified in sslKeystor [...]
+ "sslKeystoreLocation": { "index": 117, "kind": "property", "displayName": "Ssl Keystore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the key store file. This is optional for the client and can be us [...]
+ "sslKeystorePassword": { "index": 118, "kind": "property", "displayName": "Ssl Keystore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The store password for the key store file. This is optional for the client and onl [...]
+ "sslKeystoreType": { "index": 119, "kind": "property", "displayName": "Ssl Keystore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the key store file. This is optional for the cl [...]
+ "sslProtocol": { "index": 120, "kind": "property", "displayName": "Ssl Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The SSL protocol used to generate the SSLContext. The default is TLSv1.3 when running with Java 11 [...]
+ "sslProvider": { "index": 121, "kind": "property", "displayName": "Ssl Provider", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The name of the security provider used for SSL connections. Default value is the default security [...]
+ "sslTrustmanagerAlgorithm": { "index": 122, "kind": "property", "displayName": "Ssl Trustmanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PKIX", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by trust manager factory for [...]
+ "sslTruststoreLocation": { "index": 123, "kind": "property", "displayName": "Ssl Truststore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the trust store file." },
+ "sslTruststorePassword": { "index": 124, "kind": "property", "displayName": "Ssl Truststore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password for the trust store file. If a password is not set, trust store f [...]
+ "sslTruststoreType": { "index": 125, "kind": "property", "displayName": "Ssl Truststore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the trust store file. The default value is [...]
+ "useGlobalSslContextParameters": { "index": 126, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." }
},
"headers": {
"kafka.PARTITION_KEY": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Explicitly specify the partition", "constantName": "org.apache.camel.component.kafka.KafkaConstants#PARTITION_KEY" },
@@ -254,24 +261,31 @@
"kerberosPrincipalToLocalRules": { "index": 90, "kind": "parameter", "displayName": "Kerberos Principal To Local Rules", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "DEFAULT", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "A list of rules for mapping from [...]
"kerberosRenewJitter": { "index": 91, "kind": "parameter", "displayName": "Kerberos Renew Jitter", "group": "security", "label": "common,security", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0.05", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Percentage of random jitter added to the renewal time." },
"kerberosRenewWindowFactor": { "index": 92, "kind": "parameter", "displayName": "Kerberos Renew Window Factor", "group": "security", "label": "common,security", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0.8", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Login thread will sleep until the specified w [...]
- "saslJaasConfig": { "index": 93, "kind": "parameter", "displayName": "Sasl Jaas Config", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Expose the kafka sasl.jaas.config parameter Example: org.apache.kafka.common.security.plain. [...]
- "saslKerberosServiceName": { "index": 94, "kind": "parameter", "displayName": "Sasl Kerberos Service Name", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Kerberos principal name that Kafka runs as. This can be defined eith [...]
- "saslMechanism": { "index": 95, "kind": "parameter", "displayName": "Sasl Mechanism", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GSSAPI", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Simple Authentication and Security Layer (SASL) Mechanism used. [...]
- "securityProtocol": { "index": 96, "kind": "parameter", "displayName": "Security Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PLAINTEXT", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Protocol used to communicate with brokers. SASL_PLAINTEXT, [...]
- "sslCipherSuites": { "index": 97, "kind": "parameter", "displayName": "Ssl Cipher Suites", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "A list of cipher suites. This is a named combination of authentication, encryption, MAC a [...]
- "sslContextParameters": { "index": 98, "kind": "parameter", "displayName": "Ssl Context Parameters", "group": "security", "label": "common,security", "required": false, "type": "object", "javaType": "org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "SSL configuration using a Camel SSLContextPar [...]
- "sslEnabledProtocols": { "index": 99, "kind": "parameter", "displayName": "Ssl Enabled Protocols", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The list of protocols enabled for SSL connections. The default is TLSv1.2,TLSv1.3 [...]
- "sslEndpointAlgorithm": { "index": 100, "kind": "parameter", "displayName": "Ssl Endpoint Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The endpoint identification algorithm to validate ser [...]
- "sslKeymanagerAlgorithm": { "index": 101, "kind": "parameter", "displayName": "Ssl Keymanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "SunX509", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by key manager factory for S [...]
- "sslKeyPassword": { "index": 102, "kind": "parameter", "displayName": "Ssl Key Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password of the private key in the key store file or the PEM key specified in sslKeysto [...]
- "sslKeystoreLocation": { "index": 103, "kind": "parameter", "displayName": "Ssl Keystore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the key store file. This is optional for the client and can be u [...]
- "sslKeystorePassword": { "index": 104, "kind": "parameter", "displayName": "Ssl Keystore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The store password for the key store file. This is optional for the client and on [...]
- "sslKeystoreType": { "index": 105, "kind": "parameter", "displayName": "Ssl Keystore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the key store file. This is optional for the c [...]
- "sslProtocol": { "index": 106, "kind": "parameter", "displayName": "Ssl Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The SSL protocol used to generate the SSLContext. The default is TLSv1.3 when running with Java 1 [...]
- "sslProvider": { "index": 107, "kind": "parameter", "displayName": "Ssl Provider", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The name of the security provider used for SSL connections. Default value is the default security [...]
- "sslTrustmanagerAlgorithm": { "index": 108, "kind": "parameter", "displayName": "Ssl Trustmanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PKIX", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by trust manager factory fo [...]
- "sslTruststoreLocation": { "index": 109, "kind": "parameter", "displayName": "Ssl Truststore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the trust store file." },
- "sslTruststorePassword": { "index": 110, "kind": "parameter", "displayName": "Ssl Truststore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password for the trust store file. If a password is not set, trust store [...]
- "sslTruststoreType": { "index": 111, "kind": "parameter", "displayName": "Ssl Truststore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the trust store file. The default value is [...]
+ "oauthClientId": { "index": 93, "kind": "parameter", "displayName": "Oauth Client Id", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth client ID. Used when saslAuthType is set to OAUTH." },
+ "oauthClientSecret": { "index": 94, "kind": "parameter", "displayName": "Oauth Client Secret", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth client secret. Used when saslAuthType is set to OAUTH." },
+ "oauthScope": { "index": 95, "kind": "parameter", "displayName": "Oauth Scope", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth scope. Used when saslAuthType is set to OAUTH." },
+ "oauthTokenEndpointUri": { "index": 96, "kind": "parameter", "displayName": "Oauth Token Endpoint Uri", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth token endpoint URI. Used when saslAuthType is set to OAUTH." },
+ "saslAuthType": { "index": 97, "kind": "parameter", "displayName": "Sasl Auth Type", "group": "security", "label": "common,security", "required": false, "type": "enum", "javaType": "org.apache.camel.component.kafka.security.KafkaAuthType", "enum": [ "NONE", "PLAIN", "SCRAM_SHA_256", "SCRAM_SHA_512", "SSL", "OAUTH", "AWS_MSK_IAM", "KERBEROS" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "config [...]
+ "saslJaasConfig": { "index": 98, "kind": "parameter", "displayName": "Sasl Jaas Config", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Expose the kafka sasl.jaas.config parameter Example: org.apache.kafka.common.security.plain. [...]
+ "saslKerberosServiceName": { "index": 99, "kind": "parameter", "displayName": "Sasl Kerberos Service Name", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Kerberos principal name that Kafka runs as. This can be defined eith [...]
+ "saslMechanism": { "index": 100, "kind": "parameter", "displayName": "Sasl Mechanism", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GSSAPI", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Simple Authentication and Security Layer (SASL) Mechanism used. [...]
+ "saslPassword": { "index": 101, "kind": "parameter", "displayName": "Sasl Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Password for SASL authentication. Used when saslAuthType is set to PLAIN, SCRAM_SHA_256, or SCRA [...]
+ "saslUsername": { "index": 102, "kind": "parameter", "displayName": "Sasl Username", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Username for SASL authentication. Used when saslAuthType is set to PLAIN, SCRAM_SHA_256, or SCR [...]
+ "securityProtocol": { "index": 103, "kind": "parameter", "displayName": "Security Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PLAINTEXT", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Protocol used to communicate with brokers. SASL_PLAINTEXT, [...]
+ "sslCipherSuites": { "index": 104, "kind": "parameter", "displayName": "Ssl Cipher Suites", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "A list of cipher suites. This is a named combination of authentication, encryption, MAC [...]
+ "sslContextParameters": { "index": 105, "kind": "parameter", "displayName": "Ssl Context Parameters", "group": "security", "label": "common,security", "required": false, "type": "object", "javaType": "org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "SSL configuration using a Camel SSLContextPa [...]
+ "sslEnabledProtocols": { "index": 106, "kind": "parameter", "displayName": "Ssl Enabled Protocols", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The list of protocols enabled for SSL connections. The default is TLSv1.2,TLSv1. [...]
+ "sslEndpointAlgorithm": { "index": 107, "kind": "parameter", "displayName": "Ssl Endpoint Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The endpoint identification algorithm to validate ser [...]
+ "sslKeymanagerAlgorithm": { "index": 108, "kind": "parameter", "displayName": "Ssl Keymanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "SunX509", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by key manager factory for S [...]
+ "sslKeyPassword": { "index": 109, "kind": "parameter", "displayName": "Ssl Key Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password of the private key in the key store file or the PEM key specified in sslKeysto [...]
+ "sslKeystoreLocation": { "index": 110, "kind": "parameter", "displayName": "Ssl Keystore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the key store file. This is optional for the client and can be u [...]
+ "sslKeystorePassword": { "index": 111, "kind": "parameter", "displayName": "Ssl Keystore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The store password for the key store file. This is optional for the client and on [...]
+ "sslKeystoreType": { "index": 112, "kind": "parameter", "displayName": "Ssl Keystore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the key store file. This is optional for the c [...]
+ "sslProtocol": { "index": 113, "kind": "parameter", "displayName": "Ssl Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The SSL protocol used to generate the SSLContext. The default is TLSv1.3 when running with Java 1 [...]
+ "sslProvider": { "index": 114, "kind": "parameter", "displayName": "Ssl Provider", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The name of the security provider used for SSL connections. Default value is the default security [...]
+ "sslTrustmanagerAlgorithm": { "index": 115, "kind": "parameter", "displayName": "Ssl Trustmanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PKIX", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by trust manager factory fo [...]
+ "sslTruststoreLocation": { "index": 116, "kind": "parameter", "displayName": "Ssl Truststore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the trust store file." },
+ "sslTruststorePassword": { "index": 117, "kind": "parameter", "displayName": "Ssl Truststore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password for the trust store file. If a password is not set, trust store [...]
+ "sslTruststoreType": { "index": 118, "kind": "parameter", "displayName": "Ssl Truststore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the trust store file. The default value is [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/sensitive-keys.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/sensitive-keys.json
index a4f0def9dd5a..5fcfd13df66f 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/sensitive-keys.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/sensitive-keys.json
@@ -58,6 +58,7 @@
"refreshtoken",
"sascredential",
"sasljaasconfig",
+ "saslpassword",
"sassignature",
"secret",
"secretkey",
diff --git a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaComponentConfigurer.java b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaComponentConfigurer.java
index 20cfaf073c42..06fe9d880b39 100644
--- a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaComponentConfigurer.java
+++ b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaComponentConfigurer.java
@@ -148,6 +148,14 @@ public class KafkaComponentConfigurer extends PropertyConfigurerSupport implemen
case "metricsSampleWindowMs": getOrCreateConfiguration(target).setMetricsSampleWindowMs(property(camelContext, java.lang.Integer.class, value)); return true;
case "noofmetricssample":
case "noOfMetricsSample": getOrCreateConfiguration(target).setNoOfMetricsSample(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "oauthclientid":
+ case "oauthClientId": getOrCreateConfiguration(target).setOauthClientId(property(camelContext, java.lang.String.class, value)); return true;
+ case "oauthclientsecret":
+ case "oauthClientSecret": getOrCreateConfiguration(target).setOauthClientSecret(property(camelContext, java.lang.String.class, value)); return true;
+ case "oauthscope":
+ case "oauthScope": getOrCreateConfiguration(target).setOauthScope(property(camelContext, java.lang.String.class, value)); return true;
+ case "oauthtokenendpointuri":
+ case "oauthTokenEndpointUri": getOrCreateConfiguration(target).setOauthTokenEndpointUri(property(camelContext, java.lang.String.class, value)); return true;
case "offsetrepository":
case "offsetRepository": getOrCreateConfiguration(target).setOffsetRepository(property(camelContext, org.apache.camel.spi.StateRepository.class, value)); return true;
case "partitionassignor":
@@ -186,12 +194,18 @@ public class KafkaComponentConfigurer extends PropertyConfigurerSupport implemen
case "retryBackoffMaxMs": getOrCreateConfiguration(target).setRetryBackoffMaxMs(property(camelContext, java.lang.Integer.class, value)); return true;
case "retrybackoffms":
case "retryBackoffMs": getOrCreateConfiguration(target).setRetryBackoffMs(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "saslauthtype":
+ case "saslAuthType": getOrCreateConfiguration(target).setSaslAuthType(property(camelContext, org.apache.camel.component.kafka.security.KafkaAuthType.class, value)); return true;
case "sasljaasconfig":
case "saslJaasConfig": getOrCreateConfiguration(target).setSaslJaasConfig(property(camelContext, java.lang.String.class, value)); return true;
case "saslkerberosservicename":
case "saslKerberosServiceName": getOrCreateConfiguration(target).setSaslKerberosServiceName(property(camelContext, java.lang.String.class, value)); return true;
case "saslmechanism":
case "saslMechanism": getOrCreateConfiguration(target).setSaslMechanism(property(camelContext, java.lang.String.class, value)); return true;
+ case "saslpassword":
+ case "saslPassword": getOrCreateConfiguration(target).setSaslPassword(property(camelContext, java.lang.String.class, value)); return true;
+ case "saslusername":
+ case "saslUsername": getOrCreateConfiguration(target).setSaslUsername(property(camelContext, java.lang.String.class, value)); return true;
case "schemaregistryurl":
case "schemaRegistryURL": getOrCreateConfiguration(target).setSchemaRegistryURL(property(camelContext, java.lang.String.class, value)); return true;
case "securityprotocol":
@@ -392,6 +406,14 @@ public class KafkaComponentConfigurer extends PropertyConfigurerSupport implemen
case "metricsSampleWindowMs": return java.lang.Integer.class;
case "noofmetricssample":
case "noOfMetricsSample": return java.lang.Integer.class;
+ case "oauthclientid":
+ case "oauthClientId": return java.lang.String.class;
+ case "oauthclientsecret":
+ case "oauthClientSecret": return java.lang.String.class;
+ case "oauthscope":
+ case "oauthScope": return java.lang.String.class;
+ case "oauthtokenendpointuri":
+ case "oauthTokenEndpointUri": return java.lang.String.class;
case "offsetrepository":
case "offsetRepository": return org.apache.camel.spi.StateRepository.class;
case "partitionassignor":
@@ -430,12 +452,18 @@ public class KafkaComponentConfigurer extends PropertyConfigurerSupport implemen
case "retryBackoffMaxMs": return java.lang.Integer.class;
case "retrybackoffms":
case "retryBackoffMs": return java.lang.Integer.class;
+ case "saslauthtype":
+ case "saslAuthType": return org.apache.camel.component.kafka.security.KafkaAuthType.class;
case "sasljaasconfig":
case "saslJaasConfig": return java.lang.String.class;
case "saslkerberosservicename":
case "saslKerberosServiceName": return java.lang.String.class;
case "saslmechanism":
case "saslMechanism": return java.lang.String.class;
+ case "saslpassword":
+ case "saslPassword": return java.lang.String.class;
+ case "saslusername":
+ case "saslUsername": return java.lang.String.class;
case "schemaregistryurl":
case "schemaRegistryURL": return java.lang.String.class;
case "securityprotocol":
@@ -632,6 +660,14 @@ public class KafkaComponentConfigurer extends PropertyConfigurerSupport implemen
case "metricsSampleWindowMs": return getOrCreateConfiguration(target).getMetricsSampleWindowMs();
case "noofmetricssample":
case "noOfMetricsSample": return getOrCreateConfiguration(target).getNoOfMetricsSample();
+ case "oauthclientid":
+ case "oauthClientId": return getOrCreateConfiguration(target).getOauthClientId();
+ case "oauthclientsecret":
+ case "oauthClientSecret": return getOrCreateConfiguration(target).getOauthClientSecret();
+ case "oauthscope":
+ case "oauthScope": return getOrCreateConfiguration(target).getOauthScope();
+ case "oauthtokenendpointuri":
+ case "oauthTokenEndpointUri": return getOrCreateConfiguration(target).getOauthTokenEndpointUri();
case "offsetrepository":
case "offsetRepository": return getOrCreateConfiguration(target).getOffsetRepository();
case "partitionassignor":
@@ -670,12 +706,18 @@ public class KafkaComponentConfigurer extends PropertyConfigurerSupport implemen
case "retryBackoffMaxMs": return getOrCreateConfiguration(target).getRetryBackoffMaxMs();
case "retrybackoffms":
case "retryBackoffMs": return getOrCreateConfiguration(target).getRetryBackoffMs();
+ case "saslauthtype":
+ case "saslAuthType": return getOrCreateConfiguration(target).getSaslAuthType();
case "sasljaasconfig":
case "saslJaasConfig": return getOrCreateConfiguration(target).getSaslJaasConfig();
case "saslkerberosservicename":
case "saslKerberosServiceName": return getOrCreateConfiguration(target).getSaslKerberosServiceName();
case "saslmechanism":
case "saslMechanism": return getOrCreateConfiguration(target).getSaslMechanism();
+ case "saslpassword":
+ case "saslPassword": return getOrCreateConfiguration(target).getSaslPassword();
+ case "saslusername":
+ case "saslUsername": return getOrCreateConfiguration(target).getSaslUsername();
case "schemaregistryurl":
case "schemaRegistryURL": return getOrCreateConfiguration(target).getSchemaRegistryURL();
case "securityprotocol":
diff --git a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointConfigurer.java b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointConfigurer.java
index 3bbc639cf112..e513e8626d37 100644
--- a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointConfigurer.java
+++ b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointConfigurer.java
@@ -134,6 +134,14 @@ public class KafkaEndpointConfigurer extends PropertyConfigurerSupport implement
case "metricsSampleWindowMs": target.getConfiguration().setMetricsSampleWindowMs(property(camelContext, java.lang.Integer.class, value)); return true;
case "noofmetricssample":
case "noOfMetricsSample": target.getConfiguration().setNoOfMetricsSample(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "oauthclientid":
+ case "oauthClientId": target.getConfiguration().setOauthClientId(property(camelContext, java.lang.String.class, value)); return true;
+ case "oauthclientsecret":
+ case "oauthClientSecret": target.getConfiguration().setOauthClientSecret(property(camelContext, java.lang.String.class, value)); return true;
+ case "oauthscope":
+ case "oauthScope": target.getConfiguration().setOauthScope(property(camelContext, java.lang.String.class, value)); return true;
+ case "oauthtokenendpointuri":
+ case "oauthTokenEndpointUri": target.getConfiguration().setOauthTokenEndpointUri(property(camelContext, java.lang.String.class, value)); return true;
case "offsetrepository":
case "offsetRepository": target.getConfiguration().setOffsetRepository(property(camelContext, org.apache.camel.spi.StateRepository.class, value)); return true;
case "partitionassignor":
@@ -170,12 +178,18 @@ public class KafkaEndpointConfigurer extends PropertyConfigurerSupport implement
case "retryBackoffMaxMs": target.getConfiguration().setRetryBackoffMaxMs(property(camelContext, java.lang.Integer.class, value)); return true;
case "retrybackoffms":
case "retryBackoffMs": target.getConfiguration().setRetryBackoffMs(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "saslauthtype":
+ case "saslAuthType": target.getConfiguration().setSaslAuthType(property(camelContext, org.apache.camel.component.kafka.security.KafkaAuthType.class, value)); return true;
case "sasljaasconfig":
case "saslJaasConfig": target.getConfiguration().setSaslJaasConfig(property(camelContext, java.lang.String.class, value)); return true;
case "saslkerberosservicename":
case "saslKerberosServiceName": target.getConfiguration().setSaslKerberosServiceName(property(camelContext, java.lang.String.class, value)); return true;
case "saslmechanism":
case "saslMechanism": target.getConfiguration().setSaslMechanism(property(camelContext, java.lang.String.class, value)); return true;
+ case "saslpassword":
+ case "saslPassword": target.getConfiguration().setSaslPassword(property(camelContext, java.lang.String.class, value)); return true;
+ case "saslusername":
+ case "saslUsername": target.getConfiguration().setSaslUsername(property(camelContext, java.lang.String.class, value)); return true;
case "schemaregistryurl":
case "schemaRegistryURL": target.getConfiguration().setSchemaRegistryURL(property(camelContext, java.lang.String.class, value)); return true;
case "securityprotocol":
@@ -356,6 +370,14 @@ public class KafkaEndpointConfigurer extends PropertyConfigurerSupport implement
case "metricsSampleWindowMs": return java.lang.Integer.class;
case "noofmetricssample":
case "noOfMetricsSample": return java.lang.Integer.class;
+ case "oauthclientid":
+ case "oauthClientId": return java.lang.String.class;
+ case "oauthclientsecret":
+ case "oauthClientSecret": return java.lang.String.class;
+ case "oauthscope":
+ case "oauthScope": return java.lang.String.class;
+ case "oauthtokenendpointuri":
+ case "oauthTokenEndpointUri": return java.lang.String.class;
case "offsetrepository":
case "offsetRepository": return org.apache.camel.spi.StateRepository.class;
case "partitionassignor":
@@ -392,12 +414,18 @@ public class KafkaEndpointConfigurer extends PropertyConfigurerSupport implement
case "retryBackoffMaxMs": return java.lang.Integer.class;
case "retrybackoffms":
case "retryBackoffMs": return java.lang.Integer.class;
+ case "saslauthtype":
+ case "saslAuthType": return org.apache.camel.component.kafka.security.KafkaAuthType.class;
case "sasljaasconfig":
case "saslJaasConfig": return java.lang.String.class;
case "saslkerberosservicename":
case "saslKerberosServiceName": return java.lang.String.class;
case "saslmechanism":
case "saslMechanism": return java.lang.String.class;
+ case "saslpassword":
+ case "saslPassword": return java.lang.String.class;
+ case "saslusername":
+ case "saslUsername": return java.lang.String.class;
case "schemaregistryurl":
case "schemaRegistryURL": return java.lang.String.class;
case "securityprotocol":
@@ -579,6 +607,14 @@ public class KafkaEndpointConfigurer extends PropertyConfigurerSupport implement
case "metricsSampleWindowMs": return target.getConfiguration().getMetricsSampleWindowMs();
case "noofmetricssample":
case "noOfMetricsSample": return target.getConfiguration().getNoOfMetricsSample();
+ case "oauthclientid":
+ case "oauthClientId": return target.getConfiguration().getOauthClientId();
+ case "oauthclientsecret":
+ case "oauthClientSecret": return target.getConfiguration().getOauthClientSecret();
+ case "oauthscope":
+ case "oauthScope": return target.getConfiguration().getOauthScope();
+ case "oauthtokenendpointuri":
+ case "oauthTokenEndpointUri": return target.getConfiguration().getOauthTokenEndpointUri();
case "offsetrepository":
case "offsetRepository": return target.getConfiguration().getOffsetRepository();
case "partitionassignor":
@@ -615,12 +651,18 @@ public class KafkaEndpointConfigurer extends PropertyConfigurerSupport implement
case "retryBackoffMaxMs": return target.getConfiguration().getRetryBackoffMaxMs();
case "retrybackoffms":
case "retryBackoffMs": return target.getConfiguration().getRetryBackoffMs();
+ case "saslauthtype":
+ case "saslAuthType": return target.getConfiguration().getSaslAuthType();
case "sasljaasconfig":
case "saslJaasConfig": return target.getConfiguration().getSaslJaasConfig();
case "saslkerberosservicename":
case "saslKerberosServiceName": return target.getConfiguration().getSaslKerberosServiceName();
case "saslmechanism":
case "saslMechanism": return target.getConfiguration().getSaslMechanism();
+ case "saslpassword":
+ case "saslPassword": return target.getConfiguration().getSaslPassword();
+ case "saslusername":
+ case "saslUsername": return target.getConfiguration().getSaslUsername();
case "schemaregistryurl":
case "schemaRegistryURL": return target.getConfiguration().getSchemaRegistryURL();
case "securityprotocol":
diff --git a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointUriFactory.java b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointUriFactory.java
index f8bbcdd5df69..72f2516827ae 100644
--- a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointUriFactory.java
+++ b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointUriFactory.java
@@ -23,7 +23,7 @@ public class KafkaEndpointUriFactory extends org.apache.camel.support.component.
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Map<String, String> MULTI_VALUE_PREFIXES;
static {
- Set<String> props = new HashSet<>(112);
+ Set<String> props = new HashSet<>(119);
props.add("additionalProperties");
props.add("allowManualCommit");
props.add("autoCommitEnable");
@@ -81,6 +81,10 @@ public class KafkaEndpointUriFactory extends org.apache.camel.support.component.
props.add("metricReporters");
props.add("metricsSampleWindowMs");
props.add("noOfMetricsSample");
+ props.add("oauthClientId");
+ props.add("oauthClientSecret");
+ props.add("oauthScope");
+ props.add("oauthTokenEndpointUri");
props.add("offsetRepository");
props.add("partitionAssignor");
props.add("partitionKey");
@@ -100,9 +104,12 @@ public class KafkaEndpointUriFactory extends org.apache.camel.support.component.
props.add("retries");
props.add("retryBackoffMaxMs");
props.add("retryBackoffMs");
+ props.add("saslAuthType");
props.add("saslJaasConfig");
props.add("saslKerberosServiceName");
props.add("saslMechanism");
+ props.add("saslPassword");
+ props.add("saslUsername");
props.add("schemaRegistryURL");
props.add("securityProtocol");
props.add("seekTo");
@@ -137,8 +144,10 @@ public class KafkaEndpointUriFactory extends org.apache.camel.support.component.
props.add("workerPoolCoreSize");
props.add("workerPoolMaxSize");
PROPERTY_NAMES = Collections.unmodifiableSet(props);
- Set<String> secretProps = new HashSet<>(4);
+ Set<String> secretProps = new HashSet<>(6);
+ secretProps.add("oauthClientSecret");
secretProps.add("saslJaasConfig");
+ secretProps.add("saslPassword");
secretProps.add("sslKeyPassword");
secretProps.add("sslKeystorePassword");
secretProps.add("sslTruststorePassword");
diff --git a/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json b/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json
index 836027386e43..567eda888800 100644
--- a/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json
+++ b/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json
@@ -124,26 +124,33 @@
"kerberosPrincipalToLocalRules": { "index": 97, "kind": "property", "displayName": "Kerberos Principal To Local Rules", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "DEFAULT", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "A list of rules for mapping from [...]
"kerberosRenewJitter": { "index": 98, "kind": "property", "displayName": "Kerberos Renew Jitter", "group": "security", "label": "common,security", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0.05", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Percentage of random jitter added to the renewal time." },
"kerberosRenewWindowFactor": { "index": 99, "kind": "property", "displayName": "Kerberos Renew Window Factor", "group": "security", "label": "common,security", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0.8", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Login thread will sleep until the specified wi [...]
- "saslJaasConfig": { "index": 100, "kind": "property", "displayName": "Sasl Jaas Config", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Expose the kafka sasl.jaas.config parameter Example: org.apache.kafka.common.security.plain. [...]
- "saslKerberosServiceName": { "index": 101, "kind": "property", "displayName": "Sasl Kerberos Service Name", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Kerberos principal name that Kafka runs as. This can be defined eith [...]
- "saslMechanism": { "index": 102, "kind": "property", "displayName": "Sasl Mechanism", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GSSAPI", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Simple Authentication and Security Layer (SASL) Mechanism used. [...]
- "securityProtocol": { "index": 103, "kind": "property", "displayName": "Security Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PLAINTEXT", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Protocol used to communicate with brokers. SASL_PLAINTEXT, [...]
- "sslCipherSuites": { "index": 104, "kind": "property", "displayName": "Ssl Cipher Suites", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "A list of cipher suites. This is a named combination of authentication, encryption, MAC a [...]
- "sslContextParameters": { "index": 105, "kind": "property", "displayName": "Ssl Context Parameters", "group": "security", "label": "common,security", "required": false, "type": "object", "javaType": "org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "SSL configuration using a Camel SSLContextPar [...]
- "sslEnabledProtocols": { "index": 106, "kind": "property", "displayName": "Ssl Enabled Protocols", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The list of protocols enabled for SSL connections. The default is TLSv1.2,TLSv1.3 [...]
- "sslEndpointAlgorithm": { "index": 107, "kind": "property", "displayName": "Ssl Endpoint Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The endpoint identification algorithm to validate serv [...]
- "sslKeymanagerAlgorithm": { "index": 108, "kind": "property", "displayName": "Ssl Keymanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "SunX509", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by key manager factory for SS [...]
- "sslKeyPassword": { "index": 109, "kind": "property", "displayName": "Ssl Key Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password of the private key in the key store file or the PEM key specified in sslKeystor [...]
- "sslKeystoreLocation": { "index": 110, "kind": "property", "displayName": "Ssl Keystore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the key store file. This is optional for the client and can be us [...]
- "sslKeystorePassword": { "index": 111, "kind": "property", "displayName": "Ssl Keystore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The store password for the key store file. This is optional for the client and onl [...]
- "sslKeystoreType": { "index": 112, "kind": "property", "displayName": "Ssl Keystore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the key store file. This is optional for the cl [...]
- "sslProtocol": { "index": 113, "kind": "property", "displayName": "Ssl Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The SSL protocol used to generate the SSLContext. The default is TLSv1.3 when running with Java 11 [...]
- "sslProvider": { "index": 114, "kind": "property", "displayName": "Ssl Provider", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The name of the security provider used for SSL connections. Default value is the default security [...]
- "sslTrustmanagerAlgorithm": { "index": 115, "kind": "property", "displayName": "Ssl Trustmanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PKIX", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by trust manager factory for [...]
- "sslTruststoreLocation": { "index": 116, "kind": "property", "displayName": "Ssl Truststore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the trust store file." },
- "sslTruststorePassword": { "index": 117, "kind": "property", "displayName": "Ssl Truststore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password for the trust store file. If a password is not set, trust store f [...]
- "sslTruststoreType": { "index": 118, "kind": "property", "displayName": "Ssl Truststore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the trust store file. The default value is [...]
- "useGlobalSslContextParameters": { "index": 119, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." }
+ "oauthClientId": { "index": 100, "kind": "property", "displayName": "Oauth Client Id", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth client ID. Used when saslAuthType is set to OAUTH." },
+ "oauthClientSecret": { "index": 101, "kind": "property", "displayName": "Oauth Client Secret", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth client secret. Used when saslAuthType is set to OAUTH." },
+ "oauthScope": { "index": 102, "kind": "property", "displayName": "Oauth Scope", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth scope. Used when saslAuthType is set to OAUTH." },
+ "oauthTokenEndpointUri": { "index": 103, "kind": "property", "displayName": "Oauth Token Endpoint Uri", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth token endpoint URI. Used when saslAuthType is set to OAUTH." },
+ "saslAuthType": { "index": 104, "kind": "property", "displayName": "Sasl Auth Type", "group": "security", "label": "common,security", "required": false, "type": "enum", "javaType": "org.apache.camel.component.kafka.security.KafkaAuthType", "enum": [ "NONE", "PLAIN", "SCRAM_SHA_256", "SCRAM_SHA_512", "SSL", "OAUTH", "AWS_MSK_IAM", "KERBEROS" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "config [...]
+ "saslJaasConfig": { "index": 105, "kind": "property", "displayName": "Sasl Jaas Config", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Expose the kafka sasl.jaas.config parameter Example: org.apache.kafka.common.security.plain. [...]
+ "saslKerberosServiceName": { "index": 106, "kind": "property", "displayName": "Sasl Kerberos Service Name", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Kerberos principal name that Kafka runs as. This can be defined eith [...]
+ "saslMechanism": { "index": 107, "kind": "property", "displayName": "Sasl Mechanism", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GSSAPI", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Simple Authentication and Security Layer (SASL) Mechanism used. [...]
+ "saslPassword": { "index": 108, "kind": "property", "displayName": "Sasl Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Password for SASL authentication. Used when saslAuthType is set to PLAIN, SCRAM_SHA_256, or SCRAM [...]
+ "saslUsername": { "index": 109, "kind": "property", "displayName": "Sasl Username", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Username for SASL authentication. Used when saslAuthType is set to PLAIN, SCRAM_SHA_256, or SCRA [...]
+ "securityProtocol": { "index": 110, "kind": "property", "displayName": "Security Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PLAINTEXT", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Protocol used to communicate with brokers. SASL_PLAINTEXT, [...]
+ "sslCipherSuites": { "index": 111, "kind": "property", "displayName": "Ssl Cipher Suites", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "A list of cipher suites. This is a named combination of authentication, encryption, MAC a [...]
+ "sslContextParameters": { "index": 112, "kind": "property", "displayName": "Ssl Context Parameters", "group": "security", "label": "common,security", "required": false, "type": "object", "javaType": "org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "SSL configuration using a Camel SSLContextPar [...]
+ "sslEnabledProtocols": { "index": 113, "kind": "property", "displayName": "Ssl Enabled Protocols", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The list of protocols enabled for SSL connections. The default is TLSv1.2,TLSv1.3 [...]
+ "sslEndpointAlgorithm": { "index": 114, "kind": "property", "displayName": "Ssl Endpoint Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The endpoint identification algorithm to validate serv [...]
+ "sslKeymanagerAlgorithm": { "index": 115, "kind": "property", "displayName": "Ssl Keymanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "SunX509", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by key manager factory for SS [...]
+ "sslKeyPassword": { "index": 116, "kind": "property", "displayName": "Ssl Key Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password of the private key in the key store file or the PEM key specified in sslKeystor [...]
+ "sslKeystoreLocation": { "index": 117, "kind": "property", "displayName": "Ssl Keystore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the key store file. This is optional for the client and can be us [...]
+ "sslKeystorePassword": { "index": 118, "kind": "property", "displayName": "Ssl Keystore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The store password for the key store file. This is optional for the client and onl [...]
+ "sslKeystoreType": { "index": 119, "kind": "property", "displayName": "Ssl Keystore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the key store file. This is optional for the cl [...]
+ "sslProtocol": { "index": 120, "kind": "property", "displayName": "Ssl Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The SSL protocol used to generate the SSLContext. The default is TLSv1.3 when running with Java 11 [...]
+ "sslProvider": { "index": 121, "kind": "property", "displayName": "Ssl Provider", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The name of the security provider used for SSL connections. Default value is the default security [...]
+ "sslTrustmanagerAlgorithm": { "index": 122, "kind": "property", "displayName": "Ssl Trustmanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PKIX", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by trust manager factory for [...]
+ "sslTruststoreLocation": { "index": 123, "kind": "property", "displayName": "Ssl Truststore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the trust store file." },
+ "sslTruststorePassword": { "index": 124, "kind": "property", "displayName": "Ssl Truststore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password for the trust store file. If a password is not set, trust store f [...]
+ "sslTruststoreType": { "index": 125, "kind": "property", "displayName": "Ssl Truststore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the trust store file. The default value is [...]
+ "useGlobalSslContextParameters": { "index": 126, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." }
},
"headers": {
"kafka.PARTITION_KEY": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Explicitly specify the partition", "constantName": "org.apache.camel.component.kafka.KafkaConstants#PARTITION_KEY" },
@@ -254,24 +261,31 @@
"kerberosPrincipalToLocalRules": { "index": 90, "kind": "parameter", "displayName": "Kerberos Principal To Local Rules", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "DEFAULT", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "A list of rules for mapping from [...]
"kerberosRenewJitter": { "index": 91, "kind": "parameter", "displayName": "Kerberos Renew Jitter", "group": "security", "label": "common,security", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0.05", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Percentage of random jitter added to the renewal time." },
"kerberosRenewWindowFactor": { "index": 92, "kind": "parameter", "displayName": "Kerberos Renew Window Factor", "group": "security", "label": "common,security", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0.8", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Login thread will sleep until the specified w [...]
- "saslJaasConfig": { "index": 93, "kind": "parameter", "displayName": "Sasl Jaas Config", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Expose the kafka sasl.jaas.config parameter Example: org.apache.kafka.common.security.plain. [...]
- "saslKerberosServiceName": { "index": 94, "kind": "parameter", "displayName": "Sasl Kerberos Service Name", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Kerberos principal name that Kafka runs as. This can be defined eith [...]
- "saslMechanism": { "index": 95, "kind": "parameter", "displayName": "Sasl Mechanism", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GSSAPI", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Simple Authentication and Security Layer (SASL) Mechanism used. [...]
- "securityProtocol": { "index": 96, "kind": "parameter", "displayName": "Security Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PLAINTEXT", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Protocol used to communicate with brokers. SASL_PLAINTEXT, [...]
- "sslCipherSuites": { "index": 97, "kind": "parameter", "displayName": "Ssl Cipher Suites", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "A list of cipher suites. This is a named combination of authentication, encryption, MAC a [...]
- "sslContextParameters": { "index": 98, "kind": "parameter", "displayName": "Ssl Context Parameters", "group": "security", "label": "common,security", "required": false, "type": "object", "javaType": "org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "SSL configuration using a Camel SSLContextPar [...]
- "sslEnabledProtocols": { "index": 99, "kind": "parameter", "displayName": "Ssl Enabled Protocols", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The list of protocols enabled for SSL connections. The default is TLSv1.2,TLSv1.3 [...]
- "sslEndpointAlgorithm": { "index": 100, "kind": "parameter", "displayName": "Ssl Endpoint Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The endpoint identification algorithm to validate ser [...]
- "sslKeymanagerAlgorithm": { "index": 101, "kind": "parameter", "displayName": "Ssl Keymanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "SunX509", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by key manager factory for S [...]
- "sslKeyPassword": { "index": 102, "kind": "parameter", "displayName": "Ssl Key Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password of the private key in the key store file or the PEM key specified in sslKeysto [...]
- "sslKeystoreLocation": { "index": 103, "kind": "parameter", "displayName": "Ssl Keystore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the key store file. This is optional for the client and can be u [...]
- "sslKeystorePassword": { "index": 104, "kind": "parameter", "displayName": "Ssl Keystore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The store password for the key store file. This is optional for the client and on [...]
- "sslKeystoreType": { "index": 105, "kind": "parameter", "displayName": "Ssl Keystore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the key store file. This is optional for the c [...]
- "sslProtocol": { "index": 106, "kind": "parameter", "displayName": "Ssl Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The SSL protocol used to generate the SSLContext. The default is TLSv1.3 when running with Java 1 [...]
- "sslProvider": { "index": 107, "kind": "parameter", "displayName": "Ssl Provider", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The name of the security provider used for SSL connections. Default value is the default security [...]
- "sslTrustmanagerAlgorithm": { "index": 108, "kind": "parameter", "displayName": "Ssl Trustmanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PKIX", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by trust manager factory fo [...]
- "sslTruststoreLocation": { "index": 109, "kind": "parameter", "displayName": "Ssl Truststore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the trust store file." },
- "sslTruststorePassword": { "index": 110, "kind": "parameter", "displayName": "Ssl Truststore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password for the trust store file. If a password is not set, trust store [...]
- "sslTruststoreType": { "index": 111, "kind": "parameter", "displayName": "Ssl Truststore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the trust store file. The default value is [...]
+ "oauthClientId": { "index": 93, "kind": "parameter", "displayName": "Oauth Client Id", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth client ID. Used when saslAuthType is set to OAUTH." },
+ "oauthClientSecret": { "index": 94, "kind": "parameter", "displayName": "Oauth Client Secret", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth client secret. Used when saslAuthType is set to OAUTH." },
+ "oauthScope": { "index": 95, "kind": "parameter", "displayName": "Oauth Scope", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth scope. Used when saslAuthType is set to OAUTH." },
+ "oauthTokenEndpointUri": { "index": 96, "kind": "parameter", "displayName": "Oauth Token Endpoint Uri", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "OAuth token endpoint URI. Used when saslAuthType is set to OAUTH." },
+ "saslAuthType": { "index": 97, "kind": "parameter", "displayName": "Sasl Auth Type", "group": "security", "label": "common,security", "required": false, "type": "enum", "javaType": "org.apache.camel.component.kafka.security.KafkaAuthType", "enum": [ "NONE", "PLAIN", "SCRAM_SHA_256", "SCRAM_SHA_512", "SSL", "OAUTH", "AWS_MSK_IAM", "KERBEROS" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "config [...]
+ "saslJaasConfig": { "index": 98, "kind": "parameter", "displayName": "Sasl Jaas Config", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Expose the kafka sasl.jaas.config parameter Example: org.apache.kafka.common.security.plain. [...]
+ "saslKerberosServiceName": { "index": 99, "kind": "parameter", "displayName": "Sasl Kerberos Service Name", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Kerberos principal name that Kafka runs as. This can be defined eith [...]
+ "saslMechanism": { "index": 100, "kind": "parameter", "displayName": "Sasl Mechanism", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GSSAPI", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The Simple Authentication and Security Layer (SASL) Mechanism used. [...]
+ "saslPassword": { "index": 101, "kind": "parameter", "displayName": "Sasl Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Password for SASL authentication. Used when saslAuthType is set to PLAIN, SCRAM_SHA_256, or SCRA [...]
+ "saslUsername": { "index": 102, "kind": "parameter", "displayName": "Sasl Username", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Username for SASL authentication. Used when saslAuthType is set to PLAIN, SCRAM_SHA_256, or SCR [...]
+ "securityProtocol": { "index": 103, "kind": "parameter", "displayName": "Security Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PLAINTEXT", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Protocol used to communicate with brokers. SASL_PLAINTEXT, [...]
+ "sslCipherSuites": { "index": 104, "kind": "parameter", "displayName": "Ssl Cipher Suites", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "A list of cipher suites. This is a named combination of authentication, encryption, MAC [...]
+ "sslContextParameters": { "index": 105, "kind": "parameter", "displayName": "Ssl Context Parameters", "group": "security", "label": "common,security", "required": false, "type": "object", "javaType": "org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "SSL configuration using a Camel SSLContextPa [...]
+ "sslEnabledProtocols": { "index": 106, "kind": "parameter", "displayName": "Ssl Enabled Protocols", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The list of protocols enabled for SSL connections. The default is TLSv1.2,TLSv1. [...]
+ "sslEndpointAlgorithm": { "index": 107, "kind": "parameter", "displayName": "Ssl Endpoint Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The endpoint identification algorithm to validate ser [...]
+ "sslKeymanagerAlgorithm": { "index": 108, "kind": "parameter", "displayName": "Ssl Keymanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "SunX509", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by key manager factory for S [...]
+ "sslKeyPassword": { "index": 109, "kind": "parameter", "displayName": "Ssl Key Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password of the private key in the key store file or the PEM key specified in sslKeysto [...]
+ "sslKeystoreLocation": { "index": 110, "kind": "parameter", "displayName": "Ssl Keystore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the key store file. This is optional for the client and can be u [...]
+ "sslKeystorePassword": { "index": 111, "kind": "parameter", "displayName": "Ssl Keystore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The store password for the key store file. This is optional for the client and on [...]
+ "sslKeystoreType": { "index": 112, "kind": "parameter", "displayName": "Ssl Keystore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the key store file. This is optional for the c [...]
+ "sslProtocol": { "index": 113, "kind": "parameter", "displayName": "Ssl Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The SSL protocol used to generate the SSLContext. The default is TLSv1.3 when running with Java 1 [...]
+ "sslProvider": { "index": 114, "kind": "parameter", "displayName": "Ssl Provider", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The name of the security provider used for SSL connections. Default value is the default security [...]
+ "sslTrustmanagerAlgorithm": { "index": 115, "kind": "parameter", "displayName": "Ssl Trustmanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PKIX", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by trust manager factory fo [...]
+ "sslTruststoreLocation": { "index": 116, "kind": "parameter", "displayName": "Ssl Truststore Location", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the trust store file." },
+ "sslTruststorePassword": { "index": 117, "kind": "parameter", "displayName": "Ssl Truststore Password", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password for the trust store file. If a password is not set, trust store [...]
+ "sslTruststoreType": { "index": 118, "kind": "parameter", "displayName": "Ssl Truststore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the trust store file. The default value is [...]
}
}
diff --git a/components/camel-kafka/src/main/docs/kafka-component.adoc b/components/camel-kafka/src/main/docs/kafka-component.adoc
index 4d2c8d19b45d..29ab34b973e2 100644
--- a/components/camel-kafka/src/main/docs/kafka-component.adoc
+++ b/components/camel-kafka/src/main/docs/kafka-component.adoc
@@ -359,6 +359,68 @@ static {
Kafka supports several ways to authenticate the clients to the server, including plain text, PKI (certificates) over TLS, you can refer to the https://kafka.apache.org/documentation/#security_sasl[Kafka documentation] for a detailed view of the supported mechanisms. The kafka authentication and authorization is based on JAAS, so you must use a JAAS Login Module implementation on the client side.
+==== Simplified Authentication Configuration
+
+Instead of manually constructing JAAS configuration strings, you can use the `saslAuthType` option along with dedicated credential properties. This approach automatically derives the correct `securityProtocol`, `saslMechanism`, and `saslJaasConfig` values based on the selected authentication type.
+
+The following authentication types are supported:
+
+[width="100%",cols="2m,5",options="header"]
+|===
+| saslAuthType | Description
+| NONE | No authentication (insecure, for development only)
+| PLAIN | SASL/PLAIN with username and password
+| SCRAM_SHA_256 | SASL/SCRAM-SHA-256 authentication
+| SCRAM_SHA_512 | SASL/SCRAM-SHA-512 authentication
+| SSL | SSL/TLS with client certificates (mTLS)
+| OAUTH | OAuth 2.0 / OIDC authentication
+| AWS_MSK_IAM | AWS MSK IAM authentication
+| KERBEROS | Kerberos/GSSAPI authentication
+|===
+
+*SCRAM Authentication Example*
+
+[source,java]
+----
+from("kafka:my-topic?brokers=localhost:9092&saslAuthType=SCRAM_SHA_512&saslUsername=myuser&saslPassword=mypassword")
+ .to("log:received");
+----
+
+Or using Spring Boot configuration:
+
+[source,properties]
+----
+camel.component.kafka.sasl-auth-type=SCRAM_SHA_512
+camel.component.kafka.sasl-username=myuser
+camel.component.kafka.sasl-password=mypassword
+----
+
+*OAuth Authentication Example*
+
+[source,java]
+----
+from("kafka:my-topic?brokers=localhost:9092" +
+ "&saslAuthType=OAUTH" +
+ "&oauthClientId=my-client" +
+ "&oauthClientSecret=my-secret" +
+ "&oauthTokenEndpointUri=https://auth.example.com/oauth/token")
+ .to("log:received");
+----
+
+*AWS MSK IAM Authentication*
+
+When using AWS MSK with IAM authentication, ensure the `aws-msk-iam-auth` library is on the classpath:
+
+[source,java]
+----
+from("kafka:my-topic?brokers=b-1.mycluster.kafka.us-east-1.amazonaws.com:9098&saslAuthType=AWS_MSK_IAM")
+ .to("log:received");
+----
+
+The simplified configuration is optional. If you need more control or are using a custom JAAS login module, you can still use the traditional approach with explicit `securityProtocol`, `saslMechanism`, and `saslJaasConfig` properties as shown below.
+
+==== Traditional JAAS Configuration
+
This section will outline the main points for the authentication using https://github.com/strimzi/strimzi-kafka-oauth/blob/main/README.md[Strimzi JAAS Login Module] and plain text. The Strimzi OAuth contains several properties to fine tune, the authentication mechanism, so you can set them into the `OAuthBearerLoginModule` section.
The most basic way to authenticate is using the plain text login module with username and password. Beware that this is unsafe and and we suggest the OAuth over TLS for a fully secure mechanism.
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
index 0a1b432f8ab6..080c286c8225 100755
--- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
@@ -27,6 +27,8 @@ import java.util.stream.Collectors;
import org.apache.camel.Exchange;
import org.apache.camel.RuntimeCamelException;
import org.apache.camel.component.kafka.consumer.KafkaManualCommit;
+import org.apache.camel.component.kafka.security.KafkaAuthType;
+import org.apache.camel.component.kafka.security.KafkaSecurityConfigurer;
import org.apache.camel.component.kafka.serde.DefaultKafkaHeaderDeserializer;
import org.apache.camel.component.kafka.serde.DefaultKafkaHeaderSerializer;
import org.apache.camel.component.kafka.serde.KafkaHeaderDeserializer;
@@ -336,6 +338,40 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware
// sasl.jaas.config
private String saslJaasConfig;
+ // Simplified authentication configuration
+ @UriParam(label = "common,security",
+ enums = "NONE,PLAIN,SCRAM_SHA_256,SCRAM_SHA_512,SSL,OAUTH,AWS_MSK_IAM,KERBEROS",
+ description = "Simplified authentication type to use. This provides an easier way to configure Kafka "
+ + "authentication without manually setting securityProtocol, saslMechanism, and saslJaasConfig. "
+ + "When set, the appropriate security settings are automatically derived. "
+ + "Note: This is optional. You can still use the traditional approach with explicit "
+ + "securityProtocol, saslMechanism, and saslJaasConfig properties.")
+ private KafkaAuthType saslAuthType;
+
+ @UriParam(label = "common,security",
+ description = "Username for SASL authentication. Used when saslAuthType is set to PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512.")
+ private String saslUsername;
+
+ @UriParam(label = "common,security", secret = true,
+ description = "Password for SASL authentication. Used when saslAuthType is set to PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512.")
+ private String saslPassword;
+
+ @UriParam(label = "common,security",
+ description = "OAuth client ID. Used when saslAuthType is set to OAUTH.")
+ private String oauthClientId;
+
+ @UriParam(label = "common,security", secret = true,
+ description = "OAuth client secret. Used when saslAuthType is set to OAUTH.")
+ private String oauthClientSecret;
+
+ @UriParam(label = "common,security",
+ description = "OAuth token endpoint URI. Used when saslAuthType is set to OAUTH.")
+ private String oauthTokenEndpointUri;
+
+ @UriParam(label = "common,security",
+ description = "OAuth scope. Used when saslAuthType is set to OAUTH.")
+ private String oauthScope;
+
// Schema registry only options
@UriParam(label = "schema")
private String schemaRegistryURL;
@@ -382,7 +418,51 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware
}
}
+ /**
+ * Applies the simplified saslAuthType configuration if set and traditional JAAS config is not explicitly provided.
+ * <p>
+ * This method ensures backward compatibility: if the user has explicitly set saslJaasConfig, it takes precedence
+ * over the saslAuthType-based configuration.
+ * </p>
+ */
+ private void applyAuthTypeConfiguration() {
+ // Only apply if saslAuthType is set and saslJaasConfig is NOT explicitly set
+ if (saslAuthType != null && ObjectHelper.isEmpty(saslJaasConfig)) {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.forAuthType(saslAuthType);
+
+ // Configure based on auth type
+ if (saslAuthType.requiresCredentials()) {
+ configurer.withCredentials(saslUsername, saslPassword);
+ } else if (saslAuthType.requiresOAuth()) {
+ configurer.withOAuth(oauthClientId, oauthClientSecret, oauthTokenEndpointUri);
+ if (ObjectHelper.isNotEmpty(oauthScope)) {
+ configurer.withOAuthScope(oauthScope);
+ }
+ } else if (saslAuthType.requiresKerberos()) {
+ // For Kerberos, we still use the existing kerberos properties
+ // The saslAuthType just helps set the mechanism and protocol
+ }
+
+ // Determine if we should use SSL (check if any SSL properties are set)
+ boolean hasSslConfig = ObjectHelper.isNotEmpty(sslTruststoreLocation)
+ || ObjectHelper.isNotEmpty(sslKeystoreLocation)
+ || sslContextParameters != null;
+
+ // For SASL types, default to SSL unless explicitly using SASL_PLAINTEXT
+ if (saslAuthType.isSasl()) {
+ boolean useSsl = !securityProtocol.equals("SASL_PLAINTEXT") && !securityProtocol.equals("PLAINTEXT");
+ configurer.withSsl(useSsl || hasSslConfig || saslAuthType != KafkaAuthType.NONE);
+ }
+
+ // Apply the configuration
+ configurer.configure(this);
+ }
+ }
+
public Properties createProducerProperties() {
+ // Apply saslAuthType configuration if set (before creating properties)
+ applyAuthTypeConfiguration();
+
Properties props = new Properties();
addPropertyIfNotEmpty(props, ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, getKeySerializer());
addPropertyIfNotEmpty(props, ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, getValueSerializer());
@@ -472,6 +552,9 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware
}
public Properties createConsumerProperties() {
+ // Apply saslAuthType configuration if set (before creating properties)
+ applyAuthTypeConfiguration();
+
Properties props = new Properties();
addPropertyIfNotEmpty(props, ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, getKeyDeserializer());
addPropertyIfNotEmpty(props, ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, getValueDeserializer());
@@ -1271,6 +1354,106 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware
this.saslJaasConfig = saslJaasConfig;
}
+ public KafkaAuthType getSaslAuthType() {
+ return saslAuthType;
+ }
+
+ /**
+ * Simplified authentication type to use. This provides an easier way to configure Kafka authentication without
+ * manually setting securityProtocol, saslMechanism, and saslJaasConfig.
+ * <p>
+ * When set, the appropriate security settings are automatically derived based on the authentication type. This is
+ * optional - you can still use the traditional approach with explicit securityProtocol, saslMechanism, and
+ * saslJaasConfig properties.
+ * </p>
+ * <p>
+ * Supported values: NONE, PLAIN, SCRAM_SHA_256, SCRAM_SHA_512, SSL, OAUTH, AWS_MSK_IAM, KERBEROS
+ * </p>
+ *
+ * @param saslAuthType the authentication type to use
+ */
+ public void setSaslAuthType(KafkaAuthType saslAuthType) {
+ this.saslAuthType = saslAuthType;
+ }
+
+ public String getSaslUsername() {
+ return saslUsername;
+ }
+
+ /**
+ * Username for SASL authentication. Used when saslAuthType is set to PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512.
+ *
+ * @param saslUsername the SASL username
+ */
+ public void setSaslUsername(String saslUsername) {
+ this.saslUsername = saslUsername;
+ }
+
+ public String getSaslPassword() {
+ return saslPassword;
+ }
+
+ /**
+ * Password for SASL authentication. Used when saslAuthType is set to PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512.
+ *
+ * @param saslPassword the SASL password
+ */
+ public void setSaslPassword(String saslPassword) {
+ this.saslPassword = saslPassword;
+ }
+
+ public String getOauthClientId() {
+ return oauthClientId;
+ }
+
+ /**
+ * OAuth client ID. Used when saslAuthType is set to OAUTH.
+ *
+ * @param oauthClientId the OAuth client ID
+ */
+ public void setOauthClientId(String oauthClientId) {
+ this.oauthClientId = oauthClientId;
+ }
+
+ public String getOauthClientSecret() {
+ return oauthClientSecret;
+ }
+
+ /**
+ * OAuth client secret. Used when saslAuthType is set to OAUTH.
+ *
+ * @param oauthClientSecret the OAuth client secret
+ */
+ public void setOauthClientSecret(String oauthClientSecret) {
+ this.oauthClientSecret = oauthClientSecret;
+ }
+
+ public String getOauthTokenEndpointUri() {
+ return oauthTokenEndpointUri;
+ }
+
+ /**
+ * OAuth token endpoint URI. Used when saslAuthType is set to OAUTH.
+ *
+ * @param oauthTokenEndpointUri the OAuth token endpoint URI
+ */
+ public void setOauthTokenEndpointUri(String oauthTokenEndpointUri) {
+ this.oauthTokenEndpointUri = oauthTokenEndpointUri;
+ }
+
+ public String getOauthScope() {
+ return oauthScope;
+ }
+
+ /**
+ * OAuth scope. Used when saslAuthType is set to OAUTH.
+ *
+ * @param oauthScope the OAuth scope
+ */
+ public void setOauthScope(String oauthScope) {
+ this.oauthScope = oauthScope;
+ }
+
public String getSecurityProtocol() {
return securityProtocol;
}
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/security/KafkaAuthType.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/security/KafkaAuthType.java
new file mode 100644
index 000000000000..64e78a89d4c0
--- /dev/null
+++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/security/KafkaAuthType.java
@@ -0,0 +1,200 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.kafka.security;
+
+/**
+ * Supported Kafka authentication mechanisms.
+ * <p>
+ * This enum provides a simplified way to configure Kafka authentication without having to manually construct JAAS
+ * configuration strings. When used with {@link KafkaSecurityConfigurer}, it automatically derives the correct
+ * {@code securityProtocol}, {@code saslMechanism}, and {@code saslJaasConfig} values.
+ * </p>
+ *
+ * <p>
+ * Example usage:
+ * </p>
+ *
+ * <pre>
+ * // Using the enum directly
+ * KafkaAuthType authType = KafkaAuthType.SCRAM_SHA_512;
+ *
+ * // With KafkaSecurityConfigurer
+ * KafkaSecurityConfigurer.forAuthType(KafkaAuthType.SCRAM_SHA_512)
+ * .withCredentials("username", "password")
+ * .configure(kafkaConfiguration);
+ * </pre>
+ */
+public enum KafkaAuthType {
+
+ /**
+ * No authentication (insecure, typically for development only).
+ * <p>
+ * Uses PLAINTEXT security protocol with no SASL mechanism.
+ * </p>
+ */
+ NONE("PLAINTEXT", null, null),
+
+ /**
+ * SASL/PLAIN authentication with username and password.
+ * <p>
+ * Uses PlainLoginModule for authentication. Credentials are sent in clear text, so this should only be used with
+ * SSL/TLS encryption (SASL_SSL).
+ * </p>
+ */
+ PLAIN("SASL_SSL", "PLAIN", "org.apache.kafka.common.security.plain.PlainLoginModule"),
+
+ /**
+ * SASL/SCRAM-SHA-256 authentication.
+ * <p>
+ * Uses ScramLoginModule with SHA-256 hashing. More secure than PLAIN as passwords are not sent in clear text.
+ * </p>
+ */
+ SCRAM_SHA_256("SASL_SSL", "SCRAM-SHA-256", "org.apache.kafka.common.security.scram.ScramLoginModule"),
+
+ /**
+ * SASL/SCRAM-SHA-512 authentication.
+ * <p>
+ * Uses ScramLoginModule with SHA-512 hashing. More secure than SCRAM-SHA-256 due to stronger hash algorithm.
+ * </p>
+ */
+ SCRAM_SHA_512("SASL_SSL", "SCRAM-SHA-512", "org.apache.kafka.common.security.scram.ScramLoginModule"),
+
+ /**
+ * SSL/TLS authentication with client certificates (mTLS).
+ * <p>
+ * Uses SSL security protocol. Requires keystore and truststore configuration for mutual TLS authentication.
+ * </p>
+ */
+ SSL("SSL", null, null),
+
+ /**
+ * OAuth 2.0 / OIDC authentication.
+ * <p>
+ * Uses OAuthBearerLoginModule for token-based authentication. Requires OAuth client credentials and token endpoint
+ * configuration.
+ * </p>
+ */
+ OAUTH("SASL_SSL", "OAUTHBEARER", "org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule"),
+
+ /**
+ * AWS MSK IAM authentication.
+ * <p>
+ * Uses AWS IAM for authentication with Amazon MSK. Requires the aws-msk-iam-auth library on the classpath. Uses
+ * instance credentials or configured AWS credentials.
+ * </p>
+ */
+ AWS_MSK_IAM("SASL_SSL", "AWS_MSK_IAM", "software.amazon.msk.auth.iam.IAMLoginModule"),
+
+ /**
+ * Kerberos/GSSAPI authentication.
+ * <p>
+ * Uses Kerberos for authentication. Requires Kerberos configuration including principal and keytab.
+ * </p>
+ */
+ KERBEROS("SASL_SSL", "GSSAPI", "com.sun.security.auth.module.Krb5LoginModule");
+
+ private final String defaultSecurityProtocol;
+ private final String saslMechanism;
+ private final String loginModuleClass;
+
+ KafkaAuthType(String defaultSecurityProtocol, String saslMechanism, String loginModuleClass) {
+ this.defaultSecurityProtocol = defaultSecurityProtocol;
+ this.saslMechanism = saslMechanism;
+ this.loginModuleClass = loginModuleClass;
+ }
+
+ /**
+ * Returns the default security protocol for this authentication type.
+ *
+ * @return the default security protocol (e.g., "SASL_SSL", "SSL", "PLAINTEXT")
+ */
+ public String getDefaultSecurityProtocol() {
+ return defaultSecurityProtocol;
+ }
+
+ /**
+ * Returns the SASL mechanism for this authentication type.
+ *
+ * @return the SASL mechanism (e.g., "PLAIN", "SCRAM-SHA-512"), or null if not a SASL auth type
+ */
+ public String getSaslMechanism() {
+ return saslMechanism;
+ }
+
+ /**
+ * Returns the fully qualified class name of the JAAS login module.
+ *
+ * @return the login module class name, or null if not applicable
+ */
+ public String getLoginModuleClass() {
+ return loginModuleClass;
+ }
+
+ /**
+ * Returns whether this authentication type requires username and password credentials.
+ *
+ * @return true if credentials are required (PLAIN, SCRAM-SHA-256, SCRAM-SHA-512)
+ */
+ public boolean requiresCredentials() {
+ return this == PLAIN || this == SCRAM_SHA_256 || this == SCRAM_SHA_512;
+ }
+
+ /**
+ * Returns whether this authentication type uses OAuth 2.0.
+ *
+ * @return true if OAuth authentication is used
+ */
+ public boolean requiresOAuth() {
+ return this == OAUTH;
+ }
+
+ /**
+ * Returns whether this authentication type uses SSL/mTLS without SASL.
+ *
+ * @return true if SSL-only authentication is used
+ */
+ public boolean requiresSsl() {
+ return this == SSL;
+ }
+
+ /**
+ * Returns whether this authentication type uses a SASL mechanism.
+ *
+ * @return true if a SASL mechanism is used
+ */
+ public boolean isSasl() {
+ return saslMechanism != null;
+ }
+
+ /**
+ * Returns whether this authentication type uses Kerberos.
+ *
+ * @return true if Kerberos authentication is used
+ */
+ public boolean requiresKerberos() {
+ return this == KERBEROS;
+ }
+
+ /**
+ * Returns whether this authentication type uses AWS MSK IAM.
+ *
+ * @return true if AWS MSK IAM authentication is used
+ */
+ public boolean requiresAwsMskIam() {
+ return this == AWS_MSK_IAM;
+ }
+}
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/security/KafkaSecurityConfigurer.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/security/KafkaSecurityConfigurer.java
new file mode 100644
index 000000000000..7538bd3d4fc3
--- /dev/null
+++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/security/KafkaSecurityConfigurer.java
@@ -0,0 +1,504 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.kafka.security;
+
+import java.util.Objects;
+import java.util.Properties;
+
+import org.apache.camel.component.kafka.KafkaConfiguration;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.kafka.clients.CommonClientConfigs;
+import org.apache.kafka.common.config.SaslConfigs;
+
+/**
+ * Builder for Kafka security configuration.
+ * <p>
+ * This class simplifies the creation of JAAS configurations and security settings for various Kafka authentication
+ * mechanisms. Instead of manually constructing complex JAAS configuration strings, users can use this builder with
+ * simple method calls.
+ * </p>
+ *
+ * <p>
+ * Usage examples:
+ * </p>
+ *
+ * <pre>
+ * // SCRAM-SHA-512 authentication
+ * KafkaSecurityConfigurer.forAuthType(KafkaAuthType.SCRAM_SHA_512)
+ * .withCredentials("username", "password")
+ * .configure(kafkaConfiguration);
+ *
+ * // Using convenience methods
+ * KafkaSecurityConfigurer.scramSha512("username", "password")
+ * .configure(kafkaConfiguration);
+ *
+ * // OAuth 2.0 authentication
+ * KafkaSecurityConfigurer.forAuthType(KafkaAuthType.OAUTH)
+ * .withOAuth("clientId", "clientSecret", "https://auth.example.com/token")
+ * .configure(kafkaConfiguration);
+ *
+ * // AWS MSK IAM authentication
+ * KafkaSecurityConfigurer.awsMskIam()
+ * .configure(kafkaConfiguration);
+ *
+ * // Getting properties directly (for non-Camel usage)
+ * Properties props = KafkaSecurityConfigurer.scramSha512("user", "pass").toProperties();
+ * </pre>
+ *
+ * <p>
+ * This class is designed to be backward compatible with existing security configurations. If you prefer to use the
+ * traditional approach with explicit {@code securityProtocol}, {@code saslMechanism}, and {@code saslJaasConfig}
+ * properties, those will continue to work as before.
+ * </p>
+ */
+public class KafkaSecurityConfigurer {
+
+ private final KafkaAuthType authType;
+ private String username;
+ private String password;
+ private boolean useSsl = true;
+
+ // OAuth properties
+ private String oauthClientId;
+ private String oauthClientSecret;
+ private String oauthTokenEndpointUri;
+ private String oauthScope;
+
+ // Kerberos properties
+ private String kerberosPrincipal;
+ private String kerberosKeytab;
+ private boolean kerberosUseKeyTab = true;
+ private boolean kerberosStoreKey = true;
+
+ // Custom JAAS config (for advanced use cases)
+ private String customJaasConfig;
+
+ private KafkaSecurityConfigurer(KafkaAuthType authType) {
+ this.authType = Objects.requireNonNull(authType, "authType cannot be null");
+ // For NONE auth type, default to no SSL (PLAINTEXT)
+ // For other auth types, default to SSL for security
+ this.useSsl = (authType != KafkaAuthType.NONE);
+ }
+
+ /**
+ * Creates a new security configurer for the specified authentication type.
+ *
+ * @param authType the authentication type to use
+ * @return a new KafkaSecurityConfigurer instance
+ */
+ public static KafkaSecurityConfigurer forAuthType(KafkaAuthType authType) {
+ return new KafkaSecurityConfigurer(authType);
+ }
+
+ /**
+ * Creates a new security configurer for no authentication.
+ *
+ * @return a new KafkaSecurityConfigurer instance configured for no authentication
+ */
+ public static KafkaSecurityConfigurer noAuth() {
+ return new KafkaSecurityConfigurer(KafkaAuthType.NONE);
+ }
+
+ /**
+ * Creates a new security configurer for PLAIN authentication.
+ *
+ * @param username the SASL username
+ * @param password the SASL password
+ * @return a new KafkaSecurityConfigurer instance configured for PLAIN authentication
+ */
+ public static KafkaSecurityConfigurer plain(String username, String password) {
+ return new KafkaSecurityConfigurer(KafkaAuthType.PLAIN)
+ .withCredentials(username, password);
+ }
+
+ /**
+ * Creates a new security configurer for SCRAM-SHA-512 authentication.
+ *
+ * @param username the SASL username
+ * @param password the SASL password
+ * @return a new KafkaSecurityConfigurer instance configured for SCRAM-SHA-512 authentication
+ */
+ public static KafkaSecurityConfigurer scramSha512(String username, String password) {
+ return new KafkaSecurityConfigurer(KafkaAuthType.SCRAM_SHA_512)
+ .withCredentials(username, password);
+ }
+
+ /**
+ * Creates a new security configurer for SCRAM-SHA-256 authentication.
+ *
+ * @param username the SASL username
+ * @param password the SASL password
+ * @return a new KafkaSecurityConfigurer instance configured for SCRAM-SHA-256 authentication
+ */
+ public static KafkaSecurityConfigurer scramSha256(String username, String password) {
+ return new KafkaSecurityConfigurer(KafkaAuthType.SCRAM_SHA_256)
+ .withCredentials(username, password);
+ }
+
+ /**
+ * Creates a new security configurer for SSL/mTLS authentication.
+ *
+ * @return a new KafkaSecurityConfigurer instance configured for SSL authentication
+ */
+ public static KafkaSecurityConfigurer ssl() {
+ return new KafkaSecurityConfigurer(KafkaAuthType.SSL);
+ }
+
+ /**
+ * Creates a new security configurer for AWS MSK IAM authentication.
+ *
+ * @return a new KafkaSecurityConfigurer instance configured for AWS MSK IAM authentication
+ */
+ public static KafkaSecurityConfigurer awsMskIam() {
+ return new KafkaSecurityConfigurer(KafkaAuthType.AWS_MSK_IAM);
+ }
+
+ /**
+ * Creates a new security configurer for OAuth 2.0 authentication.
+ *
+ * @param clientId the OAuth client ID
+ * @param clientSecret the OAuth client secret
+ * @param tokenEndpointUri the OAuth token endpoint URI
+ * @return a new KafkaSecurityConfigurer instance configured for OAuth authentication
+ */
+ public static KafkaSecurityConfigurer oauth(String clientId, String clientSecret, String tokenEndpointUri) {
+ return new KafkaSecurityConfigurer(KafkaAuthType.OAUTH)
+ .withOAuth(clientId, clientSecret, tokenEndpointUri);
+ }
+
+ /**
+ * Creates a new security configurer for Kerberos authentication.
+ *
+ * @param principal the Kerberos principal
+ * @param keytab the path to the Kerberos keytab file
+ * @return a new KafkaSecurityConfigurer instance configured for Kerberos authentication
+ */
+ public static KafkaSecurityConfigurer kerberos(String principal, String keytab) {
+ return new KafkaSecurityConfigurer(KafkaAuthType.KERBEROS)
+ .withKerberos(principal, keytab);
+ }
+
+ /**
+ * Sets username and password credentials.
+ *
+ * @param username the SASL username
+ * @param password the SASL password
+ * @return this configurer instance for method chaining
+ */
+ public KafkaSecurityConfigurer withCredentials(String username, String password) {
+ this.username = username;
+ this.password = password;
+ return this;
+ }
+
+ /**
+ * Enables or disables SSL encryption.
+ * <p>
+ * For SASL authentication types, this controls whether to use SASL_SSL (default) or SASL_PLAINTEXT. For no
+ * authentication (NONE), this controls whether to use SSL or PLAINTEXT.
+ * </p>
+ *
+ * @param useSsl true to use SSL encryption (default), false for plaintext
+ * @return this configurer instance for method chaining
+ */
+ public KafkaSecurityConfigurer withSsl(boolean useSsl) {
+ this.useSsl = useSsl;
+ return this;
+ }
+
+ /**
+ * Configures OAuth 2.0 authentication parameters.
+ *
+ * @param clientId the OAuth client ID
+ * @param clientSecret the OAuth client secret
+ * @param tokenEndpointUri the OAuth token endpoint URI
+ * @return this configurer instance for method chaining
+ */
+ public KafkaSecurityConfigurer withOAuth(String clientId, String clientSecret, String tokenEndpointUri) {
+ this.oauthClientId = clientId;
+ this.oauthClientSecret = clientSecret;
+ this.oauthTokenEndpointUri = tokenEndpointUri;
+ return this;
+ }
+
+ /**
+ * Sets the OAuth scope.
+ *
+ * @param scope the OAuth scope
+ * @return this configurer instance for method chaining
+ */
+ public KafkaSecurityConfigurer withOAuthScope(String scope) {
+ this.oauthScope = scope;
+ return this;
+ }
+
+ /**
+ * Configures Kerberos authentication parameters.
+ *
+ * @param principal the Kerberos principal
+ * @param keytab the path to the Kerberos keytab file
+ * @return this configurer instance for method chaining
+ */
+ public KafkaSecurityConfigurer withKerberos(String principal, String keytab) {
+ this.kerberosPrincipal = principal;
+ this.kerberosKeytab = keytab;
+ return this;
+ }
+
+ /**
+ * Sets whether to use keytab for Kerberos authentication.
+ *
+ * @param useKeyTab true to use keytab (default), false otherwise
+ * @return this configurer instance for method chaining
+ */
+ public KafkaSecurityConfigurer withKerberosUseKeyTab(boolean useKeyTab) {
+ this.kerberosUseKeyTab = useKeyTab;
+ return this;
+ }
+
+ /**
+ * Sets whether to store the Kerberos key.
+ *
+ * @param storeKey true to store the key (default), false otherwise
+ * @return this configurer instance for method chaining
+ */
+ public KafkaSecurityConfigurer withKerberosStoreKey(boolean storeKey) {
+ this.kerberosStoreKey = storeKey;
+ return this;
+ }
+
+ /**
+ * Sets a custom JAAS configuration string.
+ * <p>
+ * This overrides the auto-generated JAAS configuration. Use this for advanced use cases not covered by the standard
+ * authentication types.
+ * </p>
+ *
+ * @param jaasConfig the custom JAAS configuration string
+ * @return this configurer instance for method chaining
+ */
+ public KafkaSecurityConfigurer withCustomJaasConfig(String jaasConfig) {
+ this.customJaasConfig = jaasConfig;
+ return this;
+ }
+
+ /**
+ * Returns the authentication type.
+ *
+ * @return the authentication type
+ */
+ public KafkaAuthType getAuthType() {
+ return authType;
+ }
+
+ /**
+ * Builds the JAAS configuration string based on the authentication type and configured parameters.
+ *
+ * @return the JAAS configuration string, or null if not applicable
+ * @throws IllegalArgumentException if required parameters are missing for the authentication type
+ */
+ public String buildJaasConfig() {
+ if (ObjectHelper.isNotEmpty(customJaasConfig)) {
+ return customJaasConfig;
+ }
+
+ if (authType == KafkaAuthType.NONE || authType == KafkaAuthType.SSL) {
+ return null;
+ }
+
+ StringBuilder sb = new StringBuilder();
+ sb.append(authType.getLoginModuleClass()).append(" required");
+
+ switch (authType) {
+ case PLAIN:
+ case SCRAM_SHA_256:
+ case SCRAM_SHA_512:
+ validateCredentials();
+ sb.append(" username=\"").append(escapeJaasValue(username)).append("\"");
+ sb.append(" password=\"").append(escapeJaasValue(password)).append("\"");
+ break;
+
+ case OAUTH:
+ validateOAuth();
+ sb.append(" clientId=\"").append(escapeJaasValue(oauthClientId)).append("\"");
+ sb.append(" clientSecret=\"").append(escapeJaasValue(oauthClientSecret)).append("\"");
+ sb.append(" oauth.token.endpoint.uri=\"").append(oauthTokenEndpointUri).append("\"");
+ if (ObjectHelper.isNotEmpty(oauthScope)) {
+ sb.append(" oauth.scope=\"").append(oauthScope).append("\"");
+ }
+ break;
+
+ case AWS_MSK_IAM:
+ // AWS MSK IAM uses instance credentials, no additional config needed
+ break;
+
+ case KERBEROS:
+ validateKerberos();
+ sb.append(" useKeyTab=").append(kerberosUseKeyTab);
+ sb.append(" storeKey=").append(kerberosStoreKey);
+ sb.append(" keyTab=\"").append(escapeJaasValue(kerberosKeytab)).append("\"");
+ sb.append(" principal=\"").append(escapeJaasValue(kerberosPrincipal)).append("\"");
+ break;
+
+ default:
+ throw new IllegalStateException("Unsupported auth type: " + authType);
+ }
+
+ sb.append(";");
+ return sb.toString();
+ }
+
+ /**
+ * Returns the appropriate security protocol based on the authentication type and SSL setting.
+ *
+ * @return the security protocol (e.g., "SASL_SSL", "SSL", "PLAINTEXT", "SASL_PLAINTEXT")
+ */
+ public String getSecurityProtocol() {
+ if (authType == KafkaAuthType.NONE) {
+ return useSsl ? "SSL" : "PLAINTEXT";
+ }
+ if (authType == KafkaAuthType.SSL) {
+ return "SSL";
+ }
+ // For SASL auth types
+ return useSsl ? "SASL_SSL" : "SASL_PLAINTEXT";
+ }
+
+ /**
+ * Returns the SASL mechanism for this authentication type.
+ *
+ * @return the SASL mechanism, or null if not a SASL auth type
+ */
+ public String getSaslMechanism() {
+ return authType.getSaslMechanism();
+ }
+
+ /**
+ * Applies this security configuration to a KafkaConfiguration instance.
+ * <p>
+ * This method sets the {@code securityProtocol}, {@code saslMechanism}, and {@code saslJaasConfig} properties on
+ * the provided configuration object.
+ * </p>
+ *
+ * @param configuration the KafkaConfiguration to configure
+ */
+ public void configure(KafkaConfiguration configuration) {
+ configuration.setSecurityProtocol(getSecurityProtocol());
+
+ if (authType.isSasl()) {
+ configuration.setSaslMechanism(getSaslMechanism());
+ String jaasConfig = buildJaasConfig();
+ if (jaasConfig != null) {
+ configuration.setSaslJaasConfig(jaasConfig);
+ }
+ }
+ }
+
+ /**
+ * Creates a Properties object with security settings.
+ * <p>
+ * This is useful for direct Kafka client usage or other non-Camel scenarios.
+ * </p>
+ *
+ * @return a Properties object containing the security configuration
+ */
+ public Properties toProperties() {
+ Properties props = new Properties();
+ props.setProperty(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, getSecurityProtocol());
+
+ if (authType.isSasl()) {
+ props.setProperty(SaslConfigs.SASL_MECHANISM, getSaslMechanism());
+ String jaasConfig = buildJaasConfig();
+ if (jaasConfig != null) {
+ props.setProperty(SaslConfigs.SASL_JAAS_CONFIG, jaasConfig);
+ }
+ }
+
+ return props;
+ }
+
+ /**
+ * Validates that required properties are set based on the authentication type.
+ *
+ * @throws IllegalArgumentException if required properties are missing
+ */
+ public void validate() {
+ if (authType.requiresCredentials()) {
+ validateCredentials();
+ }
+ if (authType.requiresOAuth()) {
+ validateOAuth();
+ }
+ if (authType.requiresKerberos()) {
+ validateKerberos();
+ }
+ }
+
+ private void validateCredentials() {
+ if (ObjectHelper.isEmpty(username)) {
+ throw new IllegalArgumentException(
+ "Username is required for " + authType + " authentication");
+ }
+ if (ObjectHelper.isEmpty(password)) {
+ throw new IllegalArgumentException(
+ "Password is required for " + authType + " authentication");
+ }
+ }
+
+ private void validateOAuth() {
+ if (ObjectHelper.isEmpty(oauthClientId)) {
+ throw new IllegalArgumentException("OAuth clientId is required for OAUTH authentication");
+ }
+ if (ObjectHelper.isEmpty(oauthClientSecret)) {
+ throw new IllegalArgumentException("OAuth clientSecret is required for OAUTH authentication");
+ }
+ if (ObjectHelper.isEmpty(oauthTokenEndpointUri)) {
+ throw new IllegalArgumentException("OAuth tokenEndpointUri is required for OAUTH authentication");
+ }
+ }
+
+ private void validateKerberos() {
+ if (ObjectHelper.isEmpty(kerberosPrincipal)) {
+ throw new IllegalArgumentException("Kerberos principal is required for KERBEROS authentication");
+ }
+ if (ObjectHelper.isEmpty(kerberosKeytab)) {
+ throw new IllegalArgumentException("Kerberos keytab is required for KERBEROS authentication");
+ }
+ }
+
+ /**
+ * Escapes special characters in JAAS config values.
+ * <p>
+ * Backslashes and quotes need to be escaped in JAAS configuration values.
+ * </p>
+ *
+ * @param value the value to escape
+ * @return the escaped value
+ */
+ private String escapeJaasValue(String value) {
+ if (value == null) {
+ return "";
+ }
+ // Escape backslashes first, then quotes
+ return value.replace("\\", "\\\\").replace("\"", "\\\"");
+ }
+
+ @Override
+ public String toString() {
+ return "KafkaSecurityConfigurer[authType=" + authType + ", useSsl=" + useSsl + "]";
+ }
+}
diff --git a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaComponentTest.java b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaComponentTest.java
index 826757e95c64..f2622e32c552 100644
--- a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaComponentTest.java
+++ b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaComponentTest.java
@@ -21,6 +21,7 @@ import java.util.Map;
import java.util.Properties;
import org.apache.camel.CamelContext;
+import org.apache.camel.component.kafka.security.KafkaAuthType;
import org.apache.camel.support.jsse.KeyStoreParameters;
import org.apache.camel.support.jsse.SSLContextParameters;
import org.apache.camel.support.jsse.TrustManagersParameters;
@@ -35,7 +36,9 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
public class KafkaComponentTest {
@@ -371,4 +374,147 @@ public class KafkaComponentTest {
assertEquals("test", consumerProperties.getProperty("extra.2"));
}
+ // ========================================================================
+ // saslAuthType simplified authentication tests
+ // ========================================================================
+
+ @Test
+ public void testSaslAuthTypeScramSha512() {
+ String uri = "kafka:mytopic?brokers=broker1:12345&saslAuthType=SCRAM_SHA_512&saslUsername=myuser&saslPassword=mypass";
+
+ KafkaEndpoint endpoint = context.getEndpoint(uri, KafkaEndpoint.class);
+ assertEquals(KafkaAuthType.SCRAM_SHA_512, endpoint.getConfiguration().getSaslAuthType());
+ assertEquals("myuser", endpoint.getConfiguration().getSaslUsername());
+ assertEquals("mypass", endpoint.getConfiguration().getSaslPassword());
+
+ // Create properties and verify security is configured
+ Properties props = endpoint.getConfiguration().createProducerProperties();
+ assertEquals("SASL_SSL", props.getProperty(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG));
+ assertEquals("SCRAM-SHA-512", props.getProperty(SaslConfigs.SASL_MECHANISM));
+ assertNotNull(props.getProperty(SaslConfigs.SASL_JAAS_CONFIG));
+ assertTrue(props.getProperty(SaslConfigs.SASL_JAAS_CONFIG).contains("ScramLoginModule"));
+ assertTrue(props.getProperty(SaslConfigs.SASL_JAAS_CONFIG).contains("username=\"myuser\""));
+ }
+
+ @Test
+ public void testSaslAuthTypePlain() {
+ String uri = "kafka:mytopic?brokers=broker1:12345&saslAuthType=PLAIN&saslUsername=user&saslPassword=pass";
+
+ KafkaEndpoint endpoint = context.getEndpoint(uri, KafkaEndpoint.class);
+ assertEquals(KafkaAuthType.PLAIN, endpoint.getConfiguration().getSaslAuthType());
+
+ Properties props = endpoint.getConfiguration().createConsumerProperties();
+ assertEquals("SASL_SSL", props.getProperty(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG));
+ assertEquals("PLAIN", props.getProperty(SaslConfigs.SASL_MECHANISM));
+ assertTrue(props.getProperty(SaslConfigs.SASL_JAAS_CONFIG).contains("PlainLoginModule"));
+ }
+
+ @Test
+ public void testSaslAuthTypeAwsMskIam() {
+ String uri = "kafka:mytopic?brokers=broker1:12345&saslAuthType=AWS_MSK_IAM";
+
+ KafkaEndpoint endpoint = context.getEndpoint(uri, KafkaEndpoint.class);
+ assertEquals(KafkaAuthType.AWS_MSK_IAM, endpoint.getConfiguration().getSaslAuthType());
+
+ Properties props = endpoint.getConfiguration().createProducerProperties();
+ assertEquals("SASL_SSL", props.getProperty(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG));
+ assertEquals("AWS_MSK_IAM", props.getProperty(SaslConfigs.SASL_MECHANISM));
+ assertTrue(props.getProperty(SaslConfigs.SASL_JAAS_CONFIG).contains("IAMLoginModule"));
+ }
+
+ @Test
+ public void testSaslAuthTypeNone() {
+ String uri = "kafka:mytopic?brokers=broker1:12345&saslAuthType=NONE";
+
+ KafkaEndpoint endpoint = context.getEndpoint(uri, KafkaEndpoint.class);
+ assertEquals(KafkaAuthType.NONE, endpoint.getConfiguration().getSaslAuthType());
+
+ Properties props = endpoint.getConfiguration().createProducerProperties();
+ assertEquals("PLAINTEXT", props.getProperty(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG));
+ assertNull(props.getProperty(SaslConfigs.SASL_JAAS_CONFIG));
+ }
+
+ @Test
+ public void testSaslAuthTypeSsl() {
+ String uri = "kafka:mytopic?brokers=broker1:12345&saslAuthType=SSL";
+
+ KafkaEndpoint endpoint = context.getEndpoint(uri, KafkaEndpoint.class);
+ assertEquals(KafkaAuthType.SSL, endpoint.getConfiguration().getSaslAuthType());
+
+ Properties props = endpoint.getConfiguration().createProducerProperties();
+ assertEquals("SSL", props.getProperty(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG));
+ assertNull(props.getProperty(SaslConfigs.SASL_JAAS_CONFIG));
+ }
+
+ // ========================================================================
+ // Backward compatibility tests - existing security options should still work
+ // ========================================================================
+
+ @Test
+ public void testBackwardCompatibilityExplicitSaslJaasConfig() {
+ // When saslJaasConfig is explicitly set, it should take precedence over saslAuthType
+ String customJaasConfig
+ = "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"explicit\" password=\"explicit\";";
+ String uri = "kafka:mytopic?brokers=broker1:12345"
+ + "&securityProtocol=SASL_SSL"
+ + "&saslMechanism=PLAIN"
+ + "&saslJaasConfig=" + customJaasConfig;
+
+ KafkaEndpoint endpoint = context.getEndpoint(uri, KafkaEndpoint.class);
+
+ Properties props = endpoint.getConfiguration().createProducerProperties();
+ assertEquals("SASL_SSL", props.getProperty(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG));
+ assertEquals("PLAIN", props.getProperty(SaslConfigs.SASL_MECHANISM));
+ assertEquals(customJaasConfig, props.getProperty(SaslConfigs.SASL_JAAS_CONFIG));
+ }
+
+ @Test
+ public void testBackwardCompatibilityExplicitSecurityProtocol() {
+ // Traditional approach should still work
+ String uri = "kafka:mytopic?brokers=broker1:12345&securityProtocol=SASL_PLAINTEXT&saslMechanism=PLAIN";
+
+ KafkaEndpoint endpoint = context.getEndpoint(uri, KafkaEndpoint.class);
+
+ Properties props = endpoint.getConfiguration().createProducerProperties();
+ assertEquals("SASL_PLAINTEXT", props.getProperty(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG));
+ assertEquals("PLAIN", props.getProperty(SaslConfigs.SASL_MECHANISM));
+ }
+
+ @Test
+ public void testExplicitSaslJaasConfigTakesPrecedenceOverAuthType() {
+ // If user sets both saslAuthType AND saslJaasConfig, the explicit saslJaasConfig should win
+ String customJaasConfig = "org.custom.LoginModule required;";
+
+ KafkaConfiguration config = new KafkaConfiguration();
+ config.setSaslAuthType(KafkaAuthType.SCRAM_SHA_512);
+ config.setSaslUsername("user");
+ config.setSaslPassword("pass");
+ config.setSaslJaasConfig(customJaasConfig);
+ config.setSecurityProtocol("SASL_SSL");
+ config.setSaslMechanism("SCRAM-SHA-512");
+
+ Properties props = config.createProducerProperties();
+
+ // The explicit saslJaasConfig should be used, not the generated one
+ assertEquals(customJaasConfig, props.getProperty(SaslConfigs.SASL_JAAS_CONFIG));
+ }
+
+ @Test
+ public void testProgrammaticSaslAuthType() {
+ // Test programmatic configuration with saslAuthType
+ KafkaConfiguration config = new KafkaConfiguration();
+ config.setBrokers("localhost:9092");
+ config.setTopic("test-topic");
+ config.setSaslAuthType(KafkaAuthType.SCRAM_SHA_512);
+ config.setSaslUsername("testuser");
+ config.setSaslPassword("testpass");
+
+ Properties props = config.createProducerProperties();
+
+ assertEquals("SASL_SSL", props.getProperty(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG));
+ assertEquals("SCRAM-SHA-512", props.getProperty(SaslConfigs.SASL_MECHANISM));
+ assertNotNull(props.getProperty(SaslConfigs.SASL_JAAS_CONFIG));
+ assertTrue(props.getProperty(SaslConfigs.SASL_JAAS_CONFIG).contains("testuser"));
+ }
+
}
diff --git a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaConsumerSaslAuthTypeIT.java b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaConsumerSaslAuthTypeIT.java
new file mode 100644
index 000000000000..1976b4f0b361
--- /dev/null
+++ b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaConsumerSaslAuthTypeIT.java
@@ -0,0 +1,224 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.kafka.integration;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Properties;
+import java.util.stream.StreamSupport;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.kafka.KafkaConstants;
+import org.apache.camel.component.kafka.MockConsumerInterceptor;
+import org.apache.camel.component.kafka.integration.common.KafkaAdminUtil;
+import org.apache.camel.component.kafka.integration.common.KafkaTestUtil;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.infra.core.CamelContextExtension;
+import org.apache.camel.test.infra.core.DefaultCamelContextExtension;
+import org.apache.camel.test.infra.core.annotations.RouteFixture;
+import org.apache.camel.test.infra.kafka.services.ContainerLocalAuthKafkaService;
+import org.apache.kafka.clients.admin.AdminClient;
+import org.apache.kafka.clients.producer.ProducerRecord;
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.header.internals.RecordHeader;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.MethodOrderer;
+import org.junit.jupiter.api.Order;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestMethodOrder;
+import org.junit.jupiter.api.Timeout;
+import org.junit.jupiter.api.condition.EnabledIfSystemProperties;
+import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
+
+/**
+ * Integration test for the simplified saslAuthType authentication configuration.
+ * <p>
+ * This test validates that the new saslAuthType parameter works correctly with a real authenticated Kafka instance,
+ * using the simplified configuration approach instead of manually constructing JAAS configuration strings.
+ * </p>
+ */
+@EnabledIfSystemProperties({
+ @EnabledIfSystemProperty(named = "kafka.instance.type", matches = "local-kafka3-container",
+ disabledReason = "Requires Kafka 3.x"),
+ @EnabledIfSystemProperty(named = "kafka.instance.type", matches = "kafka", disabledReason = "Requires Kafka 3.x")
+})
+@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
+public class KafkaConsumerSaslAuthTypeIT {
+ public static final String TOPIC = "test-sasl-auth-type";
+
+ @Order(1)
+ @RegisterExtension
+ public static ContainerLocalAuthKafkaService service = new ContainerLocalAuthKafkaService("/kafka-jaas.config");
+
+ @Order(2)
+ @RegisterExtension
+ public static CamelContextExtension contextExtension = new DefaultCamelContextExtension();
+
+ protected static AdminClient kafkaAdminClient;
+
+ private static final Logger LOG = LoggerFactory.getLogger(KafkaConsumerSaslAuthTypeIT.class);
+
+ private org.apache.kafka.clients.producer.KafkaProducer<String, String> producer;
+
+ @BeforeEach
+ public void before() {
+ Properties props = KafkaTestUtil.getDefaultProperties(service);
+
+ // Producer still uses traditional config to send test messages
+ props.put(SaslConfigs.SASL_JAAS_CONFIG,
+ ContainerLocalAuthKafkaService.generateSimpleSaslJaasConfig("camel", "camel-secret"));
+ props.put("security.protocol", "SASL_PLAINTEXT");
+ props.put(SaslConfigs.SASL_MECHANISM, "PLAIN");
+
+ try {
+ producer = new org.apache.kafka.clients.producer.KafkaProducer<>(props);
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+
+ MockConsumerInterceptor.recordsCaptured.clear();
+ }
+
+ @BeforeEach
+ public void setKafkaAdminClient() {
+ if (kafkaAdminClient == null) {
+ kafkaAdminClient = KafkaAdminUtil.createAdminClient(service);
+ }
+ }
+
+ @AfterEach
+ public void after() {
+ if (producer != null) {
+ producer.close();
+ }
+ // clean all test topics
+ kafkaAdminClient.deleteTopics(Collections.singletonList(TOPIC)).all();
+ }
+
+ @RouteFixture
+ public void createRouteBuilder(CamelContext context) throws Exception {
+ context.addRoutes(createRouteBuilder());
+ }
+
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+
+ @Override
+ public void configure() {
+ // Using the new simplified saslAuthType configuration instead of explicit JAAS config
+ // Note: We override securityProtocol to SASL_PLAINTEXT for the test container
+ // In production with saslAuthType=PLAIN, it would default to SASL_SSL
+ fromF("kafka:%s"
+ + "?brokers=%s"
+ + "&groupId=%s"
+ + "&autoOffsetReset=earliest"
+ + "&keyDeserializer=org.apache.kafka.common.serialization.StringDeserializer"
+ + "&valueDeserializer=org.apache.kafka.common.serialization.StringDeserializer"
+ + "&clientId=camel-kafka-sasl-auth-type-test"
+ + "&autoCommitIntervalMs=1000"
+ + "&pollTimeoutMs=1000"
+ + "&autoCommitEnable=true"
+ + "&interceptorClasses=%s"
+ + "&saslAuthType=PLAIN"
+ + "&saslUsername=camel"
+ + "&saslPassword=camel-secret"
+ + "&securityProtocol=SASL_PLAINTEXT",
+ TOPIC,
+ service.getBootstrapServers(),
+ "KafkaConsumerSaslAuthTypeIT",
+ "org.apache.camel.component.kafka.MockConsumerInterceptor")
+ .process(
+ exchange -> LOG.trace("Captured on the processor: {}", exchange.getMessage().getBody()))
+ .routeId("sasl-auth-type-it").to(KafkaTestUtil.MOCK_RESULT);
+ }
+ };
+ }
+
+ @DisplayName("Tests that Camel can connect and consume from Kafka using the simplified saslAuthType configuration")
+ @Timeout(30)
+ @Order(1)
+ @Test
+ public void kafkaMessageIsConsumedWithSaslAuthType() throws InterruptedException {
+ MockEndpoint to = contextExtension.getMockEndpoint(KafkaTestUtil.MOCK_RESULT);
+
+ String propagatedHeaderKey = "PropagatedCustomHeader";
+ byte[] propagatedHeaderValue = "propagated header value".getBytes();
+ String skippedHeaderKey = "CamelSkippedHeader";
+ to.expectedMessageCount(5);
+ to.expectedBodiesReceivedInAnyOrder("message-0", "message-1", "message-2", "message-3", "message-4");
+ // The LAST_RECORD_BEFORE_COMMIT header should not be configured on any
+ // exchange because autoCommitEnable=true
+ to.expectedHeaderValuesReceivedInAnyOrder(KafkaConstants.LAST_RECORD_BEFORE_COMMIT, null, null, null, null, null);
+ to.expectedHeaderReceived(propagatedHeaderKey, propagatedHeaderValue);
+
+ populateKafkaTopic(propagatedHeaderKey, propagatedHeaderValue);
+
+ to.assertIsSatisfied(3000);
+
+ assertEquals(5, MockConsumerInterceptor.recordsCaptured.stream()
+ .flatMap(i -> StreamSupport.stream(i.records(TOPIC).spliterator(), false)).count());
+
+ Map<String, Object> headers = to.getExchanges().get(0).getIn().getHeaders();
+ assertFalse(headers.containsKey(skippedHeaderKey), "Should not receive skipped header");
+ assertTrue(headers.containsKey(propagatedHeaderKey), "Should receive propagated header");
+ }
+
+ @DisplayName("Tests that the producer can send messages using the simplified saslAuthType configuration")
+ @Timeout(30)
+ @Order(2)
+ @Test
+ public void kafkaProducerWithSaslAuthType() throws InterruptedException {
+ MockEndpoint to = contextExtension.getMockEndpoint(KafkaTestUtil.MOCK_RESULT);
+
+ to.expectedMessageCount(3);
+ to.expectedBodiesReceivedInAnyOrder("producer-msg-0", "producer-msg-1", "producer-msg-2");
+
+ // Send messages using the test producer (which uses traditional auth)
+ for (int k = 0; k < 3; k++) {
+ String msg = "producer-msg-" + k;
+ ProducerRecord<String, String> data = new ProducerRecord<>(TOPIC, "key-" + k, msg);
+ producer.send(data);
+ }
+
+ to.assertIsSatisfied(5000);
+
+ assertEquals(3, MockConsumerInterceptor.recordsCaptured.stream()
+ .flatMap(i -> StreamSupport.stream(i.records(TOPIC).spliterator(), false)).count());
+ }
+
+ private void populateKafkaTopic(String propagatedHeaderKey, byte[] propagatedHeaderValue) {
+ for (int k = 0; k < 5; k++) {
+ String msg = "message-" + k;
+ ProducerRecord<String, String> data = new ProducerRecord<>(TOPIC, "1", msg);
+ data.headers().add(new RecordHeader("CamelSkippedHeader", "skipped header value".getBytes()));
+ data.headers().add(new RecordHeader(propagatedHeaderKey, propagatedHeaderValue));
+ producer.send(data);
+ }
+ }
+
+}
diff --git a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaProducerSaslAuthTypeIT.java b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaProducerSaslAuthTypeIT.java
new file mode 100644
index 000000000000..37febfdc73ac
--- /dev/null
+++ b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaProducerSaslAuthTypeIT.java
@@ -0,0 +1,211 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.kafka.integration;
+
+import java.time.Duration;
+import java.util.Collections;
+import java.util.Properties;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.kafka.KafkaConstants;
+import org.apache.camel.component.kafka.integration.common.KafkaAdminUtil;
+import org.apache.camel.test.infra.core.CamelContextExtension;
+import org.apache.camel.test.infra.core.DefaultCamelContextExtension;
+import org.apache.camel.test.infra.core.annotations.RouteFixture;
+import org.apache.camel.test.infra.kafka.services.ContainerLocalAuthKafkaService;
+import org.apache.kafka.clients.admin.AdminClient;
+import org.apache.kafka.clients.consumer.ConsumerConfig;
+import org.apache.kafka.clients.consumer.ConsumerRecord;
+import org.apache.kafka.clients.consumer.ConsumerRecords;
+import org.apache.kafka.clients.consumer.KafkaConsumer;
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.serialization.StringDeserializer;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.MethodOrderer;
+import org.junit.jupiter.api.Order;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestMethodOrder;
+import org.junit.jupiter.api.Timeout;
+import org.junit.jupiter.api.condition.EnabledIfSystemProperties;
+import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
+
+/**
+ * Integration test for the simplified saslAuthType authentication configuration for the Kafka producer.
+ * <p>
+ * This test validates that the new saslAuthType parameter works correctly when producing messages to an authenticated
+ * Kafka instance using the simplified configuration approach.
+ * </p>
+ */
+@EnabledIfSystemProperties({
+ @EnabledIfSystemProperty(named = "kafka.instance.type", matches = "local-kafka3-container",
+ disabledReason = "Requires Kafka 3.x"),
+ @EnabledIfSystemProperty(named = "kafka.instance.type", matches = "kafka", disabledReason = "Requires Kafka 3.x")
+})
+@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
+public class KafkaProducerSaslAuthTypeIT {
+ public static final String TOPIC = "test-producer-sasl-auth-type";
+
+ @Order(1)
+ @RegisterExtension
+ public static ContainerLocalAuthKafkaService service = new ContainerLocalAuthKafkaService("/kafka-jaas.config");
+
+ @Order(2)
+ @RegisterExtension
+ public static CamelContextExtension contextExtension = new DefaultCamelContextExtension();
+
+ protected static AdminClient kafkaAdminClient;
+
+ private static final Logger LOG = LoggerFactory.getLogger(KafkaProducerSaslAuthTypeIT.class);
+
+ private KafkaConsumer<String, String> consumer;
+
+ @BeforeEach
+ public void before() {
+ Properties props = new Properties();
+ props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, service.getBootstrapServers());
+ props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class.getName());
+ props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class.getName());
+ props.put(ConsumerConfig.GROUP_ID_CONFIG, "test-consumer-group");
+ props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
+
+ // Consumer uses traditional config to receive test messages
+ props.put(SaslConfigs.SASL_JAAS_CONFIG,
+ ContainerLocalAuthKafkaService.generateSimpleSaslJaasConfig("camel", "camel-secret"));
+ props.put("security.protocol", "SASL_PLAINTEXT");
+ props.put(SaslConfigs.SASL_MECHANISM, "PLAIN");
+
+ try {
+ consumer = new KafkaConsumer<>(props);
+ consumer.subscribe(Collections.singletonList(TOPIC));
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ @BeforeEach
+ public void setKafkaAdminClient() {
+ if (kafkaAdminClient == null) {
+ kafkaAdminClient = KafkaAdminUtil.createAdminClient(service);
+ }
+ }
+
+ @AfterEach
+ public void after() {
+ if (consumer != null) {
+ consumer.close();
+ }
+ // clean all test topics
+ kafkaAdminClient.deleteTopics(Collections.singletonList(TOPIC)).all();
+ }
+
+ @RouteFixture
+ public void createRouteBuilder(CamelContext context) throws Exception {
+ context.addRoutes(createRouteBuilder());
+ }
+
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+
+ @Override
+ public void configure() {
+ // Route that uses the Camel producer with saslAuthType
+ from("direct:start")
+ .toF("kafka:%s"
+ + "?brokers=%s"
+ + "&saslAuthType=PLAIN"
+ + "&saslUsername=camel"
+ + "&saslPassword=camel-secret"
+ + "&securityProtocol=SASL_PLAINTEXT",
+ TOPIC,
+ service.getBootstrapServers())
+ .routeId("producer-sasl-auth-type-it");
+ }
+ };
+ }
+
+ @DisplayName("Tests that Camel producer can send messages to Kafka using the simplified saslAuthType configuration")
+ @Timeout(30)
+ @Order(1)
+ @Test
+ public void kafkaProducerWithSaslAuthType() throws InterruptedException {
+ ProducerTemplate producerTemplate = contextExtension.getProducerTemplate();
+
+ // Send messages using Camel producer with saslAuthType
+ for (int i = 0; i < 5; i++) {
+ producerTemplate.sendBodyAndHeader("direct:start", "test-message-" + i, KafkaConstants.KEY, "key-" + i);
+ }
+
+ // Allow some time for messages to be sent
+ Thread.sleep(2000);
+
+ // Consume messages with native Kafka consumer to verify they were sent correctly
+ int messageCount = 0;
+ int maxAttempts = 10;
+ int attempt = 0;
+
+ while (messageCount < 5 && attempt < maxAttempts) {
+ ConsumerRecords<String, String> records = consumer.poll(Duration.ofMillis(1000));
+ for (ConsumerRecord<String, String> record : records) {
+ LOG.info("Received message: key={}, value={}", record.key(), record.value());
+ assertNotNull(record.value());
+ assertEquals("test-message-" + messageCount, record.value());
+ assertEquals("key-" + messageCount, record.key());
+ messageCount++;
+ }
+ attempt++;
+ }
+
+ assertEquals(5, messageCount, "Should have received 5 messages");
+ }
+
+ @DisplayName("Tests that Camel producer can send messages with headers using saslAuthType")
+ @Timeout(30)
+ @Order(2)
+ @Test
+ public void kafkaProducerWithSaslAuthTypeAndHeaders() throws InterruptedException {
+ ProducerTemplate producerTemplate = contextExtension.getProducerTemplate();
+
+ // Send a message with custom headers
+ producerTemplate.sendBodyAndHeaders("direct:start", "message-with-headers",
+ java.util.Map.of(
+ KafkaConstants.KEY, "header-test-key",
+ "CustomHeader", "custom-value"));
+
+ // Allow some time for messages to be sent
+ Thread.sleep(2000);
+
+ // Consume the message
+ ConsumerRecords<String, String> records = consumer.poll(Duration.ofMillis(5000));
+
+ assertEquals(1, records.count(), "Should have received 1 message");
+
+ ConsumerRecord<String, String> record = records.iterator().next();
+ assertEquals("message-with-headers", record.value());
+ assertEquals("header-test-key", record.key());
+ }
+}
diff --git a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/security/KafkaSecurityConfigurerTest.java b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/security/KafkaSecurityConfigurerTest.java
new file mode 100644
index 000000000000..b70ad3449bc4
--- /dev/null
+++ b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/security/KafkaSecurityConfigurerTest.java
@@ -0,0 +1,481 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.kafka.security;
+
+import java.util.Properties;
+
+import org.apache.camel.component.kafka.KafkaConfiguration;
+import org.apache.kafka.clients.CommonClientConfigs;
+import org.apache.kafka.common.config.SaslConfigs;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+/**
+ * Unit tests for {@link KafkaSecurityConfigurer} and {@link KafkaAuthType}.
+ */
+public class KafkaSecurityConfigurerTest {
+
+ // ========================================================================
+ // KafkaAuthType enum tests
+ // ========================================================================
+
+ @Test
+ public void testAuthTypeNone() {
+ KafkaAuthType authType = KafkaAuthType.NONE;
+ assertEquals("PLAINTEXT", authType.getDefaultSecurityProtocol());
+ assertNull(authType.getSaslMechanism());
+ assertNull(authType.getLoginModuleClass());
+ assertFalse(authType.isSasl());
+ assertFalse(authType.requiresCredentials());
+ assertFalse(authType.requiresOAuth());
+ assertFalse(authType.requiresSsl());
+ assertFalse(authType.requiresKerberos());
+ assertFalse(authType.requiresAwsMskIam());
+ }
+
+ @Test
+ public void testAuthTypePlain() {
+ KafkaAuthType authType = KafkaAuthType.PLAIN;
+ assertEquals("SASL_SSL", authType.getDefaultSecurityProtocol());
+ assertEquals("PLAIN", authType.getSaslMechanism());
+ assertEquals("org.apache.kafka.common.security.plain.PlainLoginModule", authType.getLoginModuleClass());
+ assertTrue(authType.isSasl());
+ assertTrue(authType.requiresCredentials());
+ assertFalse(authType.requiresOAuth());
+ }
+
+ @Test
+ public void testAuthTypeScramSha256() {
+ KafkaAuthType authType = KafkaAuthType.SCRAM_SHA_256;
+ assertEquals("SASL_SSL", authType.getDefaultSecurityProtocol());
+ assertEquals("SCRAM-SHA-256", authType.getSaslMechanism());
+ assertEquals("org.apache.kafka.common.security.scram.ScramLoginModule", authType.getLoginModuleClass());
+ assertTrue(authType.isSasl());
+ assertTrue(authType.requiresCredentials());
+ }
+
+ @Test
+ public void testAuthTypeScramSha512() {
+ KafkaAuthType authType = KafkaAuthType.SCRAM_SHA_512;
+ assertEquals("SASL_SSL", authType.getDefaultSecurityProtocol());
+ assertEquals("SCRAM-SHA-512", authType.getSaslMechanism());
+ assertEquals("org.apache.kafka.common.security.scram.ScramLoginModule", authType.getLoginModuleClass());
+ assertTrue(authType.isSasl());
+ assertTrue(authType.requiresCredentials());
+ }
+
+ @Test
+ public void testAuthTypeSsl() {
+ KafkaAuthType authType = KafkaAuthType.SSL;
+ assertEquals("SSL", authType.getDefaultSecurityProtocol());
+ assertNull(authType.getSaslMechanism());
+ assertFalse(authType.isSasl());
+ assertTrue(authType.requiresSsl());
+ }
+
+ @Test
+ public void testAuthTypeOAuth() {
+ KafkaAuthType authType = KafkaAuthType.OAUTH;
+ assertEquals("SASL_SSL", authType.getDefaultSecurityProtocol());
+ assertEquals("OAUTHBEARER", authType.getSaslMechanism());
+ assertTrue(authType.isSasl());
+ assertTrue(authType.requiresOAuth());
+ assertFalse(authType.requiresCredentials());
+ }
+
+ @Test
+ public void testAuthTypeAwsMskIam() {
+ KafkaAuthType authType = KafkaAuthType.AWS_MSK_IAM;
+ assertEquals("SASL_SSL", authType.getDefaultSecurityProtocol());
+ assertEquals("AWS_MSK_IAM", authType.getSaslMechanism());
+ assertEquals("software.amazon.msk.auth.iam.IAMLoginModule", authType.getLoginModuleClass());
+ assertTrue(authType.isSasl());
+ assertTrue(authType.requiresAwsMskIam());
+ }
+
+ @Test
+ public void testAuthTypeKerberos() {
+ KafkaAuthType authType = KafkaAuthType.KERBEROS;
+ assertEquals("SASL_SSL", authType.getDefaultSecurityProtocol());
+ assertEquals("GSSAPI", authType.getSaslMechanism());
+ assertTrue(authType.isSasl());
+ assertTrue(authType.requiresKerberos());
+ }
+
+ // ========================================================================
+ // KafkaSecurityConfigurer - Factory method tests
+ // ========================================================================
+
+ @Test
+ public void testNoAuth() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.noAuth();
+ assertEquals(KafkaAuthType.NONE, configurer.getAuthType());
+ assertEquals("PLAINTEXT", configurer.getSecurityProtocol());
+ assertNull(configurer.buildJaasConfig());
+ }
+
+ @Test
+ public void testPlainFactory() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.plain("myuser", "mypass");
+ assertEquals(KafkaAuthType.PLAIN, configurer.getAuthType());
+ assertEquals("SASL_SSL", configurer.getSecurityProtocol());
+ assertEquals("PLAIN", configurer.getSaslMechanism());
+ }
+
+ @Test
+ public void testScramSha512Factory() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.scramSha512("myuser", "mypass");
+ assertEquals(KafkaAuthType.SCRAM_SHA_512, configurer.getAuthType());
+ assertEquals("SASL_SSL", configurer.getSecurityProtocol());
+ assertEquals("SCRAM-SHA-512", configurer.getSaslMechanism());
+ }
+
+ @Test
+ public void testScramSha256Factory() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.scramSha256("myuser", "mypass");
+ assertEquals(KafkaAuthType.SCRAM_SHA_256, configurer.getAuthType());
+ assertEquals("SCRAM-SHA-256", configurer.getSaslMechanism());
+ }
+
+ @Test
+ public void testSslFactory() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.ssl();
+ assertEquals(KafkaAuthType.SSL, configurer.getAuthType());
+ assertEquals("SSL", configurer.getSecurityProtocol());
+ assertNull(configurer.getSaslMechanism());
+ }
+
+ @Test
+ public void testAwsMskIamFactory() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.awsMskIam();
+ assertEquals(KafkaAuthType.AWS_MSK_IAM, configurer.getAuthType());
+ assertEquals("AWS_MSK_IAM", configurer.getSaslMechanism());
+ }
+
+ @Test
+ public void testOAuthFactory() {
+ KafkaSecurityConfigurer configurer
+ = KafkaSecurityConfigurer.oauth("clientId", "clientSecret", "https://auth.example.com/token");
+ assertEquals(KafkaAuthType.OAUTH, configurer.getAuthType());
+ assertEquals("OAUTHBEARER", configurer.getSaslMechanism());
+ }
+
+ @Test
+ public void testKerberosFactory() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.kerberos("kafka/host@REALM", "/path/to/keytab");
+ assertEquals(KafkaAuthType.KERBEROS, configurer.getAuthType());
+ assertEquals("GSSAPI", configurer.getSaslMechanism());
+ }
+
+ // ========================================================================
+ // JAAS config generation tests
+ // ========================================================================
+
+ @Test
+ public void testBuildJaasConfigPlain() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.plain("myuser", "mypass");
+ String jaasConfig = configurer.buildJaasConfig();
+
+ assertNotNull(jaasConfig);
+ assertTrue(jaasConfig.contains("org.apache.kafka.common.security.plain.PlainLoginModule required"));
+ assertTrue(jaasConfig.contains("username=\"myuser\""));
+ assertTrue(jaasConfig.contains("password=\"mypass\""));
+ assertTrue(jaasConfig.endsWith(";"));
+ }
+
+ @Test
+ public void testBuildJaasConfigScramSha512() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.scramSha512("myuser", "secret123");
+ String jaasConfig = configurer.buildJaasConfig();
+
+ assertNotNull(jaasConfig);
+ assertTrue(jaasConfig.contains("org.apache.kafka.common.security.scram.ScramLoginModule required"));
+ assertTrue(jaasConfig.contains("username=\"myuser\""));
+ assertTrue(jaasConfig.contains("password=\"secret123\""));
+ }
+
+ @Test
+ public void testBuildJaasConfigAwsMskIam() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.awsMskIam();
+ String jaasConfig = configurer.buildJaasConfig();
+
+ assertNotNull(jaasConfig);
+ assertTrue(jaasConfig.contains("software.amazon.msk.auth.iam.IAMLoginModule required"));
+ // AWS MSK IAM doesn't need username/password
+ assertFalse(jaasConfig.contains("username="));
+ }
+
+ @Test
+ public void testBuildJaasConfigOAuth() {
+ KafkaSecurityConfigurer configurer
+ = KafkaSecurityConfigurer.oauth("my-client", "my-secret", "https://auth.example.com/token")
+ .withOAuthScope("kafka");
+ String jaasConfig = configurer.buildJaasConfig();
+
+ assertNotNull(jaasConfig);
+ assertTrue(jaasConfig.contains("org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule required"));
+ assertTrue(jaasConfig.contains("clientId=\"my-client\""));
+ assertTrue(jaasConfig.contains("clientSecret=\"my-secret\""));
+ assertTrue(jaasConfig.contains("oauth.token.endpoint.uri=\"https://auth.example.com/token\""));
+ assertTrue(jaasConfig.contains("oauth.scope=\"kafka\""));
+ }
+
+ @Test
+ public void testBuildJaasConfigKerberos() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.kerberos("kafka/host@REALM", "/path/to/keytab");
+ String jaasConfig = configurer.buildJaasConfig();
+
+ assertNotNull(jaasConfig);
+ assertTrue(jaasConfig.contains("com.sun.security.auth.module.Krb5LoginModule required"));
+ assertTrue(jaasConfig.contains("useKeyTab=true"));
+ assertTrue(jaasConfig.contains("storeKey=true"));
+ assertTrue(jaasConfig.contains("keyTab=\"/path/to/keytab\""));
+ assertTrue(jaasConfig.contains("principal=\"kafka/host@REALM\""));
+ }
+
+ @Test
+ public void testBuildJaasConfigNone() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.noAuth();
+ assertNull(configurer.buildJaasConfig());
+ }
+
+ @Test
+ public void testBuildJaasConfigSsl() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.ssl();
+ assertNull(configurer.buildJaasConfig());
+ }
+
+ @Test
+ public void testCustomJaasConfig() {
+ String customConfig = "org.custom.LoginModule required custom=true;";
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.forAuthType(KafkaAuthType.PLAIN)
+ .withCustomJaasConfig(customConfig);
+
+ assertEquals(customConfig, configurer.buildJaasConfig());
+ }
+
+ // ========================================================================
+ // Security protocol tests
+ // ========================================================================
+
+ @Test
+ public void testSecurityProtocolWithSsl() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.scramSha512("user", "pass").withSsl(true);
+ assertEquals("SASL_SSL", configurer.getSecurityProtocol());
+ }
+
+ @Test
+ public void testSecurityProtocolWithoutSsl() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.scramSha512("user", "pass").withSsl(false);
+ assertEquals("SASL_PLAINTEXT", configurer.getSecurityProtocol());
+ }
+
+ @Test
+ public void testSecurityProtocolNoneWithSsl() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.noAuth().withSsl(true);
+ assertEquals("SSL", configurer.getSecurityProtocol());
+ }
+
+ @Test
+ public void testSecurityProtocolNoneWithoutSsl() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.noAuth().withSsl(false);
+ assertEquals("PLAINTEXT", configurer.getSecurityProtocol());
+ }
+
+ // ========================================================================
+ // Escaping tests
+ // ========================================================================
+
+ @Test
+ public void testEscapeSpecialCharactersInPassword() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.plain("user", "pass\"with\\special");
+ String jaasConfig = configurer.buildJaasConfig();
+
+ // Verify escaping
+ assertTrue(jaasConfig.contains("password=\"pass\\\"with\\\\special\""));
+ }
+
+ @Test
+ public void testEscapeQuotesInUsername() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.plain("user\"name", "pass");
+ String jaasConfig = configurer.buildJaasConfig();
+
+ assertTrue(jaasConfig.contains("username=\"user\\\"name\""));
+ }
+
+ // ========================================================================
+ // Validation tests
+ // ========================================================================
+
+ @Test
+ public void testValidateMissingUsername() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.forAuthType(KafkaAuthType.PLAIN)
+ .withCredentials(null, "password");
+
+ assertThrows(IllegalArgumentException.class, configurer::validate);
+ }
+
+ @Test
+ public void testValidateMissingPassword() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.forAuthType(KafkaAuthType.PLAIN)
+ .withCredentials("username", null);
+
+ assertThrows(IllegalArgumentException.class, configurer::validate);
+ }
+
+ @Test
+ public void testValidateMissingOAuthClientId() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.forAuthType(KafkaAuthType.OAUTH)
+ .withOAuth(null, "secret", "https://auth.example.com/token");
+
+ assertThrows(IllegalArgumentException.class, configurer::validate);
+ }
+
+ @Test
+ public void testValidateMissingOAuthClientSecret() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.forAuthType(KafkaAuthType.OAUTH)
+ .withOAuth("clientId", null, "https://auth.example.com/token");
+
+ assertThrows(IllegalArgumentException.class, configurer::validate);
+ }
+
+ @Test
+ public void testValidateMissingOAuthTokenEndpoint() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.forAuthType(KafkaAuthType.OAUTH)
+ .withOAuth("clientId", "secret", null);
+
+ assertThrows(IllegalArgumentException.class, configurer::validate);
+ }
+
+ @Test
+ public void testValidateMissingKerberosPrincipal() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.forAuthType(KafkaAuthType.KERBEROS)
+ .withKerberos(null, "/path/to/keytab");
+
+ assertThrows(IllegalArgumentException.class, configurer::validate);
+ }
+
+ @Test
+ public void testValidateMissingKerberosKeytab() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.forAuthType(KafkaAuthType.KERBEROS)
+ .withKerberos("principal", null);
+
+ assertThrows(IllegalArgumentException.class, configurer::validate);
+ }
+
+ // ========================================================================
+ // Integration with KafkaConfiguration tests
+ // ========================================================================
+
+ @Test
+ public void testConfigureKafkaConfiguration() {
+ KafkaConfiguration config = new KafkaConfiguration();
+
+ KafkaSecurityConfigurer.scramSha512("myuser", "mypass")
+ .configure(config);
+
+ assertEquals("SASL_SSL", config.getSecurityProtocol());
+ assertEquals("SCRAM-SHA-512", config.getSaslMechanism());
+ assertNotNull(config.getSaslJaasConfig());
+ assertTrue(config.getSaslJaasConfig().contains("ScramLoginModule"));
+ }
+
+ @Test
+ public void testConfigureKafkaConfigurationPlain() {
+ KafkaConfiguration config = new KafkaConfiguration();
+
+ KafkaSecurityConfigurer.plain("user", "pass")
+ .configure(config);
+
+ assertEquals("SASL_SSL", config.getSecurityProtocol());
+ assertEquals("PLAIN", config.getSaslMechanism());
+ assertTrue(config.getSaslJaasConfig().contains("PlainLoginModule"));
+ }
+
+ @Test
+ public void testConfigureKafkaConfigurationAwsMsk() {
+ KafkaConfiguration config = new KafkaConfiguration();
+
+ KafkaSecurityConfigurer.awsMskIam()
+ .configure(config);
+
+ assertEquals("SASL_SSL", config.getSecurityProtocol());
+ assertEquals("AWS_MSK_IAM", config.getSaslMechanism());
+ assertTrue(config.getSaslJaasConfig().contains("IAMLoginModule"));
+ }
+
+ @Test
+ public void testConfigureKafkaConfigurationNone() {
+ KafkaConfiguration config = new KafkaConfiguration();
+ config.setSecurityProtocol("SOME_VALUE"); // Should be overwritten
+
+ KafkaSecurityConfigurer.noAuth()
+ .configure(config);
+
+ assertEquals("PLAINTEXT", config.getSecurityProtocol());
+ assertNull(config.getSaslJaasConfig());
+ }
+
+ @Test
+ public void testConfigureKafkaConfigurationSsl() {
+ KafkaConfiguration config = new KafkaConfiguration();
+
+ KafkaSecurityConfigurer.ssl()
+ .configure(config);
+
+ assertEquals("SSL", config.getSecurityProtocol());
+ // SSL auth type doesn't modify the existing SASL mechanism (which has a default value)
+ // The important thing is that no JAAS config is set
+ assertNull(config.getSaslJaasConfig());
+ }
+
+ // ========================================================================
+ // toProperties() tests
+ // ========================================================================
+
+ @Test
+ public void testToProperties() {
+ Properties props = KafkaSecurityConfigurer.scramSha512("user", "pass").toProperties();
+
+ assertEquals("SASL_SSL", props.getProperty(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG));
+ assertEquals("SCRAM-SHA-512", props.getProperty(SaslConfigs.SASL_MECHANISM));
+ assertNotNull(props.getProperty(SaslConfigs.SASL_JAAS_CONFIG));
+ }
+
+ @Test
+ public void testToPropertiesNoAuth() {
+ Properties props = KafkaSecurityConfigurer.noAuth().toProperties();
+
+ assertEquals("PLAINTEXT", props.getProperty(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG));
+ assertNull(props.getProperty(SaslConfigs.SASL_MECHANISM));
+ assertNull(props.getProperty(SaslConfigs.SASL_JAAS_CONFIG));
+ }
+
+ // ========================================================================
+ // toString() test
+ // ========================================================================
+
+ @Test
+ public void testToString() {
+ KafkaSecurityConfigurer configurer = KafkaSecurityConfigurer.scramSha512("user", "pass");
+ String str = configurer.toString();
+
+ assertTrue(str.contains("SCRAM_SHA_512"));
+ assertTrue(str.contains("useSsl=true"));
+ }
+}
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java b/core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java
index 24e0c2a3e703..b71fe7b21363 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java
@@ -87,6 +87,7 @@ public final class SensitiveUtils {
"refreshtoken",
"sascredential",
"sasljaasconfig",
+ "saslpassword",
"sassignature",
"secret",
"secretkey",
@@ -176,6 +177,7 @@ public final class SensitiveUtils {
+ "|\\Qrefreshtoken\\E"
+ "|\\Qsascredential\\E"
+ "|\\Qsasljaasconfig\\E"
+ + "|\\Qsaslpassword\\E"
+ "|\\Qsassignature\\E"
+ "|\\Qsecret\\E"
+ "|\\Qsecretkey\\E"
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java
index bae4e1a49b61..69c38b69ce8f 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java
@@ -2092,6 +2092,87 @@ public interface KafkaComponentBuilderFactory {
return this;
}
+ /**
+ * OAuth client ID. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthClientId the value to set
+ * @return the dsl builder
+ */
+ default KafkaComponentBuilder oauthClientId(java.lang.String oauthClientId) {
+ doSetProperty("oauthClientId", oauthClientId);
+ return this;
+ }
+
+ /**
+ * OAuth client secret. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthClientSecret the value to set
+ * @return the dsl builder
+ */
+ default KafkaComponentBuilder oauthClientSecret(java.lang.String oauthClientSecret) {
+ doSetProperty("oauthClientSecret", oauthClientSecret);
+ return this;
+ }
+
+ /**
+ * OAuth scope. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthScope the value to set
+ * @return the dsl builder
+ */
+ default KafkaComponentBuilder oauthScope(java.lang.String oauthScope) {
+ doSetProperty("oauthScope", oauthScope);
+ return this;
+ }
+
+ /**
+ * OAuth token endpoint URI. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthTokenEndpointUri the value to set
+ * @return the dsl builder
+ */
+ default KafkaComponentBuilder oauthTokenEndpointUri(java.lang.String oauthTokenEndpointUri) {
+ doSetProperty("oauthTokenEndpointUri", oauthTokenEndpointUri);
+ return this;
+ }
+
+ /**
+ * Simplified authentication type to use. This provides an easier way to
+ * configure Kafka authentication without manually setting
+ * securityProtocol, saslMechanism, and saslJaasConfig. When set, the
+ * appropriate security settings are automatically derived. Note: This
+ * is optional. You can still use the traditional approach with explicit
+ * securityProtocol, saslMechanism, and saslJaasConfig properties.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.kafka.security.KafkaAuthType</code> type.
+ *
+ * Group: security
+ *
+ * @param saslAuthType the value to set
+ * @return the dsl builder
+ */
+ default KafkaComponentBuilder saslAuthType(org.apache.camel.component.kafka.security.KafkaAuthType saslAuthType) {
+ doSetProperty("saslAuthType", saslAuthType);
+ return this;
+ }
+
/**
* Expose the kafka sasl.jaas.config parameter Example:
* org.apache.kafka.common.security.plain.PlainLoginModule required
@@ -2144,6 +2225,38 @@ public interface KafkaComponentBuilderFactory {
return this;
}
+ /**
+ * Password for SASL authentication. Used when saslAuthType is set to
+ * PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param saslPassword the value to set
+ * @return the dsl builder
+ */
+ default KafkaComponentBuilder saslPassword(java.lang.String saslPassword) {
+ doSetProperty("saslPassword", saslPassword);
+ return this;
+ }
+
+ /**
+ * Username for SASL authentication. Used when saslAuthType is set to
+ * PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param saslUsername the value to set
+ * @return the dsl builder
+ */
+ default KafkaComponentBuilder saslUsername(java.lang.String saslUsername) {
+ doSetProperty("saslUsername", saslUsername);
+ return this;
+ }
+
/**
* Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT,
@@ -2574,9 +2687,16 @@ public interface KafkaComponentBuilderFactory {
case "kerberosPrincipalToLocalRules": getOrCreateConfiguration((KafkaComponent) component).setKerberosPrincipalToLocalRules((java.lang.String) value); return true;
case "kerberosRenewJitter": getOrCreateConfiguration((KafkaComponent) component).setKerberosRenewJitter((java.lang.Double) value); return true;
case "kerberosRenewWindowFactor": getOrCreateConfiguration((KafkaComponent) component).setKerberosRenewWindowFactor((java.lang.Double) value); return true;
+ case "oauthClientId": getOrCreateConfiguration((KafkaComponent) component).setOauthClientId((java.lang.String) value); return true;
+ case "oauthClientSecret": getOrCreateConfiguration((KafkaComponent) component).setOauthClientSecret((java.lang.String) value); return true;
+ case "oauthScope": getOrCreateConfiguration((KafkaComponent) component).setOauthScope((java.lang.String) value); return true;
+ case "oauthTokenEndpointUri": getOrCreateConfiguration((KafkaComponent) component).setOauthTokenEndpointUri((java.lang.String) value); return true;
+ case "saslAuthType": getOrCreateConfiguration((KafkaComponent) component).setSaslAuthType((org.apache.camel.component.kafka.security.KafkaAuthType) value); return true;
case "saslJaasConfig": getOrCreateConfiguration((KafkaComponent) component).setSaslJaasConfig((java.lang.String) value); return true;
case "saslKerberosServiceName": getOrCreateConfiguration((KafkaComponent) component).setSaslKerberosServiceName((java.lang.String) value); return true;
case "saslMechanism": getOrCreateConfiguration((KafkaComponent) component).setSaslMechanism((java.lang.String) value); return true;
+ case "saslPassword": getOrCreateConfiguration((KafkaComponent) component).setSaslPassword((java.lang.String) value); return true;
+ case "saslUsername": getOrCreateConfiguration((KafkaComponent) component).setSaslUsername((java.lang.String) value); return true;
case "securityProtocol": getOrCreateConfiguration((KafkaComponent) component).setSecurityProtocol((java.lang.String) value); return true;
case "sslCipherSuites": getOrCreateConfiguration((KafkaComponent) component).setSslCipherSuites((java.lang.String) value); return true;
case "sslContextParameters": getOrCreateConfiguration((KafkaComponent) component).setSslContextParameters((org.apache.camel.support.jsse.SSLContextParameters) value); return true;
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java
index f0dc762a5d22..44faa02b6e4a 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java
@@ -1578,6 +1578,104 @@ public interface KafkaEndpointBuilderFactory {
doSetProperty("kerberosRenewWindowFactor", kerberosRenewWindowFactor);
return this;
}
+ /**
+ * OAuth client ID. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthClientId the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointConsumerBuilder oauthClientId(String oauthClientId) {
+ doSetProperty("oauthClientId", oauthClientId);
+ return this;
+ }
+ /**
+ * OAuth client secret. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthClientSecret the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointConsumerBuilder oauthClientSecret(String oauthClientSecret) {
+ doSetProperty("oauthClientSecret", oauthClientSecret);
+ return this;
+ }
+ /**
+ * OAuth scope. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthScope the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointConsumerBuilder oauthScope(String oauthScope) {
+ doSetProperty("oauthScope", oauthScope);
+ return this;
+ }
+ /**
+ * OAuth token endpoint URI. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthTokenEndpointUri the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointConsumerBuilder oauthTokenEndpointUri(String oauthTokenEndpointUri) {
+ doSetProperty("oauthTokenEndpointUri", oauthTokenEndpointUri);
+ return this;
+ }
+ /**
+ * Simplified authentication type to use. This provides an easier way to
+ * configure Kafka authentication without manually setting
+ * securityProtocol, saslMechanism, and saslJaasConfig. When set, the
+ * appropriate security settings are automatically derived. Note: This
+ * is optional. You can still use the traditional approach with explicit
+ * securityProtocol, saslMechanism, and saslJaasConfig properties.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.kafka.security.KafkaAuthType</code>
+ * type.
+ *
+ * Group: security
+ *
+ * @param saslAuthType the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointConsumerBuilder saslAuthType(org.apache.camel.component.kafka.security.KafkaAuthType saslAuthType) {
+ doSetProperty("saslAuthType", saslAuthType);
+ return this;
+ }
+ /**
+ * Simplified authentication type to use. This provides an easier way to
+ * configure Kafka authentication without manually setting
+ * securityProtocol, saslMechanism, and saslJaasConfig. When set, the
+ * appropriate security settings are automatically derived. Note: This
+ * is optional. You can still use the traditional approach with explicit
+ * securityProtocol, saslMechanism, and saslJaasConfig properties.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.component.kafka.security.KafkaAuthType</code>
+ * type.
+ *
+ * Group: security
+ *
+ * @param saslAuthType the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointConsumerBuilder saslAuthType(String saslAuthType) {
+ doSetProperty("saslAuthType", saslAuthType);
+ return this;
+ }
/**
* Expose the kafka sasl.jaas.config parameter Example:
* org.apache.kafka.common.security.plain.PlainLoginModule required
@@ -1626,6 +1724,36 @@ public interface KafkaEndpointBuilderFactory {
doSetProperty("saslMechanism", saslMechanism);
return this;
}
+ /**
+ * Password for SASL authentication. Used when saslAuthType is set to
+ * PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param saslPassword the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointConsumerBuilder saslPassword(String saslPassword) {
+ doSetProperty("saslPassword", saslPassword);
+ return this;
+ }
+ /**
+ * Username for SASL authentication. Used when saslAuthType is set to
+ * PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param saslUsername the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointConsumerBuilder saslUsername(String saslUsername) {
+ doSetProperty("saslUsername", saslUsername);
+ return this;
+ }
/**
* Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT,
* SASL_SSL and SSL are supported.
@@ -3849,6 +3977,104 @@ public interface KafkaEndpointBuilderFactory {
doSetProperty("kerberosRenewWindowFactor", kerberosRenewWindowFactor);
return this;
}
+ /**
+ * OAuth client ID. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthClientId the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointProducerBuilder oauthClientId(String oauthClientId) {
+ doSetProperty("oauthClientId", oauthClientId);
+ return this;
+ }
+ /**
+ * OAuth client secret. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthClientSecret the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointProducerBuilder oauthClientSecret(String oauthClientSecret) {
+ doSetProperty("oauthClientSecret", oauthClientSecret);
+ return this;
+ }
+ /**
+ * OAuth scope. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthScope the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointProducerBuilder oauthScope(String oauthScope) {
+ doSetProperty("oauthScope", oauthScope);
+ return this;
+ }
+ /**
+ * OAuth token endpoint URI. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthTokenEndpointUri the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointProducerBuilder oauthTokenEndpointUri(String oauthTokenEndpointUri) {
+ doSetProperty("oauthTokenEndpointUri", oauthTokenEndpointUri);
+ return this;
+ }
+ /**
+ * Simplified authentication type to use. This provides an easier way to
+ * configure Kafka authentication without manually setting
+ * securityProtocol, saslMechanism, and saslJaasConfig. When set, the
+ * appropriate security settings are automatically derived. Note: This
+ * is optional. You can still use the traditional approach with explicit
+ * securityProtocol, saslMechanism, and saslJaasConfig properties.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.kafka.security.KafkaAuthType</code>
+ * type.
+ *
+ * Group: security
+ *
+ * @param saslAuthType the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointProducerBuilder saslAuthType(org.apache.camel.component.kafka.security.KafkaAuthType saslAuthType) {
+ doSetProperty("saslAuthType", saslAuthType);
+ return this;
+ }
+ /**
+ * Simplified authentication type to use. This provides an easier way to
+ * configure Kafka authentication without manually setting
+ * securityProtocol, saslMechanism, and saslJaasConfig. When set, the
+ * appropriate security settings are automatically derived. Note: This
+ * is optional. You can still use the traditional approach with explicit
+ * securityProtocol, saslMechanism, and saslJaasConfig properties.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.component.kafka.security.KafkaAuthType</code>
+ * type.
+ *
+ * Group: security
+ *
+ * @param saslAuthType the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointProducerBuilder saslAuthType(String saslAuthType) {
+ doSetProperty("saslAuthType", saslAuthType);
+ return this;
+ }
/**
* Expose the kafka sasl.jaas.config parameter Example:
* org.apache.kafka.common.security.plain.PlainLoginModule required
@@ -3897,6 +4123,36 @@ public interface KafkaEndpointBuilderFactory {
doSetProperty("saslMechanism", saslMechanism);
return this;
}
+ /**
+ * Password for SASL authentication. Used when saslAuthType is set to
+ * PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param saslPassword the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointProducerBuilder saslPassword(String saslPassword) {
+ doSetProperty("saslPassword", saslPassword);
+ return this;
+ }
+ /**
+ * Username for SASL authentication. Used when saslAuthType is set to
+ * PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param saslUsername the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointProducerBuilder saslUsername(String saslUsername) {
+ doSetProperty("saslUsername", saslUsername);
+ return this;
+ }
/**
* Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT,
* SASL_SSL and SSL are supported.
@@ -4816,6 +5072,104 @@ public interface KafkaEndpointBuilderFactory {
doSetProperty("kerberosRenewWindowFactor", kerberosRenewWindowFactor);
return this;
}
+ /**
+ * OAuth client ID. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthClientId the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointBuilder oauthClientId(String oauthClientId) {
+ doSetProperty("oauthClientId", oauthClientId);
+ return this;
+ }
+ /**
+ * OAuth client secret. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthClientSecret the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointBuilder oauthClientSecret(String oauthClientSecret) {
+ doSetProperty("oauthClientSecret", oauthClientSecret);
+ return this;
+ }
+ /**
+ * OAuth scope. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthScope the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointBuilder oauthScope(String oauthScope) {
+ doSetProperty("oauthScope", oauthScope);
+ return this;
+ }
+ /**
+ * OAuth token endpoint URI. Used when saslAuthType is set to OAUTH.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauthTokenEndpointUri the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointBuilder oauthTokenEndpointUri(String oauthTokenEndpointUri) {
+ doSetProperty("oauthTokenEndpointUri", oauthTokenEndpointUri);
+ return this;
+ }
+ /**
+ * Simplified authentication type to use. This provides an easier way to
+ * configure Kafka authentication without manually setting
+ * securityProtocol, saslMechanism, and saslJaasConfig. When set, the
+ * appropriate security settings are automatically derived. Note: This
+ * is optional. You can still use the traditional approach with explicit
+ * securityProtocol, saslMechanism, and saslJaasConfig properties.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.kafka.security.KafkaAuthType</code>
+ * type.
+ *
+ * Group: security
+ *
+ * @param saslAuthType the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointBuilder saslAuthType(org.apache.camel.component.kafka.security.KafkaAuthType saslAuthType) {
+ doSetProperty("saslAuthType", saslAuthType);
+ return this;
+ }
+ /**
+ * Simplified authentication type to use. This provides an easier way to
+ * configure Kafka authentication without manually setting
+ * securityProtocol, saslMechanism, and saslJaasConfig. When set, the
+ * appropriate security settings are automatically derived. Note: This
+ * is optional. You can still use the traditional approach with explicit
+ * securityProtocol, saslMechanism, and saslJaasConfig properties.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.component.kafka.security.KafkaAuthType</code>
+ * type.
+ *
+ * Group: security
+ *
+ * @param saslAuthType the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointBuilder saslAuthType(String saslAuthType) {
+ doSetProperty("saslAuthType", saslAuthType);
+ return this;
+ }
/**
* Expose the kafka sasl.jaas.config parameter Example:
* org.apache.kafka.common.security.plain.PlainLoginModule required
@@ -4864,6 +5218,36 @@ public interface KafkaEndpointBuilderFactory {
doSetProperty("saslMechanism", saslMechanism);
return this;
}
+ /**
+ * Password for SASL authentication. Used when saslAuthType is set to
+ * PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param saslPassword the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointBuilder saslPassword(String saslPassword) {
+ doSetProperty("saslPassword", saslPassword);
+ return this;
+ }
+ /**
+ * Username for SASL authentication. Used when saslAuthType is set to
+ * PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param saslUsername the value to set
+ * @return the dsl builder
+ */
+ default KafkaEndpointBuilder saslUsername(String saslUsername) {
+ doSetProperty("saslUsername", saslUsername);
+ return this;
+ }
/**
* Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT,
* SASL_SSL and SSL are supported.