]> git.sur5r.net Git - openldap/blob - doc/drafts/draft-ietf-ldapext-matchedval-xx.txt
initialize Sockbuf * to NULL
[openldap] / doc / drafts / draft-ietf-ldapext-matchedval-xx.txt
1 Internet-Draft                                      David Chadwick\r
2 LDAPExt WG                                         University of Salford      \r
3 Intended Category: Standards Track                     Sean Mullan\r
4                                                                   Sun Microsystems\r
5 Expires: 1 January 2001                             1 July 2000\r
6 \r
7 \r
8 Returning Matched Values with LDAPv3\r
9 <draft-ietf-ldapext-matchedval-02.txt>\r
10 \r
11 \r
12 STATUS OF THIS MEMO\r
13 \r
14 This document is an Internet-Draft and is in full conformance with \r
15 all the provisions of Section 10 of RFC2026.\r
16 \r
17 Internet-Drafts are working documents of the Internet Engineering \r
18 Task Force (IETF), its areas, and its working groups. Note that other\r
19 groups may also distribute working documents as Internet-Drafts.\r
20 \r
21 Internet-Drafts are draft documents valid for a maximum of six months\r
22 and may be updated, replaced, or obsoleted by other documents at any\r
23 time. It is inappropriate to use Internet-Drafts as reference \r
24 material or to cite them other than as "work in progress."\r
25 \r
26 The list of current Internet-Drafts can be accessed at\r
27 http://www.ietf.org/ietf/1id-abstracts.txt.\r
28 \r
29 The list of Internet-Draft Shadow Directories can be accessed at\r
30 http://www.ietf.org/shadow.html.\r
31 \r
32 This Internet-Draft expires on 1 January 2001. Comments and \r
33 suggestions on this document are encouraged. Comments on this \r
34 document should be sent to the LDAPExt working group discussion list:\r
35                 ietf-ldapext@netscape.com\r
36 or directly to the authors.\r
37 \r
38 \r
39 ABSTRACT\r
40 \r
41 This document describes a control for the Lightweight Directory \r
42 Access Protocol v3 that is used to return a subset of attribute \r
43 values from an entry, specifically, only those values that match a \r
44 "values return" filter. Without support for this control, a client \r
45 must retrieve all of an attribute's values and search for specific \r
46 values locally.\r
47 \r
48 \r
49 1. Introduction\r
50 \r
51 When reading an attribute from an entry using LDAP v2 [1] or LDAPv3 \r
52 [2], it is normally only possible to read either the attribute type, \r
53 or the attribute type and all its values. It is not possible to \r
54 selectively read just a few of the attribute values. If an attribute \r
55 holds many values, for example, the userCertificate attribute, or the \r
56 subschema publishing operational attributes objectClasses and \r
57 attributeTypes [3], then it may be desirable for the user to be able \r
58 to selectively retrieve a subset of the values, specifically, those \r
59 attribute values that match some user defined selection criteria. \r
60 Without the control specified in this [ID/standard] a client must \r
61 read all of the attribute's values and filter out the unwanted \r
62 values, necessitating the client to implement the matching rules. It \r
63 also requires the client to potentially read and process many \r
64 irrelevant values, which can be inefficient if the values are large \r
65 or complex, or there are many values stored per attribute.\r
66 \r
67 This Internet Draft specifies an LDAPv3 control to enable a user to \r
68 return only those values that matched (i.e. returned TRUE to) one or \r
69 more elements of a newly defined "values return" filter. This control \r
70 can be especially useful when used in conjunction with extensible \r
71 matching rules that match on one or more components of complex binary \r
72 attribute values.\r
73 \r
74 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",  \r
75 "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and "OPTIONAL" in this \r
76 document are to be interpreted as described in RFC 2119 [5].\r
77 \r
78 \r
79 2. The valuesReturnFilter Control\r
80 \r
81 The valuesReturnFilter control MAY be critical or non-critical as \r
82 determined by the user. It is only applicable to the Search \r
83 operation, and SHALL be ignored by the server if it is present on any \r
84 other LDAP operation (even if marked critical on such operations).\r
85 \r
86 The object identifier for this control is 1.2.826.0.1.3344810.2.3\r
87 \r
88 \r
89 The controlValue is \r
90 \r
91         ValuesReturnFilter ::= SEQUENCE OF SimpleFilterItem\r
92 \r
93         SimpleFilterItem ::= CHOICE {\r
94                 equalityMatch   [3] AttributeValueAssertion,\r
95                 substrings      [4] SubstringFilter,\r
96                 greaterOrEqual  [5] AttributeValueAssertion,\r
97                 lessOrEqual     [6] AttributeValueAssertion,\r
98                 present         [7] AttributeDescription,\r
99                 approxMatch     [8] AttributeValueAssertion,\r
100                 extensibleMatch [9] SimpleMatchingAssertion }\r
101 \r
102          SimpleMatchingAssertion ::= SEQUENCE {\r
103                 matchingRule    [1] MatchingRuleId OPTIONAL,\r
104                 type            [2] AttributeDescription OPTIONAL,\r
105                 matchValue      [3] AssertionValue}\r
106 \r
107 All the above data types have their standard meanings as defined in \r
108 [2].\r
109 \r
110 If the server supports this control, the server MUST make use of the \r
111 control as follows:\r
112 \r
113 (1) The Search Filter is first executed in order to determine \r
114 which entries satisfy the Search criteria. The control has no \r
115 impact on this step.\r
116 \r
117 (2) If the typesOnly parameter of the Search Request is TRUE, \r
118 the control has no effect and the Search Request SHOULD be \r
119 processed as if the control had not been specified.\r
120 \r
121 (3) If the attributes parameter of the Search Request consists \r
122 of a list containing only the attribute with OID "1.1" \r
123 (specifying that no attributes are to be returned), the control \r
124 has no effect and the Search Request SHOULD be processed as if \r
125 the control had not been specified.\r
126 \r
127 (4) For each attribute listed in the attributes parameter of the \r
128 Search Request, the server MUST apply the control as follows:\r
129 \r
130 i) Every attribute value that evaluates TRUE against one or \r
131 more elements of the ValuesReturnFilter is placed in the \r
132 SearchResultEntry.\r
133 ii) Every attribute value that evaluates FALSE or undefined \r
134 against all elements of the ValuesReturnFilter is not \r
135 placed in the SearchResultEntry. An attribute that has no \r
136 values selected is returned with an empty set of vals.\r
137 \r
138 Editor's Note. There is possibly a more efficient but slightly more \r
139 complex way of achieving the value filtering. An alternative is to \r
140 remove the 'present' SimpleFilterItem (which obviously evaluates true \r
141 for every attribute value of the 'present' attribute description), \r
142 and to say that any attribute whose type is not mentioned in the \r
143 ValuesReturnFilter is not filtered and has all its attribute values \r
144 returned. Comments please.\r
145 \r
146 \r
147 3. Relationship to X.500\r
148 \r
149 The control is a superset of the matchedValuesOnly boolean of the \r
150 X.500 DAP [4] Search argument, as amended in the latest version [6].\r
151 Close examination of the matchedValuesOnly boolean by the LDAPExt \r
152 group revealed ambiguities and complexities in the MVO boolean that \r
153 could not easily be resolved. For example, are only those attribute \r
154 values that contributed to the overall truth of the filter governed \r
155 by the MVO boolean, or all values of attributes in the filter \r
156 governed by the MVO boolean, even if the filter item containing the \r
157 attribute evaluated to false. For this reason the LDAP group decided \r
158 to replace the MVO boolean with a simple filter that removes any \r
159 uncertainty as to whether an attribute value has been selected or \r
160 not. \r
161 \r
162 \r
163 4. Examples\r
164 \r
165 (1) The first example simply shows how the control can be used to \r
166 selectively read a subset of attribute values. \r
167 \r
168 The entry below represents a groupOfNames object class containing \r
169 several members from different organizations.\r
170 \r
171 cn: Cross Organizational Standards Body\r
172 member: cn=joe,o=acme\r
173 member: cn=alice,o=acme\r
174 member: cn=bob,o=foo\r
175 member: cn=sue,o=bar\r
176 \r
177 An LDAP search operation is specified with a baseObject set to the\r
178 DN of the entry, a baseObject scope, a filter set to \r
179 "member=*o=acme", and the list of attributes to be returned set to \r
180 "member". In addition, a ValuesReturnFilter control is set to \r
181 "member=*o=acme".\r
182 \r
183 The search results returned by the server would consist of the \r
184 following entry:\r
185 \r
186 cn: Cross Organizational Standards Body\r
187 member: cn=joe, o=acme\r
188 member: cn=alice, o=acme\r
189 \r
190 \r
191 (2) The second example shows how the control can be set to match on \r
192 attributes that are (mail) and are not (telephoneNumber) part of the \r
193 search filter. It also shows how a user can filter some attribute \r
194 values (mail) and not others (telephoneNumber).\r
195 \r
196 The entries below represent inetOrgPerson [7] object classes located\r
197 below some distinguished name in the directory.\r
198 \r
199 cn: Sean Mullan\r
200 mail: sean.mullan@sun.com\r
201 mail: mullan@east.sun.com\r
202 telephoneNumber: +1 781 442 0926\r
203 telephoneNumber: 555-9999\r
204 \r
205 cn: David Chadwick\r
206 mail: d.w.chadwick@salford.ac.uk\r
207 \r
208 An LDAP search operation is specified with a baseObject set to the\r
209 DN of the entry, a subtree scope, a filter set to \r
210 "(|(mail=sean.mullan@sun.com)(mail=d.w.chadwick@salford.ac.uk))", and \r
211 the list of attributes to be returned set to "mail telephoneNumber". \r
212 In addition, a ValuesReturnFilter control is set to \r
213 "mail=sean.mullan@sun.com, mail=d.w.chadwick@salford.ac.uk, \r
214 telephoneNumber=*"\r
215 \r
216 The search results returned by the server would consist of the \r
217 following entries:\r
218 \r
219 cn: Sean Mullan\r
220 mail: sean.mullan@sun.com\r
221 telephoneNumber: +1 781 442 0926\r
222 telephoneNumber: 555-9999\r
223 \r
224 cn: David Chadwick\r
225 mail: d.w.chadwick@salford.ac.uk\r
226 \r
227 Note that the control has no effect on the values returned for the \r
228 "telephoneNumber" attribute (all of the values are returned), since \r
229 the control specified that all values should be returned.\r
230 \r
231 (3) The third example shows how one might retrieve a single attribute \r
232 type schema definition for the "gunk" attribute with OID 1.2.3.4.5\r
233 \r
234 Assume the subschema subentry is held somewhere below the root entry \r
235 with RDN "subschema subentry", and this holds an attributeTypes \r
236 operational attribute holding the descriptions of the 35 attributes \r
237 known to this server (each description is held as a single attribute \r
238 value of the attributeTypes attribute). \r
239 \r
240 cn: subschema subentry\r
241 objectClass: subschema\r
242 attributeTypes: ( 2.5.4.3 NAME 'cn' SUP name )\r
243 attributeTypes: ( 2.5.4.6 NAME 'c' SUP name SINGLE-VALUE )\r
244 attributeTypes: ( 2.5.4.0 NAME 'objectClass' EQUALITY \r
245 objectIdentifierMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )\r
246 attributeTypes: ( 2.5.18.2 NAME 'modifyTimestamp' EQUALITY \r
247 generalizedTimeMatch ORDERING generalizedTimeOrderingMatch\r
248 SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE NO-USER-\r
249 MODIFICATION USAGE directoryOperation )\r
250 attributeTypes: ( 2.5.21.6 NAME 'objectClasses' EQUALITY \r
251 objectIdentifierFirstComponentMatch SYNTAX \r
252 1.3.6.1.4.1.1466.115.121.1.37 USAGE directoryOperation )\r
253 attributeTypes: ( 1.2.3.4.5 NAME 'gunk' EQUALITY caseIgnoreMatch  \r
254 SUBSTR caseIgnoreSubstringsMatch SYNTAX \r
255 1.3.6.1.4.1.1466.115.121.1.44{64} )\r
256 attributeTypes: ( 2.5.21.5 NAME 'attributeTypes' EQUALITY \r
257 objectIdentifierFirstComponentMatch SYNTAX \r
258 1.3.6.1.4.1.1466.115.121.1.3 USAGE directoryOperation )\r
259 \r
260 plus another 28 - you get the idea.\r
261 \r
262 \r
263 The user creates an LDAP search operation with a baseObject set to \r
264 root, a subtree scope, a filter set to "objectClass=subschema", the \r
265 list of attributes to be returned set to "attributeTypes", and the \r
266 ValuesReturnFilter set to "attributeTypes=1.2.3.4.5"\r
267 \r
268 The search result returned by the server would consist of the \r
269 following entry:\r
270 \r
271 cn: subschema subentry\r
272 attributeTypes: ( 1.2.3.4.5 NAME 'gunk' EQUALITY caseIgnoreMatch  \r
273 SUBSTR caseIgnoreSubstringsMatch SYNTAX \r
274 1.3.6.1.4.1.1466.115.121.1.44{64} )\r
275 \r
276 (4) The final example shows how the control can be set to match on \r
277 attributes that are not part of the search filter. For example, \r
278 searching for all entries that have an email address in the\r
279 sun.com domain, and returning the telephone number for any attribute\r
280 values that start with "555". \r
281 \r
282 The entries below represent inetOrgPerson [7] object classes located\r
283 below some distinguished name in the directory.\r
284 \r
285 cn: Sean Mullan\r
286 mail: sean.mullan@sun.com\r
287 mail: mullan@east.sun.com\r
288 telephoneNumber: +1 781 442 0926\r
289 telephoneNumber: 555-9999\r
290 \r
291 cn: David Chadwick\r
292 mail: d.w.chadwick@salford.ac.uk\r
293 \r
294 An LDAP search operation is specified with a baseObject set to the\r
295 DN of the entry, a subtree scope, a filter set to "mail=*sun.com", \r
296 and the list of attributes to be returned set to "telephoneNumber". \r
297 In addition, a ValuesReturnFilter control is set to\r
298 "telephoneNumber=555*"\r
299 \r
300 The search results returned by the server would consist of the \r
301 following entry:\r
302 \r
303 cn: Sean Mullan\r
304 telephoneNumber: 555-9999\r
305 \r
306 \r
307 5. Security Considerations\r
308 \r
309 This Internet Draft does not discuss security issues at all. \r
310 \r
311 Note that attribute values MUST only be returned if the access \r
312 controls applied by the LDAP server allow them to be returned, and in \r
313 this respect the effect of the ValuesReturnFilter control is of no \r
314 consequence.\r
315 \r
316 Note that the ValuesReturnFilter control may have a positive effect \r
317 on the deployment of public key infrastructures. Certain PKI \r
318 operations, like searching for specific certificates, become more \r
319 practical (when combined with X.509 certificate matching rules at the \r
320 server) and more scalable, since the control avoids the downloading \r
321 of potentially large numbers of irrelevant certificates which would \r
322 have to be processed and filtered locally (which in some cases is \r
323 very difficult to perform).\r
324 \r
325 \r
326 6. Acknowledgements\r
327 \r
328 The authors would like to thank members of the LDAPExt list for their \r
329 constructive comments on earlier versions of this draft, and in \r
330 particular to Harald Alvestrand who first suggested having an \r
331 attribute return filter and Bruce Greenblatt who first proposed a \r
332 syntax for this control.\r
333 \r
334 7. Copyright\r
335 \r
336 Copyright (C) The Internet Society (date). All Rights Reserved.\r
337 \r
338 This document and translations of it may be copied and furnished to \r
339 others, and derivative works that comment on or otherwise explain it \r
340 or assist in its implementation may be prepared, copied, published \r
341 and distributed, in whole or in part, without restriction of any \r
342 kind, provided that the above copyright notice and this paragraph are \r
343 included on all such copies and derivative works.  However, this \r
344 document itself may not be modified in any way, such as by removing \r
345 the copyright notice or references to the Internet Society or other \r
346 Internet organizations, except as needed for the purpose of \r
347 developing Internet standards in which case the procedures for \r
348 copyrights defined in the Internet Standards process must be \r
349 followed, or as required to translate it into languages other than \r
350 English.\r
351 \r
352 The limited permissions granted above are perpetual and will not be \r
353 revoked by the Internet Society or its successors or assigns.\r
354 \r
355 This document and the information contained herein is provided on an \r
356 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING \r
357 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING \r
358 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION \r
359 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF \r
360 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\r
361 \r
362 \r
363 8. References\r
364 \r
365 [1] Yeong, W., Howes, T., and Kille, S. "Lightweight Directory Access \r
366 Protocol", RFC 1777, March 1995.\r
367 [2] M. Wahl, T. Howes, S. Kille, "Lightweight Directory Access  \r
368 Protocol (v3)", Dec. 1997, RFC 2251\r
369 [3] M. Wahl, A. Coulbeck, T. Howes, S. Kille, "Lightweight Directory \r
370 Access Protocol (v3): Attribute Syntax Definitions", RFC 2252, Dec \r
371 1997\r
372 [4] ITU-T Rec. X.511, "The Directory: Abstract Service Definition", \r
373 1993.\r
374 [5] S.Bradner. "Key words for use in RFCs to Indicate Requirement \r
375 Levels", RFC 2119, March 1997.\r
376 [6] ISO/IEC 9594 / ITU-T Rec X.511 (2000) The Directory: Abstract \r
377 Service Definition.\r
378 [7] M. Smith. "Definition of the inetOrgPerson LDAP Object Class", \r
379 Internet Draft <draft-smith-ldap-inetorgperson-03.txt>, April 1999.\r
380 \r
381 \r
382 9. Authors Addresses\r
383 \r
384 David Chadwick\r
385 IS Institute\r
386 University of Salford\r
387 Salford M5 4WT \r
388 England\r
389 \r
390 Email: d.w.chadwick@salford.ac.uk\r
391 \r
392 \r
393 Sean Mullan                     \r
394 Sun Microsystems\r
395 East Point Business Park\r
396 Dublin 3\r
397 Ireland\r
398 Tel: +353 1 853 0655\r
399 Email: sean.mullan@sun.com\r
400 \r
401 Internet-Draft   Returning Matched Values with LDAPv3     1 July 2000\r
402 \r
403 \r
404 1\r
405 \r