diff options
author | Lance Bragstad <lbragstad@gmail.com> | 2018-06-28 20:31:27 +0000 |
---|---|---|
committer | Lance Bragstad <lbragstad@gmail.com> | 2018-07-09 16:46:57 +0000 |
commit | 775641a5fc549c20be37cf862deca394bf7f2d21 (patch) | |
tree | 78c0c0ae195cb64b71047d63ee369dc8ea0416b6 /releasenotes | |
parent | 13a4e789bcf5d1e8bb67f92c866355f180260df9 (diff) | |
download | oslo-policy-775641a5fc549c20be37cf862deca394bf7f2d21.tar.gz |
Teach Enforcer.enforce to deal with context objects
The ``creds`` dictionary passed into oslo.policy's enforce() method
assumes a lot of the same values already specified by oslo.context
RequestContext objects.
This commit teaches enforce() to handle being passed an instance of
a RequestContext object, and populate credential values accordingly.
Change-Id: Ia74bf6c40b1e05a1c958f4325e00f68be28d91b9
Closes-Bug: 1779172
Diffstat (limited to 'releasenotes')
-rw-r--r-- | releasenotes/notes/bug-1779172-c1323c0f647bc44c.yaml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/releasenotes/notes/bug-1779172-c1323c0f647bc44c.yaml b/releasenotes/notes/bug-1779172-c1323c0f647bc44c.yaml new file mode 100644 index 0000000..77e3569 --- /dev/null +++ b/releasenotes/notes/bug-1779172-c1323c0f647bc44c.yaml @@ -0,0 +1,19 @@ +--- +features: + - | + [`bug 1779172 <https://bugs.launchpad.net/keystone/+bug/1779172>`_] + The ``enforce()`` method now supports the ability to parse ``oslo.context`` + objects if passed into ``enforce()`` as ``creds``. This provides more + consistent policy enforcement for service developers by ensuring the + attributes provided in policy enforcement are standardized. In this case + they are being standardized through the + ``oslo_context.context.RequestContext.to_policy_values()`` method. +fixes: + - | + [`bug 1779172 <https://bugs.launchpad.net/keystone/+bug/1779172>`_] + The ``enforce()`` method now supports the ability to parse ``oslo.context`` + objects if passed into ``enforce()`` as ``creds``. This provides more + consistent policy enforcement for service developers by ensuring the + attributes provided in policy enforcement are standardized. In this case + they are being standardized through the + ``oslo_context.context.RequestContext.to_policy_values()`` method. |