|
ACL has been edited by Martin Ritchie (Nov 18, 2008). Content:v2 ACL file format for brokersThis new ACL implementation has been designed for implementation and interoperability on all Qpid brokers. It is currently supported in the following brokers:
Contents SpecificationNotes on file formats
user = [EMAIL PROTECTED]/realm]]
user-list = user1 user2 user3 ...
group-name-list = group1 group2 group3 ...
group <group-name> = [user-list] [group-name-list]
permission = [allow|allow-log|deny|deny-log]
action = ""
object = [virtualhost|queue|exchange|broker|link|route|method]
property = [name|durable|owner|routingkey|passive|autodelete|exclusive|type|alternate|queuename|schemapackage|schemaclass]
acl permission {<group-name>|<user-name>|"all"} {action|"all"} [object|"all"] [property=<property-value>]
Example file: # Some groups
group admin [EMAIL PROTECTED] [EMAIL PROTECTED]
group user-consume [EMAIL PROTECTED] [EMAIL PROTECTED]
group group2 [EMAIL PROTECTED] user-consume [EMAIL PROTECTED]
group publisher group2 \
[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
# Some rules
acl allow [EMAIL PROTECTED] create exchange name=carl.*
acl deny [EMAIL PROTECTED] create queue
acl allow [EMAIL PROTECTED] bind exchange name=amq.topic routingkey=stocks.ibm.# owner=self
acl allow user-consume create queue name=tmp.*
acl allow publisher publish all durable=false
acl allow publisher create queue name=RequestQueue
acl allow consumer consume queue durable=true
acl allow [EMAIL PROTECTED] create all
acl allow [EMAIL PROTECTED] all queue
acl allow admin all
acl deny [EMAIL PROTECTED] all
acl allow all consume queue owner=self
acl allow all bind exchange owner=self
# Last (default) rule
acl deny all all
Design DocumentationMapping of ACL traps to action and typeThe C++ broker maps the ACL traps in the follow way for AMQP 0-10:
Management actions that are not explicitly given a name property it will default the name property to management method name, if the action is 'W' Action will be 'Update', if 'R' Action will be 'Access'. for example, if the mgnt method 'joinCluster' was not mapped in schema it will be mapped in ACL file as follows
v2 ACL User GuideWriting Good/Fast ACLThe file gets read top down and rule get passed based on the first match. In the following example the first rule is a dead rule. I.e. the second rule is wider than the first rule. DON'T do this, it will force extra analysis, worst case if the parser does not kill the dead rule you might get a false deny. allow [EMAIL PROTECTED] create queue name=tmp <-- dead rule!! allow [EMAIL PROTECTED] create queue deny all all By default files end with deny all all the mode of the ACL engine can be swapped to be allow based by putting the following at the end of the file allow all all Note that 'allow' based file will be a LOT faster for message transfer. This is because the AMQP specification does not allow for creating subscribes on publish, so the ACL is executed on every message transfer. Also, ACL's rules using less properties on publish will in general be faster. Getting ACL to LogIn order to get log messages from ACL actions use allow-log and deny-log for example allow-log [EMAIL PROTECTED] all all deny-log [EMAIL PROTECTED] all all User Id / domains running with C++ brokerThe user-id used for ACL is taken from the connection user-id. Thus in order to use ACL the broker authentication has to be setup. i.e. (if --auth no is used in combination with ACL the broker will deny everything) The user id in the ACL file is of the form <user-id>@<domain> The Domain is configured via the SASL configuration for the broker, and the domain/realm for qpidd is set using --realm and default to 'QPID'. To load the ACL module use, load the acl module cmd line or via the config file ./src/qpidd --load-module src/.libs/acl.so The ACL plugin provides the following option '--acl-file'. If do ACL file is supplied the broker will not enforce ACL. If an ACL file name is supplied, and the file does not exist or is invalid the broker will not start. ACL Options: --acl-file FILE The policy file to load from, loaded from data dir |
Unsubscribe or edit your notifications preferences
