MCPcopy Index your code
hub / github.com/aliyun/ram-policy-editor

github.com/aliyun/ram-policy-editor @1.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.2.0 ↗ · + Follow
865 symbols 1,728 edges 4 files 356 documented · 41%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

RAM Policy Editor

README of English

关于

可视化的OSS授权策略生成器。

示例

http://gosspublic.alicdn.com/ram-policy-editor/index.html

用法

Resources

Resources有如下几种格式:

  • 表示某个bucket: my-bucket (此时对bucket下的文件没有权限)
  • 表示某个bucket下面所有文件: my-bucket/* (此时对bucket本身没有权限,例如ListObjects)
  • 表示某个bucket下某个目录: my-bucket/dir (此时对dir/下面的文件没有权限)
  • 表示某个bucket下某个目录下面所有文件: my-bucket/dir/* (此时对dir没有权限,例如ListObjects)
  • 填写完整的资源路径:acs:oss:*:1234:my-bucket/dir,其中1234为用户的User ID(在控制台查看)

EnablePath

当用户需要对某个目录授权时,往往还需要保证对上一层目录也有List权限,例 如用户对my-bucket/users/dir/*赋予读写权限,为了在控制台(或其他工具) 能够查看这个目录,用户还需要以下权限:

ListObjects my-bucket
ListObjects my-bucket/users
ListObjects my-bucket/users/dir

勾选EnablePath选项时,上面这些权限会自动添加。

Examples

Full access to a bucket

对某个bucket(例如my-bucket)完全授权:

添加一条规则:

  • Effect设置为Allow
  • Action选择oss:*
  • Resource填写为my-bucketmy-bucket/*
  • EnablePath不勾选

注意:

  • 如果是只读权限,把oss:*换成oss:Get*;
  • 如果是只写权限,把oss:*换成oss:Put*;

Full access to a dir

my-bucket下的my-dir完全授权:

添加一条规则:

  • Effect设置为Allow
  • Action选择oss:*
  • Resource填写为my-bucket/my-dir/*
  • EnablePath勾选

注意:

  • 如果是只读权限,把oss:*换成oss:Get*;
  • 如果是只写权限,把oss:*换成oss:Put*;

Allow only specified IP

只允许特定的IP来访问my-bucket下面的my-dir目录。

添加一条规则:

  • Effect设置为Allow
  • Action选择oss:Get*
  • Resource填写为my-bucket/my-dir/*
  • EnablePath不勾选
  • 添加条件
  • Key选择为acs:SourceIp
  • Operator选择为IpAddress
  • Value填具体的IP,如40.32.9.125

注意:

  • 如果是只读权限,把oss:*换成oss:Get*;
  • 如果是只写权限,把oss:*换成oss:Put*;

Web console

如果需要在阿里云的控制台用子账号访问,需要有oss:ListBuckets权限。

需要额外添加一条规则:

  • Effect设置为Allow
  • Action选择oss:ListBuckets
  • Resource填写为*
  • EnablePath不勾选

Build

npm install -g browserify
npm install
npm run build

Core symbols most depended-on inside this repo

Shape

Function 865

Languages

TypeScript100%

Modules by API surface

app-english.js422 symbols
app-babel.js422 symbols
highlight/highlight.pack.js21 symbols

For agents

$ claude mcp add ram-policy-editor \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page