2020-03-26 16:12:43 +03:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package go.micro.auth;
|
|
|
|
|
2020-03-30 23:58:32 +03:00
|
|
|
import "auth/service/proto/auth.proto";
|
2020-03-26 16:12:43 +03:00
|
|
|
|
|
|
|
service Rules {
|
|
|
|
rpc Create(CreateRequest) returns (CreateResponse) {};
|
|
|
|
rpc Delete(DeleteRequest) returns (DeleteResponse) {};
|
|
|
|
rpc List(ListRequest) returns (ListResponse) {};
|
|
|
|
}
|
|
|
|
|
|
|
|
enum Access {
|
|
|
|
UNKNOWN = 0;
|
|
|
|
GRANTED = 1;
|
|
|
|
DENIED = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Rule {
|
|
|
|
string id = 1;
|
|
|
|
string role = 2;
|
|
|
|
Resource resource = 3;
|
|
|
|
Access access = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CreateRequest {
|
|
|
|
string role = 1;
|
|
|
|
Resource resource = 2;
|
|
|
|
Access access = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CreateResponse {}
|
|
|
|
|
|
|
|
message DeleteRequest {
|
|
|
|
string role = 1;
|
|
|
|
Resource resource = 2;
|
|
|
|
Access access = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteResponse {}
|
|
|
|
|
|
|
|
message ListRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message ListResponse {
|
|
|
|
repeated Rule rules = 1;
|
|
|
|
}
|