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 2017/08/22 09:03:27 UTC

[1/2] camel git commit: CAMEL-11682: Add sasl.jaas.config setting

Repository: camel
Updated Branches:
  refs/heads/master ac5ab2b10 -> f09e20b2e


CAMEL-11682: Add sasl.jaas.config setting


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/22f6c766
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/22f6c766
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/22f6c766

Branch: refs/heads/master
Commit: 22f6c7665aa39a50fcc9156232011338bb242a9a
Parents: ac5ab2b
Author: christopher snow <ch...@gmail.com>
Authored: Tue Aug 22 07:50:13 2017 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Tue Aug 22 10:59:07 2017 +0200

----------------------------------------------------------------------
 .../component/kafka/KafkaConfiguration.java     | 21 +++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/22f6c766/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
----------------------------------------------------------------------
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 ba108a0..52436c6 100644
--- 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
@@ -285,7 +285,10 @@ public class KafkaConfiguration implements Cloneable {
     private Double kerberosRenewWindowFactor = SaslConfigs.DEFAULT_KERBEROS_TICKET_RENEW_WINDOW_FACTOR;
     @UriParam(label = "common,security", defaultValue = "DEFAULT")
     //sasl.kerberos.principal.to.local.rules
-    private String kerberosPrincipalToLocalRules;
+    private String kerberosPrincipalToLocalRules; 
+    @UriParam(label = "common,security", secret = true)
+    //sasl.jaas.config
+    private String saslJaasConfig;   
 
     public KafkaConfiguration() {
     }
@@ -355,6 +358,7 @@ public class KafkaConfiguration implements Cloneable {
         addPropertyIfNotNull(props, SaslConfigs.SASL_KERBEROS_TICKET_RENEW_WINDOW_FACTOR, getKerberosRenewWindowFactor());
         addListPropertyIfNotNull(props, SaslConfigs.SASL_KERBEROS_PRINCIPAL_TO_LOCAL_RULES, getKerberosPrincipalToLocalRules());
         addPropertyIfNotNull(props, SaslConfigs.SASL_MECHANISM, getSaslMechanism());
+        addPropertyIfNotNull(props, SaslConfigs.SASL_JAAS_CONFIG, getSaslJaasConfig());
 
         return props;
     }
@@ -414,6 +418,7 @@ public class KafkaConfiguration implements Cloneable {
         addPropertyIfNotNull(props, SaslConfigs.SASL_KERBEROS_TICKET_RENEW_WINDOW_FACTOR, getKerberosRenewWindowFactor());
         addListPropertyIfNotNull(props, SaslConfigs.SASL_KERBEROS_PRINCIPAL_TO_LOCAL_RULES, getKerberosPrincipalToLocalRules());
         addPropertyIfNotNull(props, SaslConfigs.SASL_MECHANISM, getSaslMechanism());
+        addPropertyIfNotNull(props, SaslConfigs.SASL_JAAS_CONFIG, getSaslJaasConfig());
         return props;
     }
 
@@ -985,6 +990,20 @@ public class KafkaConfiguration implements Cloneable {
     public void setSaslMechanism(String saslMechanism) {
         this.saslMechanism = saslMechanism;
     }
+    
+    public String getSaslJaasConfig() {
+        return saslJaasConfig;
+    }
+
+    /**
+     * Expose the kafka sasl.jaas.config parameter
+     * 
+     * Example:
+     * org.apache.kafka.common.security.plain.PlainLoginModule required username=\"USERNAME\" password=\"PASSWORD\";
+     */
+    public void setSaslJaasConfig(String saslMechanism) {
+        this.saslJaasConfig = saslMechanism;
+    }
 
     public String getSecurityProtocol() {
         return securityProtocol;

[2/2] camel git commit: CAMEL-11682 - Regen and docs

Posted by ac...@apache.org.
CAMEL-11682 - Regen and docs


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f09e20b2
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f09e20b2
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f09e20b2

Branch: refs/heads/master
Commit: f09e20b2ef6ec22ad900b737180fa58d6987377f
Parents: 22f6c76
Author: Andrea Cosentino <an...@gmail.com>
Authored: Tue Aug 22 11:02:15 2017 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Tue Aug 22 11:02:15 2017 +0200

----------------------------------------------------------------------
 .../camel-kafka/src/main/docs/kafka-component.adoc    |  3 ++-
 .../kafka/springboot/KafkaComponentConfiguration.java | 14 ++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f09e20b2/components/camel-kafka/src/main/docs/kafka-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kafka/src/main/docs/kafka-component.adoc b/components/camel-kafka/src/main/docs/kafka-component.adoc
index e67d7a7..ea6c22e 100644
--- a/components/camel-kafka/src/main/docs/kafka-component.adoc
+++ b/components/camel-kafka/src/main/docs/kafka-component.adoc
@@ -67,7 +67,7 @@ with the following path and query parameters:
 | **topic** | *Required* Name of the topic to use. On the consumer you can use comma to separate multiple topics. A producer can only send a message to a single topic. |  | String
 |=======================================================================
 
-#### Query Parameters (85 parameters):
+#### Query Parameters (86 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -139,6 +139,7 @@ with the following path and query parameters:
 | **kerberosPrincipalToLocal Rules** (security) | A list of rules for mapping from principal names to short names (typically operating system usernames). The rules are evaluated in order and the first rule that matches a principal name is used to map it to a short name. Any later rules in the list are ignored. By default principal names of the form username/hostnameREALM are mapped to username. For more details on the format please see security authorization and acls. Multiple values can be separated by comma | DEFAULT | String
 | **kerberosRenewJitter** (security) | Percentage of random jitter added to the renewal time. | 0.05 | Double
 | **kerberosRenewWindowFactor** (security) | Login thread will sleep until the specified window factor of time from last refresh to ticket's expiry has been reached at which time it will try to renew the ticket. | 0.8 | Double
+| **saslJaasConfig** (security) | Expose the kafka sasl.jaas.config parameter Example: org.apache.kafka.common.security.plain.PlainLoginModule required username=\USERNAME\ password=\PASSWORD\; |  | String
 | **saslKerberosServiceName** (security) | The Kerberos principal name that Kafka runs as. This can be defined either in Kafka's JAAS config or in Kafka's config. |  | String
 | **saslMechanism** (security) | The Simple Authentication and Security Layer (SASL) Mechanism used. For the valid values see http://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml | GSSAPI | String
 | **securityProtocol** (security) | Protocol used to communicate with brokers. Currently only PLAINTEXT and SSL are supported. | PLAINTEXT | String

http://git-wip-us.apache.org/repos/asf/camel/blob/f09e20b2/platforms/spring-boot/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
index 419a037..6c8127f 100644
--- a/platforms/spring-boot/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
@@ -379,6 +379,12 @@ public class KafkaComponentConfiguration
          */
         private String saslMechanism = "GSSAPI";
         /**
+         * Expose the kafka sasl.jaas.config parameter Example:
+         * org.apache.kafka.common.security.plain.PlainLoginModule required
+         * username=\"USERNAME\" password=\"PASSWORD\";
+         */
+        private String saslJaasConfig;
+        /**
          * Protocol used to communicate with brokers. Currently only PLAINTEXT
          * and SSL are supported.
          */
@@ -1014,6 +1020,14 @@ public class KafkaComponentConfiguration
             this.saslMechanism = saslMechanism;
         }
 
+        public String getSaslJaasConfig() {
+            return saslJaasConfig;
+        }
+
+        public void setSaslJaasConfig(String saslJaasConfig) {
+            this.saslJaasConfig = saslJaasConfig;
+        }
+
         public String getSecurityProtocol() {
             return securityProtocol;
         }