Merge "Remove default override for config options policy_file"

This commit is contained in:
Zuul 2024-11-21 04:15:26 +00:00 committed by Gerrit Code Review
commit e86ddba2cf
3 changed files with 1 additions and 16 deletions

View File

@ -14,7 +14,6 @@ import functools
import flask
from oslo_log import log
from oslo_policy import opts
from oslo_policy import policy as common_policy
from oslo_utils import strutils
@ -42,13 +41,6 @@ _POSSIBLE_TARGET_ACTIONS = frozenset(
_ENFORCEMENT_CHECK_ATTR = 'keystone:RBAC:enforcement_called'
# TODO(gmann): Remove setting the default value of config policy_file
# once oslo_policy change the default value to 'policy.yaml'.
# https://github.com/openstack/oslo.policy/blob/a626ad12fe5a3abd49d70e3e5b95589d279ab578/oslo_policy/opts.py#L49
DEFAULT_POLICY_FILE = 'policy.yaml'
opts.set_defaults(CONF, DEFAULT_POLICY_FILE)
class RBACEnforcer:
"""Enforce RBAC on API calls."""

View File

@ -17,7 +17,6 @@ from oslo_config import cfg
from oslo_log import log
import oslo_messaging
from oslo_middleware import cors
from oslo_policy import opts as policy_opts
from osprofiler import opts as profiler
from keystone.conf import application_credential
@ -161,12 +160,6 @@ def set_external_opts_defaults():
# configure OSprofiler options
profiler.set_defaults(CONF, enabled=False, trace_sqlalchemy=False)
# TODO(gmann): Remove setting the default value of config policy_file
# once oslo_policy change the default value to 'policy.yaml'.
# https://github.com/openstack/oslo.policy/blob/a626ad12fe5a3abd49d70e3e5b95589d279ab578/oslo_policy/opts.py#L49
DEFAULT_POLICY_FILE = 'policy.yaml'
policy_opts.set_defaults(cfg.CONF, DEFAULT_POLICY_FILE)
# Oslo.cache is always enabled by default for request-local caching
# TODO(morganfainberg): Fix this to not use internal interface when
# oslo.cache has proper interface to set defaults added. This is

View File

@ -25,7 +25,7 @@ oslo.db>=6.0.0 # Apache-2.0
oslo.i18n>=3.15.3 # Apache-2.0
oslo.log>=3.44.0 # Apache-2.0
oslo.middleware>=3.31.0 # Apache-2.0
oslo.policy>=3.10.0 # Apache-2.0
oslo.policy>=4.5.0 # Apache-2.0
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
oslo.upgradecheck>=1.3.0 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0