Hi,�<div><br></div><div>Wouldn&#39;t it be enough to have only write permission to write to exchange, provided I do passive mode,�</div><div><br></div><div>Here is example ruby script I expected to work but it doesn&#39;t.</div>
<div><br></div><div>prep with�</div><div>gem install bunny</div><div>gem install rspec</div><div><br></div><div>run with</div><div><br></div><div>rspec test.rb</div><div><br></div><div><br></div><div>test.rb:</div><div>--------------------------------------------------------------</div>
<div><div>require &#39;bunny&#39;</div><div>system &quot;sudo rabbitmqctl add_vhost /x&quot;</div><div>system &quot;sudo rabbitmqctl add_user writer 123&quot;</div><div># with this it works</div><div># system &quot;sudo rabbitmqctl set_permissions -p /x writer &#39;.*&#39; &#39;.*&#39; �&#39;foo&#39;&quot;</div>
<div># with this it doesn&#39;t</div><div>system &quot;sudo rabbitmqctl set_permissions -p /x writer &#39;foo&#39; &#39;.*&#39; �&#39;foo&#39;&quot;</div><div>system &quot;sudo rabbitmqctl add_user admin 321&quot;</div><div>
system &quot;sudo rabbitmqctl set_permissions -p /x admin &#39;.*&#39; &#39;.*&#39; �&#39;.*&#39;&quot;</div><div><br></div><div>describe &quot;wonderful bunny permission tests&quot; do</div><div>� it &quot;should only push&quot; do</div>
<div><br></div><div><br></div><div>� � @admin = Bunny.new(:host =&gt; &#39;localhost&#39;,:vhost=&gt; &quot;/x&quot;, :port =&gt; 5672,:user=&gt;&quot;admin&quot;,:pass=&gt; &quot;321&quot; )</div><div>� � @admin.start</div>
<div><br></div><div>� � # create/get queue</div><div>� � q = @admin.queue(&#39;myqueue&#39;)</div><div><br></div><div>� � # create/get exchange</div><div>� � exchange = @admin.exchange(&quot;myexchange&quot;,:type =&gt; :topic,:durable =&gt; true)</div>
<div><br></div><div>� � # bind queue to exchange</div><div>� � q.bind(exchange,:key =&gt; &quot;#&quot;)</div><div><br></div><div>� � ##############################</div><div>� � @writer = �Bunny.new(:host =&gt; &#39;localhost&#39;,:vhost=&gt; &quot;/x&quot;, :port =&gt; 5672,:user=&gt;&quot;writer&quot;,:pass=&gt; &quot;123&quot;,:logging=&gt;true )</div>
<div>� � @writer.start</div><div>� � e = @writer.exchange(&quot;myexchange&quot;, :passive =&gt; true)</div><div>� � e.publish &quot;yo&quot;</div><div><br></div><div>� � q.pop[:payload].should == &quot;yo&quot;</div><div>
� end</div><div><br></div><div>end</div></div><div><br></div><div>And reply is:</div><div><div>I, [2012-02-13 14:50:54#16707] �INFO -- send: #&lt;Qrack::Transport::Method:0x7fd6f3cee0d8 @payload=#&lt;Qrack::Protocol::Exchange::Declare:0x7fd6f3cee5d8 @auto_delete=nil, @durable=nil, @passive=true, @nowait=nil, @type=:direct, @exchange=&quot;myexchange&quot;, @arguments=nil, @internal=nil, @ticket=1&gt;, @channel=1&gt;</div>
<div>I, [2012-02-13 14:50:54#16707] �INFO -- received: #&lt;Qrack::Transport::Method:0x7fd6f3ceb540 @payload=#&lt;Qrack::Protocol::Channel::Close:0x7fd6f3ceb400 @method_id=10, @class_id=40, @reply_text=&quot;ACCESS_REFUSED - access to exchange &#39;myexchange&#39; in vhost &#39;/x&#39; refused for user &#39;writer&#39;&quot;, @reply_code=403&gt;, @channel=1&gt;</div>
<div><br></div></div><div><br></div><div>Why do I still need config permission, although I opened exchange with passive option.</div><div><br></div><div>Rubycut</div><div><br></div><div><br></div><div><br></div>