kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsiva...@apache.org
Subject kafka git commit: KAFKA-5294: PlainSaslServerFactory should allow a null Map
Date Mon, 22 May 2017 10:01:11 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 495836a4a -> d3f1407f7


KAFKA-5294: PlainSaslServerFactory should allow a null Map

If props is null, use POLICY_NOPLAINTEXT default value: false

Author: Mickael Maison <mickael.maison@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Rajini Sivaram <rajinisivaram@googlemail.com>

Closes #3105 from mimaison/KAFKA-5294


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/d3f1407f
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/d3f1407f
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/d3f1407f

Branch: refs/heads/trunk
Commit: d3f1407f7bc95b823516e5a1bdaa23c717b6354e
Parents: 495836a
Author: Mickael Maison <mickael.maison@gmail.com>
Authored: Mon May 22 11:00:30 2017 +0100
Committer: Rajini Sivaram <rajinisivaram@googlemail.com>
Committed: Mon May 22 11:00:30 2017 +0100

----------------------------------------------------------------------
 .../org/apache/kafka/common/security/plain/PlainSaslServer.java     | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/d3f1407f/clients/src/main/java/org/apache/kafka/common/security/plain/PlainSaslServer.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/security/plain/PlainSaslServer.java
b/clients/src/main/java/org/apache/kafka/common/security/plain/PlainSaslServer.java
index df59820..6fe3b25 100644
--- a/clients/src/main/java/org/apache/kafka/common/security/plain/PlainSaslServer.java
+++ b/clients/src/main/java/org/apache/kafka/common/security/plain/PlainSaslServer.java
@@ -160,6 +160,7 @@ public class PlainSaslServer implements SaslServer {
 
         @Override
         public String[] getMechanismNames(Map<String, ?> props) {
+            if (props == null) return new String[]{PLAIN_MECHANISM};
             String noPlainText = (String) props.get(Sasl.POLICY_NOPLAINTEXT);
             if ("true".equals(noPlainText))
                 return new String[]{};


Mime
View raw message