How to add new Control center user
This article explains how to add a new Control Center user when using realm as SQL/Postgres.
Instructions
Please follow the steps below in your SQL/Postgres terminal to add a new CC user with super admin access:
Check for Existing User:
Execute the following command to verify if the required user already exists in thecc_users
table:select * from cc_users;
If the user does not exist, please create the user using an
INSERT
statement generated using the helper tool. Please check here for documentation.cd. /opt/hivemq/extensions/hivemq-enterprise-security-extension/helper/linux ./hivemq-ese-helper db create control-center-user new_cc_user new_password"
or
cd /opt/hivemq/extensions/hivemq-enterprise-security-extension/helper/jvm java -jar hivemq-ese-helper.jar db create control-center-user ain-sw_usr "H};cMYqq%6q2aj"
Copy that statement and execute it in the SQL/Postgres terminal.
Confirm User Addition:
Verify that the user has been successfully added to the database by checking thecc_users
table again. Copy theuser_id
, as it will be needed in later steps.Check for Super Admin Role:
Check thecc_roles
table to confirm that a super admin role exists in the database, and copy therole_id
of the super admin role:Verify User Roles:
Check thecc_user_roles
table to see if the combination ofuser_id
(from Step 2) androle_id
(from Step 3) already exists:Add User Role:
If no entry is found, add the user role using the followingINSERT
statement, substituting the appropriateuser_id
androle_id
:Final Verification:
Verify that the entry has been successfully added to thecc_user_roles
table. If confirmed, start HiveMQ and attempt to log in with the newly added user in the Control Center.
Please note that roles and permissions are cached for the day, so you will not be able to log in immediately using the newly added user. For immediate effect, you can restart the extension as well.