Creating a User and Granting the Read-Only Permission to the User
Step 1: Create a User Group and Grant Permissions
Users in the same user group have the same permissions. Users created in IAM inherit permissions from the groups to which they belong. Users created in IAM inherit permissions from the groups they belong to. To create a user group, perform the following steps:
- Log in to Huawei Cloud using your Huawei account. Select HUAWEI ID login.
Figure 1 HUAWEI ID Login
- On the management console, click the username in the upper right corner and then choose Identity and Access Management.
Figure 2 Choosing IAM
- On the IAM console, choose User Groups in the navigation pane. Then click Create User Group.
Figure 3 User group
- Enter a user group name (for example, test_01), set the password, and click OK.
The user group is then displayed in the user group list.
- In the user group list, choose Authorize in the row that contains the test_01 user group.
- Select Document Database Service from the drop-down list, select DDS ReadOnlyAccess, and click Next.
Figure 4 Authorization
- Specify the scope and click OK.
- All resources
- Region-specific projects: The selected permissions will be applied to resources in the region-specific projects you select.
Figure 5 Specifying the scope
Step 2: Create an IAM User
IAM users can be created for employees or applications of an enterprise. Each IAM user has their own security credentials, and inherits permissions from the groups it is a member of. To create an IAM user, perform the following steps:
- On the IAM console, choose Users in the navigation pane. Then click Create User.
- Specify the user information on the Create User page. To create more users, click Add User. You can add a maximum of 10 users at a time.
Figure 6 Creating a user
- Username: Used for logging in to Huawei Cloud. For this example, enter James.
- Email Address: Email address bound to the IAM user. This parameter is mandatory if the access type is specified as Set by user.
- (Optional) Mobile Number: Mobile number bound to the IAM user.
- (Optional) Description: Description of the user.
- Configure required parameters and click Next.
Figure 7 Configuring user details
Table 1 Configuration items Parameter
Description
Access Type
- Programmatic access: Select this option to allow the user to access cloud services using development tools, such as APIs, CLI, and SDKs. You can generate an access key or set a password for the user.
- Management console access: Select this option to allow the user to access cloud services using the management console. You can set or generate a password for the user or request the user to set a password at first login.
Credential Type
- Access key: Download the access key after the user is created.
- Password: If you create multiple users, set a password for the users and determine whether to require the users to reset the password at first login. If you create one user, you can select Automatically generated and the system automatically generates a login password for the user.
Login Protection
To ensure account security, you are advised to select Enable. To enable or disable login protection for an IAM user after creation, see Login Protection.
- Add the users to user group created in 4 and click Create User.
Figure 8 Creating a user
- Check the created users in the user list. If you select Access key for Credential Type, you can download the access key after you create the user. You can also manage the Access Keys on the My Credentials page.
Figure 9 Viewing the results
Step 3: Log In and Verify Permissions
After the user is created, use the username and identity credential to log in to Huawei Cloud, and verify that the user has the permissions defined by the DDS ReadOnlyAccess policy.
- On the Huawei Cloud login page, click IAM User in the lower left corner.
Figure 10 IAM user login
- Enter the account name, username, and password, and click Log In.
- The account name is the name of the Huawei account that created the IAM user.
- The username and password are those set by the account when creating the IAM user.
If the login fails, contact the entity owning the account to verify the username and password. Alternatively, you can reset the password by following the procedure in Resetting Password for an IAM User.
- After successful login, switch to a region where the user has been granted permissions on the management console.
Figure 11 Region
- Choose Service List > Document Database Service. Then click Buy DB Instance on the DDS console. If a message appears indicating insufficient permissions to perform the operation, the DDS ReadOnlyAccess policy has already taken effect.
- Choose any other service in the Service List. If a message appears indicating insufficient permissions to access the service, the DDS ReadOnlyAccess policy has already taken effect.
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