Skip to content
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

[BUG] Unable to upload profile images to S3 #72

Open
tim-morgan opened this issue Jul 22, 2022 · 3 comments
Open

[BUG] Unable to upload profile images to S3 #72

tim-morgan opened this issue Jul 22, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@tim-morgan
Copy link

tim-morgan commented Jul 22, 2022

The Content Building Block is unable to upload profile pictures to the appropriate S3 bucket in the PROD Illinois environment.

2022/07/20 07:24:51 Error converting image: Unable to upload file: bcabda3d-8697-11ec-8edf-0a58a9feac02-default. Error: Unable to upload to S3: AccessDenied: Access Denied

The S3 bucket that we're using has "block all public access" enabled.

The current code attempts to use the acl "authenticated-read" when uploading, which isn't allowed due to the "block all public access" setting.

According to the documentation (https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl), "authenticated-read" allows the AuthenticatedUsers groups to have access.

On the same documentation page, it states:

This group represents all AWS accounts. Access permission to this group allows any AWS account to access the resource. However, all requests must be signed (authenticated).

Warning: When you grant access to the Authenticated Users group any AWS authenticated user in the world can access your resource.

The acl should be changed from "authenticated-read" to "private".

@tim-morgan tim-morgan added the bug Something isn't working label Jul 22, 2022
@tim-morgan
Copy link
Author

The file is /driven/awsstorage/adapter.go on line 188.

I don't have access to push to this repo, but it should be an easy fix.

mdryankov added a commit that referenced this issue Jul 25, 2022
… been changed from "authenticated-read" to "private" [#72]
mdryankov added a commit that referenced this issue Jul 25, 2022
#73)

Unable to upload profile images to S3. The S3 profile picture acl has been changed from "authenticated-read" to "private" [#72]
@mdryankov
Copy link
Collaborator

Thanks for the feedback @tim-morgan !

The requested change has been made and now the profile images will be set as private. Dev is already deployed and looks good from client perspective

@mdryankov
Copy link
Collaborator

This change is strictly related to the profile images. There is another endpoint which must be kept as public (for general purpose).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants