oslo.policy/releasenotes/notes/bug-1779172-c1323c0f647bc44c.yaml
Lance Bragstad 775641a5fc 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
2018-07-09 16:46:57 +00:00

20 lines
1015 B
YAML

---
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.