OSSN-0013: Some versions of Glance do not apply property protections as expected

Summary

Tom Leaman reported an issue to the OpenStack mailing list that affects Glance property protections. A permissive property setting in the Glance property protections configuration file will override any previously set stricter ones.

Affected Services / Software

Glance, Folsom, Grizzly

Discussion

Glance property protections limit the users who can perform CRUD operations on a Glance property to those in specific roles. When the property protections rules are processed in the Folsom and Grizzly OpenStack releases, a matching rule will only stop the processing of subsequent rules if it authorizes the attempted action. If there is a matching rule that would reject an action that is followed by another matching rule that would accept the action, then the action is accepted even though one may expect it to be rejected.

In the following policy-protections.conf example, the desired result is to restrict ‘update’ and ‘delete’ permissions for any property beginning with provider_ to only users with the ‘admin’ role:

[^provider_.*$]
create = admin
read = admin,_member_
update = admin
delete = admin

[.*]
create = _member_
read = _member_
update = _member_
delete = _member_

Due to the way that the rules are processed in the Folsom and Grizzly OpenStack releases, the admin restriction for properties beginning with provider_ is nullified by the ‘.*’ permissions since it also matches the same properties. This results in all users with the _member_ role being allowed the ‘create’, ‘update’, and ‘delete’ permissions on properties beginning with provider_, which is not what was intended.

This bug only affects the use of user-roles in Glance. It does not occur when policies are used to determine property protections.

Contacts / References