Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-4263

KafkaUtils sets invalid dynamic JAAS config

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0, 3.0.0
    • Fix Version/s: 3.0.0, 2.2.0
    • Component/s: atlas-core
    • Labels:
      None

      Description

      KafkaUtils doesn't always enclose 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:

      atlas.jaas.KafkaClient.option.username=30CQ4q1hQMy0dB6X0eXfxQ
      atlas.jaas.KafkaClient.option.password=KdaUQ4FlKWlDxwQrAeFGUVbb6sR0P+zoqOZDZjtIRP1wseXbSbhiTjz3QI9Ur9o4LTYZSv8TE1QqUC4FSwnoTA==
      

      and results in the following error:

      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)
      

      KafkaUtils should always enclose property values in double-quotes, since unenclosed digits and '+' sign can not be parsed by Kafka JaasConfig.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vladglinskiy Vladislav Glinskiy
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h