salt-formulas / salt-formula-rabbitmq

Other
4 stars 29 forks source link

The admin user isn't created with the correct password #12

Open simonpasquier opened 8 years ago

simonpasquier commented 8 years ago

I can't access the RabbitMQ admin API using the admin credentials while it's working with the guest creds.

# salt 'ctl01*' pillar.items rabbitmq
[snip]
        server:
            ----------
            admin:
                ----------
                name:
                    admin
                password:
                    workshop
[snip]
root@ctl01:~# /root/rabbitmqadmin --host=172.16.10.101 --username=guest --password=guest list users
+-----------+--------------------------------+--------------------------------------------------+--------------------------+
|   name    |       hashing_algorithm        |                  password_hash                   |           tags           |
+-----------+--------------------------------+--------------------------------------------------+--------------------------+
| admin     | rabbit_password_hashing_sha256 | wH2UxYjW8HGxAo5ZaUd4cG3Kl1dx5vfxpYfYw2gXSbSgS3my | management administrator |
| guest     | rabbit_password_hashing_sha256 | V2obX8gwcm6veIBsPt60LE1Hyum/kWuqA+/5OTtq2qn7fx4A | administrator            |
| openstack | rabbit_password_hashing_sha256 | 4MHEHvbOL1uvjxaxoloTgowBN7KndPn+BynUMHGwuHUgClCX |                          |
+-----------+--------------------------------+--------------------------------------------------+--------------------------+
root@ctl01:~# /root/rabbitmqadmin --host=172.16.10.101 --username=admin --password=workshop list users
*** Access refused: /api/users
root@ctl01:~# 
simonpasquier commented 8 years ago

@cznewt @fpytloun did you already know about this issue? do you think it is a bug in the upstream rabbitmq_user state?

simonpasquier commented 8 years ago

The problem is in the rabbitmq Salt module that doesn't handle properly a list of tags. See https://github.com/tcpcloud/salt-formula-rabbitmq/pull/21 for a temporary workaround. I'm going to file a bug againt Salt.