Creating a Custom Policy

Custom policies can be created as a supplement to the system policies of ServiceStage.

You can create custom policies in either of the following ways:

  • Visual editor: Select cloud services, actions, resources, and request conditions. This does not require knowledge of policy syntax.
  • JSON: Edit JSON policies from scratch or based on an existing policy.

For details, see Creating a Custom Policy. The following section contains examples of common ServiceStage custom policies.

Example Custom Policies

This procedure creates a policy that an IAM user is prohibited to create and modify a microservice engine.
{
        "Version": "1.1",
        "Statement": [
                {
                        "Action": [
                                "cse:*:*"
                        ],
                        "Effect": "Allow"
                },
                {
                        "Action": [
                                "cse:engine:create",
                                "cse:engine:delete"
                        ],
                        "Effect": "Deny"
                }
        ]
}

A deny policy must be used in conjunction with other policies to take effect. If the permissions assigned to a user contain both "Allow" and "Deny", the "Deny" permissions take precedence over the "Allow" permissions.

After authorization, users in the group can verify their permissions using the console or REST APIs.

The following are the steps to be performed on the console.

  1. Log in to HUAWEI CLOUD as an IAM user.
    • The account name is the name of the HUAWEI CLOUD account that created the IAM user.
    • The username and password are those set by the account when creating the IAM user.
  2. On the ServiceStage console, choose Infrastructure > Cloud Service Engines, and buy a microservice engine. If error 403 is returned, the permissions are correct and have already taken effect.