You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Ron Dagostino (Jira)" <ji...@apache.org> on 2020/09/30 15:39:00 UTC

[jira] [Created] (KAFKA-10556) NPE if sasl.mechanism is unrecognized

Ron Dagostino created KAFKA-10556:
-------------------------------------

             Summary: NPE if sasl.mechanism is unrecognized
                 Key: KAFKA-10556
                 URL: https://issues.apache.org/jira/browse/KAFKA-10556
             Project: Kafka
          Issue Type: Task
            Reporter: Ron Dagostino
            Assignee: Ron Dagostino


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




--
This message was sent by Atlassian Jira
(v8.3.4#803005)