mirror of
https://github.com/pfzetto/rebacs
synced 2024-11-25 04:29:36 +01:00
76 lines
1.1 KiB
Protocol Buffer
76 lines
1.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
package eu.zettoit.rebacs;
|
|
|
|
service RebacService {
|
|
rpc Grant(GrantReq) returns (GrantRes);
|
|
rpc Revoke(RevokeReq) returns (RevokeRes);
|
|
rpc Exists(ExistsReq) returns (ExistsRes);
|
|
rpc IsPermitted(IsPermittedReq) returns (IsPermittedRes);
|
|
rpc Expand(ExpandReq) returns (ExpandRes);
|
|
}
|
|
|
|
|
|
message GrantReq{
|
|
oneof src {
|
|
Object src_obj = 1;
|
|
Set src_set = 2;
|
|
}
|
|
Set dst = 3;
|
|
}
|
|
message GrantRes{}
|
|
|
|
message RevokeReq{
|
|
oneof src {
|
|
Object src_obj = 1;
|
|
Set src_set = 2;
|
|
}
|
|
Set dst = 3;
|
|
}
|
|
message RevokeRes{}
|
|
|
|
message ExistsReq{
|
|
oneof src {
|
|
Object src_obj = 1;
|
|
Set src_set = 2;
|
|
}
|
|
Set dst = 3;
|
|
}
|
|
message ExistsRes{
|
|
bool exists = 1;
|
|
}
|
|
|
|
message IsPermittedReq{
|
|
oneof src {
|
|
Object src_obj = 1;
|
|
Set src_set = 2;
|
|
}
|
|
Set dst = 3;
|
|
}
|
|
message IsPermittedRes{
|
|
bool permitted = 1;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
message Set{
|
|
string namespace = 1;
|
|
string id = 2;
|
|
string relation = 3;
|
|
}
|