Skip to content

Commit

Permalink
Merge pull request #95 from josephschorr/debug-trace
Browse files Browse the repository at this point in the history
Move debug tracing into the Check request and response
  • Loading branch information
josephschorr committed Mar 13, 2024
2 parents b7d9cc6 + 78cdd78 commit 9ba37ce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions authzed/api/v1/permission_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import "google/rpc/status.proto";
import "validate/validate.proto";

import "authzed/api/v1/core.proto";
import "authzed/api/v1/debug.proto";

// PermissionsService implements a set of RPCs that perform operations on
// relationships and permissions.
Expand Down Expand Up @@ -334,6 +335,11 @@ message CheckPermissionRequest {

// context consists of named values that are injected into the caveat evaluation context
google.protobuf.Struct context = 5 [ (validate.rules).message.required = false ];

// with_tracing, if true, indicates that the response should include a debug trace.
// This can be useful for debugging and performance analysis, but adds a small amount
// of compute overhead to the request.
bool with_tracing = 6;
}

message CheckPermissionResponse {
Expand All @@ -358,6 +364,9 @@ message CheckPermissionResponse {

// partial_caveat_info holds information of a partially-evaluated caveated response
PartialCaveatInfo partial_caveat_info = 3 [ (validate.rules).message.required = false ];

// debug_trace is the debugging trace of this check, if requested.
DebugInformation debug_trace = 4;
}

// CheckBulkPermissionsRequest issues a check on whether a subject has permission
Expand Down

0 comments on commit 9ba37ce

Please sign in to comment.