camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-11682) camel-kafka - Support configuration parameter sasl.jaas.config
Date Tue, 22 Aug 2017 09:46:00 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-11682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16136574#comment-16136574
] 

ASF GitHub Bot commented on CAMEL-11682:
----------------------------------------

GitHub user snowch reopened a pull request:

    https://github.com/apache/camel/pull/1897

    CAMEL-11682: Add sasl.jaas.config setting

    I have tested the PR against IBM MessageHub and it worked with the following routes:
    
    ```
    final String brokers = "kafka04-prod01.messagehub.services.eu-de.bluemix.net:9093,kafka05-prod01.messagehub.services.eu-de.bluemix.net:9093";
    
    final String saslJaasConfig = "org.apache.kafka.common.security.plain.PlainLoginModule
required username=\"USERNAME\" password=\"PASSWORD\";";
    					
    from("direct:in")
    .to("kafka:test?" 
        + "brokers=" + brokers
        + "&saslMechanism=PLAIN"  
        + "&securityProtocol=SASL_SSL"
        + "&sslProtocol=TLSv1.2"
        + "&sslEnabledProtocols=TLSv1.2" 
        + "&sslEndpointAlgorithm=HTTPS"
        + "&saslJaasConfig=" + saslJaasConfig );
    ```
    and KafkaConsumer
    
    ```
    final String brokers = "kafka04-prod01.messagehub.services.eu-de.bluemix.net:9093,kafka05-prod01.messagehub.services.eu-de.bluemix.net:9093";
    
    final String saslJaasConfig = "org.apache.kafka.common.security.plain.PlainLoginModule
required username=\"USERNAME\" password=\"PASSWORD\";";
    					
    from("kafka:test?" 
        + "brokers=" + brokers
        + "&saslMechanism=PLAIN"  
        + "&securityProtocol=SASL_SSL"
        + "&sslProtocol=TLSv1.2"
        + "&sslEnabledProtocols=TLSv1.2" 
        + "&sslEndpointAlgorithm=HTTPS"
        + "&saslJaasConfig=" + saslJaasConfig
        + "&groupId=mygroup")
    .to("stream:out");
    ```
    
    The camel-kafka tests were failing on master before I made my changes.  The failures were:
    
    ```
    [ERROR] Failures:
    [ERROR] org.apache.camel.component.kafka.KafkaConsumerOffsetRepositoryEmptyTest.shouldStartFromBeginningWithEmptyOffsetRepository(org.apache.camel.component.kafka.KafkaConsumerOffsetRepositoryEmptyTest)
    [ERROR]   Run 1: KafkaConsumerOffsetRepositoryEmptyTest.shouldStartFromBeginningWithEmptyOffsetRepository:74
mock://result Received message count. Expected: <10> but was: <0>
    [ERROR]   Run 2: KafkaConsumerOffsetRepositoryEmptyTest.shouldStartFromBeginningWithEmptyOffsetRepository:74
mock://result Received message count. Expected: <10> but was: <0>
    [ERROR]   Run 3: KafkaConsumerOffsetRepositoryEmptyTest.shouldStartFromBeginningWithEmptyOffsetRepository:74
mock://result Received message count. Expected: <10> but was: <0>
    [INFO]
    [ERROR] org.apache.camel.component.kafka.KafkaConsumerOffsetRepositoryResumeTest.shouldResumeFromAnyParticularOffset(org.apache.camel.component.kafka.KafkaConsumerOffsetRepositoryResumeTest)
    [ERROR]   Run 1: KafkaConsumerOffsetRepositoryResumeTest.shouldResumeFromAnyParticularOffset:75
mock://result Received message count. Expected: <3> but was: <0>
    [ERROR]   Run 2: KafkaConsumerOffsetRepositoryResumeTest.shouldResumeFromAnyParticularOffset:75
mock://result Received message count. Expected: <3> but was: <0>
    [ERROR]   Run 3: KafkaConsumerOffsetRepositoryResumeTest.shouldResumeFromAnyParticularOffset:75
mock://result Received message count. Expected: <3> but was: <0>
    [INFO]
    [INFO]
    [ERROR] Tests run: 43, Failures: 2, Errors: 0, Skipped: 2
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/snowch/camel CAMEL-11682

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1897.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1897
    
----
commit fd4c44e1116413b3f89ac5f07d30381bcbb86e1d
Author: christopher snow <chsnow123@gmail.com>
Date:   2017-08-22T06:50:13Z

    CAMEL-11682: Add sasl.jaas.config setting

----


> camel-kafka - Support configuration parameter sasl.jaas.config
> --------------------------------------------------------------
>
>                 Key: CAMEL-11682
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11682
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-kafka
>            Reporter: chris snow
>            Assignee: Andrea Cosentino
>            Priority: Minor
>             Fix For: 2.20.0
>
>
> As discussed on the camel [mailing list|http://camel.465427.n5.nabble.com/Camel-Kafka-SASL-plain-with-broker-list-rather-than-zookeeper-td5811191.html],
some Kafka implementations such as [IBM Message Hub|https://console.bluemix.net/docs/services/MessageHub/index.html]
require setting the sasl.jaas.config kafka client parameter, e.g.
> {code}
> sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="USERNAME"
password="PASSWORD";
> {code}
> If it would help, I can provide access to an IBM Message Hub instance endpoint to support
this development.  Please contact me at: chris.snow at uk.ibm.com. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message