Permissions
You can use a HUAWEI ID, IAM user account, or federated user account to log in to the CodeArts Agent console. The operation permissions vary depending on the account you used to log in, the role of the account on the console, and the IAM permissions assigned to the account. For details, see Table 1.
| Login Account | User Identity | Role | IAM Permissions | Allowed Functions |
|---|---|---|---|---|
| HUAWEI ID | - | Enterprise administrator | Tenant Administrator, Security Administrator | All functions |
| IAM user account | Account root user | Enterprise administrator | Tenant Administrator, Security Administrator | All functions |
| IAM user who has the Tenant Administrator permissions | Enterprise administrator | Tenant Administrator | All functions except for the 30-day login-free function | |
| IAM user with no permission | None | None |
| |
| Federated user account | SSO user (in the IAM user group with the Tenant Administrator permissions) | Enterprise administrator | Tenant Administrator | All functions except for the 30-day login-free function |
| virtual user SSO (in the IAM user group without any permissions) | None | None |
| |
| IAM user SSO | Same as that of the associated IAM user. | Same as that of the associated IAM user. | Same as those of the associated IAM user. |
- CodeArts Agent has the following roles: tenant space owner, enterprise administrator, team administrator, and member. For details, see Members.
- By default, a HUAWEI ID account and its root user act as the enterprise administrator of CodeArts Agent and have the Tenant Administrator and Security Administrator permissions of IAM.
- By default, an IAM user with the Tenant Administrator permission acts as the enterprise administrator of CodeArts Agent.
- Federated enterprise users are classified into virtual user SSO and IAM user SSO based on the identity provider type. For details, see Application Scenarios of Virtual User SSO and IAM User SSO. The virtual user SSO permissions are determined by the mapping between the enterprise federated user and IAM user group in the identity conversion rule. The IAM user SSO permissions are determined by the actual permissions of the IAM user mapped to the enterprise federated user.
HUAWEI ID, IAM User, and Federated User
- HUAWEI ID: Registered when you use Huawei Cloud services for the first time. The account has full access permissions for your Huawei Cloud resources and makes payments for the use of these resources. Your account receives and pays all bills generated by your IAM users' use of resources.
- IAM user: created by your account. Each IAM user has their own identity credentials (password and access keys) and uses cloud resources based on assigned permissions. IAM users cannot make payments themselves (they do not have bills). You can use your registered account to pay for the resources they use.
- Federated users: registered with a third-party system that has established a trust relationship with Huawei Cloud. Users can log in to Huawei Cloud using third-party system accounts, like logging in to a gaming platform using their social networking service (SNS) accounts.
A HUAWEI ID and its IAM users have a parent-child relationship. The HUAWEI ID owns the resources and has full permissions for these resources. IAM users have only the resource usage permissions granted by that HUAWEI ID. IAM users enable fine-grained permission control when multiple users collaborate on the same account.
Fine-grained IAM permissions
Some operations on the CodeArts Agent console require the enterprise administrator role and corresponding IAM permissions. For details, see Table 2 and Table 3.
As there are two editions of the IAM console and the permissions are different, configure the permissions based on your actual IAM edition. You can configure the permissions to enable or disable the pay-per-use billing mode only on the IAM console instead of the IAM console (new edition).
For details about how to grant permissions to IAM users on the IAM console, see Creating a User Group and Assigning Permissions or Creating a User Group and Assigning Permissions (New Edition). For details about how to grant permissions to federated users, see Creating a User Group and Assigning Permissions.
After the permissions of a user group to which a federated user belongs are modified, the enterprise IdP must be restarted to make the modifications take effect.
| Operation | Fine-Grained Permissions |
|---|---|
| Purchasing a package |
|
| Modifying a package |
|
| Enabling or disabling the pay-per-use billing |
|
| Renewal |
|
| Modifying auto-renewal settings |
|
| Unsubscribing from a package |
|
| Creating a custom model | Tenant Administrator |
| Setting the monthly token quota for a built-in model | devcloud:monthlyPackage:listResourceDetail |
| Operation | Fine-Grained Permissions |
|---|---|
| Purchasing a package |
|
| Modifying a package |
|
| Renewal |
|
| Modifying auto-renewal settings |
|
| Unsubscribing from a package |
|
| Creating a custom model | Tenant Administrator |
| Setting the monthly token quota for a built-in model | codearts:monthlyPackage:listResourceDetail |
Example: Assigning Fine-grained Permissions to an IAM User
The following describes how to use a HUAWEI ID to assign the permissions to an IAM user on the IAM console, enabling the user to change the package and create a custom model.
- Log in to the IAM console using a HUAWEI ID.
- Create a custom policy and configure the policy required for changing a package.
- In the navigation tree on the left, choose Permissions > Policies/Roles. The Policies/Roles page is displayed.
- Click Create Custom Policy in the upper right corner.
- Set the custom policy by referring to Table 4.
Table 4 Custom policy parameters Parameter
Description
Policy Name
Enter a policy name. Only letters, digits, spaces, and the following special characters are allowed: -_.,
Policy View
Select JSON.
Policy Content
Copy and paste the following content:
{ "Version": "1.1", "Statement": [ { "Effect": "Allow", "Action": [ "devcloud:monthlyPackage:changeSpecification", "devcloud:monthlyPackage:listResourceDetail" ] }, { "Effect": "Allow", "Action": [ "bss:order:pay", "bss:order:view" ] } ] }Description
Optional. Enter a brief description for the policy.
Figure 2 Creating a custom policy
- Click OK. The custom policy is created.
On the Policies/Roles page, view the new policy.
- Add the IAM user to a user group. If the user has been added to a user group, skip this step and go to 4.
- In the navigation tree on the left, choose User Groups.
- Click Create User Group in the upper right corner.
- Set the user group name, and click OK.
The user group name consists of letters, digits, spaces, hyphens (-), and underscores (_).
- On the User Groups page, locate the target user group, and click Manage User in the Operation column.
- Select the target IAM user, and click OK.
- Assign the permissions of the custom policy to the user group.
- On the User Groups page, locate the target user group, and click Authorize in the Operation column.
- In the search box, enter the custom policy name configured in 2. Locate and select the policy. Click Next. Figure 3 Selecting the created custom policy
- Click OK. An information dialog box is displayed.
- Click OK. A message is displayed, indicating that the authorization is successful. Click Finish.
- Log in to the CodeArts Agent console using the IAM user account, and change the CodeArts Agent package.
- Log in to the IAM console using a HUAWEI ID.
- Add the IAM user to a user group. If the user has been added to a user group, skip this step and go to 3.
- In the navigation tree on the left, choose User Groups.
- Click Create User Group in the upper right corner.
- Set the user group name, and click OK.
The user group name consists of letters, digits, spaces, hyphens (-), and underscores (_).
- On the User Groups page, locate the target user group, and click Manage User in the Operation column.
- Select the target IAM user, and click OK.
- Assign the Tenant Administrator permissions to the user group.
- On the User Groups page, locate the target user group, and click Authorize in the Operation column.
- Search for Tenant Administrator in the search box. Locate and select the permissions. Click Next. Figure 4 Selecting the Tenant Administrator permissions
- Click OK. An information dialog box is displayed.
- Click OK. A message is displayed, indicating that the authorization is successful. Click Finish.
- Log in to the CodeArts Agent console using the IAM user account, and change the CodeArts Agent package.
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