Merge "Add configuration option for policy.json file path For user authorizations, oslo_policy need to load the rules and policies defined in the policy.json file. When the oslo_policy enforcer is initializing it will look for the path of this file in cfg.CONF. Gluon needs to add this configuration option to its configuration."
This commit is contained in:
commit
cdf947e48e
@ -322,6 +322,21 @@ state_path = /var/lib/proton
|
||||
#auth_section = <None>
|
||||
|
||||
|
||||
[oslo_policy]
|
||||
|
||||
#
|
||||
# From gluon.conf
|
||||
#
|
||||
|
||||
# File path to the policy_file. Gluon models define policies in their
|
||||
# corresponding yaml files and in most cases users should manage policies e.g.
|
||||
# create, update, and delete policies within the yaml files thus making the
|
||||
# yaml files as the single reference for model definitions. This file is
|
||||
# provided as an avaiable option for users to add new or modify existing
|
||||
# policies. (string value)
|
||||
#policy_file = /etc/proton/policy.json
|
||||
|
||||
|
||||
[path]
|
||||
|
||||
#
|
||||
|
@ -59,14 +59,29 @@ SQL_OPTS = [
|
||||
help='MySQL engine to use.'),
|
||||
]
|
||||
|
||||
POLICY_OPTS = [
|
||||
cfg.StrOpt('policy_file',
|
||||
default='/etc/proton/policy.json',
|
||||
help=("File path to the policy_file. Gluon models define "
|
||||
"policies in their corresponding yaml files and in most "
|
||||
"cases users should manage policies e.g. create, update, "
|
||||
"and delete policies within the yaml files thus making "
|
||||
"the yaml files as the single reference for model "
|
||||
"definitions. This file is provided as an avaiable "
|
||||
"option for users to add new or modify existing policies."
|
||||
)),
|
||||
]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
conf.register_opts(API_OPTS, 'api')
|
||||
conf.register_opts(PATH_OPTS)
|
||||
conf.register_opts(SQL_OPTS, 'database')
|
||||
conf.register_opts(POLICY_OPTS)
|
||||
|
||||
|
||||
def list_opts():
|
||||
return {'api': API_OPTS,
|
||||
'path': PATH_OPTS,
|
||||
'database': SQL_OPTS}
|
||||
'database': SQL_OPTS,
|
||||
'oslo_policy': POLICY_OPTS}
|
||||
|
Loading…
Reference in New Issue
Block a user