amazon-web-services - AWS S3 ACL 公共(public)读写 : security concern

标签 amazon-web-services amazon-s3

我想对 AWS S3 ACL 公共(public)读写进行一些解释,来自 docs :

Owner gets FULL_CONTROL. The AllUsers group gets READ and WRITE access. Granting this on a bucket is generally not recommended.

[...]

All Users group – Represented by http://acs.amazonaws.com/groups/global/AllUsers. Access permission to this group allows anyone to access the resource. The requests can be signed (authenticated) or unsigned (anonymous). Unsigned requests omit the Authentication header in the request.

但这意味着每个 aws 帐户都可以读取/写入我的文件?或者只有我的 IAM 用户可以读/写我的文件?

最佳答案

看这个文档:http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html

Amazon S3 Predefined Groups

Amazon S3 has a set of predefined groups. When granting account access to a group, you specify one of our URIs instead of a canonical user ID. We provide the following predefined groups:

Authenticated Users group – Represented by http://acs.amazonaws.com/groups/global/AuthenticatedUsers. This group represents all AWS accounts. Access permission to this group allows any AWS account to access the resource. However, all requests must be signed (authenticated).

All Users group – Represented by http://acs.amazonaws.com/groups/global/AllUsers. Access permission to this group allows anyone to access the resource. The requests can be signed (authenticated) or unsigned (anonymous). Unsigned requests omit the Authentication header in the request.

Log Delivery group – Represented by http://acs.amazonaws.com/groups/s3/LogDelivery. WRITE permission on a bucket enables this group to write server access logs (see Server Access Logging) to the bucket.

通过 ACL,您只需与其他 AWS 账户共享您的 S3 存储桶。没有登录AWS账户的人无法访问您的存储桶。

如果您希望 AWS 账户和非 AWS 账户都可以访问您的 S3 存储桶,您必须定义 S3 存储桶策略。 例如:

{
    "Version": "2008-10-17",
    "Statement": [
        {
            "Sid": "AllowPublicRead",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::S3-Bucket-name/*"
        }
    ]
}

关于amazon-web-services - AWS S3 ACL 公共(public)读写 : security concern,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46400093/

相关文章:

amazon-web-services - 使用 s3fs 实用程序 AWS 安装 S3 存储桶

android - Ionic android - 使用预签名 URL 将文件上传到 S3(错误代码 : 3)

linux - 在 Amazon Glacier 中存储本地加密的增量 ZFS 快照

angular - 如何只允许特定用户访问 Amazon S3 上的内容

amazon-web-services - 无法通过 Terraform 在 Gitlab 中为 AWS Lambda Fx 创建 Zip 文件

amazon-web-services - 亚马逊雅典娜 : How to store results after querying with skipping column headers?

javascript - S3 替代方案,允许在不缓冲的情况下上传流文件

amazon-web-services - 在其他区域部署 AWS-CDK 堆栈

java - AWS API 与 Cloudwatch 集成返回空白数据点

node.js - 包含 ProxyPass 和 ProxyPassReverse 的正确位置(AWS Lightsail 上的 Bitnami Node.js 服务器)