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

yasith pushed a commit to branch feat/grpc-armeria-migration
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit 037cc7c99f7a3702c9b05eda826f1e2dcc40597a
Author: yasithdev <[email protected]>
AuthorDate: Tue Mar 31 02:41:13 2026 -0400

    feat: add service protos — profile, credential, sharing, data product 
domains
---
 .../main/proto/services/credential_service.proto   | 164 +++++++++++++
 .../main/proto/services/data_product_service.proto |  97 ++++++++
 .../gateway_resource_profile_service.proto         | 244 ++++++++++++++++++
 .../services/group_resource_profile_service.proto  | 220 +++++++++++++++++
 .../src/main/proto/services/sharing_service.proto  | 158 ++++++++++++
 .../services/user_resource_profile_service.proto   | 272 +++++++++++++++++++++
 6 files changed, 1155 insertions(+)

diff --git a/airavata-api/src/main/proto/services/credential_service.proto 
b/airavata-api/src/main/proto/services/credential_service.proto
new file mode 100644
index 0000000000..385489dab6
--- /dev/null
+++ b/airavata-api/src/main/proto/services/credential_service.proto
@@ -0,0 +1,164 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+syntax = "proto3";
+
+package org.apache.airavata.api.credential;
+
+option java_package = "org.apache.airavata.api.credential";
+option java_multiple_files = true;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+import "org/apache/airavata/model/credential/store/credential_store.proto";
+
+// CredentialService provides RPCs for managing SSH keys, password credentials,
+// and SSH account setup on compute resources.
+service CredentialService {
+
+  rpc GenerateAndRegisterSSHKeys(GenerateAndRegisterSSHKeysRequest) returns 
(GenerateAndRegisterSSHKeysResponse) {
+    option (google.api.http) = {
+      post: "/api/v1/credentials/ssh-keys"
+      body: "*"
+    };
+  }
+
+  rpc RegisterPwdCredential(RegisterPwdCredentialRequest) returns 
(RegisterPwdCredentialResponse) {
+    option (google.api.http) = {
+      post: "/api/v1/credentials/passwords"
+      body: "*"
+    };
+  }
+
+  rpc GetCredentialSummary(GetCredentialSummaryRequest) returns 
(org.apache.airavata.model.credential.store.CredentialSummary) {
+    option (google.api.http) = {
+      get: "/api/v1/credentials/{token_id}"
+    };
+  }
+
+  rpc GetAllCredentialSummaries(GetAllCredentialSummariesRequest) returns 
(GetAllCredentialSummariesResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/credentials"
+    };
+  }
+
+  rpc DeleteSSHPubKey(DeleteSSHPubKeyRequest) returns (google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: "/api/v1/credentials/ssh-keys/{token_id}"
+    };
+  }
+
+  rpc DeletePWDCredential(DeletePWDCredentialRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: "/api/v1/credentials/passwords/{token_id}"
+    };
+  }
+
+  rpc DoesUserHaveSSHAccount(DoesUserHaveSSHAccountRequest) returns 
(DoesUserHaveSSHAccountResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/credentials/ssh-accounts/{compute_resource_id}:check"
+    };
+  }
+
+  rpc IsSSHSetupComplete(IsSSHSetupCompleteRequest) returns 
(IsSSHSetupCompleteResponse) {
+    option (google.api.http) = {
+      get: 
"/api/v1/credentials/ssh-accounts/{compute_resource_id}:setup-status"
+    };
+  }
+
+  rpc SetupSSHAccount(SetupSSHAccountRequest) returns 
(SetupSSHAccountResponse) {
+    option (google.api.http) = {
+      post: "/api/v1/credentials/ssh-accounts/{compute_resource_id}:setup"
+      body: "*"
+    };
+  }
+}
+
+// Request/Response messages
+
+message GenerateAndRegisterSSHKeysRequest {
+  string gateway_id = 1;
+  string username = 2;
+  string description = 3;
+}
+
+message GenerateAndRegisterSSHKeysResponse {
+  string token = 1;
+}
+
+message RegisterPwdCredentialRequest {
+  string gateway_id = 1;
+  org.apache.airavata.model.credential.store.PasswordCredential 
password_credential = 2;
+}
+
+message RegisterPwdCredentialResponse {
+  string token = 1;
+}
+
+message GetCredentialSummaryRequest {
+  string token_id = 1;
+  string gateway_id = 2;
+}
+
+message GetAllCredentialSummariesRequest {
+  string gateway_id = 1;
+  org.apache.airavata.model.credential.store.SummaryType type = 2;
+}
+
+message GetAllCredentialSummariesResponse {
+  repeated org.apache.airavata.model.credential.store.CredentialSummary 
credential_summaries = 1;
+}
+
+message DeleteSSHPubKeyRequest {
+  string token_id = 1;
+  string gateway_id = 2;
+}
+
+message DeletePWDCredentialRequest {
+  string token_id = 1;
+  string gateway_id = 2;
+}
+
+message DoesUserHaveSSHAccountRequest {
+  string compute_resource_id = 1;
+  string gateway_id = 2;
+  string username = 3;
+}
+
+message DoesUserHaveSSHAccountResponse {
+  bool has_account = 1;
+}
+
+message IsSSHSetupCompleteRequest {
+  string compute_resource_id = 1;
+  string gateway_id = 2;
+  string username = 3;
+}
+
+message IsSSHSetupCompleteResponse {
+  bool is_complete = 1;
+}
+
+message SetupSSHAccountRequest {
+  string compute_resource_id = 1;
+  string gateway_id = 2;
+  string username = 3;
+}
+
+message SetupSSHAccountResponse {
+  bool success = 1;
+}
diff --git a/airavata-api/src/main/proto/services/data_product_service.proto 
b/airavata-api/src/main/proto/services/data_product_service.proto
new file mode 100644
index 0000000000..26c4c2880d
--- /dev/null
+++ b/airavata-api/src/main/proto/services/data_product_service.proto
@@ -0,0 +1,97 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+syntax = "proto3";
+
+package org.apache.airavata.api.dataproduct;
+
+option java_package = "org.apache.airavata.api.dataproduct";
+option java_multiple_files = true;
+
+import "google/api/annotations.proto";
+import "org/apache/airavata/model/data/replica/replica_catalog.proto";
+
+// DataProductService provides RPCs for managing data products and replica 
locations.
+service DataProductService {
+
+  rpc RegisterDataProduct(RegisterDataProductRequest) returns 
(RegisterDataProductResponse) {
+    option (google.api.http) = {
+      post: "/api/v1/data-products"
+      body: "data_product"
+    };
+  }
+
+  rpc GetDataProduct(GetDataProductRequest) returns 
(org.apache.airavata.model.data.replica.DataProductModel) {
+    option (google.api.http) = {
+      get: "/api/v1/data-products/{product_uri}"
+    };
+  }
+
+  rpc RegisterReplicaLocation(RegisterReplicaLocationRequest) returns 
(RegisterReplicaLocationResponse) {
+    option (google.api.http) = {
+      post: "/api/v1/data-products/{product_uri}/replicas"
+      body: "replica_location"
+    };
+  }
+
+  rpc GetParentDataProduct(GetParentDataProductRequest) returns 
(org.apache.airavata.model.data.replica.DataProductModel) {
+    option (google.api.http) = {
+      get: "/api/v1/data-products/{product_uri}/parent"
+    };
+  }
+
+  rpc GetChildDataProducts(GetChildDataProductsRequest) returns 
(GetChildDataProductsResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/data-products/{product_uri}/children"
+    };
+  }
+}
+
+// Request/Response messages
+
+message RegisterDataProductRequest {
+  org.apache.airavata.model.data.replica.DataProductModel data_product = 1;
+}
+
+message RegisterDataProductResponse {
+  string product_uri = 1;
+}
+
+message GetDataProductRequest {
+  string product_uri = 1;
+}
+
+message RegisterReplicaLocationRequest {
+  string product_uri = 1;
+  org.apache.airavata.model.data.replica.DataReplicaLocationModel 
replica_location = 2;
+}
+
+message RegisterReplicaLocationResponse {
+  string replica_id = 1;
+}
+
+message GetParentDataProductRequest {
+  string product_uri = 1;
+}
+
+message GetChildDataProductsRequest {
+  string product_uri = 1;
+}
+
+message GetChildDataProductsResponse {
+  repeated org.apache.airavata.model.data.replica.DataProductModel 
data_products = 1;
+}
diff --git 
a/airavata-api/src/main/proto/services/gateway_resource_profile_service.proto 
b/airavata-api/src/main/proto/services/gateway_resource_profile_service.proto
new file mode 100644
index 0000000000..ad2b346764
--- /dev/null
+++ 
b/airavata-api/src/main/proto/services/gateway_resource_profile_service.proto
@@ -0,0 +1,244 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+syntax = "proto3";
+
+package org.apache.airavata.api.gatewayprofile;
+
+option java_package = "org.apache.airavata.api.gatewayprofile";
+option java_multiple_files = true;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+import 
"org/apache/airavata/model/appcatalog/gatewayprofile/gateway_profile.proto";
+import 
"org/apache/airavata/model/appcatalog/accountprovisioning/account_provisioning.proto";
+
+// GatewayResourceProfileService provides RPCs for managing gateway resource 
profiles,
+// compute preferences, storage preferences, and SSH account provisioners.
+service GatewayResourceProfileService {
+
+  // --- Gateway Resource Profiles ---
+
+  rpc RegisterGatewayResourceProfile(RegisterGatewayResourceProfileRequest) 
returns (RegisterGatewayResourceProfileResponse) {
+    option (google.api.http) = {
+      post: "/api/v1/gateway-profiles"
+      body: "gateway_resource_profile"
+    };
+  }
+
+  rpc GetGatewayResourceProfile(GetGatewayResourceProfileRequest) returns 
(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile) {
+    option (google.api.http) = {
+      get: "/api/v1/gateway-profiles/{gateway_id}"
+    };
+  }
+
+  rpc UpdateGatewayResourceProfile(UpdateGatewayResourceProfileRequest) 
returns (google.protobuf.Empty) {
+    option (google.api.http) = {
+      put: "/api/v1/gateway-profiles/{gateway_id}"
+      body: "gateway_resource_profile"
+    };
+  }
+
+  rpc DeleteGatewayResourceProfile(DeleteGatewayResourceProfileRequest) 
returns (google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: "/api/v1/gateway-profiles/{gateway_id}"
+    };
+  }
+
+  rpc GetAllGatewayResourceProfiles(GetAllGatewayResourceProfilesRequest) 
returns (GetAllGatewayResourceProfilesResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/gateway-profiles"
+    };
+  }
+
+  // --- Compute Preferences ---
+
+  rpc AddComputePreference(AddComputePreferenceRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      post: "/api/v1/gateway-profiles/{gateway_id}/compute-preferences"
+      body: "compute_resource_preference"
+    };
+  }
+
+  rpc GetComputePreference(GetComputePreferenceRequest) returns 
(org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference) 
{
+    option (google.api.http) = {
+      get: 
"/api/v1/gateway-profiles/{gateway_id}/compute-preferences/{compute_resource_id}"
+    };
+  }
+
+  rpc UpdateComputePreference(UpdateComputePreferenceRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      put: 
"/api/v1/gateway-profiles/{gateway_id}/compute-preferences/{compute_resource_id}"
+      body: "compute_resource_preference"
+    };
+  }
+
+  rpc DeleteComputePreference(DeleteComputePreferenceRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: 
"/api/v1/gateway-profiles/{gateway_id}/compute-preferences/{compute_resource_id}"
+    };
+  }
+
+  rpc GetAllComputePreferences(GetAllComputePreferencesRequest) returns 
(GetAllComputePreferencesResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/gateway-profiles/{gateway_id}/compute-preferences"
+    };
+  }
+
+  // --- Storage Preferences ---
+
+  rpc AddStoragePreference(AddStoragePreferenceRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      post: "/api/v1/gateway-profiles/{gateway_id}/storage-preferences"
+      body: "storage_preference"
+    };
+  }
+
+  rpc GetStoragePreference(GetStoragePreferenceRequest) returns 
(org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference) {
+    option (google.api.http) = {
+      get: 
"/api/v1/gateway-profiles/{gateway_id}/storage-preferences/{storage_resource_id}"
+    };
+  }
+
+  rpc UpdateStoragePreference(UpdateStoragePreferenceRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      put: 
"/api/v1/gateway-profiles/{gateway_id}/storage-preferences/{storage_resource_id}"
+      body: "storage_preference"
+    };
+  }
+
+  rpc DeleteStoragePreference(DeleteStoragePreferenceRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: 
"/api/v1/gateway-profiles/{gateway_id}/storage-preferences/{storage_resource_id}"
+    };
+  }
+
+  rpc GetAllStoragePreferences(GetAllStoragePreferencesRequest) returns 
(GetAllStoragePreferencesResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/gateway-profiles/{gateway_id}/storage-preferences"
+    };
+  }
+
+  // --- SSH Account Provisioners ---
+
+  rpc GetSSHAccountProvisioners(GetSSHAccountProvisionersRequest) returns 
(GetSSHAccountProvisionersResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/ssh-account-provisioners"
+    };
+  }
+}
+
+// --- Gateway Resource Profile Request/Response messages ---
+
+message RegisterGatewayResourceProfileRequest {
+  org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile 
gateway_resource_profile = 1;
+}
+
+message RegisterGatewayResourceProfileResponse {
+  string gateway_id = 1;
+}
+
+message GetGatewayResourceProfileRequest {
+  string gateway_id = 1;
+}
+
+message UpdateGatewayResourceProfileRequest {
+  string gateway_id = 1;
+  org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile 
gateway_resource_profile = 2;
+}
+
+message DeleteGatewayResourceProfileRequest {
+  string gateway_id = 1;
+}
+
+message GetAllGatewayResourceProfilesRequest {}
+
+message GetAllGatewayResourceProfilesResponse {
+  repeated 
org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile 
gateway_resource_profiles = 1;
+}
+
+// --- Compute Preference Request/Response messages ---
+
+message AddComputePreferenceRequest {
+  string gateway_id = 1;
+  string compute_resource_id = 2;
+  
org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference 
compute_resource_preference = 3;
+}
+
+message GetComputePreferenceRequest {
+  string gateway_id = 1;
+  string compute_resource_id = 2;
+}
+
+message UpdateComputePreferenceRequest {
+  string gateway_id = 1;
+  string compute_resource_id = 2;
+  
org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference 
compute_resource_preference = 3;
+}
+
+message DeleteComputePreferenceRequest {
+  string gateway_id = 1;
+  string compute_resource_id = 2;
+}
+
+message GetAllComputePreferencesRequest {
+  string gateway_id = 1;
+}
+
+message GetAllComputePreferencesResponse {
+  repeated 
org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference 
compute_resource_preferences = 1;
+}
+
+// --- Storage Preference Request/Response messages ---
+
+message AddStoragePreferenceRequest {
+  string gateway_id = 1;
+  string storage_resource_id = 2;
+  org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference 
storage_preference = 3;
+}
+
+message GetStoragePreferenceRequest {
+  string gateway_id = 1;
+  string storage_resource_id = 2;
+}
+
+message UpdateStoragePreferenceRequest {
+  string gateway_id = 1;
+  string storage_resource_id = 2;
+  org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference 
storage_preference = 3;
+}
+
+message DeleteStoragePreferenceRequest {
+  string gateway_id = 1;
+  string storage_resource_id = 2;
+}
+
+message GetAllStoragePreferencesRequest {
+  string gateway_id = 1;
+}
+
+message GetAllStoragePreferencesResponse {
+  repeated 
org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference 
storage_preferences = 1;
+}
+
+// --- SSH Account Provisioner Request/Response messages ---
+
+message GetSSHAccountProvisionersRequest {}
+
+message GetSSHAccountProvisionersResponse {
+  repeated 
org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner 
ssh_account_provisioners = 1;
+}
diff --git 
a/airavata-api/src/main/proto/services/group_resource_profile_service.proto 
b/airavata-api/src/main/proto/services/group_resource_profile_service.proto
new file mode 100644
index 0000000000..fbbbfb2a99
--- /dev/null
+++ b/airavata-api/src/main/proto/services/group_resource_profile_service.proto
@@ -0,0 +1,220 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+syntax = "proto3";
+
+package org.apache.airavata.api.groupprofile;
+
+option java_package = "org.apache.airavata.api.groupprofile";
+option java_multiple_files = true;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+import 
"org/apache/airavata/model/appcatalog/groupresourceprofile/group_resource_profile.proto";
+import 
"org/apache/airavata/model/appcatalog/gatewaygroups/gateway_groups.proto";
+
+// GroupResourceProfileService provides RPCs for managing group resource 
profiles,
+// compute preferences, compute resource policies, and batch queue policies.
+service GroupResourceProfileService {
+
+  // --- Group Resource Profiles ---
+
+  rpc CreateGroupResourceProfile(CreateGroupResourceProfileRequest) returns 
(org.apache.airavata.model.appcatalog.groupresourceprofile.GroupResourceProfile)
 {
+    option (google.api.http) = {
+      post: "/api/v1/group-profiles"
+      body: "group_resource_profile"
+    };
+  }
+
+  rpc GetGroupResourceProfile(GetGroupResourceProfileRequest) returns 
(org.apache.airavata.model.appcatalog.groupresourceprofile.GroupResourceProfile)
 {
+    option (google.api.http) = {
+      get: "/api/v1/group-profiles/{group_resource_profile_id}"
+    };
+  }
+
+  rpc UpdateGroupResourceProfile(UpdateGroupResourceProfileRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      put: "/api/v1/group-profiles/{group_resource_profile_id}"
+      body: "group_resource_profile"
+    };
+  }
+
+  rpc RemoveGroupResourceProfile(RemoveGroupResourceProfileRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: "/api/v1/group-profiles/{group_resource_profile_id}"
+    };
+  }
+
+  rpc GetGroupResourceList(GetGroupResourceListRequest) returns 
(GetGroupResourceListResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/group-profiles"
+    };
+  }
+
+  // --- Group Compute Preferences ---
+
+  rpc GetGroupComputePreference(GetGroupComputePreferenceRequest) returns 
(org.apache.airavata.model.appcatalog.groupresourceprofile.GroupComputeResourcePreference)
 {
+    option (google.api.http) = {
+      get: 
"/api/v1/group-profiles/{group_resource_profile_id}/compute-preferences/{compute_resource_id}"
+    };
+  }
+
+  rpc RemoveGroupComputePrefs(RemoveGroupComputePrefsRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: 
"/api/v1/group-profiles/{group_resource_profile_id}/compute-preferences/{compute_resource_id}"
+    };
+  }
+
+  rpc GetGroupComputePrefList(GetGroupComputePrefListRequest) returns 
(GetGroupComputePrefListResponse) {
+    option (google.api.http) = {
+      get: 
"/api/v1/group-profiles/{group_resource_profile_id}/compute-preferences"
+    };
+  }
+
+  // --- Compute Resource Policies ---
+
+  rpc GetGroupComputeResourcePolicy(GetGroupComputeResourcePolicyRequest) 
returns 
(org.apache.airavata.model.appcatalog.groupresourceprofile.ComputeResourcePolicy)
 {
+    option (google.api.http) = {
+      get: "/api/v1/group-compute-policies/{resource_policy_id}"
+    };
+  }
+
+  rpc 
RemoveGroupComputeResourcePolicy(RemoveGroupComputeResourcePolicyRequest) 
returns (google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: "/api/v1/group-compute-policies/{resource_policy_id}"
+    };
+  }
+
+  rpc 
GetGroupComputeResourcePolicyList(GetGroupComputeResourcePolicyListRequest) 
returns (GetGroupComputeResourcePolicyListResponse) {
+    option (google.api.http) = {
+      get: 
"/api/v1/group-profiles/{group_resource_profile_id}/compute-policies"
+    };
+  }
+
+  // --- Batch Queue Resource Policies ---
+
+  rpc GetBatchQueueResourcePolicy(GetBatchQueueResourcePolicyRequest) returns 
(org.apache.airavata.model.appcatalog.groupresourceprofile.BatchQueueResourcePolicy)
 {
+    option (google.api.http) = {
+      get: "/api/v1/batch-queue-policies/{resource_policy_id}"
+    };
+  }
+
+  rpc 
RemoveGroupBatchQueueResourcePolicy(RemoveGroupBatchQueueResourcePolicyRequest) 
returns (google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: "/api/v1/batch-queue-policies/{resource_policy_id}"
+    };
+  }
+
+  rpc GetGroupBatchQueuePolicyList(GetGroupBatchQueuePolicyListRequest) 
returns (GetGroupBatchQueuePolicyListResponse) {
+    option (google.api.http) = {
+      get: 
"/api/v1/group-profiles/{group_resource_profile_id}/batch-queue-policies"
+    };
+  }
+
+  // --- Gateway Groups ---
+
+  rpc GetGatewayGroups(GetGatewayGroupsRequest) returns 
(org.apache.airavata.model.appcatalog.gatewaygroups.GatewayGroups) {
+    option (google.api.http) = {
+      get: "/api/v1/gateway-groups"
+    };
+  }
+}
+
+// --- Group Resource Profile Request/Response messages ---
+
+message CreateGroupResourceProfileRequest {
+  
org.apache.airavata.model.appcatalog.groupresourceprofile.GroupResourceProfile 
group_resource_profile = 1;
+}
+
+message GetGroupResourceProfileRequest {
+  string group_resource_profile_id = 1;
+}
+
+message UpdateGroupResourceProfileRequest {
+  string group_resource_profile_id = 1;
+  
org.apache.airavata.model.appcatalog.groupresourceprofile.GroupResourceProfile 
group_resource_profile = 2;
+}
+
+message RemoveGroupResourceProfileRequest {
+  string group_resource_profile_id = 1;
+}
+
+message GetGroupResourceListRequest {}
+
+message GetGroupResourceListResponse {
+  repeated 
org.apache.airavata.model.appcatalog.groupresourceprofile.GroupResourceProfile 
group_resource_profiles = 1;
+}
+
+// --- Group Compute Preference Request/Response messages ---
+
+message GetGroupComputePreferenceRequest {
+  string group_resource_profile_id = 1;
+  string compute_resource_id = 2;
+}
+
+message RemoveGroupComputePrefsRequest {
+  string group_resource_profile_id = 1;
+  string compute_resource_id = 2;
+}
+
+message GetGroupComputePrefListRequest {
+  string group_resource_profile_id = 1;
+}
+
+message GetGroupComputePrefListResponse {
+  repeated 
org.apache.airavata.model.appcatalog.groupresourceprofile.GroupComputeResourcePreference
 group_compute_resource_preferences = 1;
+}
+
+// --- Compute Resource Policy Request/Response messages ---
+
+message GetGroupComputeResourcePolicyRequest {
+  string resource_policy_id = 1;
+}
+
+message RemoveGroupComputeResourcePolicyRequest {
+  string resource_policy_id = 1;
+}
+
+message GetGroupComputeResourcePolicyListRequest {
+  string group_resource_profile_id = 1;
+}
+
+message GetGroupComputeResourcePolicyListResponse {
+  repeated 
org.apache.airavata.model.appcatalog.groupresourceprofile.ComputeResourcePolicy 
compute_resource_policies = 1;
+}
+
+// --- Batch Queue Resource Policy Request/Response messages ---
+
+message GetBatchQueueResourcePolicyRequest {
+  string resource_policy_id = 1;
+}
+
+message RemoveGroupBatchQueueResourcePolicyRequest {
+  string resource_policy_id = 1;
+}
+
+message GetGroupBatchQueuePolicyListRequest {
+  string group_resource_profile_id = 1;
+}
+
+message GetGroupBatchQueuePolicyListResponse {
+  repeated 
org.apache.airavata.model.appcatalog.groupresourceprofile.BatchQueueResourcePolicy
 batch_queue_resource_policies = 1;
+}
+
+// --- Gateway Groups Request/Response messages ---
+
+message GetGatewayGroupsRequest {}
diff --git a/airavata-api/src/main/proto/services/sharing_service.proto 
b/airavata-api/src/main/proto/services/sharing_service.proto
new file mode 100644
index 0000000000..60386d9473
--- /dev/null
+++ b/airavata-api/src/main/proto/services/sharing_service.proto
@@ -0,0 +1,158 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+syntax = "proto3";
+
+package org.apache.airavata.api.sharing;
+
+option java_package = "org.apache.airavata.api.sharing";
+option java_multiple_files = true;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+
+// SharingService provides RPCs for managing resource sharing with users and 
groups.
+service SharingService {
+
+  rpc ShareResourceWithUsers(ShareResourceWithUsersRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      post: "/api/v1/sharing/{resource_id}/users"
+      body: "*"
+    };
+  }
+
+  rpc ShareResourceWithGroups(ShareResourceWithGroupsRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      post: "/api/v1/sharing/{resource_id}/groups"
+      body: "*"
+    };
+  }
+
+  rpc RevokeFromUsers(RevokeFromUsersRequest) returns (google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: "/api/v1/sharing/{resource_id}/users"
+    };
+  }
+
+  rpc RevokeFromGroups(RevokeFromGroupsRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: "/api/v1/sharing/{resource_id}/groups"
+    };
+  }
+
+  rpc GetAllAccessibleUsers(GetAllAccessibleUsersRequest) returns 
(GetAllAccessibleUsersResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/sharing/{resource_id}/users"
+    };
+  }
+
+  rpc GetAllDirectlyAccessibleUsers(GetAllDirectlyAccessibleUsersRequest) 
returns (GetAllDirectlyAccessibleUsersResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/sharing/{resource_id}/users:direct"
+    };
+  }
+
+  rpc GetAllAccessibleGroups(GetAllAccessibleGroupsRequest) returns 
(GetAllAccessibleGroupsResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/sharing/{resource_id}/groups"
+    };
+  }
+
+  rpc GetAllDirectlyAccessibleGroups(GetAllDirectlyAccessibleGroupsRequest) 
returns (GetAllDirectlyAccessibleGroupsResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/sharing/{resource_id}/groups:direct"
+    };
+  }
+
+  rpc UserHasAccess(UserHasAccessRequest) returns (UserHasAccessResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/sharing/{resource_id}/users/{user_id}:check"
+    };
+  }
+}
+
+// Request/Response messages
+
+message ShareResourceWithUsersRequest {
+  string resource_id = 1;
+  // Map of user_id to permission type string.
+  map<string, string> user_permissions = 2;
+}
+
+message ShareResourceWithGroupsRequest {
+  string resource_id = 1;
+  // Map of group_id to permission type string.
+  map<string, string> group_permissions = 2;
+}
+
+message RevokeFromUsersRequest {
+  string resource_id = 1;
+  // Map of user_id to permission type string.
+  map<string, string> user_permissions = 2;
+}
+
+message RevokeFromGroupsRequest {
+  string resource_id = 1;
+  // Map of group_id to permission type string.
+  map<string, string> group_permissions = 2;
+}
+
+message GetAllAccessibleUsersRequest {
+  string resource_id = 1;
+  string permission_type = 2;
+}
+
+message GetAllAccessibleUsersResponse {
+  repeated string user_ids = 1;
+}
+
+message GetAllDirectlyAccessibleUsersRequest {
+  string resource_id = 1;
+  string permission_type = 2;
+}
+
+message GetAllDirectlyAccessibleUsersResponse {
+  repeated string user_ids = 1;
+}
+
+message GetAllAccessibleGroupsRequest {
+  string resource_id = 1;
+  string permission_type = 2;
+}
+
+message GetAllAccessibleGroupsResponse {
+  repeated string group_ids = 1;
+}
+
+message GetAllDirectlyAccessibleGroupsRequest {
+  string resource_id = 1;
+  string permission_type = 2;
+}
+
+message GetAllDirectlyAccessibleGroupsResponse {
+  repeated string group_ids = 1;
+}
+
+message UserHasAccessRequest {
+  string resource_id = 1;
+  string user_id = 2;
+  string permission_type = 3;
+}
+
+message UserHasAccessResponse {
+  bool has_access = 1;
+}
diff --git 
a/airavata-api/src/main/proto/services/user_resource_profile_service.proto 
b/airavata-api/src/main/proto/services/user_resource_profile_service.proto
new file mode 100644
index 0000000000..46012b8ee2
--- /dev/null
+++ b/airavata-api/src/main/proto/services/user_resource_profile_service.proto
@@ -0,0 +1,272 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+syntax = "proto3";
+
+package org.apache.airavata.api.userprofile;
+
+option java_package = "org.apache.airavata.api.userprofile";
+option java_multiple_files = true;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+import 
"org/apache/airavata/model/appcatalog/userresourceprofile/user_resource_profile.proto";
+import "org/apache/airavata/model/status/status.proto";
+
+// UserResourceProfileService provides RPCs for managing user resource 
profiles,
+// user compute preferences, user storage preferences, and queue statuses.
+service UserResourceProfileService {
+
+  // --- User Resource Profiles ---
+
+  rpc RegisterUserResourceProfile(RegisterUserResourceProfileRequest) returns 
(RegisterUserResourceProfileResponse) {
+    option (google.api.http) = {
+      post: "/api/v1/user-profiles"
+      body: "user_resource_profile"
+    };
+  }
+
+  rpc IsUserResourceProfileExists(IsUserResourceProfileExistsRequest) returns 
(IsUserResourceProfileExistsResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/user-profiles/{user_id}:exists"
+    };
+  }
+
+  rpc GetUserResourceProfile(GetUserResourceProfileRequest) returns 
(org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile) {
+    option (google.api.http) = {
+      get: "/api/v1/user-profiles/{user_id}"
+    };
+  }
+
+  rpc UpdateUserResourceProfile(UpdateUserResourceProfileRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      put: "/api/v1/user-profiles/{user_id}"
+      body: "user_resource_profile"
+    };
+  }
+
+  rpc DeleteUserResourceProfile(DeleteUserResourceProfileRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: "/api/v1/user-profiles/{user_id}"
+    };
+  }
+
+  rpc GetAllUserResourceProfiles(GetAllUserResourceProfilesRequest) returns 
(GetAllUserResourceProfilesResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/user-profiles"
+    };
+  }
+
+  // --- User Compute Preferences ---
+
+  rpc AddUserComputePreference(AddUserComputePreferenceRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      post: "/api/v1/user-profiles/{user_id}/compute-preferences"
+      body: "user_compute_resource_preference"
+    };
+  }
+
+  rpc GetUserComputePreference(GetUserComputePreferenceRequest) returns 
(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference)
 {
+    option (google.api.http) = {
+      get: 
"/api/v1/user-profiles/{user_id}/compute-preferences/{compute_resource_id}"
+    };
+  }
+
+  rpc UpdateUserComputePreference(UpdateUserComputePreferenceRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      put: 
"/api/v1/user-profiles/{user_id}/compute-preferences/{compute_resource_id}"
+      body: "user_compute_resource_preference"
+    };
+  }
+
+  rpc DeleteUserComputePreference(DeleteUserComputePreferenceRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: 
"/api/v1/user-profiles/{user_id}/compute-preferences/{compute_resource_id}"
+    };
+  }
+
+  rpc GetAllUserComputePreferences(GetAllUserComputePreferencesRequest) 
returns (GetAllUserComputePreferencesResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/user-profiles/{user_id}/compute-preferences"
+    };
+  }
+
+  // --- User Storage Preferences ---
+
+  rpc AddUserStoragePreference(AddUserStoragePreferenceRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      post: "/api/v1/user-profiles/{user_id}/storage-preferences"
+      body: "user_storage_preference"
+    };
+  }
+
+  rpc GetUserStoragePreference(GetUserStoragePreferenceRequest) returns 
(org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference)
 {
+    option (google.api.http) = {
+      get: 
"/api/v1/user-profiles/{user_id}/storage-preferences/{storage_resource_id}"
+    };
+  }
+
+  rpc UpdateUserStoragePreference(UpdateUserStoragePreferenceRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      put: 
"/api/v1/user-profiles/{user_id}/storage-preferences/{storage_resource_id}"
+      body: "user_storage_preference"
+    };
+  }
+
+  rpc DeleteUserStoragePreference(DeleteUserStoragePreferenceRequest) returns 
(google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: 
"/api/v1/user-profiles/{user_id}/storage-preferences/{storage_resource_id}"
+    };
+  }
+
+  rpc GetAllUserStoragePreferences(GetAllUserStoragePreferencesRequest) 
returns (GetAllUserStoragePreferencesResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/user-profiles/{user_id}/storage-preferences"
+    };
+  }
+
+  // --- Queue Statuses ---
+
+  rpc GetLatestQueueStatuses(GetLatestQueueStatusesRequest) returns 
(GetLatestQueueStatusesResponse) {
+    option (google.api.http) = {
+      get: "/api/v1/queue-statuses"
+    };
+  }
+}
+
+// --- User Resource Profile Request/Response messages ---
+
+message RegisterUserResourceProfileRequest {
+  org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile 
user_resource_profile = 1;
+}
+
+message RegisterUserResourceProfileResponse {
+  string user_id = 1;
+}
+
+message IsUserResourceProfileExistsRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+}
+
+message IsUserResourceProfileExistsResponse {
+  bool exists = 1;
+}
+
+message GetUserResourceProfileRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+}
+
+message UpdateUserResourceProfileRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+  org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile 
user_resource_profile = 3;
+}
+
+message DeleteUserResourceProfileRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+}
+
+message GetAllUserResourceProfilesRequest {}
+
+message GetAllUserResourceProfilesResponse {
+  repeated 
org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile 
user_resource_profiles = 1;
+}
+
+// --- User Compute Preference Request/Response messages ---
+
+message AddUserComputePreferenceRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+  string compute_resource_id = 3;
+  
org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference
 user_compute_resource_preference = 4;
