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

ERROR in S3Plugin: AccessDenied: Access Denied #28

Closed
joshunger opened this issue Mar 10, 2016 · 12 comments
Closed

ERROR in S3Plugin: AccessDenied: Access Denied #28

joshunger opened this issue Mar 10, 2016 · 12 comments

Comments

@joshunger
Copy link

I'm getting an access denied but my command line tools work executing a similar command of aws s3 sync. What is the best way to debug at this point? Thanks.

@MikaAK
Copy link
Owner

MikaAK commented Mar 10, 2016

I'm not to sure. Could be a problem with your region or more. This isn't really a bug and I cannot really help debug this. Closing, If you think this is a bug, please provide more info and reopen.
Thanks,
Mika

@MikaAK MikaAK closed this as completed Mar 10, 2016
@joshunger
Copy link
Author

I see the problem. You're setting ACL public-read but my permissions on my upload account only allow PutObject but not PutObjectACL. That's seems like a security concern?

@MikaAK
Copy link
Owner

MikaAK commented Mar 10, 2016

It's not really a security concern because primarily you use the things on s3 for display and need public-read. You have a unique use case that I have never come across. The config allows you to set custom s3Options so you can set

{
  s3Options: {ACL: ''}
}

@paolavness
Copy link

paolavness commented Jun 17, 2017

It would be helpful is this was mentioned somehwere in the documentation. We've spent quite a bit of time debugging this - turns out, for our specific use case where IAM users setup with restricted access, the plugin fails to upload with 'access denied'. setting ACL: '' resolved this - would have been helpful to know this sooner.

@MikaAK
Copy link
Owner

MikaAK commented Jun 17, 2017

e901ce7

@paolavness

@hsanjuan
Copy link

hsanjuan commented Jun 20, 2017

It's not really a security concern because primarily you use the things on s3 for display and need public-read.

It IS a security concern. Cloudfront supports WAF. WAF allows to whitelist only specific traffic. Bucket policies support allowing access only from Cloudfront, which is the recommended way to do permissions for buckets when using Cloudfront.

Instead of letting the user configure the bucket policies to their needs and using default ACLs (non public), you are overriding them with non-default values, on a per-object basis, in a non-obvious way which silently bypasses any security policies set for the bucket.

@jnoss
Copy link

jnoss commented Jan 25, 2018

I tested and it looks like ACL is actually a parameter on s3UploadOptions not s3Options - so to override the default ACL it's necessary to set:

s3UploadOptions: {
  Bucket: 'MyBucket'
  ACL: 'private'
},

(or other ACL as desired).

@MikaAK
Copy link
Owner

MikaAK commented Jan 26, 2018

Instead of letting the user configure the bucket policies to their needs and using default ACLs (non public), you are overriding them with non-default values, on a per-object basis, in a non-obvious way which silently bypasses any security policies set for the bucket.

As @jnoss pointed out you can override the ACL. For a vast majority of cases ACL: public-read is probably fine, if not change it 😃

@tobinbc
Copy link

tobinbc commented Jul 24, 2019

Just to further this - the default option for S3 is to forcibly deny attempts to make objects public. So without setting ACL:'' uploads will be denied by default. Either do as here, or explicitly enable allowing a public ACL.

@MikaAK
Copy link
Owner

MikaAK commented Jul 24, 2019

@tobinbc I've never had that be default did this change recently?! I've used this on countless buckets without explicitly enabling public ACL

@tobinbc
Copy link

tobinbc commented Jul 25, 2019

@MikaAK
Copy link
Owner

MikaAK commented Jul 25, 2019

You must specifically enable that though so if you're doing that you should already be aware of its impact!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants