Remove default override for RBAC config options

RBAC config options enforce_scope and enforce_new_defaults
were disabled by default in oslo.policy and Ironic had to override
the default value to enable those by default. Now oslo.policy
(4.4.0 onwards[1]) changed the default values[2][3] and enabled
by default for all the services. OpenStack service does not need
to override the default anymore.

NOTE: There is no change in behaviour here, oslo.policy provides the
same configuration that Ironic has overridden till now.

[1] https://review.opendev.org/c/openstack/releases/+/925032
[2] https://review.opendev.org/c/openstack/oslo.policy/+/924283
[3] https://review.opendev.org/c/openstack/requirements/+/925464

Change-Id: I280ae374048b16f1d27a55b09a4d7729de43f469
This commit is contained in:
Ghanshyam Mann 2024-09-05 12:44:34 -07:00
parent c996aafa6d
commit 3f6507d851
2 changed files with 7 additions and 7 deletions

View File

@ -32,13 +32,13 @@ CONF = cfg.CONF
LOG = log.getLogger(__name__)
# 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
# TODO(gmann): Remove overriding the default value of config options
# 'policy_file' once oslo_policy change its default value to what
# is overridden here.
DEFAULT_POLICY_FILE = 'policy.yaml'
opts.set_defaults(cfg.CONF, DEFAULT_POLICY_FILE,
enforce_scope=True,
enforce_new_defaults=True)
opts.set_defaults(
cfg.CONF,
DEFAULT_POLICY_FILE)
# Generic policy check string for system administrators. These are the people
# who need the highest level of authorization to operate the deployment.

View File

@ -19,7 +19,7 @@ oslo.db>=9.1.0 # Apache-2.0
oslo.rootwrap>=5.8.0 # Apache-2.0
oslo.log>=4.3.0 # Apache-2.0
oslo.middleware>=3.31.0 # Apache-2.0
oslo.policy>=3.7.0 # Apache-2.0
oslo.policy>=4.4.0 # Apache-2.0
oslo.serialization>=2.25.0 # Apache-2.0
oslo.service>=1.24.0 # Apache-2.0
oslo.upgradecheck>=1.3.0 # Apache-2.0