You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by is...@apache.org on 2021/02/22 02:29:45 UTC

[airavata] branch custos-integration updated: Fix building issues

This is an automated email from the ASF dual-hosted git repository.

isjarana pushed a commit to branch custos-integration
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/custos-integration by this push:
     new 8eec1ea  Fix building issues
     new 92fcb17  Merge pull request #271 from isururanawaka/airavata-custos-integration
8eec1ea is described below

commit 8eec1eabae90a8f2431757848b67152c98258159
Author: Isuru Ranawaka <ir...@gmail.com>
AuthorDate: Sun Feb 21 21:27:09 2021 -0500

    Fix building issues
---
 .../org/apache/airavata/api/server/handler/AiravataServerHandler.java  | 3 ++-
 .../airavata/service/profile/handlers/IamAdminServicesHandler.java     | 1 +
 .../org/apache/airavata/service/security/GatewayGroupsInitializer.java | 3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index cb506fa..c0004df 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -179,6 +179,7 @@ public class AiravataServerHandler implements Airavata.Iface {
                 AddResourceCredentialResponse response = resourceSecretClient.addPasswordCredential(custosId,
                         "Credentials for default gateway",
                         ServerSettings.getDefaultUser(),
+                        ServerSettings.getDefaultUser(),
                         ServerSettings.getDefaultUserPassword());
 
                 if (response != null && response.getToken() != null && !response.getToken().trim().equals("")) {
@@ -753,7 +754,7 @@ public class AiravataServerHandler implements Airavata.Iface {
         try {
 
             AddResourceCredentialResponse response =
-                    resourceSecretClient.addPasswordCredential(custosId, description, loginUserName, password);
+                    resourceSecretClient.addPasswordCredential(custosId, description, loginUserName,loginUserName, password);
 
             if (response.getToken() == null || response.getToken().trim().equals("")) {
                 String msg = "Password token is empty for gateway with custos Id "+ custosId + " for user "+loginUserName;
diff --git a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/IamAdminServicesHandler.java b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/IamAdminServicesHandler.java
index db3fcf3..4b17637 100644
--- a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/IamAdminServicesHandler.java
+++ b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/IamAdminServicesHandler.java
@@ -427,6 +427,7 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
             AddResourceCredentialResponse response = resourceSecretManagementClient.addPasswordCredential(createdGatewayCustosId,
                     passwordCredential.getMetadata().getDescription(),
                     gateway.getIdentityServerUserName(),
+                    gateway.getIdentityServerUserName(),
                     passwordCredential.getPassword());
             gateway.setIdentityServerPasswordToken(response.getToken());
         } catch (Exception ex) {
diff --git a/airavata-services/services-security/src/main/java/org/apache/airavata/service/security/GatewayGroupsInitializer.java b/airavata-services/services-security/src/main/java/org/apache/airavata/service/security/GatewayGroupsInitializer.java
index 8586b11..d538345 100644
--- a/airavata-services/services-security/src/main/java/org/apache/airavata/service/security/GatewayGroupsInitializer.java
+++ b/airavata-services/services-security/src/main/java/org/apache/airavata/service/security/GatewayGroupsInitializer.java
@@ -37,6 +37,7 @@ import org.apache.custos.iam.service.GroupsResponse;
 import org.apache.custos.resource.secret.management.client.ResourceSecretManagementClient;
 import org.apache.custos.tenant.management.service.GetTenantResponse;
 import org.apache.custos.tenant.manamgement.client.TenantManagementClient;
+import org.apache.custos.tenant.profile.service.Tenant;
 import org.apache.custos.user.profile.service.Group;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;
@@ -91,7 +92,7 @@ public class GatewayGroupsInitializer {
         GatewayGroups gatewayGroups = new GatewayGroups();
         gatewayGroups.setGatewayId(gatewayId);
 
-        GetTenantResponse getTenantResponse = tenantManagementClient.getTenant(custosId);
+        Tenant getTenantResponse = tenantManagementClient.getTenant(custosId);
 
         String ownerId = getTenantResponse.getAdminUsername();