Skip to content

Conversation

@miparnisari
Copy link
Contributor

Description

Closes #95

@vercel
Copy link
Contributor

vercel bot commented Dec 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Dec 12, 2025 6:48pm


## LookupResources

[`LookupResources`](https://buf.build/authzed/api/docs/main:authzed.api.v1#authzed.api.v1.PermissionsService.LookupResources) is a good choice when you need to find all resources of a given type that a specific subject can access. It supports pagination and works well for moderate result sizes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Protecting A List Endpoint page we say: "If the number of resources that a user has access to is sufficiently large and LookupResources can’t satisfy the use case anymore, another approach is to fetch a page of results and then call CheckBulkPermissions to determine which of the resources are accessible to the user."

This might contradict what's on this page

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm i don't see how these pages are contradicting each other, can you elaborate?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO for someone unfamiliar with the space these two sentences might cause confusion about which one to choose:

If the number of resources that a user has access to is sufficiently large and LookupResources can’t satisfy the use case anymore, another approach is to fetch a page of results and then call CheckBulkPermissions to determine which of the resources are accessible to the user.
[LookupResources](https://buf.build/authzed/api/docs/main:authzed.api.v1#authzed.api.v1.PermissionsService.LookupResources) is a good choice when you need to find all resources of a given type that a specific subject can access. It supports cursoring and works well for moderate result sizes.

If you’re expecting more than ~10,000 results, this isn’t ideal.

and then

The options are listed from most preferred to least preferred in terms of performance,

where LS is after BullkCheck

Copy link
Contributor Author

@miparnisari miparnisari Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you check now? i updated the link here:

If you’re expecting more than ~10,000 results, this isn't ideal. See [this](../modeling/protecting-a-list-endpoint#checking-with-checkbulkpermissions)

Copy link
Contributor

@sohanmaheshwar sohanmaheshwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! this page is much needed. Added a couple of comments.

I think we need to align on the messaging across CheckBulkPermission and LookupResources . We've had mixed messaging out for this in the RAG usecases as well. Maybe Cormac can help us out with this

@vercel
Copy link
Contributor

vercel bot commented Dec 10, 2025

Deployment failed with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: docs.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

Copy link
Collaborator

@tstirrat15 tstirrat15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments


When your schema uses caveats and you don't provide all the required context in the request parameters, the API will tell you that in the response that the result is "conditional" instead of simply denying or allowing, and it's up to you to inspect that result.

The `subject` of the query can be a single user (e.g. `user:maria`) or a set of users (e.g. `group:engineering#member`).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually news to me 🤔

Copy link
Contributor Author

@miparnisari miparnisari Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it works
image


Receive:

- Yes/no (or a provisional response if missing caveat data)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

provisional or conditional?

Copy link
Collaborator

@tstirrat15 tstirrat15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@miparnisari miparnisari merged commit 78c076e into main Dec 12, 2025
10 checks passed
@miparnisari miparnisari deleted the querying-data branch December 12, 2025 18:48
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

document x-request-id header

4 participants