更新时间:2024-03-15 GMT+08:00
分享

组织 Organizations

Organizations服务中的服务控制策略(Service Control Policies,以下简称SCP)可以使用以下这些授权项元素设置访问控制策略。

SCP不直接进行授权,只划定权限边界。将SCP绑定到组织单元或者成员账号时,并没有直接对组织单元或成员账号授予操作权限,而是规定了成员账号或组织单元包含的成员账号的授权范围。

本章节介绍组织服务中SCP使用的元素,这些元素包含了操作(Action)、资源(Resource)和条件(Condition)。

如何使用这些元素编辑SCP自定义策略,请参考创建SCP

操作(Action)

操作(Action)即为SCP中支持的授权项。

  • “访问级别”列描述如何对操作进行分类(list、read和write等)。此分类可帮助您了解在SCP中相应操作对应的访问级别。
  • “资源类型”列指每个操作是否支持资源级权限。
    • 资源类型支持通配符号*表示所有。如果此列没有值(-),则必须在SCP语句的Resource元素中指定所有资源类型(“*”)。
    • 如果该列包含资源类型,则必须在具有该操作的语句中指定该资源的URN。
    • 资源类型列中必需资源在表中用星号(*)标识,表示使用此操作必须指定该资源类型。

    关于Organizations定义的资源类型的详细信息请参见资源类型(Resource)

  • “条件键”列包括了可以在SCP语句的Condition元素中支持指定的键值。
    • 如果该授权项资源类型列存在值,则表示条件键仅对列举的资源类型生效。
    • 如果该授权项资源类型列没有值(-),则表示条件键对整个授权项生效。
    • 如果此列没有值(-),表示此操作不支持指定条件键。

    关于Organizations定义的条件键的详细信息请参见条件(Condition)

您可以在SCP语句的Action元素中指定以下Organizations的相关操作。

表1 Organizations支持的授权项

授权项

描述

访问级别

资源类型(*为必须)

条件键

organizations:organizations:create

授予创建组织的权限。

write

-

-

organizations:organizations:get

授予查询所属组织信息的权限。

read

-

-

organizations:organizations:delete

授予删除组织的权限。

write

-

-

organizations:organizations:leave

授予离开当前组织的权限。

write

-

-

organizations:roots:list

授予列出组织的根的权限。

list

-

-

organizations:ous:create

授予创建组织单元的权限。

write

ou

g:ResourceTag/<tag-key>

root

g:ResourceTag/<tag-key>

-

  • g:RequestTag/<tag-key>
  • g:TagKeys

organizations:ous:list

授予列举组织单元的权限。

list

-

-

organizations:ous:get

授予查询有关组织单元的信息的权限。

read

ou *

g:ResourceTag/<tag-key>

organizations:ous:update

授予更改组织单元名称的权限。

write

ou *

g:ResourceTag/<tag-key>

organizations:ous:delete

授予删除组织单元的权限。

write

ou *

g:ResourceTag/<tag-key>

organizations:accounts:create

授予创建账号的权限。

write

-

  • g:RequestTag/<tag-key>
  • g:TagKeys

organizations:accounts:list

授予列出组织中的账号的权限。

list

-

-

organizations:accounts:get

授予查询账号信息的权限。

read

account *

g:ResourceTag/<tag-key>

organizations:accounts:remove

授予移除指定的账号的权限。

write

account *

g:ResourceTag/<tag-key>

organizations:accounts:move

授予移动账号的权限。

write

account *

g:ResourceTag/<tag-key>

organizations:accounts:invite

授予邀请账号加入组织的权限。

write

-

  • g:RequestTag/<tag-key>
  • g:TagKeys

organizations:createAccountStatuses:list

授予列出创建账号的状态的权限。

list

-

-

organizations:createAccountStatuses:get

授予查询有关创建账号状态的信息的权限。

read

-

-

organizations:handshakes:get

授予查询邀请相关信息的权限。

read

handshake *

-

organizations:handshakes:accept

授予接受邀请的权限。

