User management
The Kafka data bus is used to stream messages. To access the message queue in topics of the Kafka cluster must first create a user. The user is assigned roles that determine whether a user can read and post messages in a topic. You can assign a role to a user and grant access:
- for one topic;
- of a few prefix topics;
- of all the topics.
Create a user
- В control panels go to Cloud platform → Databases.
- Open the Database Cluster page → tab Users.
- Click Create a user.
- Enter a name and password. Save the password — it will not be stored in the control panel.
- Click Create.
Change user password
After the cluster is created, the user password can be changed. Remember to change the password in your application.
- В control panels go to Cloud platform → Databases.
- Open the cluster page → tab Users.
- On the menu. user select Change password.
- Enter or generate a new password and press Save.
User Roles
Users can have roles:
- consumer — receives and processes messages from the topic to which it has access;
- producer — sends messages to a topic to which he/she has access.
For more information, see the Apache Kafka documentation for concumer и producer.
Grant access to a user
-
В control panels go to Cloud platform → Databases.
-
Open the cluster page → tab Users.
-
On the menu. user select Customize accesses.
-
Select the type of access to tops:
- by prefix — to a number of tops united by a repeated part at the beginning of the name;
- by name — to a specific topic. Available only if there are created topics;
- all the tops.
-
If you have selected the access type by topic prefix, in the field Significance enter the prefix.
-
If you have selected the access type by topic name, in the field Significance select a topic name.
-
Select user role. You can assign one or two roles to a user.
-
Click .
-
To grant multiple accesses to a user, press Add access and repeat steps 4-8.
Change user access
You can only change the role in the access string. If you need to change the access type or value, delete the access line you want to correct and add new access.
- В control panels go to Cloud platform → Databases.
- Open the cluster page → tab Users.
- On the menu. user select Customize accesses.
- To change the role, in the access bar, click .
- Change the role.
- Click .