[rabbitmq-discuss] Plugin rabbitmq-auth-backend-http receiving "allow *" from web-server, but authorization is not successful.

AlexanderN napylov at mail.ru
Mon Mar 11 08:58:19 GMT 2013


rabbitmq-auth-backend-http don't sending request to
http://127.0.0.1:84/auth/vhost.php

For testing of script I use Wget for send request.
If user have access to vhost, vhost.php returning "allow", else it returning
"deny".

I uncomment line 92 of rabbit_auth_backend_http.erl.
On output written
Q: "http://127.0.0.1:84/auth/user.php?username=user&password=pass"


Then I add logging to line 83.

78            case Code of
79                200 -> case parse_resp(Body) of
80                           {error, _} = E -> E;
81                           Resp           -> Resp
82                       end,
83                       error_logger:error_msg("200!", Code, Body);
84                _   -> {error, {Code, Body}}
85
86            end;

In RabbitMQ log was written:

=ERROR REPORT==== 11-Mar-2013::12:08:21 ===
closing AMQP connection <0.297.0> (127.0.0.1:34533 -> 127.0.0.1:5672):
{handshake_error,starting,0,
    {error,undef,'connection.start_ok',
        [{error_logger,error_msg,["200!",200,"allow *"],[]},
         {rabbit_auth_backend_http,check_user_login,2,
             [{file,"src/rabbit_auth_backend_http.erl"},{line,37}]},
         {rabbit_access_control,'-check_user_login/2-fun-0-',4,[]},
         {lists,foldl,3,[{file,"lists.erl"},{line,1197}]},
         {rabbit_reader,auth_phase,2,[]},
         {rabbit_reader,handle_method0,3,[]},
         {rabbit_reader,handle_input,3,[]},
         {rabbit_reader,recvloop,2,[]}]}}




--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/Plugin-rabbitmq-auth-backend-http-receiving-allow-from-web-server-but-authorization-is-not-successfu-tp25308p25364.html
Sent from the RabbitMQ mailing list archive at Nabble.com.


More information about the rabbitmq-discuss mailing list