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/05/28 12:38:41 UTC
[airavata-custos] branch develop updated: issue #178
This is an automated email from the ASF dual-hosted git repository.
isjarana pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git
The following commit(s) were added to refs/heads/develop by this push:
new d8363c5 issue #178
new e0ee92b Merge pull request #179 from isururanawaka/develop
d8363c5 is described below
commit d8363c51d61cc2a4c021f842d410f5109f81b823
Author: Isuru Ranawaka <ir...@gmail.com>
AuthorDate: Thu May 27 23:33:36 2021 -0400
issue #178
---
.../src/main/proto/TenantProfileService.proto | 1 +
.../resources/protos/TenantProfileService.proto | 1 +
.../main/resources/tenant-management-service.pb | Bin 151075 -> 151289 bytes
.../service/TenantManagementService.java | 11 +++++++++++
4 files changed, 13 insertions(+)
diff --git a/custos-core-services/tenant-profile-core-service/src/main/proto/TenantProfileService.proto b/custos-core-services/tenant-profile-core-service/src/main/proto/TenantProfileService.proto
index a253a4f..498196d 100644
--- a/custos-core-services/tenant-profile-core-service/src/main/proto/TenantProfileService.proto
+++ b/custos-core-services/tenant-profile-core-service/src/main/proto/TenantProfileService.proto
@@ -53,6 +53,7 @@ message Tenant {
string software_version = 27;
int64 refesh_token_lifetime = 28;
string client_id = 29;
+ string parent_client_id = 30;
}
enum TenantStatus {
diff --git a/custos-integration-services/custos-integration-services-swagger/src/main/resources/protos/TenantProfileService.proto b/custos-integration-services/custos-integration-services-swagger/src/main/resources/protos/TenantProfileService.proto
index a253a4f..498196d 100644
--- a/custos-integration-services/custos-integration-services-swagger/src/main/resources/protos/TenantProfileService.proto
+++ b/custos-integration-services/custos-integration-services-swagger/src/main/resources/protos/TenantProfileService.proto
@@ -53,6 +53,7 @@ message Tenant {
string software_version = 27;
int64 refesh_token_lifetime = 28;
string client_id = 29;
+ string parent_client_id = 30;
}
enum TenantStatus {
diff --git a/custos-integration-services/tenant-management-service-parent/tenant-management-service-sidecar/src/main/resources/tenant-management-service.pb b/custos-integration-services/tenant-management-service-parent/tenant-management-service-sidecar/src/main/resources/tenant-management-service.pb
index bf65d59..3cb580c 100644
Binary files a/custos-integration-services/tenant-management-service-parent/tenant-management-service-sidecar/src/main/resources/tenant-management-service.pb and b/custos-integration-services/tenant-management-service-parent/tenant-management-service-sidecar/src/main/resources/tenant-management-service.pb differ
diff --git a/custos-integration-services/tenant-management-service-parent/tenant-management-service/src/main/java/org/apache/custos/tenant/management/service/TenantManagementService.java b/custos-integration-services/tenant-management-service-parent/tenant-management-service/src/main/java/org/apache/custos/tenant/management/service/TenantManagementService.java
index 6ab9536..74887d3 100644
--- a/custos-integration-services/tenant-management-service-parent/tenant-management-service/src/main/java/org/apache/custos/tenant/management/service/TenantManagementService.java
+++ b/custos-integration-services/tenant-management-service-parent/tenant-management-service/src/main/java/org/apache/custos/tenant/management/service/TenantManagementService.java
@@ -504,6 +504,17 @@ public class TenantManagementService extends TenantManagementServiceImplBase {
CredentialMetadata metadata = credentialStoreServiceClient.
getCredential(credentialRequest);
+
+ if (tenant.getParentTenantId() > 0) {
+ GetCredentialRequest cR = GetCredentialRequest.newBuilder()
+ .setOwnerId(tenant.getParentTenantId())
+ .setType(Type.CUSTOS).build();
+
+ CredentialMetadata parentMetadata = credentialStoreServiceClient.
+ getCredential(cR);
+ tenant = tenant.toBuilder().setParentClientId(parentMetadata.getId()).build();
+ }
+
tenant = tenant.toBuilder().setClientId(metadata.getId()).build();
tenantList.add(tenant);