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

Simon MacMullen simon at rabbitmq.com
Thu Mar 7 15:20:18 GMT 2013


My suspicion is that your web server is not giving the result you think 
it is. What does 
http://127.0.0.1:84/auth/vhost.php?username=user&vhost=%2f return?

Really rabbitmq-auth-backend-http needs a debug mode like 
rabbitmq-auth-backend-ldap does. I will probably add one soon, now that 
you've reminded me it is necessary. In the mean time, you could 
uncomment line 92 of rabbit_auth_backend_http.erl to get it to display 
(on standard output) the HTTP requests it is making.

Cheers, Simon

On 07/03/13 10:10, AlexanderN wrote:
> Hello.
>
> rabbitmq-auth-backend-http receiving "allow *" from web-server, but
> authorization is not successful.
>   In log written:
>   closing AMQP connection (127.0.0.1:34028 -> 127.0.0.1:5672):
>   {handshake_error,opening,0,
>   {amqp_error,access_refused,
>   "access to vhost 'vhost_name' refused for user 'user_name'",
>   'connection.open'}}
>
> Plugin sending HTTP-request to user_path URI only.
>
> I have this problem in Debian 7 only, but in Debian 6 all OK.
>
> Server configuration:
> Used "wheezy" x86_64 distribution of Debian GNU/Linux operation system. It's
> testing distribution.
> On server with current stable distrubution "squeeze" I have not the problem.
>
> /etc/rabbitmq/enabled-plugins file content
> [rabbitmq_auth_backend_http,rabbitmq_management].
>
> /etc/rabbitmq/rabbitmq.config file content
> [
>   {rabbit, [{auth_backends, [rabbit_auth_backend_http]}]},
>   {rabbitmq_auth_backend_http,
>   [{user_path, "http://127.0.0.1:84/auth/user.php"},
>   {vhost_path, "http://127.0.0.1:84/auth/vhost.php"},
>   {resource_path, "http://127.0.0.1:84/auth/resource.php"}]}
> ].
>
>
> Used web-server nginx 1.2.1. Configuration of site:
>
> server {
>      listen   127.0.0.1:84; ## listen for ipv4
>      server_name  localhost;
>      access_log  /home/rabbitmq/log/access.log;
>      error_log   /home/rabbitmq/log/error.log;
>      charset off;
>      chunked_transfer_encoding off;
>      location ~ \.php$ {
>      root   /home/rabbitmq/htdocs;
>      include /etc/nginx/fastcgi_params;
>      fastcgi_intercept_errors off;
>      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
>      fastcgi_pass php_unix;
>      }
>      location / {
>      root   /home/rabbitmq/htdocs;
>      index  index.php;
>      }
> }
>
> In nginx log written:
> 127.0.0.1 - - [07/Mar/2013:12:07:35 +0400] "GET
> /auth/user.php?username=user&password=pass HTTP/1.0" 200 7 "-" "-"
>
> HTTP-response:
> HTTP/1.1 200 OK
> Server: nginx
> Date: Thu, 07 Mar 2013 08:07:35 GMT
> Content-Type: text/html; charset=UTF-8
> Connection: close
> X-Powered-By: PHP/5.4.4-13
>
> allow *
>
>
>
> --
> 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-tp25308.html
> Sent from the RabbitMQ mailing list archive at Nabble.com.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>


-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list