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

ASF subversion and git services commented on ATLAS-4263:
--------------------------------------------------------

Commit 21606bdc20e3890ddf9d26555fc71e4175310950 in atlas's branch 
refs/heads/master from Vlad Glinsky
[ https://gitbox.apache.org/repos/asf?p=atlas.git;h=21606bd ]

ATLAS-4263: Fix KafkaUtils to always enclose property values in double-quotes 
(#137)



> KafkaUtils sets invalid dynamic JAAS config
> -------------------------------------------
>
>                 Key: ATLAS-4263
>                 URL: https://issues.apache.org/jira/browse/ATLAS-4263
>             Project: Atlas
>          Issue Type: Task
>          Components:  atlas-core
>    Affects Versions: 2.1.0, 3.0.0
>            Reporter: Vladislav Glinskiy
>            Priority: Major
>             Fix For: 3.0.0, 2.2.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> [KafkaUtils|https://github.com/apache/atlas/blob/8d3c4ab0e8844f04e29f66acb3577e9d40de9a16/common/src/main/java/org/apache/atlas/utils/KafkaUtils.java#L195]
>  doesn't always 
> [enclose|https://github.com/apache/atlas/blob/8d3c4ab0e8844f04e29f66acb3577e9d40de9a16/common/src/main/java/org/apache/atlas/utils/KafkaUtils.java#L316]
>  property values in double-quotes, thus, setting invalid dynamic JAAS config 
> for token auth in some cases.
> Faced this issue with Spark Atlas Connector trying to configure Atlas client 
> to use delegation tokens. The following configuration is not handled properly:
> {code:java}
> atlas.jaas.KafkaClient.option.username=30CQ4q1hQMy0dB6X0eXfxQ
> atlas.jaas.KafkaClient.option.password=KdaUQ4FlKWlDxwQrAeFGUVbb6sR0P+zoqOZDZjtIRP1wseXbSbhiTjz3QI9Ur9o4LTYZSv8TE1QqUC4FSwnoTA==
> {code}
> and results in the following error:
> {code:java}
> java.lang.IllegalArgumentException: Value not specified for key 'null' in 
> JAAS config
>       at 
> org.apache.kafka.common.security.JaasConfig.parseAppConfigurationEntry(JaasConfig.java:116)
>       at 
> org.apache.kafka.common.security.JaasConfig.<init>(JaasConfig.java:63)
>       at 
> org.apache.kafka.common.security.JaasContext.load(JaasContext.java:90)
>       at 
> org.apache.kafka.common.security.JaasContext.loadClientContext(JaasContext.java:84)
> {code}
> [KafkaUtils|https://github.com/apache/atlas/blob/8d3c4ab0e8844f04e29f66acb3577e9d40de9a16/common/src/main/java/org/apache/atlas/utils/KafkaUtils.java#L195]
>  should always enclose property values in double-quotes, since unenclosed 
> digits and '+' sign can not be parsed by Kafka 
> [JaasConfig|https://github.com/apache/kafka/blob/2.0.0/clients/src/main/java/org/apache/kafka/common/security/JaasConfig.java#L116].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to