Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-7324

NPE due to lack of SASLExtensions in SASL/OAUTHBEARER

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: clients
    • Labels:
      None

      Description

      When there are no SASL extensions in an OAUTHBEARER request (or the callback handler does not support SaslExtensionsCallback) the OAuthBearerSaslClient.retrieveCustomExtensions() method returns null. This null value is then passed to the OAuthBearerClientInitialResponse constructor, and that results in an NPE:

      java.lang.NullPointerException
      at org.apache.kafka.common.security.oauthbearer.internals.OAuthBearerClientInitialResponse.validateExtensions(OAuthBearerClientInitialResponse.java:115)
      at org.apache.kafka.common.security.oauthbearer.internals.OAuthBearerClientInitialResponse.<init>(OAuthBearerClientInitialResponse.java:81)
      at org.apache.kafka.common.security.oauthbearer.internals.OAuthBearerClientInitialResponse.<init>(OAuthBearerClientInitialResponse.java:75)
      at org.apache.kafka.common.security.oauthbearer.internals.OAuthBearerSaslClient.evaluateChallenge(OAuthBearerSaslClient.java:99)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rndgstn Ron Dagostino
                Reporter:
                rndgstn Ron Dagostino
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: