Rules engine to enforce access control policy
Go to file
Colleen Murphy 4d40252748 Add attribute to suppress deprecation warnings
Without this patch, if a project is going through a heavy policy
refactor, significant numbers of deprecation warnings are emitted. When
the enforcer is repeated reinitialized, as is the case when unit
testing, the vast amount of logs resulting from the warnings is both
unnecessary and harmful as it impedes log readability and explodes the
size of the logs, thereby causing CI instability as the infrastructure
struggles to process the logs.

This change adds a public attribute to the enforcer object to allow
callers to suppress these logs. This is not exposed as a configuration
option because we do not want to allow operators to suppress these logs,
and the warnings that occur when the enforcer is only reinitialized when
the process is reloaded are not nearly so debilitating as they are
during, e.g., a unit test run when the enforcer is generally
reinitialized for every test.

The Python warnings module allows for setting global attributes to
filter logs, and it might have been useful for the consuming project to
filter these logs at that level rather than modifying the policy
enforcer to turn log emissions on and off. The problem with this
approach is that if the number of deprecations is extreme, as may be the
case during a heavy refactor, the warnings filter can become so
inefficient that the test run can take much longer, causing even further
CI stability as test runs reach timeout limits.

Needed-by: https://review.opendev.org/673933
Change-Id: Ibfc7d4fca02b896953f80ddf1a9a8b9a19444f72
Related-bug: #1836568
2019-08-05 12:35:21 -07:00
doc/source Replace git.openstack.org URLs with opendev.org URLs 2019-05-14 13:14:16 +00:00
oslo_policy Add attribute to suppress deprecation warnings 2019-08-05 12:35:21 -07:00
releasenotes Update master for stable/stein 2019-03-18 14:45:48 +00:00
sample_data Add oslopolicy-checker command-line tool 2016-01-12 15:44:03 -06:00
.coveragerc Fix coverage configuration and execution 2015-10-01 15:39:58 +00:00
.gitignore Clean up .gitignore references to personal tools 2018-10-15 11:50:32 +08:00
.gitreview OpenDev Migration Patch 2019-04-19 19:29:48 +00:00
.mailmap exported from oslo-incubator by graduate.sh 2014-12-09 14:40:01 -03:00
.stestr.conf Fix requirements and convert to stestr 2018-07-02 17:30:07 +00:00
.zuul.yaml Add Python 3 Train unit tests 2019-07-05 14:55:57 -04:00
CONTRIBUTING.rst Optimize the link address 2017-04-08 23:36:11 +08:00
HACKING.rst Update URLs in documents according to document migration 2017-07-12 23:01:31 +08:00
LICENSE exported from oslo-incubator by graduate.sh 2014-12-09 14:40:01 -03:00
README.rst Replace git.openstack.org URLs with opendev.org URLs 2019-05-14 13:14:16 +00:00
babel.cfg exported from oslo-incubator by graduate.sh 2014-12-09 14:40:01 -03:00
lower-constraints.txt Updated from global requirements 2019-07-03 12:34:24 -07:00
requirements.txt Add domain scope support for scope types 2018-11-30 14:52:36 +00:00
setup.cfg Add Python 3 Train unit tests 2019-07-05 14:55:57 -04:00
setup.py Updated from global requirements 2017-03-03 03:07:08 +00:00
test-requirements.txt Updated from global requirements 2019-07-03 12:34:24 -07:00
tox.ini Add Python 3 Train unit tests 2019-07-05 14:55:57 -04:00

README.rst

Team and repository tags

image

oslo.policy

Latest Version

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