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

NPE if sasl.mechanism is unrecognized

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: None
    • Labels:
      None

      Description

      If a client sets an unknown sasl.mechanism value (e.g. mistakenly setting "PLAN" instead of "PLAIN") the client sees a NullPointerException that only indirectly indicates the nature of the problem. For example:

      java.lang.NullPointerException
      at org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.sendSaslClientToken(SaslClientAuthenticator.java:430)

      It is better to see an exception that directly states what the issue is. For example, the initial version of this PR would provide the following information:

      Caused by: org.apache.kafka.common.errors.SaslAuthenticationException: Failed to create SaslClient with mechanism PLAN

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              rndgstn Ron Dagostino
              Reporter:
              rndgstn Ron Dagostino

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment