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

ReadRelationships: multiple resource and subject ids #134

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
17 changes: 17 additions & 0 deletions authzed/api/v1/permission_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ message RelationshipFilter {
max_bytes : 1024,
} ];

// optional_resource_ids is the *optional* list of resource IDs to filter relationships.
// If specified, optional_resource_id and optional_resource_id_prefix cannot be specified.
repeated string optional_resource_ids = 6 [ (validate.rules).repeated .string = {
pattern : "^([a-zA-Z0-9/_|\\-=+]{1,})?$",
max_bytes : 1024,
} ];

// relation is the *optional* relation of the relationship.
string optional_relation = 3 [ (validate.rules).string = {
Expand Down Expand Up @@ -223,6 +229,13 @@ message SubjectFilter {
max_bytes : 1024,
} ];

// optional_subject_ids is the *optional* list of subject IDs to filter.
// If specified, optional_subject_id cannot be specified.
repeated string optional_subject_ids = 4 [ (validate.rules).string = {
pattern : "^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$",
max_bytes : 1024,
} ];

RelationFilter optional_relation = 3;
}

Expand Down Expand Up @@ -257,6 +270,10 @@ message ReadRelationshipsResponse {
// relationship is the found relationship.
Relationship relationship = 2 [ (validate.rules).message.required = true ];

// optional_relationships are a list of relationships found when multiple resource and subject ids are
// specified in the request
repeated Relationship optional_relationships = 3 [ (validate.rules).message.required = true ];

// after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
// result.
Cursor after_result_cursor = 3;
Expand Down