Password salt is generated and applied when a user is created with a password.
HTTP API requries you to specify a password *hash*. When a hash is specified, it is used
as is:
https://github.com/rabbitmq/rabbitmq-management/blob/master/src/rabbit_mgmt_wm_user.erl#L155
Therefore you only need to compute a SHA-256 hash assuming you use a 3.6.x node and haven't altered the
hashing function.
> On the api to create users(/api/users/
> *name), the documentation says:*To PUT a user, you will need a body looking
> something like this:
>
> {"password":"secret","tags":"administrator"}
>
> or:
>
> {"password_hash":"2lmoth8l4H0DViLaK9Fxi6l9ds8=", "tags":"administrator"}
>
> The tags key is mandatory. Either password or password_hash must be set.
>
> So my question is if I wanted to send a HTTP API request to create a new
> user and I want to use the password_hash parameter(as opposed to the
> password parameter) how would I generate the hash.
>
> As an example lets say I want to create a user called mynewuser with
> password called strongpassword
>
> curl -X PUT -i -u guest:guest -H 'Content-Type: application/json' -d
> '{"password_hash":"", "tags":"administrator"}'
>
http://localhost:15672/api/users/mynewuser
>
> How would I generate the value of so that it is the hash
> > > To post to this group, send an email to
rabbitm...@googlegroups.com