You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/04/18 16:17:17 UTC

[GitHub] [geode] upthewaterspout commented on a diff in pull request #7598: GEODE-10243: Fail early if old client auth expires

upthewaterspout commented on code in PR #7598:
URL: https://github.com/apache/geode/pull/7598#discussion_r852231187


##########
geode-old-client-support/src/main/java/com/gemstone/gemfire/OldClientSupportProvider.java:
##########
@@ -121,19 +124,23 @@ public String processOutgoingClassName(String name, DataOutput out) {
   }
 
   @Override
-  public Throwable getThrowable(Throwable theThrowable, KnownVersion clientVersion) {
+  public Throwable getThrowable(Throwable theThrowable, KnownVersion clientVersion,
+      ClientProxyMembershipID clientId) {
 
     if (theThrowable == null) {
       return theThrowable;
     }
 
     // backward compatibility for authentication expiration
-    if (clientVersion.isOlderThan(ClientReAuthenticateMessage.RE_AUTHENTICATION_START_VERSION)) {
-      if (theThrowable instanceof AuthenticationExpiredException) {
-        return new AuthenticationRequiredException(USER_NOT_FOUND);
-      }
-      Throwable cause = theThrowable.getCause();
-      if (cause instanceof AuthenticationExpiredException) {
+    if (clientVersion.isOlderThan(RE_AUTHENTICATION_START_VERSION)) {
+      if (theThrowable instanceof AuthenticationExpiredException
+          || theThrowable.getCause() instanceof AuthenticationExpiredException) {
+        if (CacheClientNotifier.getInstance().getClientProxy(clientId) != null) {
+          // Re-authentication with Server->Client queues is not supported
+          return new IllegalStateException(OLD_CLIENT_AUTHENTICATION_EXPIRED);

Review Comment:
   Good question. I think they should be able to, but I can test that out. In this case handling the exception would mean just deserializing it and reporting it to the user.



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

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org