write

handshake *

-

organizations:handshakes:decline

授予拒绝邀请的权限。

write

handshake *

-

organizations:handshakes:cancel

授予取消邀请的权限。

write

handshake *

-

organizations:receivedHandshakes:list

授予列出收到的邀请的权限。

list

-

-

organizations:handshakes:list

授予列出发送的邀请的权限。

list

-

-

organizations:trustedServices:enable

授予启用可信服务的权限。

write

-

organizations:ServicePrincipal

organizations:trustedServices:disable

授予禁用受信任服务的权限。

write

-

organizations:ServicePrincipal

organizations:trustedServices:list

授予列出组织的可信服务列表的权限。

list

-

-

organizations:delegatedAdministrators:register

授予注册作为服务委托管理员的权限。

write

account *

g:ResourceTag/<tag-key>

-

organizations:ServicePrincipal

organizations:delegatedAdministrators:deregister

授予注销服务的委托管理员的权限。

write

account *

g:ResourceTag/<tag-key>

-

organizations:ServicePrincipal

organizations:delegatedServices:list

授予列出指定账号是其委托管理员的服务的权限。

list

account *

g:ResourceTag/<tag-key>

organizations:delegatedAdministrators:list

授予列出此组织中指定为委托管理员的账号的权限。

list

-

organizations:ServicePrincipal

organizations:policies:create

授予创建策略的权限。

write

-

  • g:RequestTag/<tag-key>
  • g:TagKeys

organizations:policies:list

授予列出策略的权限。

list

-

-

organizations:policies:get

授予查询策略相关信息的权限。

read

policy *

g:ResourceTag/<tag-key>

organizations:policies:update

授予更新策略的权限。

write

policy *

g:ResourceTag/<tag-key>

organizations:policies:delete

授予删除策略的权限。

write

policy *

g:ResourceTag/<tag-key>

organizations:policies:enable

授予在根中启用策略类型的权限。

write

root *

g:ResourceTag/<tag-key>

organizations:policies:disable

授予禁用根中的策略类型的权限。

write

root *

g:ResourceTag/<tag-key>

organizations:policies:attach

授予将策略跟实体绑定的权限。

write

policy *

g:ResourceTag/<tag-key>

account

g:ResourceTag/<tag-key>

ou

g:ResourceTag/<tag-key>

root

g:ResourceTag/<tag-key>

organizations:policies:detach

授予将策略跟实体解绑的权限。

write

policy *

g:ResourceTag/<tag-key>

account

g:ResourceTag/<tag-key>

ou

g:ResourceTag/<tag-key>

root

g:ResourceTag/<tag-key>

organizations:attachedEntities:list

授予列出跟指定策略绑定的所有实体的权限。

list

policy *

g:ResourceTag/<tag-key>

organizations:tags:list

授予列出绑定到指定资源的标签的权限。

list

account

g:ResourceTag/<tag-key>

ou

g:ResourceTag/<tag-key>

root

g:ResourceTag/<tag-key>

policy

g:ResourceTag/<tag-key>

organizations:resources:tag

授予为指定资源添加标签的权限。

tagging

account

g:ResourceTag/<tag-key>

ou

g:ResourceTag/<tag-key>

root

g:ResourceTag/<tag-key>

policy

g:ResourceTag/<tag-key>

-

  • g:RequestTag/<tag-key>
  • g:TagKeys

organizations:resources:untag

授予从指定资源中删除指定主键标签的权限。

tagging

account

g:ResourceTag/<tag-key>

ou

g:ResourceTag/<tag-key>

root

g:ResourceTag/<tag-key>

policy

g:ResourceTag/<tag-key>

-

  • g:RequestTag/<tag-key>
  • g:TagKeys

organizations:entities:list

授予列出组织中的根、组织单元和账号的权限。

list

-

-

organizations:services:list

授予列出所有可以与组织服务集成的云服务的权限。

list

-

-

organizations:tagPolicyServices:list

授予列出被添加到标签策略强制执行的资源类型。

