Network Working Group M. Smith INTERNET-DRAFT G. Good Intended Category: Standards Track T. Howes Expires: May 1998 R. Weltman Netscape Communications Corp. 21 November 1997 Persistent Search: A Simple LDAP Change Notification Mechanism 1. Status of this Memo This draft document will be submitted to the RFC Editor as a Standards Track document. Distribution of this memo is unlimited. Please send com- ments to the authors. This document is an Internet-Draft. Internet-Drafts are working docu- ments of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as ``work in progress.'' To learn the current status of any Internet-Draft, please check the ``1id-abstracts.txt'' listing contained in the Internet-Drafts Shadow Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim). Copyright (C) The Internet Society (1997). All Rights Reserved. Please see the Copyright section near the end of this document for more information. 2. Introduction This document defines two controls that extend the LDAP [1] 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. Expires: May 1998 [Page 1] LDAP Persistent Search 21 November 1997 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", and "MAY" in this document are to be interpreted as described in RFC 2119 [2]. 3. General Approach 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. 4. Persistent Search Control This control may be included in the Controls portion of an LDAPv3 Sear- chRequest message. PersistentSearch ::= SEQUENCE { changeTypes INTEGER, changesOnly BOOLEAN, returnECs BOOLEAN, } Upon receiving this control, a server that supports it MUST process this as a standard LDAPv3 search with the following exceptions: a) 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). b) The server MUST NOT return a SearchResult message. Instead, the search operation MUST be kept active until it is abandoned by the client or until the client unbinds. c) As changes are made to the server, the effected entries MUST be returned to the client if they match the standard search cri- teria and if the operation that caused the change is included in the changeTypes field. The changeTypes field is the logical OR of one or more of these values: add (1), delete (2), modify (4), modDN (8). Expires: May 1998 [Page 2] LDAP Persistent Search 21 November 1997 d) If returnECs is TRUE, the server MUST return an Entry Change Notification control with each entry returned as the result of changes. This control is described in the next section. 5. 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. EntryChangeNotification ::= SEQUENCE { changeType ENUMERATED { add (1), delete (2), modify (4), modDN (8), }, previousDN LDAPDN OPTIONAL, -- modifyDN ops. only changeNumber INTEGER OPTIONAL, -- if supported } changeType indicates what LDAP operation caused the entry to be returned. 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 when returning change notifications as a result of modifyDN operations. changeNumber is the change number [3] assigned by a server for the change. If a server supports an LDAP Change Log it SHOULD include this field. 6. Security Considerations In some situations, it may be important to prevent general exposure of information about changes that occur in an LDAP server. Therefore, servers that implement the mechanism described in this document SHOULD provide a means to enforce access control on the entries returned and MAY also provide specific access control mechanisms to control the use of the PersistentSearch and EntryChangeNotification controls. Expires: May 1998 [Page 3] LDAP Persistent Search 21 November 1997 7. Copyright Copyright (C) The Internet Society (date). All Rights Reserved. This document and translations of it may be copied and furnished to oth- ers, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and dis- tributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Stan- dards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FIT- NESS FOR A PARTICULAR PURPOSE. 8. Bibliography [1] M. Wahl, T. Howes, S. Kille, "Lightweight Directory Access Protocol (v3)", INTERNET-DRAFT , November 1997. [2] S. Bradner, "Key words for use in RFCs to Indicate Requirement Lev- els", RFC 2119. [3] G. Good, "Definition of an Object Class to Hold LDAP Change Record", INTERNET-DRAFT , July 1997. 9. Author's Addresses Mark Smith Netscape Communications Corp. 501 E. Middlefield Rd., Mailstop MV068 Mountain View, CA 94043 Expires: May 1998 [Page 4] LDAP Persistent Search 21 November 1997 USA +1 650 937-3477 mcs@netscape.com Gordon Good Netscape Communications Corp. 501 E. Middlefield Rd., Mailstop MV068 Mountain View, CA 94043 USA +1 650 937-3825 ggood@netscape.com Tim Howes Netscape Communications Corp. 501 E. Middlefield Rd., Mailstop MV068 Mountain View, CA 94043 USA +1 650 937-3419 Rob Weltman Netscape Communications Corp. 501 E. Middlefield Rd., Mailstop MV068 Mountain View, CA 94043 USA +1 650 937-3301 rweltman@netscape.com Expires: May 1998 [Page 5] 1. Status of this Memo............................................1 2. Introduction...................................................1 3. General Approach...............................................2 4. Persistent Search Control......................................2 5. Entry Change Notification Control..............................3 6. Security Considerations........................................3 7. Copyright......................................................4 8. Bibliography...................................................4 9. Author's Addresses.............................................4