-
Notifications
You must be signed in to change notification settings - Fork 22
feat: add broken permissions service #150
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
Open
ostafen
wants to merge
14
commits into
main
Choose a base branch
from
feat/broken-sets-api
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
371d544
feat: add broken sets service
ostafen 2250e8c
Fix syntax error
ostafen aa6c853
Fix format
ostafen d710cc1
Rename entities
ostafen ca83c6f
Update authzed/api/materialize/v0/brokensets_service.proto
ostafen a5527a5
Update definition
ostafen 02ecba6
Add import to WatchedPermission
ostafen f86ee7f
rename file and fix path
ostafen 67e9ef4
Update authzed/api/materialize/v0/brokenpermissions.proto
ostafen 2db5891
Update authzed/api/materialize/v0/brokenpermissions.proto
ostafen c0e0bd8
Update authzed/api/materialize/v0/brokenpermissions.proto
ostafen 47ef97c
Introduce a custom type for broken watched permission
ostafen b9f09ed
Improve cycle comment
ostafen 66cb2ac
Update authzed/api/materialize/v0/brokenpermissions.proto
ostafen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
ostafen marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| 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; | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.