From c3c9f3e2ed4ad53348f717d00ec2bc59a4ee1efc Mon Sep 17 00:00:00 2001 From: St4NNi Date: Thu, 27 Jul 2023 14:47:48 +0200 Subject: [PATCH 1/8] feat: Added trusted endpoints to user --- aruna/api/storage/models/v2/models.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aruna/api/storage/models/v2/models.proto b/aruna/api/storage/models/v2/models.proto index 10719bb9..9bbe986d 100644 --- a/aruna/api/storage/models/v2/models.proto +++ b/aruna/api/storage/models/v2/models.proto @@ -164,8 +164,9 @@ message UserAttributes { bool global_admin = 1; bool service_account = 2; repeated Token tokens = 3; - repeated CustomAttributes custom_attributes = 4; - repeated Permission personal_permissions = 5; + repeated string trusted_endpoints = 4; + repeated CustomAttributes custom_attributes = 5; + repeated Permission personal_permissions = 6; } // --------------- RELATION / KEYVALUES ------------------- From 904e34ce5f7078563fbe22892252100017bf5287 Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Mon, 31 Jul 2023 13:13:18 +0200 Subject: [PATCH 2/8] refactor: Remove associated_id from Resource --- .../notification/services/v2/notification_service.proto | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/aruna/api/notification/services/v2/notification_service.proto b/aruna/api/notification/services/v2/notification_service.proto index f9840962..f05d0fad 100644 --- a/aruna/api/notification/services/v2/notification_service.proto +++ b/aruna/api/notification/services/v2/notification_service.proto @@ -55,10 +55,9 @@ service EventNotificationService { message Resource { string resource_id = 1; - string associated_id = 2; - bool persistent_resource_id = 3; - string checksum = 4; - storage.models.v2.ResourceVariant resource_variant = 5; + bool persistent_resource_id = 2; + string checksum = 3; + storage.models.v2.ResourceVariant resource_variant = 4; } message ResourceTarget { From 19431128e8435580464456ca8e703a5d00878b94 Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Mon, 21 Aug 2023 15:30:01 +0200 Subject: [PATCH 3/8] feat: Add endpoint info to ProjectCreateRequest/Response --- aruna/api/storage/services/v2/project_service.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aruna/api/storage/services/v2/project_service.proto b/aruna/api/storage/services/v2/project_service.proto index bda78efd..8cf97fff 100644 --- a/aruna/api/storage/services/v2/project_service.proto +++ b/aruna/api/storage/services/v2/project_service.proto @@ -161,11 +161,15 @@ message CreateProjectRequest { repeated storage.models.v2.ExternalRelation external_relations = 4; // DataClass storage.models.v2.DataClass data_class = 5; + // Preferred endpoint + string preferred_endpoint = 6; } message CreateProjectResponse { // The freshly created project storage.models.v2.Project project = 1; + // Endpoint the project was registered + string endpoint_id = 2; } message GetProjectRequest { From 5d61403385fd724fdeac31b715e66eacc0d0c9c0 Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Mon, 21 Aug 2023 15:30:45 +0200 Subject: [PATCH 4/8] refactor: Change pubkey event type --- .../notification/services/v2/notification_service.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aruna/api/notification/services/v2/notification_service.proto b/aruna/api/notification/services/v2/notification_service.proto index f05d0fad..ee6d0b10 100644 --- a/aruna/api/notification/services/v2/notification_service.proto +++ b/aruna/api/notification/services/v2/notification_service.proto @@ -24,8 +24,8 @@ service EventNotificationService { // GetEventMessageBatch // - // Reads a set of messages from a given stream group - // Each message contains a separate acknowledgement message that is protected by a salt and an hmac for verification + // Reads a set of messages from a given stream group + // Each message contains a separate acknowledgement message thatis protected by a salt and an hmac for verification // The message can be send directly through the AcknowledgeMessageBatch call to acknowledge the message rpc GetEventMessageBatch(GetEventMessageBatchRequest) returns (GetEventMessageBatchResponse) {} @@ -176,8 +176,8 @@ message AnouncementEvent { string new_data_proxy_id = 1; string remove_data_proxy_id = 2; string update_data_proxy_id = 3; - bool new_pubkey = 4; - bool remove_pubkey = 5; + int32 new_pubkey = 4; + int32 remove_pubkey = 5; ScheduledDowntime downtime = 6; NewVersion version = 7; } From dd3ec71738918a920e26160e0453dbc623cd68ff Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Mon, 21 Aug 2023 18:46:40 +0200 Subject: [PATCH 5/8] refactor: GetEventMessageBatchStream Renames the rpc to GetEventMessageStream and removes the batch parameter as each individual recieved message will be pushed through the open channel to the user at the moment it is received. --- .../services/v2/notification_service.proto | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/aruna/api/notification/services/v2/notification_service.proto b/aruna/api/notification/services/v2/notification_service.proto index ee6d0b10..5b9c03b3 100644 --- a/aruna/api/notification/services/v2/notification_service.proto +++ b/aruna/api/notification/services/v2/notification_service.proto @@ -25,18 +25,18 @@ service EventNotificationService { // GetEventMessageBatch // // Reads a set of messages from a given stream group - // Each message contains a separate acknowledgement message thatis protected by a salt and an hmac for verification - // The message can be send directly through the AcknowledgeMessageBatch call to acknowledge the message + // Each message contains a separate acknowledgement message thatis protected by a salt and an hmac for verification. + // The message can be send directly through the AcknowledgeMessageBatch call to acknowledge the message. rpc GetEventMessageBatch(GetEventMessageBatchRequest) returns (GetEventMessageBatchResponse) {} // GetEventMessageBatch // - // Reads a set of messages from a given stream group - // Each message contains a separate acknowledgement message that is protected by a salt and an hmac for verification - // The message can be send directly through the AcknowledgeMessageBatch call to acknowledge the message - rpc GetEventMessageBatchStream(GetEventMessageBatchStreamRequest) - returns (stream GetEventMessageBatchStreamResponse) {} + // Opens a stream which pushes each received notification individual and just-in-time. + // Each message contains a separate acknowledgement message that is protected by a salt and an hmac for verification. + // The message can be send directly through the AcknowledgeMessageBatch call to acknowledge the message. + rpc GetEventMessageStream(GetEventMessageStreamRequest) + returns (stream GetEventMessageStreamResponse) {} // AcknowledgeMessageBatch // @@ -91,13 +91,12 @@ message GetEventMessageBatchResponse { repeated EventMessage messages = 1; } -message GetEventMessageBatchStreamRequest { +message GetEventMessageStreamRequest { string stream_consumer = 1; - uint32 batch_size = 2; } -message GetEventMessageBatchStreamResponse { - repeated EventMessage messages = 1; +message GetEventMessageStreamResponse { + EventMessage messages = 1; } message AcknowledgeMessageBatchRequest { From 4f117055a5d8883359ceff560270408e3e2f6836 Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Tue, 22 Aug 2023 09:55:15 +0200 Subject: [PATCH 6/8] refactor: Add endpoint info to object models --- aruna/api/storage/models/v2/models.proto | 6 +++++- aruna/api/storage/services/v2/project_service.proto | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/aruna/api/storage/models/v2/models.proto b/aruna/api/storage/models/v2/models.proto index 9bbe986d..9fba3234 100644 --- a/aruna/api/storage/models/v2/models.proto +++ b/aruna/api/storage/models/v2/models.proto @@ -275,6 +275,7 @@ message Project { string created_by = 9; Status status = 10; bool dynamic = 11; + repeated string endpoints = 12; } @@ -292,6 +293,7 @@ message Collection { string created_by = 9; Status status = 10; bool dynamic = 11; + repeated string endpoints = 12; } message Dataset { @@ -308,6 +310,7 @@ message Dataset { string created_by = 9; Status status = 10; bool dynamic = 11; + repeated string endpoints = 12; } message Object { @@ -324,6 +327,7 @@ message Object { string created_by = 9; Status status = 10; bool dynamic = 11; + repeated string endpoints = 12; // Object specific attributes - repeated Hash hashes = 12; + repeated Hash hashes = 13; } \ No newline at end of file diff --git a/aruna/api/storage/services/v2/project_service.proto b/aruna/api/storage/services/v2/project_service.proto index 8cf97fff..0c5a465d 100644 --- a/aruna/api/storage/services/v2/project_service.proto +++ b/aruna/api/storage/services/v2/project_service.proto @@ -168,8 +168,6 @@ message CreateProjectRequest { message CreateProjectResponse { // The freshly created project storage.models.v2.Project project = 1; - // Endpoint the project was registered - string endpoint_id = 2; } message GetProjectRequest { From a4abcbec10ac2d37cda57a6696b8234fe8552ccc Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Tue, 22 Aug 2023 10:07:54 +0200 Subject: [PATCH 7/8] refactor: Extend object endpoints with sync flag --- aruna/api/storage/models/v2/models.proto | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/aruna/api/storage/models/v2/models.proto b/aruna/api/storage/models/v2/models.proto index 9fba3234..619e898b 100644 --- a/aruna/api/storage/models/v2/models.proto +++ b/aruna/api/storage/models/v2/models.proto @@ -235,6 +235,12 @@ message Endpoint { repeated EndpointHostConfig host_configs = 6; } +message DataEndpoint { + string id = 1; + // Hint if the objects' project + // is fully synced to the endpoint + bool full_synced = 2; +} message Copy { string resource = 1; @@ -275,7 +281,7 @@ message Project { string created_by = 9; Status status = 10; bool dynamic = 11; - repeated string endpoints = 12; + repeated DataEndpoint endpoints = 12; } @@ -293,7 +299,7 @@ message Collection { string created_by = 9; Status status = 10; bool dynamic = 11; - repeated string endpoints = 12; + repeated DataEndpoint endpoints = 12; } message Dataset { @@ -310,7 +316,7 @@ message Dataset { string created_by = 9; Status status = 10; bool dynamic = 11; - repeated string endpoints = 12; + repeated DataEndpoint endpoints = 12; } message Object { @@ -327,7 +333,7 @@ message Object { string created_by = 9; Status status = 10; bool dynamic = 11; - repeated string endpoints = 12; + repeated DataEndpoint endpoints = 12; // Object specific attributes repeated Hash hashes = 13; } \ No newline at end of file From b5db70027ef81db305e90fbc7609c9a32ba26ee2 Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Tue, 22 Aug 2023 10:09:59 +0200 Subject: [PATCH 8/8] chore: Google api submodule update --- aruna/api/google | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aruna/api/google b/aruna/api/google index e8cca305..1c4f24e6 160000 --- a/aruna/api/google +++ b/aruna/api/google @@ -1 +1 @@ -Subproject commit e8cca30589a3fadf8e93954bd30197ef12a39ff8 +Subproject commit 1c4f24e66d8559a680e472eab70ccfb1e6fbd685