zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] eolivelli commented on a change in pull request #118: ZOOKEEPER-1634: hardening security by teaching server to enforce client authentication.
Date Mon, 17 Jun 2019 05:33:28 GMT
eolivelli commented on a change in pull request #118: ZOOKEEPER-1634: hardening security by
teaching server to enforce client authentication.
URL: https://github.com/apache/zookeeper/pull/118#discussion_r294140376
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
 ##########
 @@ -1361,27 +1386,39 @@ private Record processSasl(ByteBuffer incomingBuffer, ServerCnxn
cnxn) throws IO
                         cnxn.addAuthInfo(new Id("super", ""));
                     }
                 }
-            }
-            catch (SaslException e) {
+            } catch (SaslException e) {
                 LOG.warn("Client failed to SASL authenticate: " + e, e);
-                if ((System.getProperty("zookeeper.allowSaslFailedClients") != null)
-                  &&
-                  (System.getProperty("zookeeper.allowSaslFailedClients").equals("true")))
{
-                    LOG.warn("Maintaining client connection despite SASL authentication failure.");
+                if (shouldAllowSaslFailedClientsConnect() && !shouldRequireClientSaslAuth())
{
+                  LOG.warn("Maintaining client connection despite SASL authentication failure.");
                 } else {
+                  int error;
+                  if (shouldRequireClientSaslAuth()) {
+                    LOG.warn("Closing client connection due to server requires client SASL
authenticaiton," +
 
 Review comment:
   Is it possible to report at least the client ip address? This way it is simpler to correlate
the errors.
   Not blocker for me, this class already has logs without references to the client. It could
be a more global enhancement for the future

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message