You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by ParkiratBagga <pa...@gmail.com> on 2012/09/26 00:41:34 UTC

ACL not working properly?

Hi,

I have added a .acl file while starting qpid c++ 0.14 version.

Below are the contents of the file:
================================================
acl allow parkirat@COMPANY all all name=parkirat
acl deny all all
================================================

My server is running over the realm=COMPANY

When, I run the following command:
qpid-config -a parkirat/parkirat@localhost:5432 add queue parkirat

I get the following error:
================================================
Failed: SessionException: ExecutionException(error_code=403,
command_id=serial(0), class_code=8, command_code=1, field_index=0,
description=u'unauthorized-access: ACL denied queue create request from
parkirat@COMPANY (qpid/broker/Broker.cpp:894)', error_info={}, channel=1,
id=serial(0))
================================================

Can you please tell, if I have missed something here. I believe the acl
implementation has changed in 0.16. But I am using 0.14 c++ broker. 

Also, I think qpid tools uses qmf2, so Is the above request trying to make
some temporary queue in which it aspects the reply message from the qmf2
protocol?
If this is the case then how should I implement the above rule?

Regards,
Parkirat Singh Bagga



--
View this message in context: http://qpid.2158936.n2.nabble.com/ACL-not-working-properly-tp7582621.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: ACL not working properly?

Posted by ParkiratBagga <pa...@gmail.com>.
Thanks Gordan.

Your proposed solution is working. You Rock!!!

Regards,
Parkirat Singh Bagga.



--
View this message in context: http://qpid.2158936.n2.nabble.com/ACL-not-working-properly-tp7582621p7582637.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: ACL not working properly?

Posted by Gordon Sim <gs...@redhat.com>.
On 09/25/2012 11:41 PM, ParkiratBagga wrote:
> Hi,
>
> I have added a .acl file while starting qpid c++ 0.14 version.
>
> Below are the contents of the file:
> ================================================
> acl allow parkirat@COMPANY all all name=parkirat
> acl deny all all
> ================================================
>
> My server is running over the realm=COMPANY
>
> When, I run the following command:
> qpid-config -a parkirat/parkirat@localhost:5432 add queue parkirat
>
> I get the following error:
> ================================================
> Failed: SessionException: ExecutionException(error_code=403,
> command_id=serial(0), class_code=8, command_code=1, field_index=0,
> description=u'unauthorized-access: ACL denied queue create request from
> parkirat@COMPANY (qpid/broker/Broker.cpp:894)', error_info={}, channel=1,
> id=serial(0))
> ================================================
>
> Can you please tell, if I have missed something here. I believe the acl
> implementation has changed in 0.16. But I am using 0.14 c++ broker.
>
> Also, I think qpid tools uses qmf2, so Is the above request trying to make
> some temporary queue in which it aspects the reply message from the qmf2
> protocol?

Yes, the qmf tools themselves need permission for several of their 
tasks. So users that are allowed to use those tools need expanded 
privileges. Unfortunately this depends on the version of the tool in use 
as well.

> If this is the case then how should I implement the above rule?

The only way is through painful trial and error. For example, with 
v0.14 of qpid-config, I got it down to the following rules (replace 
username and HOSTNAME as appropriate):

acl allow username@QPID all all name=username

acl allow username@QPID create queue name=reply-HOSTNAME.* 
exclusive=true autodelete=true
acl allow username@QPID consume queue name=reply-HOSTNAME.*
acl allow username@QPID bind exchange name=amq.direct 
routingkey=reply-HOSTNAME.*

acl allow username@QPID create queue name=topic-HOSTNAME.* 
exclusive=true autodelete=true
acl allow username@QPID consume queue name=topic-HOSTNAME.*
acl allow username@QPID bind exchange name=qpid.management 
routingkey=schema.#
acl allow username@QPID bind exchange name=qpid.management 
routingkey=console.obj.*.*.org.apache.qpid.broker.agent
acl allow username@QPID bind exchange name=qpid.management 
routingkey=console.event.*.*.org.apache.qpid.broker.agent

