Skip to main content

Managing Kafka users

The Kafka data bus is used for streaming messages. To access the message queue in topics of a Kafka cluster, you must first create a user. Users are assigned roles that define whether a user can read or send messages to a topic. You can assign a role to a user and grant access:

  • for a single topic;
  • multiple topics by prefix;
  • all topics.

Create a user

  1. In the Dashboard, on the top menu, click Products and select Managed Databases.
  2. Open the Active tab.
  3. Open the database cluster page → Users tab.
  4. Click Create User.
  5. Enter a username and password. Save the password — it will not be stored in the dashboard.
  6. Click Create.

Change user password

After the cluster is created, the user password can be changed. Do not forget to update the password in your application.

  1. In the Dashboard, on the top menu, click Products and select Managed Databases.
  2. Open the Active tab.
  3. Open the cluster page → Users tab.
  4. In the user menu, select Change password.
  5. Enter or generate a new password and click Save.

User roles

Users can have the following roles:

  • consumer — receives and processes messages from a topic to which they have access;
  • producer — sends messages to a topic to which they have access.

Learn more in the Apache Kafka documentation for consumers and producers.

Grant access to a user

  1. In the Dashboard, on the top menu, click Products and select Managed Databases.

  2. Open the Active tab.

  3. Open the cluster page → Users tab.

  4. In the user menu, select Configure access.

  5. Choose the topic access type:

    • by prefix — to multiple topics identified by a repeating start of their name;
    • by name — to a specific topic. Available only if topics have been created;
    • all topics.
  6. If you selected access by topic prefix, enter the prefix in the Value field.

  7. If you selected access by topic name, select the topic name in the Value field.

  8. Select a user role. You can assign one or two roles to a user.

  9. Click .

  10. To grant a user multiple access rules, click Add access and repeat steps 5-9.

Change user access

You can only change the role in an access row. If you need to change the access type or value, delete the access row that needs correction and add new access.

  1. In the Dashboard, on the top menu, click Products and select Managed Databases.
  2. Open the Active tab.
  3. Open the cluster page → Users tab.
  4. In the user menu, select Configure access.
  5. To change the role, in the access row click .
  6. Change the role.
  7. Click .