1
0
Fork 0

Begin implement protocol

This commit is contained in:
Florian RICHER 2023-01-30 21:28:03 +01:00
parent 368d5eca46
commit f145bcf383
8 changed files with 135 additions and 48 deletions

View file

@ -1,17 +0,0 @@
syntax = "proto3";
package helloworld;
service Greeter {
// Our SayHello rpc accepts HelloRequests and returns HelloReplies
rpc SayHello (HelloRequest) returns (HelloReply);
}
message HelloRequest {
// Request message contains the name to be greeted
string name = 1;
}
message HelloReply {
// Reply contains the greeting message
string message = 1;
}

44
proto/internal.proto Normal file
View file

@ -0,0 +1,44 @@
syntax = "proto3";
package internal;
service Unix {
// Message send by the command gateway to the daemon
rpc authorize(AuthorizeRequest) returns (AuthorizeResponse);
// Message send when user quit shell
rpc terminate(TerminateRequest) returns (TerminateResponse);
}
message AuthorizeRequest {
// identifier of the project
string identifier = 1;
// ssh_keys from ssh agent
string public_ssh_keys = 2;
// command?
}
enum AuthorizationStatus {
AUTHORIZED = 0;
PERMISSION_DENIED = 1;
}
message AuthorizeResponse {
AuthorizationStatus status = 1;
string error_message = 2;
string session_uuid = 3;
string log_file = 4;
}
message TerminateRequest {
string session_uuid = 1;
}
enum TerminateStatus {
OK = 0;
FAILED = 1;
}
message TerminateResponse {
TerminateStatus status = 1;
string error_message = 2;
}