Method Considered Harmful ReduxPage added by Martin RitchieMethod Madness"Though this be madness, yet there is method in't." IntroductionThe main point of contention in the ACL debate seems to centre around the mechanism used to permission non AMQP entities, the current METHOD method is felt to be unsuitable. This document proposes an update to this syntax and describes exactly how it should be interpreted across brokers. Access ControlThe things that are being controlled or permissioned by entries in the access control list are objects that form part of the Qpid broker. These entities could reasonably be said to be children of the broker, although I don't feel that a tree-type structure is either helpful or necessary here, since there is no parallel in the Qpid or AMQP internals. A flat object type space has therefore been assumed, continuing current behavior. These types of object have until now simply represented the major types of object that exist and are manipulable inside a broker. The only addition is that of the broker itself, since there are some operations and actions that can only realistically be said to be performed globally. This is the rationale behind such proposed ACL entries as: ACL ALLOW robot ACCESS LOG ACL DENY robot UPDATE CONFIG ACL DENY kitten UPDATE USERS ACL ALLOW kitten ADMIN LOG
It is proposed that the existing operations are maintained, along with the mappings to object types they are allowed to manipulate (as described in a previous text) and the three types described above are mapped as follows:
ACCESS continues to describe simple, read-only property or attribute access, mapping nicely a JMX intent of INFO or a get type of operation. UPDATE would be used for read-write access to properties, when the operation carried out is a simple change of value with no side effects. The new EXECUTE operation replaces the contentious ADMIN or MANAGE described previously, and more accurately describes the execution or invocation of an administrative action or operation with a particular effect on the broker. BrokerageThe BROKER object type is to be used to control access to any new set of features. For example, if it is desired to add an ACL entry that will allow the robots group to read and write properties on the Acl QMF managed object, and additionally to execute all methods that are present, this could be done as follows: ACL ALLOW robots ACCESS BROKER package="org.apache.qpid.acl" ACL ALLOW robots UPDATE BROKER package="org.apache.qpid.acl" ACL ALLOW robots EXECUTE BROKER package="org.apache.qpid.acl" If a logging subsystem was added, with the QMF management schema package defined as org.apache.qpid.log and methods such as setLoggingLevel, getAvailableLoggingLevels, reloadLogFile, rollLogFile are defined, along with properties like currentLevel and lastLogEntryTime then it could be permissioned this way: ACL ALLOW robots ACCESS BROKER package="org.apache.qpid.log" ACL ALLOW robots UPDATE BROKER package="org.apache.qpid.log" ACL ALLOW kitten EXECUTE BROKER package="org.apache.qpid.log" method="rollLogFile" ACL ALLOW robots EXECUTE BROKER package="org.apache.qpid.log" method="reloadLogFile" ACL DENY robots EXECUTE BROKER package="org.apache.qpid.log" In this example, the robots group can only execute reloadLogFile while kitten (a member) can also execute rollLogFile, and the group has read/write access to all properties and statistics. It should be obvious that there is scope for adding arbitrary new packages and then permissioning them. Also, if the contents of the packages are well defined and they are suitably finely grained then it will mostly suffice to permission at the package level for all operations and properties. This gives freedom to update APIs and add new methods without making ACL files obsolete or causing security issues, since the meaning of the ACL entries should be unchanged. Care will need to be taken with, for example, JMX invoke method, which offers a level of indirection that could enable bypassing access checks. This is currently handled at a common JMX entry point, and should suffice at present. Syntactic SugarIn an attempt to divorce the ACL syntax from the mechanism further, it could also be possible to remove references to the package and use a different naming scheme, which would have a mapping to QMF, JMX managed objects and any future management information repository. This could work as follows, with users mapping to the JMX UserManagement MBean and a QMF org.apache.qpid.users package with a Users class. The change to the ACL syntax is trivial. Additionally, changing all properties to simply name would standardise the syntax further, with only a small loss of readability. ACL ALLOW kitten EXECUTE BROKER component="users" name="*" ACL ALLOW kitten UPDATE BROKER component="users" name="fileName" It is possible that another object could be chosen instead of BROKER, such as METHOD (however this gives the issue of changing the meaning of existing files) but this would not change the discussion presented above. The only issue might be that it is cumbersome to add a permission granting access to all management methods, properties and statistics, both read and write, at the same time. Even though UPDATE will usually include ACCESS permissions, two lines are needed (for EXECUTE separately) unless it is satisfactory for EXECUTE to include UPDATE (and hence ACCESS) rights. ACL DENY robot EXECUTE METHOD component="config" name="reload*" ACL ALLOW kitten ACCESS METHOD component="config" name="*" It could be pointed out that ACCESS METHOD ought more correctly to read ACCESS PROPERTY and similarly for UPDATE, however it is felt that the number of object types should be kept to a minimum, which is the purpose of this proposal. ConclusionThe ACL changes described above are fairly simple, but should provide a sensible and easily extensible syntax that will allow both the Java and C++ brokers to provide fine grained access control for custom components that are specific to each implementation without compromising cross- platform file compatibility. The actual access and management mechanisms for the brokers do not impact the ACL syntax, which remains agnostic, and also maintains its meaning through API upgrades and extensions without compromising platform security. There are several options for ACL file syntax describing access to methods controlling a (for example) logging mechanism, which are summarised below:
ACL ALLOW kitten EXECUTE LOG
ACL ALLOW kitten UPDATE METHOD name="methodNameOne" ACL ALLOW kitten UPDATE METHOD name="methodNameTwo"
ACL ALLOW kitten EXECUTE BROKER subsystem=logging ACL ALLOW kitten EXECUTE BROKER package="org.apache.qpid.log" ACL ALLOW kitten EXECUTE METHOD component="log" name="reload*" ACL ALLOW kitten UPDATE METHOD component="log" ACL ALLOW robot ACCESS METHOD component="log" ACL ALLOW robot EXECUTE METHOD component="acl" name="reload*" ACL DENY robot EXECUTE METHOD component="config" name="reload*" ACL ALLOW robot EXECUTE METHOD component="config" The last described syntax is close to a preferred option, and incorporates features from recent dev.qpid.apache.org discussion, although any updates or suggestions are welcome. (Note this has the interesting/useful feature/bug of falling back to C++ broker syntax if the component property is omitted. This would be legal in the Java broker, just not recommended.) Post ScriptumThe following points should clarify some of the proposed features, however the syntax as described in the Conclusion is intended to represent the preferred usage. In the C++ broker there exists a feature wherby plugins, uniquely identified by a schema package and a class name, can have ACLs applied to them. This will also become available in the Java broker, and would be permissioned using the OBJECT object type. This allows objects that are external to the broker to be controlled. For the Java broker it is intended that the main class for a plugin would check with the security manager using the Java package and class names as properties, as below. ACL ALLOW kittens ACCESS OBJECT package="com.example.plugin" class="Example" When management functions are being permissioned, a symbolic name for a logical grouping of related methods, properties, attributes and operations is used to identify what is being controlled. This is identified using the component property in the examples above. These groupings will map onto JMX managed objects or MBeans, QMF management schemas, or some other form of mangement object. It is intended that a particular broker implementation handles these mappings internally and ignores mappings that do not exist, such as logging management on the C++ broker currently. It is also possible to offer finer grained control by specifying the name property for the ACL entry, thus restricting the scope to a single method or property. It may also be possible to specify other properties that have meaning for a paricular broker implementation, thus maintaining backward compatibility. The list of possible property names should be fixed as part of the definition of the ACL file format. Andrew D Kennedy, andrew.internatio...@gmail.com, 2010-05-20
Change Notification Preferences
View Online
|
Add Comment
|
- [CONF] Apache Qpid > Method Considered Harmful Redux confluence