Change webUI admin user password when using mysql

Is there an easy way to edit the admin user for the web UI when using an existing mysql setup?

Relates to Apache Druid druid-0.16.1

Hi Mitch,

What do you want to edit about the admin user? Change the password?

If you mean changing the name of the admin user, what I’m understanding from the docs here is that it is a default user account and its permissions are fixed.

1 Like

Thanks for the reply. Yes I wanted to change the password.

I was able to get it figured out from the docs. Need to use the Rest API. I was able to make changes with curl. (using brackets for example users and ip addresses, etc).

These should be done against a “coordinator node”.
Get List of Users:
curl -u admin:[your password] http://:8081/druid-ext/basic-security/authentication/db/BasicAuthenticator/users

Create user:
curl -X POST -u admin:[your password] http://[your ip]:8081/druid-ext/basic-security/authentication/db/BasicAuthenticator/users/[your user]

Set password:
curl -X POST -u admin:[your password] -H “Content-Type: application/json” -d ‘{“password”: “[your new password]”}’ http://[your ip]:8081/druid-ext/basic-security/authentication/db/BasicAuthenticator/users/[your user]/credentials

Delete a user:
curl -X DELETE -u admin: http://[your ip]:8081/druid-ext/basic-security/authentication/db/BasicAuthenticator/users/[your user]

1 Like