[rabbitmq-discuss] Permissions for aliveness-test user

Matthias Radestock matthias at rabbitmq.com
Mon Nov 26 10:30:25 GMT 2012


Jean Paul,

On 26/11/12 10:10, Matthias Radestock wrote:
> On 26/11/12 10:06, Jean Paul Galea wrote:
>> Yes I am certain that this works:
>>
>>  >> rabbitmqctl set_permissions -p / monitoring '^aliveness-test|$'
>>  >> '^aliveness-test|$' '^aliveness-test|$'
>
> That's weird.

Ah, that's because that regexp is rather wrong and will in fact match 
anything. I think you meant ^(aliveness-test|)$'.

>> I created a user and assigned permissions as you described, but
>> authentication failed:
>>
>> rabbitmqctl add_user test test
>> rabbitmqctl set_permissions -p / test '^aliveness-test$'
>> '^amq\.default$' '^aliveness-test$'
>>
>> rabbitmqctl stop
>> rabbitmq-server -detached
>>
>> wget --header="Authorization: Basic dGVzdDp0ZXN0" --server-response -q
>> -O - -- 'http://127.0.0.1:15672/api/aliveness-test/%2F'
>>    HTTP/1.0 401 Unauthorized
>>    Server: MochiWeb/1.1 WebMachine/1.9.0 (someone had painted it blue)
>>    Date: Mon, 26 Nov 2012 09:58:31 GMT
>>    Content-Length: 51
>>
>>
>> Any ideas?
>
> Check the server logs.

Actually, you simply forgot to set the 'management' user tag:

rabbitmqctl set_user-tag test management


Regards,

Matthias.


More information about the rabbitmq-discuss mailing list