list

-

-

organizations:effectivePolicies:get

授予查询账号指定策略类型的有效策略的权限。

read

-

-

organizations:resources:listByTag

授予列出所有资源类型及标签信息查询实例的权限。

list

-

-

organizations:resources:countByTag

授予列出资源类型及标签信息查询实例数量的权限。

list

-

-

organizations:resources:list

授予列出项目标签的权限。

list

-

-

organizations:quotas:list

授予列出租户组织配额的权限。

list

-

-

Organizations的API通常对应着一个或多个授权项。表2展示了API与授权项的关系,以及该API需要依赖的授权项。

表2 API与授权项的关系

API

对应的授权项

依赖的授权项

POST /v1/organizations

organizations:organizations:create

iam:agencies:createServiceLinkedAgency

GET /v1/organizations

organizations:organizations:get

-

DELETE /v1/organizations

organizations:organizations:delete

-

POST /v1/organizations/leave

organizations:organizations:leave

-

GET /v1/organizations/roots

organizations:roots:list

-

POST /v1/organizations/organizational-units

organizations:ous:create

organizations:resources:tag

GET /v1/organizations/organizational-units

organizations:ous:list

-

GET /v1/organizations/organizational-units/{organizational_unit_id}

organizations:ous:get

-

PATCH /v1/organizations/organizational-units/{organizational_unit_id}

organizations:ous:update

-

DELETE /v1/organizations/organizational-units/{organizational_unit_id}

organizations:ous:delete

-

POST /v1/organizations/accounts

organizations:accounts:create

organizations:resources:tag

GET /v1/organizations/accounts

organizations:accounts:list

-

GET /v1/organizations/accounts/{account_id}

organizations:accounts:get

-

POST /v1/organizations/accounts/{account_id}/remove

organizations:accounts:remove

-

POST /v1/organizations/accounts/{account_id}/move

organizations:accounts:move

-

POST /v1/organizations/accounts/invite

organizations:accounts:invite

organizations:resources:tag

GET /v1/organizations/create-account-status

organizations:createAccountStatuses:list

-

GET /v1/organizations/create-account-status/{create_account_status_id}

organizations:createAccountStatuses:get

-

GET /v1/organizations/handshakes/{handshake_id}

organizations:handshakes:get

-

POST /v1/received-handshakes/{handshake_id}/accept

organizations:handshakes:accept

iam:agencies:createServiceLinkedAgency

POST /v1/received-handshakes/{handshake_id}/decline

organizations:handshakes:decline

-

POST /v1/organizations/handshakes/{handshake_id}/cancel

organizations:handshakes:cancel

-

GET /v1/received-handshakes

organizations:receivedHandshakes:list

-

GET /v1/organizations/handshakes

organizations:handshakes:list

-

POST /v1/organizations/trusted-services/enable

organizations:trustedServices:enable

-

POST /v1/organizations/trusted-services/disable

organizations:trustedServices:disable

-

GET /v1/organizations/trusted-services

organizations:trustedServices:list

-

POST /v1/organizations/delegated-administrators/register

organizations:delegatedAdministrators:register

-

POST /v1/organizations/delegated-administrators/deregister

organizations:delegatedAdministrators:deregister

-

GET /v1/organizations/accounts/{account_id}/delegated-services

organizations:delegatedServices:list

-

GET /v1/organizations/delegated-administrators

organizations:delegatedAdministrators:list

-

POST /v1/organizations/policies

organizations:policies:create

organizations:resources:tag

GET /v1/organizations/policies

organizations:policies:list

-

GET /v1/organizations/policies/{policy_id}

organizations:policies:get

-

PATCH /v1/organizations/policies/{policy_id}

organizations:policies:update

-

DELETE /v1/organizations/policies/{policy_id}

organizations:policies:delete

-

POST /v1/organizations/policies/enable

organizations:policies:enable

-

POST /v1/organizations/policies/disable

organizations:policies:disable

-

POST /v1/organizations/policies/{policy_id}/attach

organizations:policies:attach

