Introduction

This chapter describes fine-grained permissions management for your ServiceStage. If your 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 by 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.

An account has all the permissions required to call all APIs, but IAM users 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.

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 by a user who has been granted specific permissions.
  • Actions: added to a custom policy to control permissions for specific operations.
  • Dependent actions: actions on which a specific action depends. When assigning permissions for the action to a user, you also need to assign permissions for the dependent actions.
  • IAM projects and enterprise projects: type of projects for which an action will take effect. Policies that contain actions supporting both IAM and enterprise projects can be assigned to user groups and take effect in both IAM and Enterprise Management. Policies that only contain actions supporting IAM projects can be assigned to user groups and only take effect for IAM. Such policies will not take effect if they are assigned to user groups in Enterprise Management. For details about the differences between IAM and enterprise projects, see What Are the Differences Between IAM and Enterprise Management?

√: supported; x: not supported

Table 1 ServiceStage actions

Permissions

APIs

Actions

IAM Project

Enterprise Project

Creating an application

POST /v2/{project_id}/cas/applications

servicestage:app:create

√

√

Deleting an application

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

servicestage:app:delete

√

√

Modifying an application

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

servicestage:app:modify

√

√

Querying an application list

GET /v2/{project_id}/cas/applications

servicestage:app:list

√

√

Querying application information

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

servicestage:app:get

√

√

Querying information about a microservice based on the service ID

GET /v4/{project_id}/registry/microservices/{serviceId}

cse:registry:get

√

√

Querying information about microservices that meet filter criteria

GET /v4/{project_id}/registry/microservices

cse:registry:get

√

√

Creating static information for a microservice before registering a microservice instance. The registered instance is associated with the static information based on the service ID.

POST /v4/{project_id}/registry/microservices

cse:registry:modify

√

√

Updating microservice fields after static information about the microservice is created

PUT /v4/{project_id}/registry/microservices/{serviceId}/properties

cse:registry:modify

√

√

Querying a microservice schema based on the service ID and schema ID

GET /v4/{project_id}/registry/microservices/{serviceId}/schemas/{schemaId}

cse:registry:get

√

√

Modifying a microservice schema based on the schema ID

PUT /v4/{project_id}/registry/microservices/{serviceId}/schemas/{schemaId}

cse:registry:modify

√

√

Creating a dependency between services

PUT /v4/{project_id}/registry/dependencies

cse:registry:modify

√

√

Querying all providers of a microservice based on the consumer ID

GET /v4/{project_id}/registry/microservices/{serviceId}/providers

cse:registry:get

√

√

Querying the unique service or schema ID of a microservice based on filter criteria

GET /v4/{project_id}/registry/existence

cse:registry:get

√

√

Registering a microservice instance after a microservice is created (Information about the instance must be provided during registration.)

POST /v4/{project_id}/registry/microservices/{serviceId}/instances

cse:registry:modify

√

√

Querying all instances of a microservice based on the service ID after the instances are registered

GET /v4/{project_id}/registry/microservices/{serviceId}/instances

cse:registry:get

√

√

Deregistering an instance based on the instance ID

DELETE /v4/{project_id}/registry/microservices/{serviceId}/instances/{instanceId}

cse:registry:modify

√

√

Querying details about an instance based on the service ID and instance ID after the instance is registered

GET /v4/{project_id}/registry/microservices/{serviceId}/instances/{instanceId}

cse:registry:get

√

√

Adding or updating the extended information about a microservice instance based on the instance ID after the instance is registered

PUT /v4/{project_id}/registry/microservices/{serviceId}/instances/{instanceId}/properties

cse:registry:modify

√

√

Changing the status of a microservice instance based on the instance ID after the instance is registered

PUT /v4/{project_id}/registry/microservices/{serviceId}/instances/{instanceId}/status

cse:registry:modify

√

√

Sending heartbeat information to the service center

PUT /v4/{project_id}/registry/microservices/{serviceId}/instances/{instanceId}/heartbeat

cse:registry:modify

√

√

Querying a microservice instance based on microservice version rules or field filter criteria after the instance is registered

GET /v4/{project_id}/registry/instances

cse:registry:get

√

√

Querying configurations in the configuration center

GET /v3/{project_id}/configuration/items

cse:config:get

√

√

Reporting service metrics to the dashboard

POST /v2/{project_id}/csemonitor/metric

cse:dashboard:modify

√

√

Reporting transaction data

POST /v2/{project_id}/csemonitor/transaction

cse:dashboard:modify

√

√

Deleting the definition and related information about a microservice, and deregistering all instances of the microservice

DELETE /v4/{project_id}/registry/microservices/{serviceId}

cse:registry:modify

√

√

Deleting the definitions and related information about microservices in batches, and deregistering all instances of the microservices

DELETE /v4/{project_id}/registry/microservices

cse:registry:modify

√

√

Querying microservice instances in batches based on microservice version rules or field filter criteria after the instances are registered

POST /v4/{project_id}/registry/instances/action

cse:registry:modify

√

√

Querying all schema information (including schemaId and summary) about a microservice

GET /v4/{project_id}/registry/microservices/{serviceId}/schemas

cse:registry:get

√

√