|
ACL has been edited by Carl Trieloff (Aug 28, 2008). Content:ACL file format for brokers.Notes on file formats
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]
property = [name|durable|owner|routingkey|passive|autodelete|exclusive|type|alternate|queuename]
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 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
Writing 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/libqpidacl.so The ACL plugin supports two options: ACL Options:
--no-enforce-acl Do not enforce ACL
--acl-file FILE (policy.acl) The policy file to load from, loaded from data
dir
Mapping 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
|
Unsubscribe or edit your notifications preferences
