Skip to content

Commit

Permalink
Merge branch 'main' into feat-partitions
Browse files Browse the repository at this point in the history
  • Loading branch information
esoubiran-aneo committed Dec 14, 2022
2 parents 5a48e4b + ea97df8 commit 6b093e7
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Api/common/protofiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export README_PATH=$REPOSITORY_PATH/README.md

armonik_worker_files=("agent_service.proto" "worker_service.proto")
armonik_client_files=("submitter_service.proto" "tasks_service.proto" "sessions_service.proto" \
"results_service.proto" "applications_service.proto" "partitions_service.proto")
"results_service.proto" "applications_service.proto" "auth_service.proto" "partitions_service.proto")
armonik_common_files=("objects.proto" "task_status.proto" "session_status.proto" \
"result_status.proto" "agent_common.proto" "sessions_common.proto" \
"submitter_common.proto" "tasks_common.proto" "worker_common.proto" \
"results_common.proto" "applications_common.proto" "partitions_common.proto")
"results_common.proto" "applications_common.proto" "auth_common.proto" "partitions_common.proto")
5 changes: 4 additions & 1 deletion Api/csharp/ArmoniK.Api.Client/ArmoniK.Api.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
<Protobuf Include="..\..\..\Protos\V1\results_service.proto" GrpcServices="Client">
<Link>gRPC\Protos\results_service.proto</Link>
</Protobuf>
<Protobuf Include="..\..\..\Protos\V1\partitions_service.proto" GrpcServices="Client">
<Protobuf Include="..\..\..\Protos\V1\auth_service.proto" GrpcServices="Client">
<Link>gRPC\Protos\auth_service.proto</Link>
</Protobuf>
<Protobuf Include="..\..\..\Protos\V1\partitions_service.proto" GrpcServices="Client">
<Link>gRPC\Protos\partitions_service.proto</Link>
</Protobuf>
</ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions Api/csharp/ArmoniK.Api.Common/ArmoniK.Api.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<Protobuf Include="..\..\..\Protos\V1\applications_common.proto" Link="applications_common.proto">
<GrpcServices>Message</GrpcServices>
<ProtoCompile>True</ProtoCompile>
</Protobuf>
<Protobuf Include="..\..\..\Protos\V1\auth_common.proto" Link="auth_common.proto">
<GrpcServices>Message</GrpcServices>
<ProtoCompile>True</ProtoCompile>
</Protobuf>
<Protobuf Include="..\..\..\Protos\V1\sessions_common.proto" Link="sessions_common.proto">
<GrpcServices>Message</GrpcServices>
Expand Down
3 changes: 3 additions & 0 deletions Api/csharp/ArmoniK.Api.Core/ArmoniK.Api.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
</ItemGroup>

<ItemGroup>
<Protobuf Include="..\..\..\Protos\V1\auth_service.proto" GrpcServices="Both">
<Link>gRPC\Protos\auth_service.proto</Link>
</Protobuf>
<Protobuf Include="..\..\..\Protos\V1\submitter_service.proto" GrpcServices="Both">
<Link>gRPC\Protos\submitter_service.proto</Link>
</Protobuf>
Expand Down
30 changes: 30 additions & 0 deletions Protos/V1/auth_common.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Messages describing authentication and associated requests and responses.
*/
syntax = "proto3";

package armonik.api.grpc.v1.auth;

option csharp_namespace = "ArmoniK.Api.gRPC.V1.Auth";

/**
* A user.
*/
message User {
string username = 1; /** Username. If authentication is disabled, must be set to 'Anonymous' */

repeated string roles = 2; /** Roles. If authentication is disabled, must return []. */
repeated string permissions = 3; /** Permissions. If authentication is disabled, must return every permissions. */
}

/**
* Request to get current user informations.
*/
message GetCurrentUserRequest {}

/**
* Response to get current user informations.
*/
message GetCurrentUserResponse {
User user = 1; /** Return current user. If auth failed, must throw a gRPC error. */
}
20 changes: 20 additions & 0 deletions Protos/V1/auth_service.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Authentication related methods within a service.
*/
syntax = "proto3";

package armonik.api.grpc.v1.auth;

import "auth_common.proto";

option csharp_namespace = "ArmoniK.Api.gRPC.V1.Auth";

/**
* Service for authentication management.
*/
service Authentication {
/**
* Get current user
*/
rpc GetCurrentUser(GetCurrentUserRequest) returns (GetCurrentUserResponse) {}
}
7 changes: 7 additions & 0 deletions Protos/V1/sessions_common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ message SessionSummary {
session_status.SessionStatus status = 2; /** The session status. */
google.protobuf.Timestamp created_at = 3; /** The creation date. */
google.protobuf.Timestamp cancelled_at = 4; /** The cancellation date. Only set when status is 'cancelled'. */

TaskOptions options = 5; /** The default task options. */
}

/**
Expand Down Expand Up @@ -104,6 +106,11 @@ message ListSessionsRequest {
* Must be set for every request.
*/
Sort sort = 4;

/**
* Flag to tell if server must return task options in summary sessions
*/
bool with_task_options = 5;
}

/**
Expand Down

0 comments on commit 6b093e7

Please sign in to comment.