Bug 1041930

Summary: [RFE][keystone]: Callbacks on internal events
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: openstack-keystoneAssignee: RHOS Maint <rhos-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Udi Kalifon <ukalifon>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: aberezin, ayoung, breeler, markmc, nkinder, yeylon
Target Milestone: Upstream M2Keywords: FutureFeature, Triaged
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/keystone/+spec/internal-callbacks
Whiteboard: upstream_milestone_icehouse-2 upstream_status_implemented upstream_definition_review
Fixed In Version: openstack-keystone-2014.1-4.el7ost Doc Type: Enhancement
Doc Text:
Implementers of custom Identity extensions may need to perform tasks when Identity resources such as users or groups are created, updated, or deleted. The ability to register callbacks for these events has been added to allow for more complex custom Identity extensions.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-22 11:58:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description RHOS Integration 2013-12-12 20:08:09 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/keystone/+spec/event-notif-extensions.

Description:

Problem Statement
Keystone extensions are creating and managing data tables independently from the "core" code. These extensions may create data that have interdependencies with the core data. For instance an extension can create extra data related to a user or a project or establish relationship between two entities. Keystone is not currently providing a method for the extensions to react to changes in the core data enabling them to clean/reflect the state changes in core.

Solution
The solution is to leverage the existing notification method for Create, Update and Delete and having a mechanism for extensions to register to those events providing a callback. When an event is fired the EvenHandler will go through the list of extensions that have subscribed to that event and invoke their callbacks. The extensions are now responsible of eliminate any data inconsistency that may be present and/or perform any actions that are necessary/required.

Specification URL (additional information):

None

Comment 2 Udi Kalifon 2014-02-06 07:44:56 UTC
Need info:
1) The blueprint is a simple copy-paste of this bug, and provides no additional technical data on the feature design
2) Need documentation on writing keystone extensios
3) Need documentation on the new notification framework and how to make use of it

Comment 3 Nathan Kinder 2014-02-27 01:04:19 UTC
(In reply to Udi from comment #2)
> Need info:
> 1) The blueprint is a simple copy-paste of this bug, and provides no
> additional technical data on the feature design
> 2) Need documentation on writing keystone extensios
> 3) Need documentation on the new notification framework and how to make use
> of it

The documentation for developing extensions that use the new internal notification framework is located here:

    https://github.com/openstack/keystone/blob/master/doc/source/extension_development.rst#event-callbacks

Comment 4 Nathan Kinder 2014-02-27 01:18:20 UTC
*** Bug 1053724 has been marked as a duplicate of this bug. ***