Ben Nemec c386837121 Temporarily make namespace arg optional
In order to fix the referenced bug, we need to register cli args on
the global config object. Unfortunately, that causes issues because
our consumers are re-calling the conf object in their enforcers due
to the way we used to handle cli args. Specifically, the conf call
in the consumer fails because the namespace arg from oslo.policy is
registered as required, but they don't pass it to the conf call.

Long-term we want to stop having consumers call the conf object at
all, but in the meantime we need to provide a migration path that
doesn't break them. This change registers the namespace arg as
optional on the conf object and temporarily moves the required check
to oslo.policy. This will allow us to maintain the existing behavior
for our cli tools while not breaking consumers who haven't migrated
to the new cli arg behavior.

Note that we do have unit test coverage of this behavior[0], so we
can be reasonably confident the explicit check is maintaining
compatibility.

Change-Id: I34ce1dd15c464bec319e51d3e217e26554f1a944
Closes-Bug: 1863637
Related-Bug: 1849518
0: 6e2fe38573/oslo_policy/tests/test_generator.py (L500)
2020-02-17 16:17:34 +00:00
2019-10-10 08:38:14 -07:00
2019-04-19 19:29:48 +00:00
2017-04-08 23:36:11 +08:00
2020-02-11 18:54:49 +01:00

Team and repository tags

image

oslo.policy

Latest Version

The Oslo Policy library provides support for RBAC policy enforcement across all OpenStack services.

Description
Rules engine to enforce access control policy
Readme 6.6 MiB
Languages
Python 100%