syntax = "proto3"; package authorize; service Authorizer { rpc Authorize(Identity) returns (AuthorizeReply) {} rpc IsAdmin(Identity) returns (IsAdminReply) {} } message Identity { // request context string route = 1; // user context string user = 2; string email = 3; repeated string groups = 4; // user context string impersonate_email = 5; repeated string impersonate_groups = 6; } message AuthorizeReply { bool is_valid = 1; } message IsAdminReply { bool is_admin = 1; }