rebacs/rebacs_server/proto/rebacs.proto

77 lines
1.1 KiB
Protocol Buffer
Raw Normal View History

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-09-06 22:41:42 +02:00
rpc Expand(ExpandReq) returns (ExpandRes);
}
2023-08-27 22:10:16 +02:00
message GrantReq{
2023-09-06 22:41:42 +02:00
oneof src {
Object src_obj = 1;
Set src_set = 2;
}
Set dst = 3;
}
2023-08-27 22:10:16 +02:00
message GrantRes{}
2023-08-27 22:10:16 +02:00
message RevokeReq{
2023-09-06 22:41:42 +02:00
oneof src {
Object src_obj = 1;
Set src_set = 2;
}
Set dst = 3;
}
2023-08-27 22:10:16 +02:00
message RevokeRes{}
2023-08-27 22:10:16 +02:00
message ExistsReq{
2023-09-06 22:41:42 +02:00
oneof src {
Object src_obj = 1;
Set src_set = 2;
}
Set dst = 3;
}
2023-08-27 22:10:16 +02:00
message ExistsRes{
bool exists = 1;
}
2023-08-27 22:10:16 +02:00
message IsPermittedReq{
2023-09-06 22:41:42 +02:00
oneof src {
Object src_obj = 1;
Set src_set = 2;
}
Set dst = 3;
}
2023-08-27 22:10:16 +02:00
message IsPermittedRes{
bool permitted = 1;
}
2023-09-06 22:41:42 +02:00
message ExpandReq {
Set dst = 1;
}
message ExpandRes {
repeated ExpandResItem expanded = 1;
}
message ExpandResItem {
Object src = 1;
repeated Set path = 2;
}
message Object{
string namespace = 1;
string id = 2;
2023-09-06 22:41:42 +02:00
}
message Set{
string namespace = 1;
string id = 2;
string relation = 3;
}