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

KafkaUtils sets invalid dynamic JAAS config

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0, 3.0.0
    • 3.0.0, 2.2.0
    • atlas-core
    • 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

              Unassigned Unassigned
              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