silverstripe / silverstripe-s3

Silverstripe module to store assets in S3 rather than on the local filesystem (SS4/SS5 only)
BSD 3-Clause "New" or "Revised" License
20 stars 25 forks source link

Update of README.md for policy update #23

Closed obj63mc closed 5 years ago

obj63mc commented 5 years ago

Just a quick readme update for issue #17

madmatt commented 5 years ago

Hey @obj63mc, looks good to me. Do we need to do something for protected files still? The current rule allows anyone to access the public folder, but doesn't provide any rule for the protected folder, so I think that won't work... right?

Do you use the S3 adapter for both public and protected directories?

obj63mc commented 5 years ago

I do use this with public/protected. Essentially all protected stuff is written outside of the public directory (under /protected or whatever prefix you choose) so that means your IAM credentials will have to generate signed urls to view any of the content. This is what the protected adapters are returning. Also with the IAM credentials specified it should be able to write just fine.

At least when I call

aws s3api get-bucket-policy --bucket <bucket-name> 

All I get back is what is in this pull request and all works fine. Note I didn't create the bucket from scratch I am using a vendor from heroku that creates the bucket for you and then this policy is applied. To use this provider though you are always specifing your aws secret key and id so maybe that's why all I need is the one policy.

madmatt commented 5 years ago

Ah yes good point, I'd forgotten about that. Cool, looks good to me then!