Skip to content
Open
Changes from 3 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
43 changes: 43 additions & 0 deletions authzed/api/materialize/v0/brokensets_service.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
syntax = "proto3";
package authzed.api.materialize.v0;

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

option go_package = "github.com/authzed/authzed-go/proto/authzed/api/materialize/v0";
option java_multiple_files = true;
option java_package = "com.authzed.api.materialize.v0";

service BrokenSetsService {
// ListBrokenSets returns all broken sets detected during
// the hydration process.
//
// Each broken set represents a circular dependency in the permission
// graph. The response includes the sets involved in each cycle,
// along with their associated resources.
rpc ListBrokenSets(ListBrokenSetsRequest) returns (stream ListBrokenSetsResponse) {}
}

message ListBrokenSetsRequest {
// batch_size specifies the maximum number of broken sets to return in a single response.
// If set to zero, the server will use the default batch size.
uint32 batch_size = 1;
// optional_at_revision defines the specific revision at which the broken sets should be evaluated.
// At this time, it is only compared against the revision of the provided backing store snapshot.
authzed.api.v1.ZedToken optional_at_revision = 2;
}

message BrokenSet {
// resource_type is the type of the broken resource.
string resource_type = 1;
// resource_id is the id of the broken resource.
string resource_id = 2;
// permission is the broken permission set.
string permission = 3;
}

message ListBrokenSetsResponse {
// broken_sets contains the list of broken sets found for the requested revision.
repeated BrokenSet broken_sets = 1;
// read_at is the ZedToken at which the broken set applies.
authzed.api.v1.ZedToken revision = 2;
}