Bug 1118944 - [RFE][oslo]: policy.json - Comparing kind against match
Summary: [RFE][oslo]: policy.json - Comparing kind against match
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: RFEs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact:
URL: https://blueprints.launchpad.net/oslo...
Whiteboard: upstream_milestone_none upstream_defi...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-12 04:06 UTC by RHOS Integration
Modified: 2015-03-19 16:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-19 16:52:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description RHOS Integration 2014-07-12 04:06:51 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/oslo/+spec/policy-compare-kind-with-match.

Description:

As of now if you want to do the comparison of 'kind' and 'match',
you need to pass this data in the 'credential' and then match it.
'credential' is a dictionary which consist of information about users, tenants
and roles. So if the comparison need to be done on the basis of image or
instance properties, you need to pass these properties explicitly through the
'credential' dictionary, otherwise 'KeyError' will be raised as this
information is not present in the 'credential' dictionary and the particular
policy rule will not work as per expectation.

The feature proposed in this blueprint is, in GenericCheck class, we will add a
simple check to compare 'kind' with 'match'. If this comparison is matched
then it will return True or else it will compare using 'credential' dictionary.

For example,
if self.kind == match:
    return True

Specification URL (additional information):

None


Note You need to log in before you can comment on or make changes to this bug.