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

Andor Molnar commented on ZOOKEEPER-4885:
-----------------------------------------

One important thing:

The login-retry patch never makes the session wait for the KDC.

While the KDC is down, the client stays connected without authentication and 
keeps pinging the server, so the session stays alive however long the outage 
lasts. Retries run in the background, so a KDC that takes minutes to recover, 
or a login that blocks on KDC timeouts, doesn’t put the session at risk.

The session timeout only comes into play after the login succeeds, for the 
deliberate reconnect. That reconnect doesn’t involve the KDC at all: it reuses 
the cached {{{}Login{}}}, and the service ticket for the SASL handshake is 
fetched with a TGT that is already valid. So the only thing that has to finish 
inside the session timeout is a normal reconnect to the ensemble.

The fail-closed patch (improvement1) is different. It doesn’t create a session 
until the login succeeds, so there’s no session to lose. The difference is that 
fail-closed means the client gets no access during an outage, while the retry 
patch keeps unauthenticated access and recovers automatically.

> Can Non-SASL-Clients automatically recover with the recovery of kerberos 
> communication?
> ---------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-4885
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4885
>             Project: ZooKeeper
>          Issue Type: Improvement
>    Affects Versions: 3.4.14, 3.6.4, 3.9.3
>            Reporter: Xin Chen
>            Assignee: Andor Molnar
>            Priority: Major
>         Attachments: ZOOKEEPER-4885-improvement1.patch, 
> ZOOKEEPER-4885-login-retry.patch
>
>
> About  ZOOKEEPER-2139 & ZOOKEEPER-2323, it just avoids ZooKeeper clients into 
> infinite AuthFailedException. Noauth Exception still exists! 
> LoginException was thrown through each login, but at this point, a zkclient 
> without Kerberos SASL authentication was created. Non SASL Znodes can be 
> operated on in the future. However, when Kerberos recovers from network 
> disconnections and other anomalies, the previously created zkclient without 
> SASL authentication is still being used without rebuilding the login or 
> recreating a saslclient. If it is used to operate on ACL Znodes at this time, 
> an error will always be reported: 
> {code:java}
> KeeperErrorCode = NoAuth for /zookeeper
> or
> KeeperErrorCode = AuthFailed for /zookeeper
> or
> KeeperErrorCode = InvalidACL for /zookeeper{code}
> Isn't this a question that should be considered?  And I also met this issue 
> in ZK-3.6.4,It seems that this issue has not been considered in the updated 
> version. 



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to