[英]Difficulty of getting image from public S3 bucket?
I want to use S3 to store user uploaded images. 我想使用S3存储用户上传的图像。 Some images like profile pictures and other thumbnails should be visible to anyone.
任何人都可以看到某些图片,例如个人资料图片和其他缩略图。 However, I also want to have some images to be visible to users in the group that the image was "posted" to.
但是,我还希望某些图像对于“发布”到该图像组中的用户可见。
My app will handle all of the logic to decide whether or not a certain user has access to the image. 我的应用程序将处理所有逻辑,以确定某个用户是否有权访问该图像。
My question is: with a public S3 bucket and my app controlling the visibility of the images, how hard would it potentially be for someone to see images that they generally don't have access to? 我的问题是:在公共S3存储桶和我的应用程序控制图像可见性的情况下,某人看到他们通常无法访问的图像有多困难?
Is there a better way to set up an S3 bucket to meet these requirements? 是否有更好的方法来设置S3存储桶以满足这些要求?
Thanks. 谢谢。
The best approach is: 最好的方法是:
Your application can generate the pre-signed URL in a couple of lines of code, without requiring a call to AWS. 您的应用程序可以通过几行代码来生成预签名的URL,而无需调用AWS。
This way, all your security is maintained by the application rather than having to selectively make some objects public and there is no way for people to gain unauthorized access to objects. 这样,您的所有安全性都由应用程序维护,而不必有选择地将某些对象公开,并且人们无法获得对对象的未授权访问。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.