Add protos for supporting debugging information returned by SpiceDB#34
Add protos for supporting debugging information returned by SpiceDB#34josephschorr merged 1 commit intoauthzed:mainfrom
Conversation
authzed/api/v1/debug.proto
Outdated
| // permission_or_relation holds the name of the permission or relation on which the Check was performed. | ||
| string permission_or_relation = 2; | ||
|
|
||
| // permission_or_relation_type holds information indicating whether it was a permission or relation. | ||
| RelationPermissionType permission_or_relation_type = 3; |
There was a problem hiding this comment.
Do we think this is better than doing
oneof path {
option (validate.required) = true;
string relation = 2;
string permission = 3;
}There was a problem hiding this comment.
Same difference, I guess. I prefer an enum but this works too
There was a problem hiding this comment.
Updated to just name permission and permission_type
52d8a84 to
b943641
Compare
| // See the github.com/authzed/authzed-go project for the specific header and footer names. | ||
| message DebugInformation { | ||
| // check holds debug information about a check request. | ||
| CheckDebugTrace check = 1; |
There was a problem hiding this comment.
should this be a oneof to support future types, or do you anticipate potentially returning multiple types of trace metadata?
There was a problem hiding this comment.
I anticipated having only one for now, but I could see a case where multiple are returned
|
|
||
| // CheckDebugTrace is a recursive trace of the requests made for resolving a CheckPermission | ||
| // API call. | ||
| message CheckDebugTrace { |
There was a problem hiding this comment.
should this include the (relevant) schema as context too, since that is mutable?
There was a problem hiding this comment.
Good idea; I'll add it
|
|
||
| // result holds the result of the Check call. | ||
| Permissionship result = 5; | ||
|
|
There was a problem hiding this comment.
Does it make sense to skip a few field numbers here to leave space for caveat-related data?
There was a problem hiding this comment.
I don't think so; the field number ordering doesn't really matter, especially since this is marshaled to JSON
First step for authzed/spicedb#696