You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Jayendra Parab (Jira)" <ji...@apache.org> on 2021/05/04 09:52:00 UTC

[jira] [Commented] (ATLAS-4263) KafkaUtils sets invalid dynamic JAAS config

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

Jayendra Parab commented on ATLAS-4263:
---------------------------------------

+1 for the patch

> 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: 40m
>  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)