andrew acl proposalPage added by Rajith AttapattuDRAFTACL ImplementationUse Cases
Plugin interactionThe plugins can return four different values - ALLOWED, DENIED, ABSTAIN and DEFER. Since we can have two plugins of the same type looking at a particular access request, one for the virtual host and the other for global, the reults ineract as follows:
The host and global entries in the Result column indicate that the default answer for that plugin should be returned. ACL FileThe access control file consists of a series of rules, describing the permissions granted to users or groups for operations on object types, with specific properties. these are all restricted to certain values, as illustrated by the following lists of tokens: PermissionALLOW, ALLOW_LOG, DENY, DENY_LOG OperationALL, CONSUME, PUBLISH, CREATE, ACCESS, CONNECT, BIND, UNBIND, DELETE, PURGE, UPDATE, (ADMIN ?) ObjectTypeALL, VIRTUALHOST, QUEUE, TOPIC, EXCHANGE, BROKER, LINK, ROUTE, METHOD, (USER, LOG, CONFIG ?) ObjectPropertyROUTING_KEY, NAME, QUEUE_NAME, OWNER, TYPE, ALTERNATE, INTERNAL, NO_WAIT, NO_LOCAL, NO_ACK, PASSIVE, DURABLE, EXCLUSIVE, TEMPORARY, AUTO_DELETE The ObjectProperties are keys that are listed as key = value pairs after an Operation/ObjectType combination. They must be in this format; a lone string is not accepted here. This is to make the ACL entries less ambiguous. Allowed CombinationsThe object types and operations are related, with only certain combinations allowed. The table below lists allowed combinations with y and possible combinations as ?. The rows contain ObjectTypes and the columns Operations.
To access JMX/QMF attributes there are still some questions. The ADMIN operation could be used, with a set of object types describing the different broker-wide objects that can be manged, sich as LOG, USER and CONFIG. Alternatively, the METHOD object is currently used by the C++ broker ACL files. The type of operation is usually determined by the name of the method, with get*, is* and query* being read (as well as invoked JMX methods that have an impact of INFO) and set* being write, any other method would be usually an operation with side effects. These operations, if they are creating queues etc. can be permissioned using those ACLs. It is only actions that can only be performed through the admin interfaces that need special handling. The fact that the type of operation is defined by the method name makes these ACLs different from the others - it makes no sense to have both UPDATE and ACCESS, eg. adding UPDATE permission for a read method, or ACCESS permission for a write method or other operation. For instance, to permission access using the METHOD object, I suggest ACL ALLOW admin ACCESS METHOD name=get* ACL ALLOW adk ACCESS METHOD name=* ACL ALLOW other ACCESS METHOD name=createQueue
Syntax
The declarations are as follows, using some kind of grammar, with + and * having the usual regular _expression_ meanings, parenthesis denote grouping and brackets denote optional elements. CONFIG ( <config-property> '=' <TRUE | FALSE> ) + GROUP <group-name> ( <username | group-name> ) + [ <number> ] ACL <permission> <username | group-name | ALL> <operation> [ <object-type> ( <property-name> '=' <property-value> ) * ] This allows a rather looser and more readable style for ACL files, while still retaining the ability to read the stricter files accepted by the C++ broker. Bear in mind that the group declarations are to be deprecated, in favour of an external directory service, using a plugin mechanism. The initial <number> is used to allow rulesets to be created which allow indicidual rules to be enabled and disabled using an admin interface, and an ACL file using numbered lines would be restricted to having increasing numbers per rule, although gaps would be allowed to enable rules to be inserted later, again using an admin interface. This administrative interface would also allow saving of a modified ruleset and re-loading. ExamplesAllow "a...@iterator.co.uk" Create Queue \ Owner="a...@iterator.co.uk" Routingkey = "chocolate biscuits" \ QueueName="kitten.*" # allow adk to create queues Allow "a...@iterator.co.uk" Create Queue \ Owner = "a...@iterator.co.uk" \ Routingkey = "chocolate biscuits" \ QueueName=kitten # allow adk access to this virtual host 110 ALLOW "a...@iterator" ACCESS VIRTUALHOST # allow creating temporary queues and queues with names matching adk.* 210 ALLOW-LOG \ "a...@iterator" BIND EXCHANGE \ routingKey="adk.*" \ name="amq.direct" # allow adk.* queue bind to amq.direct 220 \ ALLOW-LOG "a...@iterator" BIND EXCHANGE \ routingKey="tmp.*" name="amq.direct" 230 ALLOW "a...@iterator" CREATE QUEUE name="adk.*" owner="a...@iterator" 240 ALLOW "a...@iterator" CREATE QUEUE temporary="true" owner="a...@iterator" # allow publish and consume of messages on the queues 310 ALLOW "a...@iterator" CONSUME QUEUE name="adk.*" 315 ALLOW "a...@iterator" PUBLISH QUEUE routingkey="adk.export#extra" // foo 320 ALLOW "a...@iterator" PUBLISH QUEUE name="adk.*" # default deny 910 DENY ALL ALL ALL == METHOD considered harmful == A lot of the object types and operations used in the ACL file are shared ACL ALLOW adk UPDATE METHOD name=getLoggingLevel This seems to be at the wrong level of abstraction. Looking at this If we abandon the METHOD object in favour of existing object types, we ACL ALLOW adk ACCESS BROKER extension=logging If we want to create an ACL file format that is usable across AMQP
Change Notification Preferences
View Online
|
Add Comment
|
- [CONF] Apache Qpid > andrew acl proposal confluence
- [CONF] Apache Qpid > andrew acl proposal confluence