[rabbitmq-discuss] Virtual Hosts in the HTTP Auth Plugin

Simon MacMullen simon at rabbitmq.com
Mon Mar 28 16:07:57 BST 2011

On 27/03/11 02:04, Max Bridgewater wrote:
> I got the HTTP auth plugin working now.  I feel, however, that there
> is a bit of inconsistency in the way it works. To authenticate a user
> X with password Y in virtual host Z, it requires that Z be created
> using rabbitmqctl while it does not require the same for the user. The
> user is indeed authenticated against the HTTP server but only if the
> embedded authentication mechanism knows of the virtual host. I was
> under the impression that vhosts are only used for message scoping and
> access control and therefore, their management could also be
> delegated.

Hi Max.

The problem is that AMQP defines the default exchange and the "amq.xxx" 
exchanges to exist in every virtual host. We therefore need to create 
these when the vhost is created.

Alternatively we could create them automatically when a vhost is first 
accessed, but this then raises the question of when such vhosts ever go 

> At the bare minimum, maybe it would be worth mentioning to the plugin
> users that vhosts would need to be created in the traditional way.

Sure, I'll change the docs.

Cheers, Simon

Simon MacMullen
Staff Engineer, RabbitMQ
SpringSource, a division of VMware

More information about the rabbitmq-discuss mailing list