diff --git a/etc/keystone.conf.sample b/etc/keystone.conf.sample index cf7aa9723b..9fe4e0beb9 100644 --- a/etc/keystone.conf.sample +++ b/etc/keystone.conf.sample @@ -90,10 +90,6 @@ # but is insecure. (boolean value) #insecure_debug = false -# -# From keystone.notifications -# - # Default publisher_id for outgoing notifications (string value) #default_publisher_id = diff --git a/keystone/common/config.py b/keystone/common/config.py index c93a3a49ee..6a942b0f35 100644 --- a/keystone/common/config.py +++ b/keystone/common/config.py @@ -153,6 +153,24 @@ FILE_OPTIONS = { 'or authenticated user to get more information than ' 'normal, such as why authentication failed. This may ' 'be useful for debugging but is insecure.'), + cfg.StrOpt('default_publisher_id', + help='Default publisher_id for outgoing notifications'), + cfg.StrOpt('notification_format', default='basic', + choices=['basic', 'cadf'], + help='Define the notification format for Identity Service ' + 'events. A "basic" notification has information about ' + 'the resource being operated on. A "cadf" ' + 'notification has the same information, as well as ' + 'information about the initiator of the event.'), + cfg.MultiStrOpt('notification_opt_out', default=[], + help='Define the notification options to opt-out ' + 'from. The value expected is: ' + 'identity... This ' + 'field can be set multiple times in order to add ' + 'more notifications to opt-out from. For example:' + '\n notification_opt_out=identity.user.created' + '\n notification_opt_out=identity.authenticate.' + 'success'), ], 'identity': [ cfg.StrOpt('default_domain_id', default='default', diff --git a/keystone/notifications.py b/keystone/notifications.py index 5dc1224d8f..55a7159f0d 100644 --- a/keystone/notifications.py +++ b/keystone/notifications.py @@ -36,29 +36,6 @@ from keystone.common import utils _CATALOG_HELPER_OBJ = None -notifier_opts = [ - cfg.StrOpt('default_publisher_id', - help='Default publisher_id for outgoing notifications'), - cfg.StrOpt('notification_format', default='basic', - choices=['basic', 'cadf'], - help='Define the notification format for Identity Service ' - 'events. A "basic" notification has information about ' - 'the resource being operated on. A "cadf" notification ' - 'has the same information, as well as information about ' - 'the initiator of the event.'), - cfg.MultiStrOpt('notification_opt_out', default=[], - help='Define the notification options to opt-out from. ' - 'The value expected is: ' - 'identity... This field ' - 'can be set multiple times in order to add more ' - 'notifications to opt-out from. For example:\n ' - 'notification_opt_out=identity.user.created\n ' - 'notification_opt_out=identity.authenticate.success'), -] - -config_section = None -list_opts = lambda: [(config_section, notifier_opts), ] - LOG = log.getLogger(__name__) # NOTE(gyee): actions that can be notified. One must update this list whenever # a new action is supported. @@ -93,7 +70,6 @@ SERVICE = 'identity' CONF = cfg.CONF -CONF.register_opts(notifier_opts) # NOTE(morganfainberg): Special case notifications that are only used # internally for handling token persistence token deletions diff --git a/setup.cfg b/setup.cfg index 41e5ac882b..138c4bb509 100644 --- a/setup.cfg +++ b/setup.cfg @@ -182,7 +182,6 @@ keystone.revoke = oslo.config.opts = keystone = keystone.common.config:list_opts - keystone.notifications = keystone.notifications:list_opts oslo.config.opts.defaults = keystone = keystone.common.config:set_external_opts_defaults