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:02:28 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.11.0 6d04e412c -> ef88ee504


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

(cherry picked from commit d3f1407f7bc95b823516e5a1bdaa23c717b6354e)
Signed-off-by: Rajini Sivaram <rajinisivaram@googlemail.com>


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

Branch: refs/heads/0.11.0
Commit: ef88ee5045ea791d3208c3dcbc8723c4b2092262
Parents: 6d04e41
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:02:14 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/ef88ee50/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