You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/10/08 14:21:14 UTC

[GitHub] [hive] nrg4878 commented on a change in pull request #2601: HIVE-25479: Browser SSO auth may fail intermittently

nrg4878 commented on a change in pull request #2601:
URL: https://github.com/apache/hive/pull/2601#discussion_r724418606



##########
File path: jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java
##########
@@ -1067,33 +1069,58 @@ private void openSession() throws SQLException {
     //TODO This is a bit hacky. We piggy back on a dummy OpenSession call
     // to get the redirect response from the server. Instead its probably cleaner to
     // explicitly do a HTTP post request and get the response.
-    int numRetry = isBrowserAuthMode() ? 2 : 1;
-    for (int i=0; i<numRetry; i++) {
-      try {
-        openSession(openReq);
-      } catch (TException e) {
-        if (isSamlRedirect(e)) {
-          boolean success = doBrowserSSO();
-          if (!success) {
-            String msg = browserClient.getServerResponse() == null
-                || browserClient.getServerResponse().getMsg() == null ? ""
-                : browserClient.getServerResponse().getMsg();
+    try {
+      int numRetry = 1;
+      if (isBrowserAuthMode()) {
+        numRetry = 2;

Review comment:
       do we need a retry for a failed SAML auth workflow? 




-- 
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: gitbox-unsubscribe@hive.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org