Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move debug tracing into the Check request and response #95

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading