You need to enable JavaScript to run this app.
导航

0010-00000015

最近更新时间2024.01.05 16:32:17

首次发布时间2024.01.05 16:32:17

问题描述

桶策略配置非法。

问题原因

用户设置桶策略时,策略中的 NotPrincipal 配置与 Effect":"Allow 搭配使用。

问题示例

您配置桶策略时,策略中的 Effect 配置为 Allow 时,存在 NotPrincipal 配置。

PUT /?policy HTTP/1.1
Host: bucketname.tos-cn-beijing.volces.com
Date: Fri, 30 Jul 2021 13:59:18 GMT
Authorization: authorization xxx

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "1",
            "Effect": "Allow",
            "Action": ["tos:*"],
            "NotPrincipal": "*",
            "Resource": ["trn:tos:::bucketname/*"]
        }        
    ]
}

解决方案

参见桶策略模板及参数说明,正确构造桶策略配置,确保策略中的 Effect 配置为 Allow 时,无 NotPrincipal 配置。