You need to enable JavaScript to run this app.
文档中心
对象存储

对象存储

复制全文
下载 pdf
典型配置场景
禁止 TOS 的公网访问
复制全文
下载 pdf
禁止 TOS 的公网访问
本文档介绍如何限制存储桶的公网访问。您可以通过本教程,限制 TOS 的公网访问,防止 TOS 的数据外泄到公网。​
注意事项​
  • 限制公网访问 TOS 后,将无法使用火山引擎对象存储控制台。​
  • 权限配置后略有延迟,如果您配置的权限没有立即生效,建议您稍后重试。​
操作步骤​
  1. 在左侧导航栏,单击桶列表,在桶列表页面单击目标桶名称。​
  1. 在左侧导航栏,选择权限管理 > 存储桶授权策略管理。​
  1. 根据需要选择授权方式。​
说明​
  • 本例中需要选择 JSON视图配置,单击编辑,将示例策略内容复制到文本框中,并将 bucketname 替换为您使用的桶名,再单击保存。​
  • 本场景下建议您使用桶策略的 NetPlane 条件进行授权。关于桶策略的详细说明,请参见桶策略概述。​
  • 禁止用户在公网读取桶 bucketname 内的对象​
  • ​
    {​
    "Statement": [{​
    "Effect": "Deny",​
    "Action": "tos:GetObject",​
    "Principal": ["*"],​
    "Resource": ["trn:tos:::bucketname","trn:tos:::bucketname/*"],​
    "Condition": {​
    "StringEquals": {​
    "tos:NetPlane": "public"​
    }​
    }​
    }]​
    }​
    ​
  • 禁止用户在公网对桶 bucketname 执行任何操作​
  • ​
    {​
    "Statement": [{​
    "Effect": "Deny",​
    "Action": "tos:*",​
    "Principal": ["*"],​
    "Resource": ["trn:tos:::bucketname","trn:tos:::bucketname/*"],​
    "Condition": {​
    "StringEquals": {​
    "tos:NetPlane": "public"​
    }​
    }​
    }]​
    }​
    ​
  • 禁止用户在公网对桶 bucketname 执行任何操作,但可通过对象存储控制台正常运维桶​
  • ​
    {​
    "Statement": [{​
    "Effect": "Deny",​
    "Action": "tos:*",​
    "Principal": ["*"],​
    "Resource": ["trn:tos:::bucketname", "trn:tos:::bucketname/*"],​
    "Condition": {​
    "StringEquals": {​
    "tos:NetPlane": "public",​
    "volc:ViaConsole": "false"​
    }​
    }​
    }]​
    }​
    ​
  • 禁止用户在公网对桶 bucketname 执行任何操作,但放行其他云服务通过跨服务授权访问,以资源管理服务为例(角色为 ServiceRoleForResourceCenter)​
  • ​
    {​
    "Statement": [​
    {​
    "Effect": "Deny",​
    "Action": "tos:*",​
    "Principal": [​
    "*"​
    ],​
    "Resource": [​
    "trn:tos:::bucketname",​
    "trn:tos:::bucketname/*"​
    ],​
    "Condition": {​
    "StringEquals": {​
    "tos:NetPlane": "public"​
    },​
    "StringNotEquals": {​
    "tos:RoleName": "ServiceRoleForResourceCenter"​
    }​
    }​
    }​
    ]​
    }​
    ​
  • ​
  • ​
​
最近更新时间:2026.10.22 18:30:49
这个页面对您有帮助吗?
有用
有用
无用
无用