|
Page Edited :
qpid :
Java XML ACLs
Java XML ACLs has been edited by Martin Ritchie (Nov 18, 2008). Change summary: Updated PUBLISH section Java XML ACLsThis page documents version 1 of Qpid ACLs that was implemented only in the Java broker. SpecificationThe XML ACL focus was to take to business style focus to access rather than the individual AMQP method level.
XML FormatUser Guide (SimpleXML)The XML ACLs have been implemented as per the ACLPlugin Permission LimitationsOnly the first three permissions, CONSUME, PUBLISH and CREATE have been implemented. An oversight in the original design resulted in the inability to specify negative permissions. As a result permission can only be granted to users and not taken away. Enabling XML ACLsTo enable the ACLs the security access class in the main broker configuration needs to be updated as follows: ...
<security>
<access>
<class>org.apache.qpid.server.security.access.plugins.SimpleXML</class>
</access>
...
Here the 'client' users is only give rights to PUBLISH messages using the key 'example.RequestQueue'. Whilst not shown here multiple <user> values can be specified in the <users> section. Remember that the routing_key value in the Java broker is the same as the queue name (correct at release of M4) for the amq.direct exchange. For topic exchanges the routing_key is the topic name that a Publisher uses to send messages. <publish>
<exchanges>
<exchange>
<!-- This is the name of the exchange to limit publication to. -->
<name>amq.direct</name>
<routing_keys>
<!-- Allow clients to publish requests -->
<routing_key>
<value>example.RequestQueue</value>
<users>
<user>client</user>
</users>
</routing_key>
<!-- Allow the processor to respond to a client on their Temporary Topic -->
<routing_key>
<value>tmp_*</value>
<users>
<user>server</user>
</users>
</routing_key>
<routing_key>
<value>TempQueue*</value>
<users>
<user>server</user>
</users>
</routing_key>
</routing_keys>
</exchange>
</exchanges>
</publish>
CONSUME SectionThis section allows the granting of permissions to Consumers. <!-- This section grants users the ability to consume from the broker -->
<consume>
<queues>
<!-- Allow the clients to consume from their temporary queues-->
<queue>
<temporary/>
<users>
<user>client</user>
</users>
</queue>
<!-- Only allow the server to consume from the Request Queue-->
<queue>
<name>example.RequestQueue</name>
<users>
<user>server</user>
</users>
</queue>
</queues>
</consume>
CREATE Section<!-- This section grants clients the ability to create queues and exchanges -->
<create>
<queues>
<!-- Allow clients to create temporary queues-->
<queue>
<temporary/>
<exchanges>
<exchange>
<name>amq.direct</name>
<users>
<user>client</user>
</users>
</exchange>
</exchanges>
</queue>
<!-- Allow the server to create the Request Queue-->
<queue>
<name>example.RequestQueue</name>
<users>
<user>server</user>
</users>
</queue>
</queues>
</create>
Known Issues
|
Unsubscribe or edit your notifications preferences
