From 7b05e54e880c2d02ec8fab90a40820ae9c9e5f60 Mon Sep 17 00:00:00 2001 From: St4NNi Date: Wed, 23 Aug 2023 13:05:55 +0200 Subject: [PATCH 1/4] feat: Added Fullsync request / response as stream, move pubkey to models --- aruna/api/storage/models/v2/models.proto | 5 +++++ aruna/api/storage/services/v2/endpoint_service.proto | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/aruna/api/storage/models/v2/models.proto b/aruna/api/storage/models/v2/models.proto index 619e898b..78a977e7 100644 --- a/aruna/api/storage/models/v2/models.proto +++ b/aruna/api/storage/models/v2/models.proto @@ -154,6 +154,11 @@ message Token { Permission permission = 5; } +message Pubkey { + int32 id = 1; + string key = 2; + string location = 3; +} message CustomAttributes { string attribute_name = 1; diff --git a/aruna/api/storage/services/v2/endpoint_service.proto b/aruna/api/storage/services/v2/endpoint_service.proto index 39b8bdec..f8d83ff1 100644 --- a/aruna/api/storage/services/v2/endpoint_service.proto +++ b/aruna/api/storage/services/v2/endpoint_service.proto @@ -35,7 +35,7 @@ service EndpointService { // Status: BETA // // Requests a full sync of all endpoint related data - rpc FullSyncEndpoint(FullSyncEndpointRequest) returns (FullSyncEndpointResponse) { + rpc FullSyncEndpoint(FullSyncEndpointRequest) returns (stream FullSyncEndpointResponse) { option (google.api.http) = { get : "/v2/endpoint/sync" }; @@ -110,7 +110,11 @@ message CreateEndpointResponse { message FullSyncEndpointRequest {} message FullSyncEndpointResponse { - string url = 1; + oneof target{ + storage.models.v2.GenericResource generic_resource = 1; + storage.models.v2.User user = 2; + storage.models.v2.Pubkey pubkey = 3; + } } message GetEndpointRequest { From 0803436a285ea15b22de94b118218c6c29610290 Mon Sep 17 00:00:00 2001 From: St4NNi Date: Wed, 23 Aug 2023 13:09:19 +0200 Subject: [PATCH 2/4] feat: Rename messages to message in GetEventMessageStream Response --- aruna/api/notification/services/v2/notification_service.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aruna/api/notification/services/v2/notification_service.proto b/aruna/api/notification/services/v2/notification_service.proto index 13e87e16..b1a4e620 100644 --- a/aruna/api/notification/services/v2/notification_service.proto +++ b/aruna/api/notification/services/v2/notification_service.proto @@ -96,7 +96,7 @@ message GetEventMessageStreamRequest { } message GetEventMessageStreamResponse { - EventMessage messages = 1; + EventMessage message = 1; } message AcknowledgeMessageBatchRequest { From e44932f0476ab2e23595f7e4181ce64f50266d4d Mon Sep 17 00:00:00 2001 From: St4NNi Date: Wed, 23 Aug 2023 14:12:11 +0200 Subject: [PATCH 3/4] feat: Rename update authorizations -s request --- aruna/api/storage/services/v2/authorization_service.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aruna/api/storage/services/v2/authorization_service.proto b/aruna/api/storage/services/v2/authorization_service.proto index 41c4f78d..d77fe898 100644 --- a/aruna/api/storage/services/v2/authorization_service.proto +++ b/aruna/api/storage/services/v2/authorization_service.proto @@ -59,8 +59,8 @@ service AuthorizationService { // // This creates a user-specific attribute that handles permission for a // specific resource - rpc UpdateAuthorizations(UpdateAuthorizationsRequest) - returns (UpdateAuthorizationsResponse) { + rpc UpdateAuthorization(UpdateAuthorizationRequest) + returns (UpdateAuthorizationResponse) { option (google.api.http) = { patch : "/v2/auth" body : "*" @@ -109,12 +109,12 @@ message DeleteAuthorizationRequest { message DeleteAuthorizationResponse {} -message UpdateAuthorizationsRequest { +message UpdateAuthorizationRequest { string resource_id = 1; string user_id = 2; storage.models.v2.PermissionLevel permission_level = 3; } -message UpdateAuthorizationsResponse { +message UpdateAuthorizationResponse { UserPermission user_permission = 1; } \ No newline at end of file From 27ea1c36ba98437327cdfb291776e37e91e9011e Mon Sep 17 00:00:00 2001 From: St4NNi Date: Thu, 24 Aug 2023 09:43:32 +0200 Subject: [PATCH 4/4] feat: Move Pubkey in info service to models --- aruna/api/storage/services/v2/info_service.proto | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/aruna/api/storage/services/v2/info_service.proto b/aruna/api/storage/services/v2/info_service.proto index 0b8826ef..54a64a7d 100644 --- a/aruna/api/storage/services/v2/info_service.proto +++ b/aruna/api/storage/services/v2/info_service.proto @@ -100,12 +100,6 @@ message GetStorageStatusResponse { message GetPubkeysRequest {} -message Pubkey { - int32 id = 1; - string key = 2; - string location = 3; -} - message GetPubkeysResponse { - repeated Pubkey pubkeys = 1; + repeated storage.models.v2.Pubkey pubkeys = 1; } \ No newline at end of file