Using IAM Roles or Policies to Grant Access to COC
To manage the permissions for your Cloud Operations Center (COC), you can use IAM and refer to Permissions Management. With IAM, you can:
- Create IAM users for employees based on the organizational structure of your enterprise. Each IAM user has their own identity credentials for accessing COC resources.
- Grant only the minimum permissions required for users to perform a given task.
- Entrust a Huawei account or a cloud service to perform efficient O&M on your COC resources.
If your HUAWEI ID does not require individual IAM users, skip this section.
Figure 1 shows the process flow of role- and policy-based authorization.
Prerequisites
Before authorizing a user group, learn about the permissions supported by COC and select permissions based on your service requirements. For details, see Permissions Management. For the permissions of other services, see system-defined permissions supported by IAM.
Example Workflow
- Create a user group and assign permissions to it.
Create a user group on the IAM console, and assign the COC ReadOnlyAccessPolicy policy to the group.
- Create an IAM user and add it to the user group.
Create a user on the IAM console and add the user to the group created in 1.
- Log in and verify permissions.
Log in to the console as the created user, and verify the user's permissions in the authorized region by performing the following operations:
- Log in to COC. In the navigation pane, choose Task Management > To-Do Center. In the upper right corner of the displayed page, click Create. If a to-do task fails to be created (assuming that the current permission contains only COC ReadOnlyAccessPolicy), COC ReadOnlyAccessPolicy has taken effect.
- Log in to COC. In the navigation pane, choose Task Management > To-Do Center. In the upper right corner of the displayed page, click Create. If a to-do task can be created (assume that you have only the COC FullAccess permission), the COC FullAccess permission has been applied.
Examples of Custom Policies of COC
If the system-defined COC permissions do not meet your authorization requirements, create custom policies. For actions supported for custom policies, see Policies and Actions.
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: Create a JSON policy or edit an existing one.
For details, see Creating a Custom Policy. The following lists examples of common COC custom policies.
- Example 1: Authorize users to create O&M tasks.
{ "Version": "1.1", "Statement": [ { "Effect": "Allow", "Action": [ "coc:task:create" ] } ] } - Example 2: Grant permissions to deny document deletion.
A policy with only the Deny permissions must be used along with other policies to take effect. If the permissions granted to an IAM user contain both Allow and Deny, the Deny permissions take precedence over the Allow permissions.
Assume that you want to grant the permissions of the COC FullAccess policy to a user but want to prevent them from deleting documents. You can create a custom policy for denying document deletion, and attach both policies to the user. As an explicit deny in any policy overrides any allows, the user can perform all operations on COC resources except deleting documents. The following is an example of a deny policy:{ "Version": "1.1", "Statement": [ { "Effect": "Deny", "Action": [ "coc:document:delete" ] } ] } - Example 3: Create a custom policy containing multiple actions.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
