[ 
https://issues.apache.org/jira/browse/KAFKA-5294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16017935#comment-16017935
 ] 

ASF GitHub Bot commented on KAFKA-5294:
---------------------------------------

GitHub user mimaison opened a pull request:

    https://github.com/apache/kafka/pull/3105

    KAFKA-5294: PlainSaslServerFactory should allow a null Map in getMech…

    …anismNames
    
    If props is null, use POLICY_NOPLAINTEXT default value: false
    
    As far as I can tell, none of the other classes implementing 
SaslServerFactory use the properties Map

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mimaison/kafka KAFKA-5294

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/3105.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3105
    
----
commit 432c48c3f49ccc3090646671bdba82a2ef05b839
Author: Mickael Maison <mickael.mai...@gmail.com>
Date:   2017-05-19T19:38:13Z

    KAFKA-5294: PlainSaslServerFactory should allow a null Map in 
getMechanismNames
    
    If props is null, use POLICY_NOPLAINTEXT default value: false

----


> 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
>             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)

Reply via email to