The generic checking in policy allows us to match against data from the
creds_dict using a very simple syntax. For example, in policy.json if
you had something like:
"some_action": [["project_id:foo"]]
it would only allow project foo to perform that action, but something
like:
"some_action": [["is_admin:True"]]
where is_admin is a boolean fails.
This modifies the check to convert the value to unicode before
attempting to compare it. It includes a test.
Reviewed: https:/ /review. openstack. org/12338 github. com/openstack/ openstack- common/ commit/ 5a565397deba671 228d10c9c57102d aae75eeb7f
Committed: http://
Submitter: Jenkins
Branch: stable/folsom
commit 5a565397deba671 228d10c9c57102d aae75eeb7f
Author: Vishvananda Ishaya <email address hidden>
Date: Mon Aug 20 10:25:21 2012 -0700
Allow non-string items in the creds dict.
The generic checking in policy allows us to match against data from the
creds_dict using a very simple syntax. For example, in policy.json if
you had something like:
"some_action": [["project_ id:foo" ]]
it would only allow project foo to perform that action, but something
like:
"some_action": [["is_admin:True"]]
where is_admin is a boolean fails.
This modifies the check to convert the value to unicode before
attempting to compare it. It includes a test.
Fixes bug 1039132
Change-Id: I0e53a6ea270921 2d4a1536f901bcf 1e717a232ca