Skip to content

ACL for files #4418

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

Closed
srameshr opened this issue Dec 8, 2017 · 10 comments
Closed

ACL for files #4418

srameshr opened this issue Dec 8, 2017 · 10 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@srameshr
Copy link
Contributor

srameshr commented Dec 8, 2017

Issue Description

ACL's are not obeyed on file type.

Steps to reproduce

Create a row or a record with a file type column in it and set its ACL to public read and write false. Now anybody who has the access to the link can access the file.

Does this fall under parse or server config?

Expected Results

The files should obey ACL and return 404 is credentials are not met.

Actual Outcome

The file is accessible.

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 2.9.x
    • Operating System: MAC OS High Sierra
    • Hardware:
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): Both
  • Database

    • MongoDB version: 3.3.x
    • Storage engine: MongoFS
    • Hardware:
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): Both

Logs/Trace

Null

@montymxb
Copy link
Contributor

montymxb commented Dec 9, 2017

@srameshr this is actually how it worked in the original Parse.com, however there was the caveat of having a file key in some cases to restrict access. Setting a file key in the parse server config was used to provide access to files that were hosted on the original Parse.com api.

Haven't dug into it but it might be worthwhile to consider enabling a similar fileKey feature for the current parse server.

@montymxb montymxb added discussion type:question Support or code-level question labels Dec 9, 2017
@srameshr
Copy link
Contributor Author

srameshr commented Dec 9, 2017

It would be a critical security feature that has to be allowed. Though links to files are not obvious or filename derived the access should still obey ACL.

@flovilmart
Copy link
Contributor

ACL for files should be enforced at bucket level, depending on your storage provider. I’m not against introducing such feature, but it requires a major overhaul including enforcing such restrictions on your storage. In many cases you want to serve your files from the storage adapter directly, like S3 to prevent the traffic from hitting your server. I’m not saying the current solution is perfect, but the obfuscation of the name is for now good enough.

That said, what storage do you use, and are the permissions on this storage properly configured? Did you disable bucket listing?

@srameshr
Copy link
Contributor Author

srameshr commented Dec 9, 2017

Well thats a bummer! I wish this was part of the parse server. And no I don't use S3 but just the regular mongo IFS.

@milesrichardson
Copy link

milesrichardson commented Dec 15, 2017

One thing I would like along these lines is the ability for parse-server-s3-adapter to upload to an arbitrary number of buckets, rather than just one. I'm building an app where users create "data rooms" and each data room is an encrypted S3 bucket. As far as I can tell, I can't use any native parse features for this so I need to build the system out myself.

@montymxb
Copy link
Contributor

@milesrichardson I don't see a multi-bucket solution within parse server itself coming around.

With that being said it may be possible to put together a storage adapter that performs this in one way or another. You could base it off of the existing s3 adapter and go from there.

@srameshr
Copy link
Contributor Author

@montymxb I wish there was a generic solution that worked with either, s3 or object storage (Digital ocean) or the default Mongo storage.
Also, is this feature still being considered?

@stale
Copy link

stale bot commented Sep 18, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 18, 2018
@acoyiu
Copy link

acoyiu commented Sep 25, 2018

@srameshr my colleague has to set up the client to send the session as cookie to the server, and set up a logic in express for checking all request to the the file url, preventing unauth access to the files

@stale stale bot removed the wontfix label Sep 25, 2018
@flovilmart
Copy link
Contributor

@srameshr I will close this issue as the core team won’t be working on it. Any proposal can go through either a detailed issued with design, architecture etc... or better a Pr with a tentative implementation.

@mtrezza mtrezza added type:feature New feature or improvement of existing feature and removed type:improvement type:question Support or code-level question labels Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

6 participants