-

POST /v1/organizations/policies/{policy_id}/detach

organizations:policies:detach

-

GET /v1/organizations/policies/{policy_id}/attached-entities

organizations:attachedEntities:list

-

GET /v1/organizations/resources/{resource_id}/tags

organizations:tags:list

-

POST /v1/organizations/resources/{resource_id}/tag

organizations:resources:tag

-

POST /v1/organizations/resources/{resource_id}/untag

organizations:resources:untag

-

GET /v1/organizations/entities

organizations:entities:list

-

GET /v1/organizations/services

organizations:services:list

-

GET /v1/organizations/tag-policy-services

organizations:tagPolicyServices:list

-

GET /v1/organizations/entities/effective-policies

organizations:effectivePolicies:get

-

GET /v1/organizations/{resource_type}/{resource_id}/tags

organizations:tags:list

-

POST /v1/organizations/{resource_type}/{resource_id}/tags/create

organizations:resources:tag

-

POST /v1/organizations/{resource_type}/{resource_id}/tags/delete

organizations:resources:untag

-

POST /v1/organizations/{resource_type}/resource-instances/filter

organizations:resources:listByTag

-

POST /v1/organizations/{resource_type}/resource-instances/count

organizations:resources:countByTag

-

GET /v1/organizations/{resource_type}/tags

organizations:resources:list

-

GET /v1/organizations/quotas

organizations:quotas:list

-

资源类型(Resource)

资源类型(Resource)表示SCP所作用的资源。如表3中的某些操作指定了可以在该操作指定的资源类型,则必须在具有该操作的SCP语句中指定该资源的URN,SCP仅作用于此资源;如未指定,Resource默认为“*”,则SCP将应用到所有资源。您也可以在SCP中设置条件,从而指定资源类型。

Organizations定义了以下可以在SCP的Resource元素中使用的资源类型。

表3 Organizations支持的资源类型

资源类型

URN

handshake

organizations::<management-account-id>:handshake:<organization-id>/<handshake-id>

ou

organizations::<management-account-id>:ou:<organization-id>/<organization-unit-id>

organization

organizations::<management-account-id>:organization:<organization-id>

root

organizations::<management-account-id>:root:<organization-id>/<root-id>

account

organizations::<management-account-id>:account:<organization-id>/<account-id>

policy

organizations::<management-account-id>:policy:<organization-id>/<policy-type>/<policy-id>

builtinpolicy

organizations::system:policy:<policy-type>/<policy-id>

条件(Condition)

条件(Condition)是SCP生效的特定条件,包括条件键运算符

  • 条件键表示SCP语句的Condition元素中的键值。根据适用范围,分为全局级条件键和服务级条件键。
    • 全局级条件键(前缀为g:)适用于所有操作,在鉴权过程中,云服务不需要提供用户身份信息,系统将自动获取并鉴权。详情请参见:全局条件键
    • 服务级条件键(前缀为服务缩写,如organizations:)仅适用于对应服务的操作,详情请参见表4
    • 单值/多值表示API调用时请求中与条件关联的值数。单值条件键在API调用时的请求中最多包含一个值,多值条件键在API调用时请求可以包含多个值。例如:g:SourceVpce是单值条件键,表示仅允许通过某个VPC终端节点发起请求访问某资源,一个请求最多包含一个VPC终端节点ID值。g:TagKeys是多值条件键,表示请求中携带的所有标签的key组成的列表,当用户在调用API请求时传入标签可以传入多个值。
  • 运算符与条件键、条件值一起构成完整的条件判断语句,当请求信息满足该条件时,SCP才能生效。支持的运算符请参见:运算符

Organizations定义了以下可以在SCP的Condition元素中使用的条件键,您可以使用这些条件键进一步细化SCP语句应用的条件。

表4 Organizations支持的服务级条件键

服务级条件键

类型

单值/多值

说明

organizations:ServicePrincipal

string

单值

根据指定的服务主体的名称过滤访问。

分享:

    相关文档

    相关产品