+}
+
+message GetUserComputePreferenceRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+  string compute_resource_id = 3;
+}
+
+message UpdateUserComputePreferenceRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+  string compute_resource_id = 3;
+  
org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference
 user_compute_resource_preference = 4;
+}
+
+message DeleteUserComputePreferenceRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+  string compute_resource_id = 3;
+}
+
+message GetAllUserComputePreferencesRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+}
+
+message GetAllUserComputePreferencesResponse {
+  repeated 
org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference
 user_compute_resource_preferences = 1;
+}
+
+// --- User Storage Preference Request/Response messages ---
+
+message AddUserStoragePreferenceRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+  string storage_resource_id = 3;
+  
org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference 
user_storage_preference = 4;
+}
+
+message GetUserStoragePreferenceRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+  string storage_resource_id = 3;
+}
+
+message UpdateUserStoragePreferenceRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+  string storage_resource_id = 3;
+  
org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference 
user_storage_preference = 4;
+}
+
+message DeleteUserStoragePreferenceRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+  string storage_resource_id = 3;
+}
+
+message GetAllUserStoragePreferencesRequest {
+  string user_id = 1;
+  string gateway_id = 2;
+}
+
+message GetAllUserStoragePreferencesResponse {
+  repeated 
org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference 
user_storage_preferences = 1;
+}
+
+// --- Queue Status Request/Response messages ---
+
+message GetLatestQueueStatusesRequest {}
+
+message GetLatestQueueStatusesResponse {
+  repeated org.apache.airavata.model.status.QueueStatusModel queue_statuses = 
1;
+}


Reply via email to