ACL
Design Documentation
Mapping of ACL
traps to action and type
The C++ broker maps the ACL traps in the follow way for AMQP
0-10:
The Java broker currently only performs ACLs on the AMQP
connection not on management functions:
Mapping ACL Traps
Object
Action
Properties
Trap C++
Trap Java
Exchange
Create
name type alternate passive durable
ExchangeHandlerImpl::declare
ExchangeDeclareHandler
Exchange
Delete
name
ExchangeHandlerImpl::delete
ExchangeDeleteHandler
Exchange
Access
name
ExchangeHandlerImpl::query
Exchange
Bind
name routingkey queuename owner
ExchangeHandlerImpl::bind
QueueBindHandler
Exchange
Unbind
name routingkey
ExchangeHandlerImpl::unbind
ExchangeUnbindHandler
Exchange
Access
name queuename routingkey
ExchangeHandlerImpl::bound
Exchange
Publish
name routingKey
SemanticState::route
BasicPublishMethodHandler
Queue
Access
name
QueueHandlerImpl::query
Queue
Create
name alternate passive durable exclusive autodelete
QueueHandlerImpl::declare
QueueDeclareHandler
Queue
Purge
name
QueueHandlerImpl::purge
QueuePurgeHandler
Queue
Purge
name
Management::Queue::purge
Queue
Delete
name
QueueHandlerImpl::delete
QueueDeleteHandler
Queue
Consume
name (possibly add in future?)
MessageHandlerImpl::subscribe
BasicConsumeMethodHandler
BasicGetMethodHandler
<Object>
Update
ManagementProperty::set
<Object>
Access
ManagementProperty::read
Link
Create
Management::connect
Route
Create
Management:: -createFederationRoute-
Route
Delete
Management:: -deleteFederationRoute-
Virtualhost
Access
name
TBD
ConnectionOpenMethodHandler
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
Mapping Management Actions to ACL
Object
Action
Property
Broker
Update
name=joinCluster
v2 ACL User Guide
Writing Good/Fast ACL
The 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 peter@QPID create queue name=tmp <-- dead rule!!
allow peter@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 Log
In order to get log messages from ACL actions use allow-log and
deny-log for example
allow-log john@QPID all all
deny-log guest@QPID all all
User Id /
domains running with C++ broker
The 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