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

NullPointerException when SCRAM is allowed bu ScramLoginModule is not in broker's jaas.conf

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0, 2.5.0
    • 2.7.0
    • security
    • None

    Description

      When user wants to use delegation tokens and lists SCRAM in sasl.enabled.mechanisms, but does not add ScramLoginModule to broker's JAAS configuration, a null pointer exception is thrown on broker side and the connection is closed.

      Meaningful error message should be logged and sent back to the client.

      java.lang.NullPointerException
              at org.apache.kafka.common.security.authenticator.SaslServerAuthenticator.handleSaslToken(SaslServerAuthenticator.java:376)
              at org.apache.kafka.common.security.authenticator.SaslServerAuthenticator.authenticate(SaslServerAuthenticator.java:262)
              at org.apache.kafka.common.network.KafkaChannel.prepare(KafkaChannel.java:127)
              at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:489)
              at org.apache.kafka.common.network.Selector.poll(Selector.java:427)
              at kafka.network.Processor.poll(SocketServer.scala:679)
              at kafka.network.Processor.run(SocketServer.scala:584)
              at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        1. KAFKA-7631.patch
          3 kB
          Jun Wang

        Issue Links

          Activity

            People

              Unassigned Unassigned
              andrasbeni Andras Beni
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: