首页 > 解决方案 > 预签名上传时使 s3 安全

问题描述

我一直在尝试在我的 Web 应用程序中实现 S3 存储。然而,我已经到了让自己陷入僵局的地步。

我正在使用预签名的网址。

用户获得预签名的 url,上传文件,现在必须将 url 发回以保存在后端。然后它将移动它。

确保用户不只是猜测另一个 url 的最合乎逻辑的方法是什么,将其发送到请求中,从而得到该文件的签名和下载,而不是他应该得到的文件?这样他就可以访问私人文件。

标签: amazon-s3object-storage

解决方案


If your user can guess a url from your service, and you return a pre-signed version of that url, then pre-signing is basically pointless.

If the user is only allowed to access some objects, then your system should make sure you're only ever returning pre-signed urls for the objects that user has access to.


推荐阅读