Configuring Kafka ACL Users
Kafka instances with ciphertext access enabled support access control list (ACL) for topics. You can differentiate user permissions by granting users different permissions in a topic.
This section describes how to create users, reset the password, modify user information, and delete users with ciphertext access enabled. For details about how to grant topic permissions for users, see Configuring Kafka Topic Permissions.
The maximum number of users that can be created for a Kafka instance is 20 or 500. Check the console for the actual limit.
There are two ways to create a user on the console. Accordingly, there are two ways to reset the user's password:
- Initial user: The user set when ciphertext access is enabled for the first time. If you forget your password, reset it by referring to Resetting the Password (for the Initial User).
- Non-initial users: Users created on the Users page. If you forget your password, reset it by referring to Resetting the User Password (for Non-initial Users).
Prerequisites
- Ciphertext access has been enabled for the Kafka instance.
- Kafka users can be configured only for Kafka instances in the Running state.
Constraints
- Single-node instances do not support user creation, user password reset, user information modification, or user deletion.
- Resetting a user password will interrupt services. Change the user password in the client configuration file or code as soon as possible.
Creating a User
- Log in to the console.
- Click in the upper left corner to select a region.
Select the region where your Kafka instance is located.
- Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
- Click the desired instance to go to the instance details page.
- On the Users page, click Create User.
- Set user information by referring to Configuring Kafka ACL Users.
Table 1 User creation parameters Parameter
Description
Username
The username used to access a Kafka instance, you can customize a name that complies with the rules: 4–64 characters; starts with a letter; can contain only letters, digits, hyphens (-), and underscores (_).
Password
The password used to access a Kafka instance. A password must meet the following requirements:
- Contains 8 to 32 characters.
- Contains at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters `~! @#$ %^&*()-_=+\|[{}];:'",<.>? and spaces, and cannot start with a hyphen (-).
- Cannot be the username spelled forward or backward.
Description
The description of a user. 0–200 characters.
- Click OK.
After the user is created, grant permissions to the user by referring to Configuring Kafka Topic Permissions.
Resetting the Password (for the Initial User)
- Log in to the console.
- Click in the upper left corner to select a region.
Select the region where your Kafka instance is located.
- Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
- Reset the password for the initial user in either of the following ways.
- Choose More > Reset Kafka Password in the row containing the desired Kafka instance.
- Click the desired Kafka instance to view its details. Choose More > Reset Kafka Password in the upper left corner.
- Click the desired Kafka instance to view its details. On the Basic Information page, click Reset Password next to Username in the Connection section.
- Click the desired Kafka instance to view its details. On the Users page, click Reset Password in the row containing the desired user.
- Enter and confirm a new password, and click OK.
- If the password is successfully reset, a success message is displayed.
- If the password fails to be reset, a failure message is displayed. In this case, reset the password again. If you still fail to reset the password after multiple attempts, contact customer service.
The system will display a success message only after the password is successfully reset on all brokers.
Resetting the User Password (for Non-initial Users)
- Log in to the console.
- Click in the upper left corner to select a region.
Select the region where your Kafka instance is located.
- Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
- Click the desired Kafka instance to view its details.
- On the Users page, click Reset Password in the row containing the desired user.
- Enter and confirm a new password, and click OK.
- If the password is successfully reset, a success message is displayed.
- If the password fails to be reset, a failure message is displayed. In this case, reset the password again. If you still fail to reset the password after multiple attempts, contact customer service.
The system will display a success message only after the password is successfully reset on all brokers.
Modifying User Information
- Log in to the console.
- Click in the upper left corner to select a region.
Select the region where your Kafka instance is located.
- Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
- Click the desired Kafka instance to view its details.
- In the navigation pane, choose Users.
- In the row containing the desired user, click Edit.
- Modify the description and click OK.
After the modification is successful, you can view the new description in the Description column.
Deleting a User
- Log in to the console.
- Click in the upper left corner to select a region.
Select the region where your Kafka instance is located.
- Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
- Click the desired Kafka instance to view its details.
- In the navigation pane, choose Users.
- Delete a user in either of the following ways:
- In the row containing the desired user, click Delete.
- Select one or more users and click Delete above the list.
The initial user set when ciphertext access is enabled for the first time cannot be deleted.
- In the displayed Delete User dialog box, click OK to delete the user.
Exporting the User List
- Log in to the console.
- Click in the upper left corner to select a region.
Select the region where your Kafka instance is located.
- Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
- Click the desired Kafka instance to view its details.
- In the navigation pane, choose Users.
- Export the user list in either of the following ways:
- Select the desired users and choose Export > Export selected data to an XLSX file to export specified users.
- Choose Export > Export all data to an XLSX file to export all users.
The initial user cannot be selected manually. To export the initial user, choose Export all data to an XLSX file.
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