RabbitMQ 3.5.1 - Definitions.json - Password

2,227 views
Skip to first unread message

medley

unread,
May 5, 2015, 10:28:50 AM5/5/15
to rabbitm...@googlegroups.com
Hello,

I'm using a definitions.json file that i have declared in the rabbit.config file

{rabbitmq_management,
 
[%% Pre-Load schema definitions from the following JSON file. See
   
%% http://www.rabbitmq.com/management.html#load-definitions
   
%%
   
   
{load_definitions, "definitions.json"}
...
 



the definitions.json file looks like this :

{
   
"rabbit_version": "3.5.1",
   
"users": [
       
{
           
"name": "rabbitmq",
           
"password_hash": "aedb75dfc563674e1263316b01879722",
           
"tags": "administrator"
       
}
   
],
   
"vhosts": [
       
{
           
"name": "/"
       
}
   
],
   
"permissions": [
       
{
           
"user": "rabbitmq",
           
"vhost": "/",
           
"configure": ".*",
           
"write": ".*",
           
"read": ".*"
       
}
   
],

However, if I want to connect to the RabbitMQ Management web application, the login fails.

I think that it is a problem with the password hash. But which hash function should I use ?

Regards
medley







medley

unread,
May 5, 2015, 10:33:03 AM5/5/15
to rabbitm...@googlegroups.com


I tried with this. I replaced the attribute "password_hash" with the attribute "password
". This is working.

{
   
"rabbit_version": "3.5.1",
   
"users": [
       
{
           
"name": "rabbitmq",

           
"password": "rabbitmq",
           
"tags": "administrator"
       
}
   
],



But I would like to try with the attribute "password_hash"

Michael Klishin

unread,
May 5, 2015, 10:47:01 AM5/5/15
to rabbitm...@googlegroups.com, medley
On 5 May 2015 at 17:33:05, medley (khail....@gmail.com) wrote:
> But I would like to try with the attribute "password_hash"

You should be able to produce a hash with

rabbitmqctl eval 'binary_to_list(base64:encode(rabbit_auth_backend_internal:hash_password(<<"topsecret">>))).'
# => "bE7oUO2q4UmiUs/fs6okC0kJtBE="

The hashing function is MD5, with a salt. HTTP API requires the values to be
base64-encoded. 
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Reply all
Reply to author
Forward
0 new messages