airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata git commit: credential store client initialization retry attempts
Date Mon, 02 May 2016 18:30:52 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 944ccc891 -> 12f5b014d


credential store client initialization retry attempts


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/12f5b014
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/12f5b014
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/12f5b014

Branch: refs/heads/develop
Commit: 12f5b014d681353b4a6a67133426dc936090c762
Parents: 944ccc8
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Mon May 2 14:30:47 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Mon May 2 14:30:47 2016 -0400

----------------------------------------------------------------------
 .../airavata/api/server/AiravataAPIServer.java  | 25 ++++++--------------
 .../DefaultAiravataSecurityManager.java         | 14 -----------
 2 files changed, 7 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/12f5b014/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
index b530bff..5df73dc 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
@@ -21,14 +21,10 @@
 
 package org.apache.airavata.api.server;
 
-import java.net.InetSocketAddress;
-import java.net.UnknownHostException;
-import java.net.InetAddress;
-
+import com.google.inject.Guice;
+import com.google.inject.Injector;
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.server.handler.AiravataServerHandler;
-import org.apache.airavata.api.server.security.AiravataSecurityManager;
-import org.apache.airavata.api.server.security.SecurityManagerFactory;
 import org.apache.airavata.api.server.security.interceptor.SecurityModule;
 import org.apache.airavata.api.server.util.*;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
@@ -36,17 +32,18 @@ import org.apache.airavata.common.utils.IServer;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.model.error.AiravataErrorType;
 import org.apache.airavata.model.error.AiravataSystemException;
-import org.apache.airavata.security.AiravataSecurityException;
 import org.apache.thrift.server.TServer;
 import org.apache.thrift.server.TThreadPoolServer;
+import org.apache.thrift.transport.TSSLTransportFactory;
 import org.apache.thrift.transport.TServerSocket;
 import org.apache.thrift.transport.TServerTransport;
 import org.apache.thrift.transport.TTransportException;
-import org.apache.thrift.transport.TSSLTransportFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
+
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
 
 public class AiravataAPIServer implements IServer{
 
@@ -162,11 +159,6 @@ public class AiravataAPIServer implements IServer{
                 }.start();
                 logger.info("Airavata API server starter over TLS on Port: " + ServerSettings.getTLSServerPort());
             }
-            /*perform any security related initialization at the server startup, according
to the underlying security
-             manager implementation being used.*/
-            AiravataSecurityManager securityManager = SecurityManagerFactory.getSecurityManager();
-            securityManager.initializeSecurityInfra();
-
         } catch (TTransportException e) {
             logger.error(e.getMessage());
             setStatus(ServerStatus.FAILED);
@@ -178,9 +170,6 @@ public class AiravataAPIServer implements IServer{
         } catch (UnknownHostException e) {
             logger.error(e.getMessage(), e);
             throw new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
-        } catch (AiravataSecurityException e) {
-            logger.error(e.getMessage(), e);
-            throw new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
         }
     }
     public static void main(String[] args) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/12f5b014/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java
index 1b9fa23..3faf07d 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java
@@ -69,20 +69,6 @@ public class DefaultAiravataSecurityManager implements AiravataSecurityManager
{
          */
         try {
             if (ServerSettings.isAPISecured()) {
-
-                //Waiting for the CS to start.
-                int retryAttempts = 4;
-                while(retryAttempts > 0){
-                    try {
-                        csClient.getCSServiceVersion();
-                    }catch (TException ex){}
-                    try{
-                        Thread.sleep(2500);
-                    } catch (InterruptedException e) {}
-                    retryAttempts--;
-                }
-
-
                 ConfigurationContext configContext =
                         ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
null);
                 //initialize SSL context with the trust store that contains the public cert
of WSO2 Identity Server.


Mime
View raw message