ACL has been edited by Martin Ritchie (Jan 27, 2009). 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 = userna...@domain[/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>] ValidationThe new ACL file format needs to perform validation on the acl rules. The validation should be performed depending on the set value: strict-acl-validation=none On validation of this acl the following checks would be expected: acl allow client publish routingkey=exampleQueue exchange=amq.direct
Each of these checks that fail will result in a log statement being generated. In the case of a fatal logging the full file will be validated before the broker shuts down. Example file:# Some Users user t...@qpid user mar...@qpid user k...@qpid user r...@qpid user t...@qpid user and...@qpid user deb...@qpid # Some groups group admin t...@qpid mar...@qpid group user-consume mar...@qpid t...@qpid group group2 k...@qpid user-consume r...@qpid group publisher group2 \ t...@qpid and...@qpid deb...@qpid # Some rules acl allow ca...@qpid create exchange name=carl.* acl deny r...@qpid create queue acl allow gu...@qpid 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 f...@qpid create all acl allow b...@qpid all queue acl allow admin all acl deny k...@qpid 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 pe...@qpid create queue name=tmp <-- dead rule!! allow pe...@qpid 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 j...@qpid all all deny-log gu...@qpid 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