-
Notifications
You must be signed in to change notification settings - Fork 285
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
Support for wildcard query (computed_usersets with prefixes) #170
Comments
This is an interesting idea, so I'd like to understand a bit more about the type of data you're working with. Typically, we'd recommend writing a schema where users can have a relation "salesrep" or documents can have a "broucher". |
Aha I see. I've just started reading up on Zanzibar this week, so pls bear with me. A typical scenario is where I want access control to an API endpoint. I will design my API such that I can parse out the "action" from the url prefix. For example, Now alongside Sometimes it is not only an issue of tediousness. The resource itself may not be ascertainable beforehand, so it is impossible to define its set. For instance, how do I say "Johnny can delete file lalala.*"? The only solution I can think of is to use the expand API and then filter in code. |
@imacks Are the list of actions known ahead of time in your applicable or are they fully dynamic? Likewise, is the mapping between an action and a "class" of user known ahead of time, or is it also dynamic? Fully dynamic permissions systems can be represented using a static schema and relationships. For example, let's say you wanted to issue a check like within your first example (
The goal would be to then define a schema that allows for this check to succeed, from the file "type" to the user "class". An example might be:
To enable the above check to succeed, you'd write a relationship of the form:
Now, the above assumes that the |
@josephschorr tks for the clarification. My issue is that I cannot parse code in the scenario. Let me describe the bigger picture: I have a web drive app that allow operator users to create other users, groups, and files. User, group and file names are arbitrary. User/group can perform an action on a file. Actions are predefined (EditTag, EditFilename, etc.) and I can parse out the action from the request URL. I want operators to be able to self-service create acls like Query to authzed for a request may look like To illustrate further, consider user have files |
@imacks in your design, the operator is calling the Authzed API directly, or is it going through your application? |
It is through my application, but I won't for instance be able to know to check for Edit* when the request is for EditTag. |
This is equivalent to a |
This stuff looks awesome! I want to know whether there is plan to support the
LIKE
operator, which is very important in my use case.For example,
salesrep_* is allowed to edit broucher_*.doc
will allow usernames with prefixsalesrep_
to edit docs that match wildcard patternbroucher_*.doc
.This is really useful in cases where you have many apis in your app that follows some kind of naming pattern, and specifying each of them explicitly becomes tedious.
The text was updated successfully, but these errors were encountered: