Updated on 2024-06-14 GMT+08:00

Introduction

This chapter describes fine-grained permissions management for your ServiceStage. If your Huawei Cloud account does not need individual Identity and Access Management (IAM) users, then you may skip over this chapter.

By default, new IAM users do not have permissions assigned. You need to add a user to one or more groups, and attach permissions policies or roles to these groups. Users inherit permissions from the groups to which they are added and can perform specified operations on cloud services based on the permissions.

You can grant users permissions using roles and policies. Roles are a type of coarse-grained authorization mechanism that defines permissions related to user responsibilities. Policies define API-based permissions for operations on specific resources under certain conditions, allowing for more fine-grained, secure access control of cloud resources.

Policy-based authorization is recommended if you want to allow or deny the access to an API.

Your account has all the permissions required to call all APIs, but IAM users under your account must be assigned the required permissions. The permissions required for calling an API are determined by the actions supported by the API. Only users who have been granted permissions allowing the actions can call the API successfully. For example, if an IAM user wants to query metrics using an API, the user must have been granted permissions that allow the servicestage:app:get action.

Supported Actions

There are two kinds of policies: system-defined policies and custom policies. If the permissions preset in the system do not meet your requirements, you can create custom policies and apply these policies to user groups for refined access control. Operations supported by policies are specific to APIs. The following lists common concepts related to policies:

  • Permissions: Defined by actions in a custom policy.
  • APIs: REST APIs that can be called in a custom policy.
  • Actions: specific operations that are allowed or denied.
  • IAM projects/Enterprise projects: the authorization scope of a custom policy. A custom policy can be applied to IAM projects or enterprise projects or both. Policies that contain actions for both IAM and enterprise projects can be used and applied for both IAM and Enterprise Management. Policies that contain actions only for IAM projects can be used and applied to IAM only. Administrators can check whether an action supports IAM projects or enterprise projects in the action list. For details about the differences between IAM and enterprise projects, see What Are the Differences Between IAM and Enterprise Management?

ServiceStage supports the following actions in custom policies:

Table 1 ServiceStage actions

Permissions

APIs

Actions

IAM Projects

Enterprise Projects

Create an application

POST /v3/{project_id}/cas/applications

servicestage:app:create

Delete an application

DELETE /v3/{project_id}/cas/applications/{application_id}

servicestage:app:delete

Update an application

PUT /v3/{project_id}/cas/applications/{application_id}

servicestage:app:modify

Query applications

GET /v3/{project_id}/cas/applications

servicestage:app:list

Query application information

GET /v3/{project_id}/cas/applications/{application_id}

servicestage:app:get

Modify a project

-

servicestage:project:modify

Create a project

-

servicestage:project:create

Approve an application

-

servicestage:app:approve

View pipelines

-

servicestage:pipeline:list

Modify a build job

-

servicestage:assembling:modify

Approve a pipeline

-

servicestage:pipeline:review

Execute a pipeline

-

servicestage:pipeline:execute

View the build information

-

servicestage:project:get

Delete a build job

-

servicestage:assembling:delete

Delete a pipeline

-

servicestage:pipeline:delete

Delete a project

-

servicestage:project:delete

Modify a pipeline

-

servicestage:pipeline:modify

Create a build job

-

servicestage:assembling:create

View build jobs

-

servicestage:assembling:list

View the build information

-

servicestage:assembling:get

View projects

-

servicestage:project:list

View the pipeline information

-

servicestage:pipeline:get

Create a pipeline

-

servicestage:pipeline:create