You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2015/03/03 22:47:23 UTC

[1/3] airavata git commit: using uuid as the password - AIRAVATA-1614

Repository: airavata
Updated Branches:
  refs/heads/master 672d13e2b -> c073c6a5d


using uuid as the password - AIRAVATA-1614


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

Branch: refs/heads/master
Commit: c66cc84da3da2bea1932e507dcc33531ce00f393
Parents: 050ea84
Author: Suresh Marru <sm...@apache.org>
Authored: Tue Mar 3 15:55:09 2015 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Tue Mar 3 15:55:09 2015 -0500

----------------------------------------------------------------------
 .../server/CredentialStoreServerHandler.java    |  3 ++-
 .../cs-thrift-description/cs.cpi.service.thrift | 23 +++++++++++++++-----
 .../cs-thrift-description/csDataModel.thrift    |  2 +-
 3 files changed, 20 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c66cc84d/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java b/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
index 1675781..b5b1ac0 100644
--- a/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
+++ b/modules/credential-store-service/credential-store/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
@@ -45,6 +45,7 @@ import sun.security.provider.X509Factory;
 import java.io.ByteArrayInputStream;
 import java.security.cert.CertificateFactory;
 import java.security.cert.X509Certificate;
+import java.util.UUID;
 
 public class CredentialStoreServerHandler implements CredentialStoreService.Iface {
     protected static Logger log = LoggerFactory.getLogger(CredentialStoreServerHandler.class);
@@ -80,7 +81,7 @@ public class CredentialStoreServerHandler implements CredentialStoreService.Ifac
             // only username and gateway id will be sent by client.
             String token = TokenGenerator.generateToken(sshCredential.getGatewayId(), null);
             credential.setToken(token);
-            credential.setPassphrase(sshCredential.getPassphrase());
+            credential.setPassphrase(String.valueOf(UUID.randomUUID()));
             if (sshCredential.getPrivateKey() != null) {
                 credential.setPrivateKey(sshCredential.getPrivateKey().getBytes());
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/c66cc84d/modules/credential-store-service/cs-thrift-description/cs.cpi.service.thrift
----------------------------------------------------------------------
diff --git a/modules/credential-store-service/cs-thrift-description/cs.cpi.service.thrift b/modules/credential-store-service/cs-thrift-description/cs.cpi.service.thrift
index b4f078b..c8a31db 100644
--- a/modules/credential-store-service/cs-thrift-description/cs.cpi.service.thrift
+++ b/modules/credential-store-service/cs-thrift-description/cs.cpi.service.thrift
@@ -38,12 +38,23 @@ service CredentialStoreService {
   /**
   * This method is to add SSHCredential which will return the token Id in success
   **/
-  string addSSHCredential (1: required csDataModel.SSHCredential sshCredential) throws (1:credentialStoreErrors.CredentialStoreException csException) ;
-  string addCertificateCredential (1: required csDataModel.CertificateCredential certificateCredential) throws (1:credentialStoreErrors.CredentialStoreException csException);
-  string addPasswordCredential (1: required csDataModel.PasswordCredential passwordCredential) throws (1:credentialStoreErrors.CredentialStoreException csException);
-  csDataModel.SSHCredential getSSHCredential (1: required string tokenId, 2: required string gatewayId) throws (1:credentialStoreErrors.CredentialStoreException csException);
-  csDataModel.CertificateCredential getCertificateCredential (1: required string tokenId, 2: required string gatewayId) throws (1:credentialStoreErrors.CredentialStoreException csException);
-  csDataModel.PasswordCredential getPasswordCredential (1: required string tokenId, 2: required string gatewayId) throws (1:credentialStoreErrors.CredentialStoreException csException);
+  string addSSHCredential (1: required csDataModel.SSHCredential sshCredential)
+                        throws (1:credentialStoreErrors.CredentialStoreException csException);
+
+  string addCertificateCredential (1: required csDataModel.CertificateCredential certificateCredential)
+                        throws (1:credentialStoreErrors.CredentialStoreException csException);
+
+  string addPasswordCredential (1: required csDataModel.PasswordCredential passwordCredential)
+                        throws (1:credentialStoreErrors.CredentialStoreException csException);
+
+  csDataModel.SSHCredential getSSHCredential (1: required string tokenId, 2: required string gatewayId)
+                        throws (1:credentialStoreErrors.CredentialStoreException csException);
+
+  csDataModel.CertificateCredential getCertificateCredential (1: required string tokenId, 2: required string gatewayId)
+                        throws (1:credentialStoreErrors.CredentialStoreException csException);
+
+  csDataModel.PasswordCredential getPasswordCredential (1: required string tokenId, 2: required string gatewayId)
+                        throws (1:credentialStoreErrors.CredentialStoreException csException);
 
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/c66cc84d/modules/credential-store-service/cs-thrift-description/csDataModel.thrift
----------------------------------------------------------------------
diff --git a/modules/credential-store-service/cs-thrift-description/csDataModel.thrift b/modules/credential-store-service/cs-thrift-description/csDataModel.thrift
index efd3dd5..ce4dc46 100644
--- a/modules/credential-store-service/cs-thrift-description/csDataModel.thrift
+++ b/modules/credential-store-service/cs-thrift-description/csDataModel.thrift
@@ -37,7 +37,7 @@ struct SSHCredential {
 }
 
 struct CommunityUser {
-    1: required string gatewayNmae,
+    1: required string gatewayName,
     2: required string username,
     3: required string userEmail
 }


[3/3] airavata git commit: Merge remote-tracking branch 'origin/master'

Posted by sm...@apache.org.
Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/master
Commit: c073c6a5d9d6d6719bd6e0574aec826b879f4469
Parents: 0f2c6ff 672d13e
Author: Suresh Marru <sm...@apache.org>
Authored: Tue Mar 3 16:47:20 2015 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Tue Mar 3 16:47:20 2015 -0500

----------------------------------------------------------------------
 .../data/impl/GwyResourceProfileImpl.java       |   2 +
 .../data/model/ApplicationDeployment.java       |  10 +
 .../data/model/ApplicationInterface.java        |  10 +
 .../data/model/ComputeResourcePreference.java   |  10 +
 .../catalog/data/model/Workflow.java            |  10 +
 .../data/resources/AppDeploymentResource.java   |  11 +
 .../data/resources/AppInterfaceResource.java    |  11 +
 .../ComputeHostPreferenceResource.java          |  11 +
 .../data/resources/WorkflowResource.java        |  10 +
 .../catalog/data/util/AppCatalogJPAUtils.java   |   4 +
 .../data/util/AppCatalogThriftConversion.java   |   1 +
 .../src/main/resources/appcatalog-derby.sql     | 208 ++++++++++---------
 .../src/main/resources/appcatalog-mysql.sql     | 204 +++++++++---------
 .../src/test/resources/appcatalog-derby.sql     | 208 ++++++++++---------
 14 files changed, 405 insertions(+), 305 deletions(-)
----------------------------------------------------------------------



[2/3] airavata git commit: Adding gatewayId to relavent API methods to ensure multi-tentant scenarious will work - AIRAVATA-1607

Posted by sm...@apache.org.
Adding gatewayId to relavent API methods to ensure multi-tentant scenarious will work - AIRAVATA-1607


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

Branch: refs/heads/master
Commit: 0f2c6ff1a223f352e9a19cdebdd5f0933a0f20d8
Parents: c66cc84
Author: Suresh Marru <sm...@apache.org>
Authored: Tue Mar 3 16:47:08 2015 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Tue Mar 3 16:47:08 2015 -0500

----------------------------------------------------------------------
 .../airavataAPI.thrift                          | 88 +++++++++++++-------
 1 file changed, 56 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/0f2c6ff1/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
index 0c88e8e..6caf264 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -111,7 +111,7 @@ service Airavata {
    * Generate and Register SSH Key Pair with Airavata Credential Store.
    *
    * @param gatewayId
-   *    The identifier for the requested experiment. This is returned during the create experiment step.
+   *    The identifier for the requested gateway.
    *
    * @param userName
    *    The User for which the credential should be registered. For community accounts, this user is the name of the
@@ -139,13 +139,21 @@ service Airavata {
                    3: airavataErrors.AiravataSystemException ase)
 
   /**
-   * Create a Project
+   * Creates a Project with basic metadata.
+   *    A Project is a container of experiments.
+   *
+   * @param gatewayId
+   *    The identifier for the requested gateway.
+   *
+   * @param Project
+   *    The Project Object described in the workspaceModel
    *
   */
-  string createProject (1: required workspaceModel.Project project)
-      throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.AiravataClientException ace,
-              3: airavataErrors.AiravataSystemException ase)
+  string createProject (1: required string gatewayId,
+                        2: required workspaceModel.Project project)
+          throws (1: airavataErrors.InvalidRequestException ire,
+                  2: airavataErrors.AiravataClientException ace,
+                  3: airavataErrors.AiravataSystemException ase)
 
   /**
    * Update a Project
@@ -168,11 +176,18 @@ service Airavata {
                 3: airavataErrors.AiravataSystemException ase,
                 4: airavataErrors.ProjectNotFoundException pnfe)
 
-/**
+ /**
    * Get all Project by user
    *
-  */
-  list<workspaceModel.Project> getAllUserProjects (1: required string userName)
+   * @param gatewayId
+   *    The identifier for the requested gateway.
+   *
+   * @param userName
+   *    The Project Object described in the workspaceModel
+   *
+ **/
+  list<workspaceModel.Project> getAllUserProjects (1: required string gatewayId,
+                                                   2: required string userName)
         throws (1: airavataErrors.InvalidRequestException ire,
                 2: airavataErrors.AiravataClientException ace,
                 3: airavataErrors.AiravataSystemException ase)
@@ -181,7 +196,8 @@ service Airavata {
      * Get all Project for user by project name
      *
     */
-  list<workspaceModel.Project> searchProjectsByProjectName (1: required string userName, 2: required string projectName)
+  list<workspaceModel.Project> searchProjectsByProjectName (1: required string gatewayId,
+                        2: required string userName, 3: required string projectName)
           throws (1: airavataErrors.InvalidRequestException ire,
                   2: airavataErrors.AiravataClientException ace,
                   3: airavataErrors.AiravataSystemException ase)
@@ -190,7 +206,8 @@ service Airavata {
     * Get all Project for user by project description
     *
   */
-  list<workspaceModel.Project> searchProjectsByProjectDesc (1: required string userName, 2: required string description)
+  list<workspaceModel.Project> searchProjectsByProjectDesc (1: required string gatewayId,
+                        2: required string userName, 3: required string description)
             throws (1: airavataErrors.InvalidRequestException ire,
                     2: airavataErrors.AiravataClientException ace,
                     3: airavataErrors.AiravataSystemException ase)
@@ -200,7 +217,8 @@ service Airavata {
        * Search Experiments by experiment name
        *
     */
-  list<experimentModel.ExperimentSummary> searchExperimentsByName (1: required string userName, 2: required string expName)
+  list<experimentModel.ExperimentSummary> searchExperimentsByName (1: required string gatewayId,
+                          2: required string userName, 3: required string expName)
             throws (1: airavataErrors.InvalidRequestException ire,
                     2: airavataErrors.AiravataClientException ace,
                     3: airavataErrors.AiravataSystemException ase)
@@ -209,7 +227,8 @@ service Airavata {
        * Search Experiments by experiment name
        *
   */
-  list<experimentModel.ExperimentSummary> searchExperimentsByDesc (1: required string userName, 2: required string description)
+  list<experimentModel.ExperimentSummary> searchExperimentsByDesc (1: required string gatewayId,
+                            2: required string userName, 3: required string description)
               throws (1: airavataErrors.InvalidRequestException ire,
                       2: airavataErrors.AiravataClientException ace,
                       3: airavataErrors.AiravataSystemException ase)
@@ -218,7 +237,8 @@ service Airavata {
        * Search Experiments by application id
        *
   */
-  list<experimentModel.ExperimentSummary> searchExperimentsByApplication (1: required string userName, 2: required string applicationId)
+  list<experimentModel.ExperimentSummary> searchExperimentsByApplication (1: required string gatewayId,
+                             2: required string userName, 3: required string applicationId)
               throws (1: airavataErrors.InvalidRequestException ire,
                       2: airavataErrors.AiravataClientException ace,
                       3: airavataErrors.AiravataSystemException ase)
@@ -227,7 +247,8 @@ service Airavata {
          * Search Experiments by experiment status
          *
     */
-    list<experimentModel.ExperimentSummary> searchExperimentsByStatus (1: required string userName, 2: required experimentModel.ExperimentState experimentState)
+    list<experimentModel.ExperimentSummary> searchExperimentsByStatus (1: required string gatewayId,
+                            2: required string userName, 3: required experimentModel.ExperimentState experimentState)
                 throws (1: airavataErrors.InvalidRequestException ire,
                         2: airavataErrors.AiravataClientException ace,
                         3: airavataErrors.AiravataSystemException ase)
@@ -236,7 +257,8 @@ service Airavata {
          * Search Experiments by experiment status
          *
     */
-    list<experimentModel.ExperimentSummary> searchExperimentsByCreationTime (1: required string userName, 2: required i64 fromTime, 3: required i64 toTime)
+    list<experimentModel.ExperimentSummary> searchExperimentsByCreationTime (1: required string gatewayId,
+                            2: required string userName, 3: required i64 fromTime, 4: required i64 toTime)
                 throws (1: airavataErrors.InvalidRequestException ire,
                         2: airavataErrors.AiravataClientException ace,
                         3: airavataErrors.AiravataSystemException ase)
@@ -255,7 +277,8 @@ service Airavata {
      * Get all Experiments by user
      *
   */
-  list<experimentModel.Experiment> getAllUserExperiments(1: required string userName)
+  list<experimentModel.Experiment> getAllUserExperiments(1: required string gatewayId,
+                        2: required string userName)
             throws (1: airavataErrors.InvalidRequestException ire,
                     2: airavataErrors.AiravataClientException ace,
                     3: airavataErrors.AiravataSystemException ase)
@@ -296,7 +319,8 @@ service Airavata {
      *
     */
 
-  string createExperiment(1: required experimentModel.Experiment experiment)
+  string createExperiment(1: required string gatewayId,
+                          2: required experimentModel.Experiment experiment)
     throws (1: airavataErrors.InvalidRequestException ire,
             2: airavataErrors.AiravataClientException ace,
             3: airavataErrors.AiravataSystemException ase)
@@ -387,7 +411,7 @@ service Airavata {
             4: airavataErrors.AiravataSystemException ase)
 
   void updateExperimentConfiguration(1: required string airavataExperimentId,
-                                       2: required experimentModel.UserConfigurationData userConfiguration)
+                                     2: required experimentModel.UserConfigurationData userConfiguration)
 
   void updateResourceScheduleing(1: required string airavataExperimentId,
                                  2: required experimentModel.ComputationalResourceScheduling resourceScheduling)
@@ -495,9 +519,6 @@ service Airavata {
                         3: airavataErrors.AiravataClientException ace,
                         4: airavataErrors.AiravataSystemException ase)
 
-
-
-
   /**
    * Clone an specified experiment with a new name. A copy of the experiment configuration is made and is persisted with new metadata.
    *   The client has to subsequently update this configuration if needed and launch the cloned experiment. 
@@ -607,7 +628,8 @@ service Airavata {
    *   Returns a server-side generated airavata appModule globally unique identifier.
    *
   */
-  string registerApplicationModule(1: required applicationDeploymentModel.ApplicationModule applicationModule)
+  string registerApplicationModule(1: required string gatewayId,
+                        2: required applicationDeploymentModel.ApplicationModule applicationModule)
     	throws (1: airavataErrors.InvalidRequestException ire,
               2: airavataErrors.AiravataClientException ace,
               3: airavataErrors.AiravataSystemException ase)
@@ -647,7 +669,7 @@ service Airavata {
                 3: airavataErrors.AiravataSystemException ase)
 
 
-  list<applicationDeploymentModel.ApplicationModule> getAllAppModules ()
+  list<applicationDeploymentModel.ApplicationModule> getAllAppModules (1: required string gatewayId)
         throws (1: airavataErrors.InvalidRequestException ire,
                 2: airavataErrors.AiravataClientException ace,
                 3: airavataErrors.AiravataSystemException ase)
@@ -682,7 +704,8 @@ service Airavata {
    *   Returns a server-side generated airavata appDeployment globally unique identifier.
    *
   */
-  string registerApplicationDeployment(1: required applicationDeploymentModel.ApplicationDeploymentDescription applicationDeployment)
+  string registerApplicationDeployment(1: required string gatewayId,
+                2: required applicationDeploymentModel.ApplicationDeploymentDescription applicationDeployment)
     	throws (1: airavataErrors.InvalidRequestException ire,
               2: airavataErrors.AiravataClientException ace,
               3: airavataErrors.AiravataSystemException ase)
@@ -743,7 +766,7 @@ service Airavata {
    *   Returns the list of all application Deployment Objects.
    *
   */
-  list<applicationDeploymentModel.ApplicationDeploymentDescription> getAllApplicationDeployments()
+  list<applicationDeploymentModel.ApplicationDeploymentDescription> getAllApplicationDeployments(1: required string gatewayId)
       	throws (1: airavataErrors.InvalidRequestException ire,
                 2: airavataErrors.AiravataClientException ace,
                 3: airavataErrors.AiravataSystemException ase)
@@ -778,8 +801,8 @@ service Airavata {
    *   Returns a server-side generated airavata application interface globally unique identifier.
    *
   */
-  string registerApplicationInterface(1: required applicationInterfaceModel.ApplicationInterfaceDescription
-                                            applicationInterface)
+  string registerApplicationInterface(1: required string gatewayId,
+                2: required applicationInterfaceModel.ApplicationInterfaceDescription applicationInterface)
     	throws (1: airavataErrors.InvalidRequestException ire,
               2: airavataErrors.AiravataClientException ace,
               3: airavataErrors.AiravataSystemException ase)
@@ -844,7 +867,7 @@ service Airavata {
    *   Returns a list of application interfaces with corresponsing id's
    *
   */
-  map<string, string> getAllApplicationInterfaceNames ()
+  map<string, string> getAllApplicationInterfaceNames (1: required string gatewayId)
       	throws (1: airavataErrors.InvalidRequestException ire,
                 2: airavataErrors.AiravataClientException ace,
                 3: airavataErrors.AiravataSystemException ase)
@@ -857,7 +880,7 @@ service Airavata {
    *   Returns a list of application interfaces documents
    *
   */
-  list<applicationInterfaceModel.ApplicationInterfaceDescription> getAllApplicationInterfaces ()
+  list<applicationInterfaceModel.ApplicationInterfaceDescription> getAllApplicationInterfaces (1: required string gatewayId)
       	throws (1: airavataErrors.InvalidRequestException ire,
                 2: airavataErrors.AiravataClientException ace,
                 3: airavataErrors.AiravataSystemException ase)
@@ -1690,7 +1713,7 @@ service Airavata {
             2: airavataErrors.AiravataClientException ace,
             3: airavataErrors.AiravataSystemException ase)
 
-  list<string> getAllWorkflows()
+  list<string> getAllWorkflows(1: required string gatewayId)
           throws (1: airavataErrors.InvalidRequestException ire,
                   2: airavataErrors.AiravataClientException ace,
                   3: airavataErrors.AiravataSystemException ase)
@@ -1705,7 +1728,8 @@ service Airavata {
                 2: airavataErrors.AiravataClientException ace,
                 3: airavataErrors.AiravataSystemException ase)
 
-  string registerWorkflow(1: required workflowDataModel.Workflow workflow)
+  string registerWorkflow(1: required string gatewayId,
+                          2: required workflowDataModel.Workflow workflow)
           throws (1: airavataErrors.InvalidRequestException ire,
                   2: airavataErrors.AiravataClientException ace,
                   3: airavataErrors.AiravataSystemException ase)