Skip to content

Commit

Permalink
Merge branch 'v2.0.0-beta.12' of github.com:ArunaStorage/ArunaAPI int…
Browse files Browse the repository at this point in the history
…o v2.0.0-beta.12
  • Loading branch information
lfbrehm committed Feb 23, 2024
2 parents 0bae960 + 1375f09 commit 1111713
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 5 deletions.
1 change: 1 addition & 0 deletions aruna/api/dataproxy/services/v2/bundler_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ message CreateBundleRequest {
repeated string resource_ids = 1;
string filename = 2; // .tar.gz / .zip
google.protobuf.Timestamp expires_at = 3; // Default 1 Month
bool once = 4; // Default false (expires after first download)
}

message CreateBundleResponse {
Expand Down
13 changes: 11 additions & 2 deletions aruna/api/storage/models/v2/models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,18 @@ message Pubkey {
string location = 3;
}

message CustomAttributes {
message CustomAttribute {
string attribute_name = 1;
string attribute_value = 2;
}

message DataProxyAttribute {
string attribute_name = 1;
string attribute_value = 2;
string signature = 3;
string proxy_id = 4;
}

message OidcMapping {
string external_id = 1;
string oidc_url = 2;
Expand All @@ -186,9 +193,11 @@ message UserAttributes {
bool service_account = 2;
repeated Token tokens = 3;
repeated string trusted_endpoints = 4;
repeated CustomAttributes custom_attributes = 5;
repeated CustomAttribute custom_attributes = 5;
repeated Permission personal_permissions = 6;
repeated OidcMapping external_ids = 7;
string pubkey = 8;
repeated DataProxyAttribute data_proxy_attributes = 9;
}

// --------------- RELATION / KEYVALUES -------------------
Expand Down
97 changes: 95 additions & 2 deletions aruna/api/storage/services/v2/service_account_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ service ServiceAccountService {
//
// Status: ALPHA
//
// Gets s3 credentials for a specific user and data_proxy
// Gets s3 credentials for a specific SvcAccount and data_proxy
rpc GetS3CredentialsSvcAccount(GetS3CredentialsSvcAccountRequest)
returns (GetS3CredentialsSvcAccountResponse) {
option (google.api.http) = {
Expand All @@ -132,14 +132,73 @@ service ServiceAccountService {
//
// Status: ALPHA
//
// Gets token for a specific user and data_proxy
// Gets token for a specific SvcAccount and data_proxy
rpc CreateDataproxyTokenSvcAccount(CreateDataproxyTokenSvcAccountRequest)
returns (CreateDataproxyTokenSvcAccountResponse) {
option (google.api.http) = {
post : "/v2/service_accounts/{svc_account_id}/proxy_tokens/{endpoint_id}"
body : "*"
};
}


// AddPubkeySvcAccount
//
// Status: ALPHA
//
// Adds an ED25519 public key for the SvcAccount
rpc AddPubkeySvcAccount(AddPubkeySvcAccountRequest) returns (AddPubkeySvcAccountResponse) {
option (google.api.http) = {
post : "/v2/service_accounts/pubkey"
body : "*"
};
}

// AddTrustedEndpointsSvcAccount
//
// Status: ALPHA
//
// Adds an endpoint to the trusted endpoints list of the SvcAccount
rpc AddTrustedEndpointsSvcAccount(AddTrustedEndpointsSvcAccountRequest) returns (AddTrustedEndpointsSvcAccountResponse) {
option (google.api.http) = {
post : "/v2/service_accounts/trusted_endpoints"
body : "*"
};
}

// RemoveTrustedEndpointsSvcAccount
//
// Status: ALPHA
//
// Removes an endpoint from the trusted endpoints list of the SvcAccount
rpc RemoveTrustedEndpointsSvcAccount(RemoveTrustedEndpointsSvcAccountRequest) returns (RemoveTrustedEndpointsSvcAccountResponse) {
option (google.api.http) = {
delete : "/v2/service_accounts/trusted_endpoints"
};
}

// AddDataProxyAttributeSvcAccount
//
// Status: ALPHA
//
// Adds an data proxy specific attribute to the SvcAccount
rpc AddDataProxyAttributeSvcAccount(AddDataProxyAttributeSvcAccountRequest) returns (AddDataProxyAttributeSvcAccountResponse) {
option (google.api.http) = {
post : "/v2/service_accounts/{svc_account_id}/attributes/data_proxy"
body : "*"
};
}

// RemoveDataProxyAttributeSvcAccount
//
// Status: ALPHA
//
// Removes an data proxy specific attribute from the SvcAccount
rpc RemoveDataProxyAttributeSvcAccount(RemoveDataProxyAttributeSvcAccountRequest) returns (RemoveDataProxyAttributeSvcAccountResponse) {
option (google.api.http) = {
delete : "/v2/service_accounts/{svc_account_id}/attributes/data_proxy"
};
}
}

message CreateServiceAccountRequest {
Expand Down Expand Up @@ -243,3 +302,37 @@ message CreateDataproxyTokenSvcAccountRequest {
message CreateDataproxyTokenSvcAccountResponse {
string token = 1;
}


message AddPubkeySvcAccountRequest {
string public_key = 1;
}

message AddPubkeySvcAccountResponse {}

message AddTrustedEndpointsSvcAccountRequest {
string endpoint_id = 1;
}

message AddTrustedEndpointsSvcAccountResponse {}

message RemoveTrustedEndpointsSvcAccountRequest {
string endpoint_id = 1;
}

message RemoveTrustedEndpointsSvcAccountResponse {}

message AddDataProxyAttributeSvcAccountRequest {
string svc_account_id = 1;
storage.models.v2.DataProxyAttribute attribute = 2;
}

message AddDataProxyAttributeSvcAccountResponse {}

message RemoveDataProxyAttributeSvcAccountRequest {
string svc_account_id = 1;
string dataproxy_id = 2;
string attribute_name = 3;
}

message RemoveDataProxyAttributeSvcAccountResponse {}
100 changes: 99 additions & 1 deletion aruna/api/storage/services/v2/user_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,65 @@ service UserService {
};
}


// AddPubkeyUser
//
// Status: ALPHA
//
// Adds an ED25519 public key for the user
rpc AddPubkeyUser(AddPubkeyUserRequest) returns (AddPubkeyUserResponse) {
option (google.api.http) = {
post : "/v2/user/pubkey"
body : "*"
};
}

// AddTrustedEndpointsUser
//
// Status: ALPHA
//
// Adds an endpoint to the trusted endpoints list of the user
rpc AddTrustedEndpointsUser(AddTrustedEndpointsUserRequest) returns (AddTrustedEndpointsUserResponse) {
option (google.api.http) = {
post : "/v2/user/trusted_endpoints"
body : "*"
};
}

// RemoveTrustedEndpointsUser
//
// Status: ALPHA
//
// Removes an endpoint from the trusted endpoints list of the user
rpc RemoveTrustedEndpointsUser(RemoveTrustedEndpointsUserRequest) returns (RemoveTrustedEndpointsUserResponse) {
option (google.api.http) = {
delete : "/v2/user/trusted_endpoints"
};
}

// AddDataProxyAttributeUser
//
// Status: ALPHA
//
// Adds an data proxy specific attribute to the user
rpc AddDataProxyAttributeUser(AddDataProxyAttributeUserRequest) returns (AddDataProxyAttributeUserResponse) {
option (google.api.http) = {
post : "/v2/user/{user_id}/attributes/data_proxy"
body : "*"
};
}

// RemoveDataProxyAttributeUser
//
// Status: ALPHA
//
// Removes an data proxy specific attribute from the user
rpc RemoveDataProxyAttributeUser(RemoveDataProxyAttributeUserRequest) returns (RemoveDataProxyAttributeUserResponse) {
option (google.api.http) = {
delete : "/v2/user/{user_id}/attributes/data_proxy"
};
}

}

message RegisterUserRequest {
Expand Down Expand Up @@ -474,4 +533,43 @@ message RemoveOidcProviderRequest {

message RemoveOidcProviderResponse {
storage.models.v2.User user = 1;
}
}

message AddPubkeyUserRequest {
string public_key = 1;
}

message AddPubkeyUserResponse {
storage.models.v2.User user = 1;
}

message AddTrustedEndpointsUserRequest {
string endpoint_id = 1;
}

message AddTrustedEndpointsUserResponse {
storage.models.v2.User user = 1;
}

message RemoveTrustedEndpointsUserRequest {
string endpoint_id = 1;
}

message RemoveTrustedEndpointsUserResponse {
storage.models.v2.User user = 1;
}

message AddDataProxyAttributeUserRequest {
string user_id = 1;
storage.models.v2.DataProxyAttribute attribute = 2;
}

message AddDataProxyAttributeUserResponse {}

message RemoveDataProxyAttributeUserRequest {
string user_id = 1;
string dataproxy_id = 2;
string attribute_name = 3;
}

message RemoveDataProxyAttributeUserResponse {}

0 comments on commit 1111713

Please sign in to comment.