You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Ismael Juma (JIRA)" <ji...@apache.org> on 2017/05/19 15:05:04 UTC

[jira] [Updated] (KAFKA-5294) PlainSaslServerFactory should allow a null Map in getMechanismNames

     [ https://issues.apache.org/jira/browse/KAFKA-5294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ismael Juma updated KAFKA-5294:
-------------------------------
    Fix Version/s: 0.11.0.0

> PlainSaslServerFactory should allow a null Map in getMechanismNames
> -------------------------------------------------------------------
>
>                 Key: KAFKA-5294
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5294
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.10.2.1
>            Reporter: Bryan Bende
>            Priority: Minor
>             Fix For: 0.11.0.0
>
>
> PlainSaslServerFactory will get a NullPointerException if getMechanismNames(Map<String,?> props) is called with a null props map.
> The Java docs for getMechanismNames from the base class javax.security.sasl.SaslServerFactory say that the map can be null:
> * @param props The possibly null set of properties used to specify the
>      * security policy of the SASL mechanisms.
> A scenario where this causes a problem is when attempting to use a Kafka consumer/producer with the PlainLoginModule in the same JVM as a Hadoop client with Kerberos...
> The Hadoop client purposely calls getMechanismNames with a null map, so if you have already create a Kafka consumer/producer with PlainLoginModule then the PlainSaslServerFactory will be registered in the list of providers in java.security.Security, and then NPEs when the Hadoop client calls getMechanismNames on each provider with a null map.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)