amazon-s3 - 预签名上传时使 s3 安全
问题描述
我一直在尝试在我的 Web 应用程序中实现 S3 存储。然而,我已经到了让自己陷入僵局的地步。
我正在使用预签名的网址。
用户获得预签名的 url,上传文件,现在必须将 url 发回以保存在后端。然后它将移动它。
确保用户不只是猜测另一个 url 的最合乎逻辑的方法是什么,将其发送到请求中,从而得到该文件的签名和下载,而不是他应该得到的文件?这样他就可以访问私人文件。
解决方案
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.
推荐阅读
- java - 在 STS 的演示 Maven 项目中使用 pom.xml 处理生命周期处理指令时出错
- javascript - 土星环 - 初始条件
- optaplanner - 跟踪容量 MultiTrip CVRPTW 并在超过容量时返回站点
- node.js - 带有 JavaScript 开发工具包和 Raspberry Pi 连接错误的 AWS IoT
- apache-spark - Spark:用地图中的键选择
- java - 单击按钮后如何更改应用程序的字符串语言?
- r - 从第二个文件的第一个文件数据匹配索引并在R中获取其前后数据
- python - 熊猫减去日期时间条件
- java - 在 Java 中为 ARIMA 调用 R
- java - 尝试将 AddAll 添加到 MutableList 时出现不受支持的异常