acl allow username@QPID create queue name=qmfc-v2-HOSTNAME.* 
exclusive=true autodelete=true
acl allow username@QPID consume queue name=qmfc-v2-HOSTNAME.*
acl allow username@QPID bind exchange name=qmf.default.direct 
routingkey=qmfc-v2-HOSTNAME.*

acl allow username@QPID create queue name=qmfc-v2-ui-HOSTNAME.* 
exclusive=true autodelete=true
acl allow username@QPID consume queue name=qmfc-v2-ui-HOSTNAME.*

acl allow username@QPID create queue name=qmfc-v2-hb-HOSTNAME.* 
exclusive=true autodelete=true
acl allow username@QPID consume queue name=qmfc-v2-hb-HOSTNAME.*
acl allow username@QPID bind exchange name=qmf.default.topic 
routingkey=agent.ind.heartbeat.#

acl allow username@QPID publish exchange name=qpid.management 
routingkey=broker
acl allow username@QPID publish exchange name=qmf.default.topic 
routingkey=console.request.agent_locate
acl allow username@QPID publish exchange name=qmf.default.direct 
routingkey=broker

acl allow username@QPID access exchange name=qmf.default.direct
acl allow username@QPID access exchange name=qmf.default.topic

acl deny all all

The bad news is this will likely change a little when you upgrade.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: ACL not working properly?

Posted by ParkiratBagga <pa...@gmail.com>.
Hi Paul,

Thanks for replying.

I tried your suggestion but -b option is for binding(-b, --bindings     
Show bindings in queue or exchange list) in qpid-config.

It did not work out for me.

I am using 0.14 version of c++ broker. Which version are you using?
Anymore suggestions which may be helpful?

Regards,
Parkirat Singh Bagga.



--
View this message in context: http://qpid.2158936.n2.nabble.com/ACL-not-working-properly-tp7582621p7582633.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: ACL not working properly?

Posted by Paul Colby <pa...@colby.id.au>.
Hi Parkirat,

I'm not sure if this is your issue, but when specifying the broker for
qpid-config 0.16, I use the "-b" flag, not "-a".

eg: qpid-config -b amqps://parkirat/parkirat@localhost

Of course, that flag may have changed for the version your running, and you
might want to drop the "amps" bit if you're not running SSL.

Hope that helps...

pc
----
http://colby.id.au


On Wed, Sep 26, 2012 at 8:41 AM, ParkiratBagga <pa...@gmail.com>wrote:

> Hi,
>
> I have added a .acl file while starting qpid c++ 0.14 version.
>
> Below are the contents of the file:
> ================================================
> acl allow parkirat@COMPANY all all name=parkirat
> acl deny all all
> ================================================
>
> My server is running over the realm=COMPANY
>
> When, I run the following command:
> qpid-config -a parkirat/parkirat@localhost:5432 add queue parkirat
>
> I get the following error:
> ================================================
> Failed: SessionException: ExecutionException(error_code=403,
> command_id=serial(0), class_code=8, command_code=1, field_index=0,
> description=u'unauthorized-access: ACL denied queue create request from
> parkirat@COMPANY (qpid/broker/Broker.cpp:894)', error_info={}, channel=1,
> id=serial(0))
> ================================================
>
> Can you please tell, if I have missed something here. I believe the acl
> implementation has changed in 0.16. But I am using 0.14 c++ broker.
>
> Also, I think qpid tools uses qmf2, so Is the above request trying to make
> some temporary queue in which it aspects the reply message from the qmf2
> protocol?
> If this is the case then how should I implement the above rule?
>
> Regards,
> Parkirat Singh Bagga
>
>
>
> --
> View this message in context:
> http://qpid.2158936.n2.nabble.com/ACL-not-working-properly-tp7582621.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>