rebacs/rebacs_server/proto/rebacs.proto

45 lines
721 B
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);
}
message GrantReq{
Object src = 1;
Object dst = 2;
}
message GrantRes{}
message RevokeReq{
Object src = 1;
Object dst = 2;
}
message RevokeRes{}
message ExistsReq{
Object src = 1;
Object dst = 2;
}
message ExistsRes{
bool exists = 1;
}
message IsPermittedReq{
Object src = 1;
Object dst = 2;
}
message IsPermittedRes{
bool permitted = 1;
}
message Object{
string namespace = 1;
string id = 2;
optional string relation = 3;
}