Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 20 additions & 75 deletions aruna/api/notification/services/v2/notification_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ service EventNotificationService {

message Resource {
string resource_id = 1;
string resource_name = 2;
string associated_id = 3;
string associated_id = 2;
bool persistent_resource_id = 3;
storage.models.v2.ResourceVariant resource_variant = 4;
}

Expand Down Expand Up @@ -118,49 +118,12 @@ message StreamFromDate { google.protobuf.Timestamp timestamp = 1; }

message StreamAll {}

enum ResourceEventType {
RESOURCE_EVENT_TYPE_UNSPECIFIED = 0;
RESOURCE_EVENT_TYPE_CREATED = 1;
RESOURCE_EVENT_TYPE_AVAILABLE = 2;
RESOURCE_EVENT_TYPE_UPDATED = 3;
RESOURCE_EVENT_TYPE_DELETED = 4;
}

message RelationUpdate {
repeated storage.models.v2.Relation add_relations = 2;
repeated storage.models.v2.Relation remove_relations = 3;
}

message Fields {
repeated string updated_fields = 1;
}

message ResourceEventContext {
oneof event {
Fields updated_fields = 1;
RelationUpdate relation_updates = 2;
string custom_context = 3;
}
}
enum UserEventType {
USER_EVENT_TYPE_UNSPECIFIED = 0;
USER_EVENT_TYPE_CREATED = 1;
USER_EVENT_TYPE_UPDATED = 2;
USER_EVENT_TYPE_DELETED = 3;
}

message Token {
string id = 1;
aruna.api.storage.models.v2.Permission permission = 2;
}

message UserEventContext {
oneof event {
string updated_field = 1;
bool admin = 2;
Token token = 3;
aruna.api.storage.models.v2.Permission permission = 4;
}
enum EventVariant {
EVENT_VARIANT_UNSPECIFIED = 0;
EVENT_VARIANT_CREATED = 1;
EVENT_VARIANT_AVAILABLE = 2;
EVENT_VARIANT_UPDATED = 3;
EVENT_VARIANT_DELETED = 4;
}

message EventMessage {
Expand All @@ -173,17 +136,14 @@ message EventMessage {

message ResourceEvent {
Resource resource = 1;
ResourceEventType event_type = 2;
ResourceEventContext context = 3;
Reply reply = 4;
EventVariant event_variant = 2;
Reply reply = 3;
}

message UserEvent {
string user_id = 1;
string user_name = 2;
UserEventType event_type = 3;
UserEventContext context = 4;
Reply reply = 5;
EventVariant event_variant = 2;
Reply reply = 3;
}

message Reply {
Expand All @@ -192,22 +152,6 @@ message Reply {
string hmac = 3;
}



message DataproxyInfo {
string endpoint_id = 1;
// Endpoint name
string name = 2;
// Endpoint type
storage.models.v2.EndpointVariant ep_variant = 3;
// Is this endpoint public
bool is_public = 4;
// required public_key
string pubkey = 5;
// url
string url = 6;
}

message ScheduledDowntime {
string location = 1;
string component = 2;
Expand All @@ -227,12 +171,13 @@ message NewPubkey {

message AnouncementEvent {
oneof event_variant {
DataproxyInfo new_data_proxy = 1;
DataproxyInfo remove_data_proxy = 2;
DataproxyInfo update_data_proxy = 3;
ScheduledDowntime downtime = 4;
NewVersion version = 5;
NewPubkey pubkey = 6;
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;
ScheduledDowntime downtime = 6;
NewVersion version = 7;
}
Reply reply = 7;
Reply reply = 8;
}
12 changes: 9 additions & 3 deletions aruna/api/storage/models/v2/models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,16 @@ enum ResourceVariant {

// ------------- USERS & PERMISSIONS -----------------------

message ExternalId {
string external_id = 1;
string idp = 2;
}

message User {
// Internal Aruna UserID
string id = 1;
// Oidc subject ID
repeated string external_id = 2;
repeated ExternalId external_ids = 2;
// (optional) User display_name
string display_name = 3;
// Is the user activated
Expand Down Expand Up @@ -164,8 +169,9 @@ message CustomAttributes {
message UserAttributes {
bool global_admin = 1;
bool service_account = 2;
repeated CustomAttributes custom_attributes = 3;
repeated Permission personal_permissions = 4;
repeated Token tokens = 3;
repeated CustomAttributes custom_attributes = 4;
repeated Permission personal_permissions = 5;
}

// --------------- RELATION / KEYVALUES -------------------
Expand Down
19 changes: 19 additions & 0 deletions aruna/api/storage/services/v2/info_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ service StorageStatusService {
get : "/v2/info/status"
};
}


rpc GetPubkeys(GetPubkeysRequest) returns (GetPubkeysResponse) {
option (google.api.http) = {
get : "/v2/info/pubkeys"
};
}
}


Expand Down Expand Up @@ -89,4 +96,16 @@ message ComponentStatus {
message GetStorageStatusResponse {
// List of all locations and their component / status
repeated LocationStatus location_status = 1;
}

message GetPubkeysRequest {}

message Pubkey {
int32 id = 1;
string key = 2;
string location = 3;
}

message GetPubkeysResponse {
repeated Pubkey pubkeys = 1;
}
23 changes: 23 additions & 0 deletions aruna/api/storage/services/v2/user_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,19 @@ service UserService {
};
}

// GetUserRequestRedacted
//
// Status: STABLE
//
// This is a request that returns the user information of the
// current user or if invoked by an admin from another user
// Redacts personal information like name or email
rpc GetUserRedacted(GetUserRedactedRequest) returns (GetUserRedactedResponse) {
option (google.api.http) = {
get : "/v2/user/redacted"
};
}

// UpdateUserDisplayName
//
// Status: STABLE
Expand Down Expand Up @@ -264,6 +277,16 @@ message GetUserResponse {
storage.models.v2.User user = 1;
}

message GetUserRedactedRequest {
// Optional user_id
string user_id = 1;
}

message GetUserRedactedResponse {
// User info
storage.models.v2.User user = 1;
}

message UpdateUserDisplayNameRequest {
// New display name
string new_display_name = 1;
Expand Down