source: branches/samba-3.5.x/source4/ldap_server/devdocs/rfc2307.txt

Last change on this file was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 40.4 KB
Line 
1
2
3
4
5
6
7Network Working Group L. Howard
8Request for Comments: 2307 Independent Consultant
9Category: Experimental March 1998
10
11
12 An Approach for Using LDAP as a Network Information Service
13
14Status of this Memo
15
16 This memo defines an Experimental Protocol for the Internet
17 community. It does not specify an Internet standard of any kind.
18 Discussion and suggestions for improvement are requested.
19 Distribution of this memo is unlimited.
20
21Copyright Notice
22
23 Copyright (C) The Internet Society (1998). All Rights Reserved.
24
25Abstract
26
27 This document describes an experimental mechanism for mapping
28 entities related to TCP/IP and the UNIX system into X.500 [X500]
29 entries so that they may be resolved with the Lightweight Directory
30 Access Protocol [RFC2251]. A set of attribute types and object
31 classes are proposed, along with specific guidelines for interpreting
32 them.
33
34 The intention is to assist the deployment of LDAP as an
35 organizational nameservice. No proposed solutions are intended as
36 standards for the Internet. Rather, it is hoped that a general
37 consensus will emerge as to the appropriate solution to such
38 problems, leading eventually to the adoption of standards. The
39 proposed mechanism has already been implemented with some success.
40
411. Background and Motivation
42
43 The UNIX (R) operating system, and its derivatives (specifically,
44 those which support TCP/IP and conform to the X/Open Single UNIX
45 specification [XOPEN]) require a means of looking up entities, by
46 matching them against search criteria or by enumeration. (Other
47 operating systems that support TCP/IP may provide some means of
48 resolving some of these entities. This schema is applicable to those
49 environments also.)
50
51 These entities include users, groups, IP services (which map names to
52 IP ports and protocols, and vice versa), IP protocols (which map
53 names to IP protocol numbers and vice versa), RPCs (which map names
54 to ONC Remote Procedure Call [RFC1057] numbers and vice versa), NIS
55
56
57
58Howard Experimental [Page 1]
59
60
61RFC 2307 Using LDAP as a Network Information Service March 1998
62
63
64 netgroups, booting information (boot parameters and MAC address
65 mappings), filesystem mounts, IP hosts and networks, and RFC822 mail
66 aliases.
67
68 Resolution requests are made through a set of C functions, provided
69 in the UNIX system's C library. For example, the UNIX system utility
70 "ls", which enumerates the contents of a filesystem directory, uses
71 the C library function getpwuid() in order to map user IDs to login
72 names. Once the request is made, it is resolved using a "nameservice"
73 which is supported by the client library. The nameservice may be, at
74 its simplest, a collection of files in the local filesystem which are
75 opened and searched by the C library. Other common nameservices
76 include the Network Information Service (NIS) and the Domain Name
77 System (DNS). (The latter is typically used for resolving hosts,
78 services and networks.) Both these nameservices have the advantage of
79 being distributed and thus permitting a common set of entities to be
80 shared amongst many clients.
81
82 LDAP is a distributed, hierarchical directory service access protocol
83 which is used to access repositories of users and other network-
84 related entities. Because LDAP is often not tightly integrated with
85 the host operating system, information such as users may need to be
86 kept both in LDAP and in an operating system supported nameservice
87 such as NIS. By using LDAP as the the primary means of resolving
88 these entities, these redundancy issues are minimized and the
89 scalability of LDAP can be exploited. (By comparison, NIS services
90 based on flat files do not have the scalability or extensibility of
91 LDAP or X.500.)
92
93 The object classes and attributes defined below are suitable for
94 representing the aforementioned entities in a form compatible with
95 LDAP and X.500 directory services.
96
972. General Issues
98
992.1. Terminology
100
101 The key words "MUST", "SHOULD", and "MAY" used in this document are
102 to be interpreted as described in [RFC2119].
103
104 For the purposes of this document, the term "nameservice" refers to a
105 service, such as NIS or flat files, that is used by the operating
106 system to resolve entities within a single, local naming context.
107 Contrast this with a "directory service" such as LDAP, which supports
108 extensible schema and multiple naming contexts.
109
110
111
112
113
114
115Howard Experimental [Page 2]
116
117
118RFC 2307 Using LDAP as a Network Information Service March 1998
119
120
121 The term "NIS-related entities" broadly refers to entities which are
122 typically resolved using the Network Information Service. (NIS was
123 previously known as YP.) Deploying LDAP for resolving these entities
124 does not imply that NIS be used, as a gateway or otherwise. In
125 particular, the host and network classes are generically applicable,
126 and may be implemented on any system that wishes to use LDAP or X.500
127 for host and network resolution.
128
129 The "DUA" (directory user agent) refers to the LDAP client querying
130 these entities, such as an LDAP to NIS gateway or the C library. The
131 "client" refers to the application which ultimately makes use of the
132 information returned by the resolution. It is irrelevant whether the
133 DUA and the client reside within the same address space. The act of
134 the DUA making this information to the client is termed
135 "republishing".
136
137 To avoid confusion, the term "login name" refers to the user's login
138 name (being the value of the uid attribute) and the term "user ID"
139 refers to he user's integer identification number (being the value of
140 the uidNumber attribute).
141
142 The phrases "resolving an entity" and "resolution of entities" refer
143 respectively to enumerating NIS-related entities of a given type, and
144 matching them against a given search criterion. One or more entities
145 are returned as a result of successful "resolutions" (a "match"
146 operation will only return one entity).
147
148 The use of the term UNIX does not confer upon this schema the
149 endorsement of owners of the UNIX trademark. Where necessary, the
150 term "TCP/IP entity" is used to refer to protocols, services, hosts,
151 and networks, and the term "UNIX entity" to its complement. (The
152 former category does not mandate the host operating system supporting
153 the interfaces required for resolving UNIX entities.)
154
155 The OIDs defined below are derived from iso(1) org(3) dod(6)
156 internet(1) directory(1) nisSchema(1).
157
1582.2. Attributes
159
160 The attributes and classes defined in this document are summarized
161 below.
162
163 The following attributes are defined in this document:
164
165 uidNumber
166 gidNumber
167 gecos
168 homeDirectory
169
170
171
172Howard Experimental [Page 3]
173
174
175RFC 2307 Using LDAP as a Network Information Service March 1998
176
177
178 loginShell
179 shadowLastChange
180 shadowMin
181 shadowMax
182 shadowWarning
183 shadowInactive
184 shadowExpire
185 shadowFlag
186 memberUid
187 memberNisNetgroup
188 nisNetgroupTriple
189 ipServicePort
190 ipServiceProtocol
191 ipProtocolNumber
192 oncRpcNumber
193 ipHostNumber
194 ipNetworkNumber
195 ipNetmaskNumber
196 macAddress
197 bootParameter
198 bootFile
199 nisMapName
200 nisMapEntry
201
202 Additionally, some of the attributes defined in [RFC2256] are
203 required.
204
2052.3. Object classes
206
207 The following object classes are defined in this document:
208
209 posixAccount
210 shadowAccount
211 posixGroup
212 ipService
213 ipProtocol
214 oncRpc
215 ipHost
216 ipNetwork
217 nisNetgroup
218 nisMap
219 nisObject
220 ieee802Device
221 bootableDevice
222
223 Additionally, some of the classes defined in [RFC2256] are required.
224
225
226
227
228
229Howard Experimental [Page 4]
230
231
232RFC 2307 Using LDAP as a Network Information Service March 1998
233
234
2352.4. Syntax definitions
236
237 The following syntax definitions [RFC2252] are used by this schema.
238 The nisNetgroupTripleSyntax represents NIS netgroup triples:
239
240 ( nisSchema.0.0 NAME 'nisNetgroupTripleSyntax'
241 DESC 'NIS netgroup triple' )
242
243 Values in this syntax are represented by the following:
244
245 nisnetgrouptriple = "(" hostname "," username "," domainname ")"
246 hostname = "" / "-" / keystring
247 username = "" / "-" / keystring
248 domainname = "" / "-" / keystring
249
250 X.500 servers may use the following representation of the above
251 syntax:
252
253 nisNetgroupTripleSyntax ::= SEQUENCE {
254 hostname [0] IA5String OPTIONAL,
255 username [1] IA5String OPTIONAL,
256 domainname [2] IA5String OPTIONAL
257 }
258
259 The bootParameterSyntax syntax represents boot parameters:
260
261 ( nisSchema.0.1 NAME 'bootParameterSyntax'
262 DESC 'Boot parameter' )
263
264 where:
265
266 bootparameter = key "=" server ":" path
267 key = keystring
268 server = keystring
269 path = keystring
270
271 X.500 servers may use the following representation of the above
272 syntax:
273
274 bootParameterSyntax ::= SEQUENCE {
275 key IA5String,
276 server IA5String,
277 path IA5String
278 }
279
280 Values adhering to these syntaxes are encoded as strings by LDAP
281 servers.
282
283
284
285
286Howard Experimental [Page 5]
287
288
289RFC 2307 Using LDAP as a Network Information Service March 1998
290
291
2923. Attribute definitions
293
294 This section contains attribute definitions to be implemented by DUAs
295 supporting this schema.
296
297 ( nisSchema.1.0 NAME 'uidNumber'
298 DESC 'An integer uniquely identifying a user in an
299 administrative domain'
300 EQUALITY integerMatch SYNTAX 'INTEGER' SINGLE-VALUE )
301
302 ( nisSchema.1.1 NAME 'gidNumber'
303 DESC 'An integer uniquely identifying a group in an
304 administrative domain'
305 EQUALITY integerMatch SYNTAX 'INTEGER' SINGLE-VALUE )
306
307 ( nisSchema.1.2 NAME 'gecos'
308 DESC 'The GECOS field; the common name'
309 EQUALITY caseIgnoreIA5Match
310 SUBSTRINGS caseIgnoreIA5SubstringsMatch
311 SYNTAX 'IA5String' SINGLE-VALUE )
312
313 ( nisSchema.1.3 NAME 'homeDirectory'
314 DESC 'The absolute path to the home directory'
315 EQUALITY caseExactIA5Match
316 SYNTAX 'IA5String' SINGLE-VALUE )
317
318 ( nisSchema.1.4 NAME 'loginShell'
319 DESC 'The path to the login shell'
320 EQUALITY caseExactIA5Match
321 SYNTAX 'IA5String' SINGLE-VALUE )
322
323 ( nisSchema.1.5 NAME 'shadowLastChange'
324 EQUALITY integerMatch
325 SYNTAX 'INTEGER' SINGLE-VALUE )
326
327 ( nisSchema.1.6 NAME 'shadowMin'
328 EQUALITY integerMatch
329 SYNTAX 'INTEGER' SINGLE-VALUE )
330
331 ( nisSchema.1.7 NAME 'shadowMax'
332 EQUALITY integerMatch
333 SYNTAX 'INTEGER' SINGLE-VALUE )
334
335 ( nisSchema.1.8 NAME 'shadowWarning'
336 EQUALITY integerMatch
337 SYNTAX 'INTEGER' SINGLE-VALUE )
338
339 ( nisSchema.1.9 NAME 'shadowInactive'
340
341
342
343Howard Experimental [Page 6]
344
345
346RFC 2307 Using LDAP as a Network Information Service March 1998
347
348
349 EQUALITY integerMatch
350 SYNTAX 'INTEGER' SINGLE-VALUE )
351
352 ( nisSchema.1.10 NAME 'shadowExpire'
353 EQUALITY integerMatch
354 SYNTAX 'INTEGER' SINGLE-VALUE )
355
356 ( nisSchema.1.11 NAME 'shadowFlag'
357 EQUALITY integerMatch
358 SYNTAX 'INTEGER' SINGLE-VALUE )
359
360 ( nisSchema.1.12 NAME 'memberUid'
361 EQUALITY caseExactIA5Match
362 SUBSTRINGS caseExactIA5SubstringsMatch
363 SYNTAX 'IA5String' )
364
365 ( nisSchema.1.13 NAME 'memberNisNetgroup'
366 EQUALITY caseExactIA5Match
367 SUBSTRINGS caseExactIA5SubstringsMatch
368 SYNTAX 'IA5String' )
369
370 ( nisSchema.1.14 NAME 'nisNetgroupTriple'
371 DESC 'Netgroup triple'
372 SYNTAX 'nisNetgroupTripleSyntax' )
373
374 ( nisSchema.1.15 NAME 'ipServicePort'
375 EQUALITY integerMatch
376 SYNTAX 'INTEGER' SINGLE-VALUE )
377
378 ( nisSchema.1.16 NAME 'ipServiceProtocol'
379 SUP name )
380
381 ( nisSchema.1.17 NAME 'ipProtocolNumber'
382 EQUALITY integerMatch
383 SYNTAX 'INTEGER' SINGLE-VALUE )
384
385 ( nisSchema.1.18 NAME 'oncRpcNumber'
386 EQUALITY integerMatch
387 SYNTAX 'INTEGER' SINGLE-VALUE )
388
389 ( nisSchema.1.19 NAME 'ipHostNumber'
390 DESC 'IP address as a dotted decimal, eg. 192.168.1.1,
391 omitting leading zeros'
392 EQUALITY caseIgnoreIA5Match
393 SYNTAX 'IA5String{128}' )
394
395 ( nisSchema.1.20 NAME 'ipNetworkNumber'
396 DESC 'IP network as a dotted decimal, eg. 192.168,
397
398
399
400Howard Experimental [Page 7]
401
402
403RFC 2307 Using LDAP as a Network Information Service March 1998
404
405
406 omitting leading zeros'
407 EQUALITY caseIgnoreIA5Match
408 SYNTAX 'IA5String{128}' SINGLE-VALUE )
409
410 ( nisSchema.1.21 NAME 'ipNetmaskNumber'
411 DESC 'IP netmask as a dotted decimal, eg. 255.255.255.0,
412 omitting leading zeros'
413 EQUALITY caseIgnoreIA5Match
414 SYNTAX 'IA5String{128}' SINGLE-VALUE )
415
416 ( nisSchema.1.22 NAME 'macAddress'
417 DESC 'MAC address in maximal, colon separated hex
418 notation, eg. 00:00:92:90:ee:e2'
419 EQUALITY caseIgnoreIA5Match
420 SYNTAX 'IA5String{128}' )
421
422 ( nisSchema.1.23 NAME 'bootParameter'
423 DESC 'rpc.bootparamd parameter'
424 SYNTAX 'bootParameterSyntax' )
425
426 ( nisSchema.1.24 NAME 'bootFile'
427 DESC 'Boot image name'
428 EQUALITY caseExactIA5Match
429 SYNTAX 'IA5String' )
430
431 ( nisSchema.1.26 NAME 'nisMapName'
432 SUP name )
433
434 ( nisSchema.1.27 NAME 'nisMapEntry'
435 EQUALITY caseExactIA5Match
436 SUBSTRINGS caseExactIA5SubstringsMatch
437 SYNTAX 'IA5String{1024}' SINGLE-VALUE )
438
4394. Class definitions
440
441 This section contains class definitions to be implemented by DUAs
442 supporting the schema.
443
444 The rfc822MailGroup object class MAY be used to represent a mail
445 group for the purpose of alias expansion. Several alternative schemes
446 for mail routing and delivery using LDAP directories, which are
447 outside the scope of this document.
448
449 ( nisSchema.2.0 NAME 'posixAccount' SUP top AUXILIARY
450 DESC 'Abstraction of an account with POSIX attributes'
451 MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory )
452 MAY ( userPassword $ loginShell $ gecos $ description ) )
453
454
455
456
457Howard Experimental [Page 8]
458
459
460RFC 2307 Using LDAP as a Network Information Service March 1998
461
462
463 ( nisSchema.2.1 NAME 'shadowAccount' SUP top AUXILIARY
464 DESC 'Additional attributes for shadow passwords'
465 MUST uid
466 MAY ( userPassword $ shadowLastChange $ shadowMin
467 shadowMax $ shadowWarning $ shadowInactive $
468 shadowExpire $ shadowFlag $ description ) )
469
470 ( nisSchema.2.2 NAME 'posixGroup' SUP top STRUCTURAL
471 DESC 'Abstraction of a group of accounts'
472 MUST ( cn $ gidNumber )
473 MAY ( userPassword $ memberUid $ description ) )
474
475 ( nisSchema.2.3 NAME 'ipService' SUP top STRUCTURAL
476 DESC 'Abstraction an Internet Protocol service.
477 Maps an IP port and protocol (such as tcp or udp)
478 to one or more names; the distinguished value of
479 the cn attribute denotes the service's canonical
480 name'
481 MUST ( cn $ ipServicePort $ ipServiceProtocol )
482 MAY ( description ) )
483
484 ( nisSchema.2.4 NAME 'ipProtocol' SUP top STRUCTURAL
485 DESC 'Abstraction of an IP protocol. Maps a protocol number
486 to one or more names. The distinguished value of the cn
487 attribute denotes the protocol's canonical name'
488 MUST ( cn $ ipProtocolNumber $ description )
489 MAY description )
490
491 ( nisSchema.2.5 NAME 'oncRpc' SUP top STRUCTURAL
492 DESC 'Abstraction of an Open Network Computing (ONC)
493 [RFC1057] Remote Procedure Call (RPC) binding.
494 This class maps an ONC RPC number to a name.
495 The distinguished value of the cn attribute denotes
496 the RPC service's canonical name'
497 MUST ( cn $ oncRpcNumber $ description )
498 MAY description )
499
500 ( nisSchema.2.6 NAME 'ipHost' SUP top AUXILIARY
501
502 DESC 'Abstraction of a host, an IP device. The distinguished
503 value of the cn attribute denotes the host's canonical
504 name. Device SHOULD be used as a structural class'
505 MUST ( cn $ ipHostNumber )
506 MAY ( l $ description $ manager ) )
507
508 ( nisSchema.2.7 NAME 'ipNetwork' SUP top STRUCTURAL
509 DESC 'Abstraction of a network. The distinguished value of
510 the cn attribute denotes the network's canonical name'
511
512
513
514Howard Experimental [Page 9]
515
516
517RFC 2307 Using LDAP as a Network Information Service March 1998
518
519
520 MUST ( cn $ ipNetworkNumber )
521 MAY ( ipNetmaskNumber $ l $ description $ manager ) )
522
523 ( nisSchema.2.8 NAME 'nisNetgroup' SUP top STRUCTURAL
524 DESC 'Abstraction of a netgroup. May refer to other netgroups'
525 MUST cn
526 MAY ( nisNetgroupTriple $ memberNisNetgroup $ description ) )
527
528 ( nisSchema.2.09 NAME 'nisMap' SUP top STRUCTURAL
529 DESC 'A generic abstraction of a NIS map'
530 MUST nisMapName
531 MAY description )
532
533 ( nisSchema.2.10 NAME 'nisObject' SUP top STRUCTURAL
534 DESC 'An entry in a NIS map'
535 MUST ( cn $ nisMapEntry $ nisMapName )
536 MAY description )
537
538 ( nisSchema.2.11 NAME 'ieee802Device' SUP top AUXILIARY
539 DESC 'A device with a MAC address; device SHOULD be
540 used as a structural class'
541 MAY macAddress )
542
543 ( nisSchema.2.12 NAME 'bootableDevice' SUP top AUXILIARY
544 DESC 'A device with boot parameters; device SHOULD be
545 used as a structural class'
546 MAY ( bootFile $ bootParameter ) )
547
5485. Implementation details
549
5505.1. Suggested resolution methods
551
552 The preferred means of directing a client application (one using the
553 shared services of the C library) to use LDAP as its information
554 source for the functions listed in 5.2 is to modify the source code
555 to directly query LDAP. As the source to commercial C libraries and
556 applications is rarely available to the end-user, one could emulate a
557 supported nameservice (such as NIS). (This is also an appropriate
558 opportunity to perform caching of entries across process address
559 spaces.) In the case of NIS, reference implementations are widely
560 available and the RPC interface is well known.
561
562 The means by which the operating system is directed to use LDAP is
563 implementation dependent. For example, some operating systems and C
564 libraries support end-user extensible resolvers using dynamically
565 loadable libraries and a nameservice "switch". The means in which the
566 DUA locates LDAP servers is also implementation dependent.
567
568
569
570
571Howard Experimental [Page 10]
572
573
574RFC 2307 Using LDAP as a Network Information Service March 1998
575
576
5775.2. Affected library functions
578
579 The following functions are typically found in the C libraries of
580 most UNIX and POSIX compliant systems. An LDAP search filter
581 [RFC2254] which may be used to satisfy the function call is included
582 alongside each function name. Parameters are denoted by %s and %d for
583 string and integer arguments, respectively. Long lines are broken.
584
585 getpwnam() (&(objectClass=posixAccount)(uid=%s))
586 getpwuid() (&(objectClass=posixAccount)
587 (uidNumber=%d))
588 getpwent() (objectClass=posixAccount)
589
590 getspnam() (&(objectClass=shadowAccount)(uid=%s))
591 getspent() (objectClass=shadowAccount)
592
593 getgrnam() (&(objectClass=posixGroup)(cn=%s))
594 getgrgid() (&(objectClass=posixGroup)
595 (gidNumber=%d))
596 getgrent() (objectClass=posixGroup)
597
598 getservbyname() (&(objectClass=ipService)
599 (cn=%s)(ipServiceProtocol=%s))
600 getservbyport() (&(objectClass=ipService)
601 (ipServicePort=%d)
602 (ipServiceProtocol=%s))
603 getservent() (objectClass=ipService)
604
605 getrpcbyname() (&(objectClass=oncRpc)(cn=%s))
606 getrpcbynumber() (&(objectClass=oncRpc)(oncRpcNumber=%d))
607 getrpcent() (objectClass=oncRpc)
608
609 getprotobyname() (&(objectClass=ipProtocol)(cn=%s))
610 getprotobynumber() (&(objectClass=ipProtocol)
611 (ipProtocolNumber=%d))
612 getprotoent() (objectClass=ipProtocol)
613
614 gethostbyname() (&(objectClass=ipHost)(cn=%s))
615 gethostbyaddr() (&(objectClass=ipHost)(ipHostNumber=%s))
616 gethostent() (objectClass=ipHost)
617
618 getnetbyname() (&(objectClass=ipNetwork)(cn=%s))
619 getnetbyaddr() (&(objectClass=ipNetwork)
620 (ipNetworkNumber=%s))
621 getnetent() (objectClass=ipNetwork)
622
623 setnetgrent() (&(objectClass=nisNetgroup)(cn=%s))
624
625
626
627
628Howard Experimental [Page 11]
629
630
631RFC 2307 Using LDAP as a Network Information Service March 1998
632
633
6345.3. Interpreting user and group entries
635
636 User and group resolution is initiated by the functions prefixed by
637 getpw and getgr respectively. The uid attribute contains the user's
638 login name. The cn attribute, in posixGroup entries, contains the
639 group's name.
640
641 The account object class provides a convenient structural class for
642 posixAccount, and SHOULD be used where additional attributes are not
643 required.
644
645 It is suggested that uid and cn are used as the RDN attribute type
646 for posixAccount and posixGroup entries, respectively.
647
648 An account's GECOS field is preferably determined by a value of the
649 gecos attribute. If no gecos attribute exists, the value of the cn
650 attribute MUST be used. (The existence of the gecos attribute allows
651 information embedded in the GECOS field, such as a user's telephone
652 number, to be returned to the client without overloading the cn
653 attribute. It also accommodates directories where the common name
654 does not contain the user's full name.)
655
656 An entry of class posixAccount, posixGroup, or shadowAccount without
657 a userPassword attribute MUST NOT be used for authentication. The
658 client should be returned a non-matchable password such as "x".
659
660 userPassword values MUST be represented by following syntax:
661
662 passwordvalue = schemeprefix encryptedpassword
663 schemeprefix = "{" scheme "}"
664 scheme = "crypt" / "md5" / "sha" / altscheme
665 altscheme = "x-" keystring
666 encryptedpassword = encrypted password
667
668 The encrypted password contains of a plaintext key hashed using the
669 algorithm scheme.
670
671 userPassword values which do not adhere to this syntax MUST NOT be
672 used for authentication. The DUA MUST iterate through the values of
673 the attribute until a value matching the above syntax is found. Only
674 if encryptedpassword is an empty string does the user have no
675 password. DUAs are not required to consider encryption schemes which
676 the client will not recognize; in most cases, it may be sufficient to
677 consider only "crypt".
678
679 Below is an example of a userPassword attribute:
680
681 userPassword: {crypt}X5/DBrWPOQQaI
682
683
684
685Howard Experimental [Page 12]
686
687
688RFC 2307 Using LDAP as a Network Information Service March 1998
689
690
691 A future standard may specify LDAP v3 attribute descriptions to
692 represent hashed userPasswords, as noted below. This schema MUST NOT
693 be used with LDAP v2 DUAs and DSAs.
694
695 attributetype = attributename sep attributeoption
696 attributename = "userPassword"
697 sep = ";"
698 attributeoption = schemeclass "-" scheme
699 schemeclass = "hash" / altschemeclass
700 scheme = "crypt" / "md5" / "sha" / altscheme
701 altschemeclass = "x-" keystring
702 altscheme = keystring
703
704
705 Below is an example of a userPassword attribute, represented with an
706 LDAP v3 attribute description:
707
708 userPassword;hash-crypt: X5/DBrWPOQQaI
709
710
711 A DUA MAY utilise the attributes in the shadowAccount class to
712 provide shadow password service (getspnam() and getspent()). In such
713 cases, the DUA MUST NOT make use of the userPassword attribute for
714 getpwnam() et al, and MUST return a non-matchable password (such as
715 "x") to the client instead.
716
7175.4. Interpreting hosts and networks
718
719 The ipHostNumber and ipNetworkNumber attributes are defined in
720 preference to dNSRecord (defined in [RFC1279]), in order to simplify
721 the DUA's role in interpreting entries in the directory. A dNSRecord
722 expresses a complete resource record, including time to live and
723 class data, which is extraneous to this schema.
724
725 Additionally, the ipHost and ipNetwork classes permit a host or
726 network (respectively) and all its aliases to be represented by a
727 single entry in the directory. This is not necessarily possible if a
728 DNS resource record is mapped directly to an LDAP entry.
729 Implementations that wish to use LDAP to master DNS zone information
730 are not precluded from doing so, and may simply avoid the ipHost and
731 ipNetwork classes.
732
733 This document redefines, although not exclusively, the ipNetwork
734 class defined in [RFC1279], in order to achieve consistent naming
735 with ipHost. The ipNetworkNumber attribute is also used in the
736 siteContact object class [ROSE].
737
738
739
740
741
742Howard Experimental [Page 13]
743
744
745RFC 2307 Using LDAP as a Network Information Service March 1998
746
747
748 The trailing zeros in a network address MUST be omitted. CIDR-style
749 network addresses (eg. 192.168.1/24) MAY be used.
750
751 Hosts with IPv6 addresses MUST be written in their "preferred" form
752 as defined in section 2.2.1 of [RFC1884], such that all components of
753 the address are indicated and leading zeros are omitted. This
754 provides a consistent means of resolving ipHosts by address.
755
7565.5. Interpreting other entities
757
758 In general, a one-to-one mapping between entities and LDAP entries is
759 proposed, in that each entity has exactly one representation in the
760 DIT. In some cases this is not feasible; for example, a service which
761 is represented in more than one protocol domain. Consider the
762 following entry:
763
764 dn: cn=domain, dc=aja, dc=com
765 cn: domain
766 cn: nameserver
767 objectClass: top
768 objectClass: ipService
769 ipServicePort: 53
770 ipServiceProtocol: tcp
771 ipServiceProtocol: udp
772
773 This entry MUST map to the following two (2) services entities:
774
775 domain 53/tcp nameserver
776 domain 53/udp nameserver
777
778 While the above two entities may be represented as separate LDAP
779 entities, with different distinguished names (such as
780 cn=domain+ipServiceProtocol=tcp, ... and
781 cn=domain+ipServiceProtocol=udp, ...) it is convenient to represent
782 them as a single entry. (If a service is represented in multiple
783 protocol domains with different ports, then multiple entries are
784 required; multivalued RDNs may be used to distinguish them.)
785
786 With the exception of userPassword values, which are parsed according
787 to the syntax considered in section 5.2, any empty values (consisting
788 of a zero length string) are returned by the DUA to the client. The
789 DUA MUST reject any entries which do not conform to the schema
790 (missing mandatory attributes). Non-conforming entries SHOULD be
791 ignored while enumerating entries.
792
793 The nisObject object class MAY be used as a generic means of
794 representing NIS entities. Its use is not encouraged; where support
795 for entities not described in this schema is desired, an appropriate
796
797
798
799Howard Experimental [Page 14]
800
801
802RFC 2307 Using LDAP as a Network Information Service March 1998
803
804
805 schema should be devised. Implementors are strongly advised to
806 support end-user extensible mappings between NIS entities and object
807 classes. (Where the nisObject class is used, the nisMapName attribute
808 may be used as a RDN.)
809
8105.6. Canonicalizing entries with multi-valued naming attributes
811
812 For entities such as hosts, services, networks, protocols, and RPCs,
813 where there may be one or more aliases, the respective entry's
814 relative distinguished name SHOULD be used to determine the canonical
815 name. Any other values for the same attribute are used as aliases.
816 For example, the service described in section 5.5 has the canonical
817 name "domain" and exactly one alias, "nameserver".
818
819 The schema in this document generally only defines one attribute per
820 class which is suitable for distinguishing an entity (excluding any
821 attributes with integer syntax; it is assumed that entries will be
822 distinguished on name). Usually, this is the common name (cn)
823 attribute. This aids the DUA in determining the canonical name of an
824 entity, as it can examine the value of the relative distinguished
825 name. Aliases are thus any values of the distinguishing attribute
826 (such as cn) which do not match the canonical name of the entity.
827
828 In the event that a different attribute is used to distinguish the
829 entry, as may be the case where these object classes are used as
830 auxiliary classes, the entry's canonical name may not be present in
831 the RDN. In this case, the DUA MUST choose one of the non-
832 distinguished values to represent the entity's canonical name. As the
833 directory server guarantees no ordering of attribute values, it may
834 not be possible to distinguish an entry deterministically. This
835 ambiguity SHOULD NOT be resolved by mapping one directory entry into
836 multiple entities.
837
8386. Implementation focus
839
840 A NIS server which uses LDAP instead of local files has been
841 developed which supports the schema defined in this document.
842
843 A reference implementation of the C library resolution code has been
844 written for the Free Software Foundation. It may support other C
845 libraries which support the Name Service Switch (NSS) or the
846 Information Retrieval Service (IRS).
847
848 The author has made available a freely distributable set of scripts
849 which parses local databases such as /etc/passwd and /etc/hosts into
850 a form suitable for loading into an LDAP server.
851
852
853
854
855
856Howard Experimental [Page 15]
857
858
859RFC 2307 Using LDAP as a Network Information Service March 1998
860
861
8627. Security Considerations
863
864 The entirety of related security considerations are outside the scope
865 of this document. It is noted that making passwords encrypted with a
866 widely understood hash function (such as crypt()) available to non-
867 privileged users is dangerous because it exposes them to dictionary
868 and brute-force attacks. This is proposed only for compatibility
869 with existing UNIX system implementations. Sites where security is
870 critical SHOULD consider using a strong authentication service for
871 user authentication.
872
873 Alternatively, the encrypted password could be made available only to
874 a subset of privileged DUAs, which would provide "shadow" password
875 service to client applications. This may be difficult to enforce.
876
877 Because the schema represents operating system-level entities, access
878 to these entities SHOULD be granted on a discretionary basis. (There
879 is little point in restricting access to data which will be
880 republished without restriction, however.) It is particularly
881 important that only administrators can modify entries defined in this
882 schema, with the exception of allowing a principal to change their
883 password (which may be done on behalf of the user by a client bound
884 as a superior principal, such that password restrictions may be
885 enforced). For example, if a user were allowed to change the value of
886 their uidNumber attribute, they could subvert security by
887 equivalencing their account with the superuser account.
888
889 A subtree of the DIT which is to be republished by a DUA (such as a
890 NIS gateway) SHOULD be within the same administrative domain that the
891 republishing DUA represents. (For example, principals outside an
892 organization, while conceivably part of the DIT, should not be
893 considered with the same degree of authority as those within the
894 organization.)
895
896 Finally, care should be exercised with integer attributes of a
897 sensitive nature (particularly the uidNumber and gidNumber
898 attributes) which contain zero-length values. DUAs MAY treat such
899 values as corresponding to the "nobody" or "nogroup" user and group,
900 respectively.
901
9028. Acknowledgements
903
904 Thanks to Leif Hedstrom of Netscape Communications Corporation,
905 Michael Grant and Rosanna Lee of Sun Microsystems Inc., Ed Reed of
906 Novell Inc., and Mark Wahl of Critical Angle Inc. for their valuable
907 contributions to the development of this schema. Thanks to Andrew
908 Josey of The Open Group for clarifying the use of the UNIX trademark,
909 and to Tim Howes and Peter J. Cherny for their support.
910
911
912
913Howard Experimental [Page 16]
914
915
916RFC 2307 Using LDAP as a Network Information Service March 1998
917
918
919 UNIX is a registered trademark of The Open Group.
920
9219. References
922
923 [RFC1057]
924 Sun Microsystems, Inc., "RPC: Remote Procedure Call: Protocol
925 Specification Version 2", RFC 1057, June 1988.
926
927 [RFC1279]
928 Kille, S., "X.500 and Domains", RFC 1279, November 1991.
929
930 [RFC1884]
931 Hinden, R., and S. Deering, "IP Version 6 Addressing
932 Architecture", RFC 1884, December 1995.
933
934 [RFC2119]
935 Bradner, S., "Key Words for use in RFCs to Indicate Requirement
936 Levels", BCP 14, RFC 2119, March 1997.
937
938 [RFC2251]
939 Wahl, M., Howes, T., and S. Kille, "Lightweight Directory Access
940 Protocol (v3)", RFC 2251, December 1997.
941
942 [RFC2252]
943 Wahl, M., Coulbeck, A., Howes, T., and S. Kille, "Lightweight
944 Directory Access Protocol (v3): Attribute Syntax Definitions",
945 RFC 2252, December 1997.
946
947 [RFC2254]
948 Howes, T., "The String Representation of LDAP Search Filters",
949 RFC 2254, December 1997.
950
951 [RFC2256]
952 Wahl, M., "A Summary of the X.500(96) User Schema for use with
953 LDAPv3", RFC 2256, December 1997.
954
955 [ROSE]
956 M. T. Rose, "The Little Black Book: Mail Bonding with OSI
957 Directory Services", ISBN 0-13-683210-5, Prentice-Hall, Inc.,
958 1992.
959
960 [X500]
961 "Information Processing Systems - Open Systems Interconnection -
962 The Directory: Overview of Concepts, Models and Service",
963 ISO/IEC JTC 1/SC21, International Standard 9594-1, 1988.
964
965
966
967
968
969
970Howard Experimental [Page 17]
971
972
973RFC 2307 Using LDAP as a Network Information Service March 1998
974
975
976 [XOPEN]
977 ISO/IEC 9945-1:1990, Information Technology - Portable Operating
978 Systems Interface (POSIX) - Part 1: Systems Application
979 Programming Interface (API) [C Language]
980
98110. Author's Address
982
983 Luke Howard
984 PO Box 59
985 Central Park Vic 3145
986 Australia
987
988 EMail: lukeh@xedoc.com
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027Howard Experimental [Page 18]
1028
1029
1030RFC 2307 Using LDAP as a Network Information Service March 1998
1031
1032
1033A. Example entries
1034
1035 The examples described in this section are provided to illustrate the
1036 schema described in this memo. They are not meant to be exhaustive.
1037
1038 The following entry is an example of the posixAccount class:
1039
1040 dn: uid=lester, dc=aja, dc=com
1041 objectClass: top
1042 objectClass: account
1043 objectClass: posixAccount
1044 uid: lester
1045 cn: Lester the Nightfly
1046 userPassword: {crypt}X5/DBrWPOQQaI
1047 gecos: Lester
1048 loginShell: /bin/csh
1049 uidNumber: 10
1050 gidNumber: 10
1051 homeDirectory: /home/lester
1052
1053
1054 This corresponds the UNIX system password file entry:
1055
1056 lester:X5/DBrWPOQQaI:10:10:Lester:/home/lester:/bin/sh
1057
1058 The following entry is an example of the ipHost class:
1059
1060 dn: cn=peg.aja.com, dc=aja, dc=com
1061 objectClass: top
1062 objectClass: device
1063 objectClass: ipHost
1064 objectClass: bootableDevice
1065 objectClass: ieee802Device
1066 cn: peg.aja.com
1067 cn: www.aja.com
1068 ipHostNumber: 10.0.0.1
1069 macAddress: 00:00:92:90:ee:e2
1070 bootFile: mach
1071 bootParameter: root=fs:/nfsroot/peg
1072 bootParameter: swap=fs:/nfsswap/peg
1073 bootParameter: dump=fs:/nfsdump/peg
1074
1075 This entry represents the host canonically peg.aja.com, also known as
1076 www.aja.com. The Ethernet address and four boot parameters are also
1077 specified.
1078
1079
1080
1081
1082
1083
1084Howard Experimental [Page 19]
1085
1086
1087RFC 2307 Using LDAP as a Network Information Service March 1998
1088
1089
1090 An example of the nisNetgroup class:
1091
1092 dn: cn=nightfly, dc=aja, dc=com
1093 objectClass: top
1094 objectClass: nisNetgroup
1095 cn: nightfly
1096 nisNetgroupTriple: (charlemagne,peg,dunes.aja.com)
1097 nisNetgroupTriple: (lester,-,)
1098 memberNisNetgroup: kamakiriad
1099
1100 This entry represents the netgroup nightfly, which contains two
1101 triples (the user charlemagne, the host peg, and the domain
1102 dunes.aja.com; and, the user lester, no host, and any domain) and one
1103 netgroup (kamakiriad).
1104
1105 Finally, an example of the nisObject class:
1106
1107 dn: nisMapName=tracks, dc=dunes, dc=aja, dc=com
1108 objectClass: top
1109 objectClass: nisMap
1110 nisMapName: tracks
1111
1112 dn: cn=Maxine, nisMapName=tracks, dc=dunes, dc=aja, dc=com
1113 objectClass: top
1114 objectClass: nisObject
1115 cn: Maxine
1116 nisMapName: tracks
1117 nisMapEntry: Nightfly$4
1118
1119 This entry represents the NIS map tracks, and a single map entry.
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141Howard Experimental [Page 20]
1142
1143
1144RFC 2307 Using LDAP as a Network Information Service March 1998
1145
1146
1147Full Copyright Statement
1148
1149 Copyright (C) The Internet Society (1998). All Rights Reserved.
1150
1151 This document and translations of it may be copied and furnished to
1152 others, and derivative works that comment on or otherwise explain it
1153 or assist in its implementation may be prepared, copied, published
1154 and distributed, in whole or in part, without restriction of any
1155 kind, provided that the above copyright notice and this paragraph are
1156 included on all such copies and derivative works. However, this
1157 document itself may not be modified in any way, such as by removing
1158 the copyright notice or references to the Internet Society or other
1159 Internet organizations, except as needed for the purpose of
1160 developing Internet standards in which case the procedures for
1161 copyrights defined in the Internet Standards process must be
1162 followed, or as required to translate it into languages other than
1163 English.
1164
1165 The limited permissions granted above are perpetual and will not be
1166 revoked by the Internet Society or its successors or assigns.
1167
1168 This document and the information contained herein is provided on an
1169 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
1170 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
1171 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
1172 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
1173 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198Howard Experimental [Page 21]
1199
1200
Note: See TracBrowser for help on using the repository browser.