-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Customize upload ACL when uploading in object storage #4850
Comments
I got errors Uploading with To mitigate this issue in Amazon S3 side without modifying peertube source code, here are the steps we can do in S3 permission tab:
|
I'm having this same issue with Google Cloud Storage |
@aldy120 That is not an appropriate solution as uploaded objects are then publicly readable from the S3 bucket. |
@gsugambit I believe the problem you've described in #4855 is not the same as this one. |
@dougluce i had to make all objects in my storage public because of the ACL defined |
Hello, See the discussion: #4290 (comment) I'm not sure to understand this issue: video files uploaded in the bucket should be publicly readable by anyone so why should we remove this ACL? |
@Chocobozzz If the bucket is public, even the files marked private in Peertube can be browsed if address is known. |
@Chocobozzz I'm using CloudFront for the actual video distribution and an AWS S3 bucket as the store for CloudFront. The bucket doesn't need to be public for CloudFront to access it. While it's not a given that public access is transitive in this scenario, even in cases where it is open S3 access can show up as a red flag on over-enthusiastic AWS audits (whereas CloudFront is commonly assumed to be public). From that linked discussion it appears that the public ACL was added as a convenience for people who have the alternative to properly configure their bucket. Unfortunately it leaves no alternative for some of us who have properly configured our buckets. How does dougluce@3301e0c look? |
See #4417
Thanks for the explanations, I understand now.
It seems good, you can do a PR! |
Override this value to allow uploads to non-public S3 buckets. Otherwise "AccessDenied: Access Denied" errors will end up in the log. Fixes #4850
I'm using S3 object storage with a bucket that is not publicly readable. Instead, it feeds a CloudFront distribution. This works smashingly well and I'm very grateful that the ability to store videos to S3 was added to the code base.
After upgrading to 4.1.0, attempts to upload to the bucket result in an error:
This is due to ACL being set to
public-read
in thePutObjectCommand
in server/lib/object-storage/shared/object-storage-helpers.ts. If I remove that option in code the upload works just fine.What was the motivation for adding that to the S3 call? Would an addition to the config of an explicit ACL be the best way to mitigate this issue?
The text was updated successfully, but these errors were encountered: