oslo.policy/releasenotes/notes/Fix-map-system-scope-for-creds-dict-e4cbec2f7495f22e.yaml
Michael Johnson 9774108cf9 Map system_scope in creds dictionary
An earlier patch[1] added a mapping for context 'system_scope'
to 'system' when enforce was called with a RequestContext
object. However, enforce can also be called with a creds dictionary
that may contain the context 'system_scope' element. When this
occured, 'system_scope' was not mapped to 'system' and the enforce
would fail with an InvalidScope exception.
This patch moves the 'system_scope' mapping from only occuring
with RequestContext objects to also map it when a creds dictonary
is passed to enforce.

[1] https://review.opendev.org/c/openstack/oslo.policy/+/578995

Change-Id: I83a22c3f825bad0c88018118f8630a20a445965e
2021-08-12 20:28:52 +00:00

6 lines
151 B
YAML

---
fixes:
- |
Fixes the mapping of 'system_scope' to 'system' when enforce is called
with a 'creds' dictionary instead of a RequestContext.