更新时间:2026-09-18 GMT+08:00
分享

策略授权参考

本章节介绍CodeArtsPipeline策略授权场景下支持的策略授权项。

支持的授权项

策略包含系统策略和自定义策略,如果系统策略不满足授权要求,管理员可以创建自定义策略,并通过给用户组授予自定义策略来进行精细的访问控制。策略支持的操作与API相对应,授权项列表说明如下:

  • 权限:允许或拒绝某项操作。
  • 对应API接口:自定义策略实际调用的API接口。
  • 授权项:自定义策略中支持的Action,在自定义策略中的Action中写入授权项,可以实现授权项对应的权限功能。
  • 依赖的授权项:部分Action存在对其他Action的依赖,需要将依赖的Action同时写入授权项,才能实现对应的权限功能。
  • IAM项目(Project)/企业项目(Enterprise Project):自定义策略的授权范围,包括IAM项目与企业项目。授权范围如果同时支持IAM项目和企业项目,表示此授权项对应的自定义策略,可以在IAM和企业管理两个服务中给用户组授权并生效。如果仅支持IAM项目,不支持企业项目,表示仅能在IAM中给用户组授权并生效,如果在企业管理中授权,则该自定义策略不生效。管理员可以在授权项列表中查看授权项是否支持IAM项目或企业项目,“√”表示支持,“×”表示暂不支持。关于IAM项目与企业项目的区别,详情请参见:IAM与企业管理的区别。

CodeArtsPipeline的支持自定义策略授权项如下所示:

  • 模板管理,包含CodeArtsPipeline流水线模板对应的授权项,如创建流水线模板、更新流水线模板、删除流水线模板、查询流水线模板等接口。
  • 规则管理,包含CodeArtsPipeline规则对应的授权项,如创建规则、更新规则、删除规则、查询规则等接口。
  • 策略管理,包含CodeArtsPipeline策略对应的授权项,如创建策略、更新策略、删除策略、查询策略等接口。
  • 扩展插件管理,包含CodeArtsPipeline扩展插件对应的授权项,如创建扩展插件、更新扩展插件、删除扩展插件、查询扩展插件等接口。

模板管理

表1 模板管理

权限

对应API接口

授权项(Action)

IAM项目

(Project)

企业项目

(Enterprise Project)

更新流水线模板

PUT /v5/{tenant_id}/api/pipeline-templates/{template_id}

cloudpipeline:pipelinetemplate:update

√

√

更新流水线模板

DELETE /v5/{tenant_id}/api/pipeline-templates/{template_id}

cloudpipeline:pipelinetemplate:update

√

√

规则管理

表2 规则管理

权限

对应API接口

授权项(Action)

IAM项目

(Project)

企业项目

(Enterprise Project)

更新规则

POST /v2/{domain_id}/rules/create

cloudpipeline:rule:update

√

√

更新规则

PUT /v2/{domain_id}/rules/{rule_id}/update

cloudpipeline:rule:update

√

√

更新规则

DELETE /v2/{domain_id}/rules/{rule_id}/delete

cloudpipeline:rule:update

√

√

策略管理

表3 策略管理

权限

对应API接口

授权项(Action)

IAM项目

(Project)

企业项目

(Enterprise Project)

更新策略

POST /v2/{domain_id}/tenant/rule-sets/create

cloudpipeline:ruletemplate:update

√

√

更新策略

PUT /v2/{domain_id}/tenant/rule-sets/{rule_set_id}/update

cloudpipeline:ruletemplate:update

√

√

更新策略

DELETE /v2/{domain_id}/tenant/rule-sets/{rule_set_id}/delete

cloudpipeline:ruletemplate:update

√

√

更新策略

PUT /v2/{domain_id}/tenant/rule-sets/{rule_set_id}/switch

cloudpipeline:ruletemplate:update

√

√

更新策略

POST /v2/{domain_id}/tenant/open-source/rule-sets/create

cloudpipeline:ruletemplate:update

√

√

更新策略

PUT /v2/{domain_id}/tenant/open-source/rule-sets/{rule_set_id}/update

cloudpipeline:ruletemplate:update

√

√

更新策略

DELETE /v2/{domain_id}/tenant/open-source/rule-sets/{rule_set_id}/delete

cloudpipeline:ruletemplate:update

√

√

更新策略

PUT /v2/{domain_id}/tenant/open-source/rule-sets/{rule_set_id}/switch

cloudpipeline:ruletemplate:update

√

√

扩展插件管理

表4 扩展插件管理

权限

对应API接口

授权项(Action)

IAM项目

(Project)

企业项目

(Enterprise Project)

更新扩展插件

POST /v1/{domain_id}/agent-plugin/create

cloudpipeline:extensions:update

√

√

更新扩展插件

POST /v1/{domain_id}/agent-plugin/create-draft

cloudpipeline:extensions:update

√

√

更新扩展插件

POST /v1/{domain_id}/publisher/create

cloudpipeline:extensions:update

√

√

更新扩展插件

POST /v1/{domain_id}/agent-plugin/edit-draft

cloudpipeline:extensions:update

√

√

更新扩展插件

POST /v1/{domain_id}/agent-plugin/publish-draft

cloudpipeline:extensions:update

√

√

更新扩展插件

POST /v1/{domain_id}/agent-plugin/update-info

cloudpipeline:extensions:update

√

√

更新扩展插件

POST /v1/{domain_id}/agent-plugin/publish-plugin

cloudpipeline:extensions:update

√

√

更新扩展插件

POST /v1/{domain_id}/agent-plugin/publish-plugin-bind

cloudpipeline:extensions:update

√

√

更新扩展插件

POST /v1/{domain_id}/common/upload-plugin-icon

cloudpipeline:extensions:update

√

√

更新扩展插件

POST /v1/{domain_id}/common/upload-publisher-icon

cloudpipeline:extensions:update

√

√

更新扩展插件

DELETE /v1/{domain_id}/agent-plugin/delete-draft

cloudpipeline:extensions:update

√

√

更新扩展插件

DELETE /v1/{domain_id}/publisher/delete

cloudpipeline:extensions:update

√

√

更新扩展插件

POST /v3/{domain_id}/extension/info/add

cloudpipeline:extensions:update

√

√

更新扩展插件

POST /v3/{domain_id}/extension/info/update

cloudpipeline:extensions:update

√

√

更新扩展插件

DELETE /v3/{domain_id}/extension/info/delete

cloudpipeline:extensions:update

√

√

更新扩展插件

POST /v3/{domain_id}/extension/upload

cloudpipeline:extensions:update

√

√

相关文档