vladhlinsky opened a new pull request #137:
URL: https://github.com/apache/atlas/pull/137


   ## What changes were proposed in this pull request?
   
   Fix `KafkaUtils` to always enclose property values in double-quotes. This 
helps to avoid the following error with Spark Atlas Connector trying to 
configure Atlas client to use delegation tokens:
   ```
   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)
   ```
   The following configuration is not handled properly:
   ```
   atlas.jaas.KafkaClient.option.username=30CQ4q1hQMy0dB6X0eXfxQ
   
atlas.jaas.KafkaClient.option.password=KdaUQ4FlKWlDxwQrAeFGUVbb6sR0P+zoqOZDZjtIRP1wseXbSbhiTjz3QI9Ur9o4LTYZSv8TE1QqUC4FSwnoTA==
   ```
   
[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).
   
   
   ## How was this patch tested?
   
   * Manually deploying a modified version of `atlas-common-*.jar` on a cluster
   * Updated existing unit tests and added a new one


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to