You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/06/29 21:22:55 UTC

[GitHub] [zookeeper] nkalmar opened a new pull request #1389: ZOOKEEPER-1634: hardening security by teaching server to enforce clie…

nkalmar opened a new pull request #1389:
URL: https://github.com/apache/zookeeper/pull/1389


   …nt authentication.
   
   Previously ZooKeeper server is open to the world as the server does not enforce client authentication - anonymous clients are allowed to establish session with server. This behavior raises a couple of issues from the perspective of performance and security for example:
   * It is easy to launch a DDoS attack to server, by having a fleet of anonymous clients connect to the ensemble, as each session would consume valuable resources (socket, memory, etc) from server.
   * It is cumbersome to enforce certain security models with the presence of anonymous clients login - for example as clients are not trusted the root ACL has to be disabled for writes to world, among other configurations an admin has to do to secure a cluster in a multi-tenant environment.
   
   So the goal here is to address such issue by hardening ZooKeeper security to provide a more confined access option that user could opt-in, which in addition to the existing ACLs together could lead to more secured / resource optimal ensemble.
   
   * Introduce a new server side Java property that if set, ZooKeeper server will only accept connections and requests from clients that have authenticated with server via SASL.
   * Clients that are not configured with SASL authentication, or configured with SASL but fail authentication (i.e. with invalid credential) will not be able to establish a session with server. A typed error code (-124) will be delivered in such case, both Java and C client will close the session with server thereafter, without further attempts on retrying to reconnect.
   * This feature overrules the server property "zookeeper.allowSaslFailedClients". So even if server is configured to allow clients that fail SASL authentication to login, client will not be able to establish a session with server if this feature is enabled.
   * Only support SASL because only SASL authentication has the property that no operations will happen until SASL authentication process finished. Thus, the decision of whether to close the session or not can be quickly made on server side upon receiving a client connection request. We could later add support for other auth scheme via add_auth_info if that's desired (if we do, then a session has to be maintained until add_auth_info is invoked.).
   * As a side benefit, this PR fixes an issue mentioned in ZOOKEEPER-2346 by correctly propagate events from server to client side so a SASL auth failure will manifest as an auth / config failure rather than generic ConnectionLoss event.
   
   JIRA: https://issues.apache.org/jira/browse/ZOOKEEPER-1634
   The PR also covers (or part of):
   https://issues.apache.org/jira/browse/ZOOKEEPER-2462
   https://issues.apache.org/jira/browse/ZOOKEEPER-2526
   https://issues.apache.org/jira/browse/ZOOKEEPER-2346
   
   Author: Michael Han <lh...@twitter.com>
   
   Reviewers: Enrico Olivelli <eo...@apache.org>, Andor Molnar <an...@apache.org>
   
   Closes #118 from hanm/ZOOKEEPER-1634


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



[GitHub] [zookeeper] nkalmar commented on pull request #1389: ZOOKEEPER-1634: hardening security by teaching server to enforce clie…

Posted by GitBox <gi...@apache.org>.
nkalmar commented on pull request #1389:
URL: https://github.com/apache/zookeeper/pull/1389#issuecomment-651375680


   I backported the original ticket as we could argue this is a security fix. Please let me know what you think. 


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



[GitHub] [zookeeper] nkalmar commented on pull request #1389: ZOOKEEPER-1634: hardening security by teaching server to enforce client authentication

Posted by GitBox <gi...@apache.org>.
nkalmar commented on pull request #1389:
URL: https://github.com/apache/zookeeper/pull/1389#issuecomment-654272073


   Merged to branch-3.5


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



[GitHub] [zookeeper] nkalmar closed pull request #1389: ZOOKEEPER-1634: hardening security by teaching server to enforce client authentication

Posted by GitBox <gi...@apache.org>.
nkalmar closed pull request #1389:
URL: https://github.com/apache/zookeeper/pull/1389


   


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