Default the assignment backend to SQL
Previously, keystone had logic to default the assignment backend, without providing a default through configuration. This behavior was removed and we should provide a sensible default for the assignment backend. This commit defaults the assignment backend to `sql` since that is the only backend keystone currently supports. We also leave a warning that there isn't any reason to change the default unless a deployer is writing a proprietary or custom assignment backend. Change-Id: I6fb9b7fa401c0805a538b46141a4d8c8df2093cf Closes-Bug: 1630435
This commit is contained in:
parent
4767e58eff
commit
4888a11c4d
|
@ -18,7 +18,6 @@ import copy
|
|||
import functools
|
||||
|
||||
from oslo_log import log
|
||||
from oslo_log import versionutils
|
||||
|
||||
from keystone.common import cache
|
||||
from keystone.common import dependency
|
||||
|
@ -66,28 +65,6 @@ class Manager(manager.Manager):
|
|||
|
||||
def __init__(self):
|
||||
assignment_driver = CONF.assignment.driver
|
||||
# If there is no explicit assignment driver specified, we let the
|
||||
# identity driver tell us what to use. This is for backward
|
||||
# compatibility reasons from the time when identity, resource and
|
||||
# assignment were all part of identity.
|
||||
if assignment_driver is None:
|
||||
msg = _('Use of the identity driver config to automatically '
|
||||
'configure the same assignment driver has been '
|
||||
'deprecated, in the "O" release, the assignment driver '
|
||||
'will need to be expicitly configured if different '
|
||||
'than the default (SQL).')
|
||||
versionutils.report_deprecated_feature(LOG, msg)
|
||||
try:
|
||||
identity_driver = dependency.get_provider(
|
||||
'identity_api').driver
|
||||
assignment_driver = identity_driver.default_assignment_driver()
|
||||
except ValueError:
|
||||
msg = _('Attempted automatic driver selection for assignment '
|
||||
'based upon [identity]\driver option failed since '
|
||||
'driver %s is not found. Set [assignment]/driver to '
|
||||
'a valid driver in keystone config.')
|
||||
LOG.critical(msg)
|
||||
raise exception.KeystoneConfigurationError(msg)
|
||||
super(Manager, self).__init__(assignment_driver)
|
||||
|
||||
self.event_callbacks = {
|
||||
|
|
|
@ -17,14 +17,12 @@ from keystone.conf import utils
|
|||
|
||||
driver = cfg.StrOpt(
|
||||
'driver',
|
||||
default='sql',
|
||||
help=utils.fmt("""
|
||||
Entry point for the assignment backend driver (where role assignments are
|
||||
stored) in the `keystone.assignment` namespace. Only a SQL driver is supplied
|
||||
by keystone itself. If an assignment driver is not specified, the identity
|
||||
driver will choose the assignment driver based on the deprecated
|
||||
`[identity]/driver` option (the behavior will be removed in the "O" release).
|
||||
Unless you are writing proprietary drivers for keystone, you do not need to set
|
||||
this option.
|
||||
by keystone itself. Unless you are writing proprietary drivers for keystone,
|
||||
you do not need to set this option.
|
||||
"""))
|
||||
|
||||
prohibited_implied_role = cfg.ListOpt(
|
||||
|
|
Loading…
Reference in New Issue