-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
More granular permissions (attribute/field level permissions) #1326
Comments
Can you share more about your use-case? Usually what I do in this situation is to leverage multiple collections or multiple documents and sync data using cloud functions. That way I can still get lots of flexibility using a relative simple permissions model. |
I guess my use case is to avoid exactly what you described as a solution 😅
I mean you’re totally right that this is an option, but it kinda defeats (slightly) the BaaS concept if I have to kinda implement security/permission systems on my own instead of only configuring them
… Am 26.06.2021 um 17:58 schrieb Eldad A. Fux ***@***.***>:
Can you share more about your use-case? Usually what I do in this situation is to leverage multiple collections or multiple documents and sync data using cloud functions. That way I can still get lots of flexibility using a relative simple permissions model.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I totally understand where you coming from, but at the end of the day this is all a compromise between flexibility, ease of usage and performance. Checking for permission access for each attribute can be a killer for performance. In big scale application the go to solution would probably be multiple collections with sync functionality or managing all write from a single cloud function who is the only one with write access to the collections. |
I think it's a good idea to offer users the option to define more granular permissions like Firebase, where you can check if specific fields have specific values. You're probably right with the performance concerns, but at the end of the day, a user should be able to decide for themselves if they want to take that performance loss or not. |
Come to think of it, this opens security issues on every project with multiple users, right? **Example:**I have a simple chatting platform.. I can create a message with someone else ID and make it look like someone else send the message. Maybe we should not focus on supporting per-parameter permissions, instead, let's just add one security layer that will tell appwrite to append user's ID into a document. This way we don't need to trust the client, the "userId" would be added by Appwrite PHP. Anyone can see a problem with this approach? Any other cases that would not be solved by this? |
Good idea, but I would like to extend that idea: |
In Firebase, they have implemented field level permission in such a way that they can be validated looking at the query itself (not looking at the data stored in the DB) when it comes to reading a bunch of records. Of course they look at both query and the data in DB when it comes to single record read/write/update. This is done to avoid potential performance issues. I guess field level permissions are critical to handle scenarios such as:
Implementing such checks using a separate collection would be a little too much overhead I guess. |
Let's focus this issue on the granular permissions rather than "powerful defaults" |
I've been following the development of the upcoming version and its new permissions features. While I understand this might be outside the current scope maybe, I wanted to suggest a feature that I believe would significantly enhance the flexibility of the permissions system. |
🚀 Feature
Currently i can only deny access to a whole document/collection but not restrict acces of certain fields (like createdAt or similiar non mutatable fields)
Also there is no way of adding generated fields like a uuid or the current date/timestamp.
This is quite basic stuff i guess... weird that i could not find any other issue/request here...
The text was updated successfully, but these errors were encountered: