2023-06-05 22:17:22 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
package eu.zettoit.rebacs;
|
|
|
|
|
2023-08-27 22:10:16 +02:00
|
|
|
service RebacService {
|
|
|
|
rpc Grant(GrantReq) returns (GrantRes);
|
|
|
|
rpc Revoke(RevokeReq) returns (RevokeRes);
|
|
|
|
rpc Exists(ExistsReq) returns (ExistsRes);
|
|
|
|
rpc IsPermitted(IsPermittedReq) returns (IsPermittedRes);
|
2023-06-05 22:17:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-08-27 22:10:16 +02:00
|
|
|
message GrantReq{
|
|
|
|
Object src = 1;
|
2023-06-05 22:17:22 +02:00
|
|
|
Object dst = 2;
|
|
|
|
}
|
2023-08-27 22:10:16 +02:00
|
|
|
message GrantRes{}
|
2023-06-05 22:17:22 +02:00
|
|
|
|
2023-08-27 22:10:16 +02:00
|
|
|
message RevokeReq{
|
|
|
|
Object src = 1;
|
|
|
|
Object dst = 2;
|
2023-06-05 22:17:22 +02:00
|
|
|
}
|
2023-08-27 22:10:16 +02:00
|
|
|
message RevokeRes{}
|
2023-06-05 22:17:22 +02:00
|
|
|
|
2023-08-27 22:10:16 +02:00
|
|
|
message ExistsReq{
|
|
|
|
Object src = 1;
|
2023-06-05 22:17:22 +02:00
|
|
|
Object dst = 2;
|
|
|
|
}
|
2023-08-27 22:10:16 +02:00
|
|
|
message ExistsRes{
|
2023-06-05 22:17:22 +02:00
|
|
|
bool exists = 1;
|
|
|
|
}
|
|
|
|
|
2023-08-27 22:10:16 +02:00
|
|
|
message IsPermittedReq{
|
|
|
|
Object src = 1;
|
2023-06-05 22:17:22 +02:00
|
|
|
Object dst = 2;
|
|
|
|
}
|
2023-08-27 22:10:16 +02:00
|
|
|
message IsPermittedRes{
|
|
|
|
bool permitted = 1;
|
2023-06-05 22:17:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message Object{
|
|
|
|
string namespace = 1;
|
|
|
|
string id = 2;
|
|
|
|
optional string relation = 3;
|
|
|
|
}
|