Author |
Topic: LDAP Persistent Search Control |
|
SteveHB member offline |
|
posts: |
113 |
joined: |
05/31/2006 |
from: |
Mountain View, CA |
|
|
|
|
|
LDAP Persistent Search Control |
http://www3.ietf.org/proceedings/01mar/I-D/ldapext-psearch-03.txt
This document defines two controls that extend the LDAPv3 [LDAP] search operation to provide a simple mechanism by which an LDAP client can receive notification of changes that occur in an LDAP server. The mechanism is designed to be very flexible yet easy for clients and servers to implement.
The approach taken by the Persistent Search mechanism described in this document is to alter the standard LDAP search operation so that it does not end after the initial set of entries matching the search criteria are returned. Instead, LDAP servers keep the search operation going. This provides clients and servers participating in Persistent Search with an active channel through which entries that change (and additional information about the changes that occur) can be communicated.
|
|
|
|
|
|
|
SteveHB member offline |
|
posts: |
113 |
joined: |
05/31/2006 |
from: |
Mountain View, CA |
|
|
|
|
|
LDAP Persistent Search Control Protocol -- Request |
The control sent to server may be included in the Controls portion of an LDAPv3 SearchRequest message, as defined in Section 4.1.12 of [LDAPv3]. The structure of this control is as follows:
PersistentSearchControl ::= SEQUENCE {
controlType 2.16.840.1.113730.3.4.3,
criticality BOOLEAN DEFAULT FALSE,
controlValue persistentSearchControlValue
}
The persistentSearchControlValue is an OCTET STRING wrapping the BER-encoded version of the following SEQUENCE:
persistentSearchControlValue::= SEQUENCE {
changeTypes INTEGER,
-- add(1)|delete(2)|modify(4)|modDN(8)
changesOnly BOOLEAN,
returnECs BOOLEAN
}
|
|
|
|
|
|
|
SteveHB member offline |
|
posts: |
113 |
joined: |
05/31/2006 |
from: |
Mountain View, CA |
|
|
|
|
|
LDAP Persistent Search Control Protocol -- Response |
Upon receiving the above Persistent Search Control, a server that supports it MUST process this as a standard LDAPv3 search with the following exceptions:
The server MUST NOT return a SearchResultDone message. Instead, the search operation MUST be kept active until it is abandoned by the client or until the client unbinds.
If changesOnly is TRUE, the server MUST NOT return any existing entries that match the search criteria. Entries are only returned when they are changed (added, modified, deleted, or subject to a modifyDN operation).
As changes are made to the server, the effected entries MUST be returned to the client if they match the standard search criteria and if the operation that caused the change is included in the changeTypes field.
If returnECs is TRUE, the server MUST return an Entry Change Notification control with each entry returned as the result of changes.
Entry Change Notification control
This control provides additional information about the change the caused a particular entry to be returned as the result of a persistent search. If the client set the returnECs boolean to TRUE in the PersistentSearch control, servers MUST include an EntryChangeNotification control in the Controls portion of each SearchResultEntry that is returned due to an entry being added, deleted, or modified.
EntryChangeNotificationControl::= SEQUENCE {
controlType 2.16.840.1.113730.3.4.7,
criticality BOOLEAN DEFAULT FALSE,
controlValue entryChangeNotificationControlValue
}
The entryChangeNotificationControlValue is an OCTET STRING wrapping the BER-encoded version of the following SEQUENCE:
entryChangeNotificationControlValue::= SEQUENCE {
changeType ENUMERATED {
add (1),
delete (2),
modify (4),
modDN (8)
},
previousDN LDAPDN OPTIONAL, -- modifyDN ops. only
changeNumber INTEGER OPTIONAL -- if supported
}
previousDN is present only for modifyDN operations and gives the DN of the entry before it was renamed and/or moved. Servers MUST include this optional field only when returning change notifications as a result of modifyDN operations.
changeNumber is the change number assigned by a server for the change. If a server supports an LDAP change log it SHOULD include this field.
|
|
|
|
|
|
|
SteveHB member offline |
|
posts: |
113 |
joined: |
05/31/2006 |
from: |
Mountain View, CA |
|
|
|
|
|
|