Skip to main content
Version: Management Center 2.5

User Profile Edit

2.3
Premium


This page describes how to use the User Profile Edit feature that is provided by the Management Center for the Pro Edition of Eclipse Mosquitto (MMC).

info

User Profile Edit feature can be accessed by any authenticated user

info

This feature only affects users created by the Management Center itself. In case you are using the Single Sign-On feature, this feature will have no effect on the users coming from your Identity Provider.

User Profile Edit Overview

The User Profile Edit feature provides a way of editing the user's password using the web interface of the Mosquitto Management Center or a REST API. Also, by using the REST API endpoint, you can change the role of the user.

info

Note that this feature will not allow the root user (the user configured with environmental variables) to change their password.

Enable User Profile Edit Plugin

To enable the User Profile Edit feature, make sure you are using the Pro Edition of Mosquitto and that you have the feature enabled in your license. Also, ensure that your config file (specified with CEDALO_MC_PROXY_CONFIG environmental variable or by default saved in management-center/config/config.json) contains the following entry inside of the plugins array:

    {
"name": "user-profile-edit"
}

On start-up, the Management Center will print a message that the user-profile-edit plugin is enabled and loaded into the console:

Loaded plugin: "cedalo_user_profile" (Cedalo User Profile)

User Profile Edit Usage

To use this feature, you have to be authenticated as the user you are trying to update.

If you want to update the user's password from the web interface:

  • Go to the user profile page by clicking on the profile icon in the top right corner of the navigation bar

image

  • Click on the "Edit" button, enter a new password and confirm it, and then press "Save"

image

image

If you want to use a REST endpoint to edit the user, read the next section.

User Profile Edit REST API

info

Before sending an HTTP request make sure that you have been authenticated.

With User Profile Edit REST API you can change not only the password of the user but also their role in case user's role is an admin.

File your request to the following endpoint:

  • POST /api/profile/:userId - where userId is the username

Example of the body for the POST request:

{
"username": "your_username",
"password": "new_password",
"role": "editor"
}

Possible role values: admin, editor, viewer, connectionManager, monitoringViewer

Note that the username field is required.

Possible errors:

  • error code 404 with the following body of text/plain type: "Plugin Not Enabled"
  • error code 403 with the following body of text/plain type: "Not allowed"
  • error code 400 with the following body of text/plain type: "User object is invalid" or "User must have at least one role"