Updated on 2024-10-16 GMT+08:00

Introduction

You can use Identity and Access Management (IAM) for fine-grained permissions management of your ServiceStage. If your Huawei Cloud account does not need individual IAM users, you can skip this section.

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 required permissions are determined by the actions supported by the API. Only users with the policies allowing for those 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

ServiceStage provides system-defined policies that can be directly used in IAM. You can also create custom policies to supplement system-defined policies for more refined access control. Operations supported by policies are specific to APIs. The following are common concepts related to policies:

  • Permissions: Defined by actions in a custom policy.
  • APIs: REST APIs that can be called by a user who has been granted specific permissions.
  • 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