summaryrefslogtreecommitdiff
path: root/source4/ldap_server/devdocs/rfc2307.txt
blob: f46519f12708e35e14de83a5fedfddf2b44d3bf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
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
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179






Network Working Group                                          L. Howard
Request for Comments: 2307                        Independent Consultant
Category: Experimental                                        March 1998


      An Approach for Using LDAP as a Network Information Service

Status of this Memo

   This memo defines an Experimental Protocol for the Internet
   community.  It does not specify an Internet standard of any kind.
   Discussion and suggestions for improvement are requested.
   Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (1998).  All Rights Reserved.

Abstract

   This document describes an experimental mechanism for mapping
   entities related to TCP/IP and the UNIX system into X.500 [X500]
   entries so that they may be resolved with the Lightweight Directory
   Access Protocol [RFC2251]. A set of attribute types and object
   classes are proposed, along with specific guidelines for interpreting
   them.

   The intention is to assist the deployment of LDAP as an
   organizational nameservice. No proposed solutions are intended as
   standards for the Internet. Rather, it is hoped that a general
   consensus will emerge as to the appropriate solution to such
   problems, leading eventually to the adoption of standards. The
   proposed mechanism has already been implemented with some success.

1. Background and Motivation

   The UNIX (R) operating system, and its derivatives (specifically,
   those which support TCP/IP and conform to the X/Open Single UNIX
   specification [XOPEN]) require a means of looking up entities, by
   matching them against search criteria or by enumeration. (Other
   operating systems that support TCP/IP may provide some means of
   resolving some of these entities. This schema is applicable to those
   environments also.)

   These entities include users, groups, IP services (which map names to
   IP ports and protocols, and vice versa), IP protocols (which map
   names to IP protocol numbers and vice versa), RPCs (which map names
   to ONC Remote Procedure Call [RFC1057] numbers and vice versa), NIS



Howard                        Experimental                      [Page 1]

RFC 2307      Using LDAP as a Network Information Service     March 1998


   netgroups, booting information (boot parameters and MAC address
   mappings), filesystem mounts, IP hosts and networks, and RFC822 mail
   aliases.

   Resolution requests are made through a set of C functions, provided
   in the UNIX system's C library. For example, the UNIX system utility
   "ls", which enumerates the contents of a filesystem directory, uses
   the C library function getpwuid() in order to map user IDs to login
   names. Once the request is made, it is resolved using a "nameservice"
   which is supported by the client library. The nameservice may be, at
   its simplest, a collection of files in the local filesystem which are
   opened and searched by the C library. Other common nameservices
   include the Network Information Service (NIS) and the Domain Name
   System (DNS). (The latter is typically used for resolving hosts,
   services and networks.) Both these nameservices have the advantage of
   being distributed and thus permitting a common set of entities to be
   shared amongst many clients.

   LDAP is a distributed, hierarchical directory service access protocol
   which is used to access repositories of users and other network-
   related entities. Because LDAP is often not tightly integrated with
   the host operating system, information such as users may need to be
   kept both in LDAP and in an operating system supported nameservice
   such as NIS. By using LDAP as the the primary means of resolving
   these entities, these redundancy issues are minimized and the
   scalability of LDAP can be exploited. (By comparison, NIS services
   based on flat files do not have the scalability or extensibility of
   LDAP or X.500.)

   The object classes and attributes defined below are suitable for
   representing the aforementioned entities in a form compatible with
   LDAP and X.500 directory services.

2. General Issues

2.1. Terminology

   The key words "MUST", "SHOULD", and "MAY" used in this document are
   to be interpreted as described in [RFC2119].

   For the purposes of this document, the term "nameservice" refers to a
   service, such as NIS or flat files, that is used by the operating
   system to resolve entities within a single, local naming context.
   Contrast this with a "directory service" such as LDAP, which supports
   extensible schema and multiple naming contexts.






Howard                        Experimental                      [Page 2]

RFC 2307      Using LDAP as a Network Information Service     March 1998


   The term "NIS-related entities" broadly refers to entities which are
   typically resolved using the Network Information Service. (NIS was
   previously known as YP.) Deploying LDAP for resolving these entities
   does not imply that NIS be used, as a gateway or otherwise. In
   particular, the host and network classes are generically applicable,
   and may be implemented on any system that wishes to use LDAP or X.500
   for host and network resolution.

   The "DUA" (directory user agent) refers to the LDAP client querying
   these entities, such as an LDAP to NIS gateway or the C library.  The
   "client" refers to the application which ultimately makes use of the
   information returned by the resolution. It is irrelevant whether the
   DUA and the client reside within the same address space. The act of
   the DUA making this information to the client is termed
   "republishing".

   To avoid confusion, the term "login name" refers to the user's login
   name (being the value of the uid attribute) and the term "user ID"
   refers to he user's integer identification number (being the value of
   the uidNumber attribute).

   The phrases "resolving an entity" and "resolution of entities" refer
   respectively to enumerating NIS-related entities of a given type, and
   matching them against a given search criterion. One or more entities
   are returned as a result of successful "resolutions" (a "match"
   operation will only return one entity).

   The use of the term UNIX does not confer upon this schema the
   endorsement of owners of the UNIX trademark. Where necessary, the
   term "TCP/IP entity" is used to refer to protocols, services, hosts,
   and networks, and the term "UNIX entity" to its complement. (The
   former category does not mandate the host operating system supporting
   the interfaces required for resolving UNIX entities.)

   The OIDs defined below are derived from iso(1) org(3) dod(6)
   internet(1) directory(1) nisSchema(1).

2.2. Attributes

   The attributes and classes defined in this document are summarized
   below.

   The following attributes are defined in this document:

           uidNumber
           gidNumber
           gecos
           homeDirectory



Howard                        Experimental                      [Page 3]

RFC 2307      Using LDAP as a Network Information Service     March 1998


           loginShell
           shadowLastChange
           shadowMin
           shadowMax
           shadowWarning
           shadowInactive
           shadowExpire
           shadowFlag
           memberUid
           memberNisNetgroup
           nisNetgroupTriple
           ipServicePort
           ipServiceProtocol
           ipProtocolNumber
           oncRpcNumber
           ipHostNumber
           ipNetworkNumber
           ipNetmaskNumber
           macAddress
           bootParameter
           bootFile
           nisMapName
           nisMapEntry

   Additionally, some of the attributes defined in [RFC2256] are
   required.

2.3. Object classes

   The following object classes are defined in this document:

           posixAccount
           shadowAccount
           posixGroup
           ipService
           ipProtocol
           oncRpc
           ipHost
           ipNetwork
           nisNetgroup
           nisMap
           nisObject
           ieee802Device
           bootableDevice

   Additionally, some of the classes defined in [RFC2256] are required.





Howard                        Experimental                      [Page 4]

RFC 2307      Using LDAP as a Network Information Service     March 1998


2.4. Syntax definitions

   The following syntax definitions [RFC2252] are used by this schema.
   The nisNetgroupTripleSyntax represents NIS netgroup triples:

           ( nisSchema.0.0 NAME 'nisNetgroupTripleSyntax'
             DESC 'NIS netgroup triple' )

   Values in this syntax are represented by the following:

        nisnetgrouptriple = "(" hostname "," username "," domainname ")"
        hostname          = "" / "-" / keystring
        username          = "" / "-" / keystring
        domainname        = "" / "-" / keystring

   X.500 servers may use the following representation of the above
   syntax:

        nisNetgroupTripleSyntax ::= SEQUENCE {
         hostname  [0] IA5String OPTIONAL,
         username  [1] IA5String OPTIONAL,
         domainname  [2] IA5String OPTIONAL
        }

   The bootParameterSyntax syntax represents boot parameters:

           ( nisSchema.0.1 NAME 'bootParameterSyntax'
             DESC 'Boot parameter' )

   where:

        bootparameter     = key "=" server ":" path
        key               = keystring
        server            = keystring
        path              = keystring

   X.500 servers may use the following representation of the above
   syntax:

        bootParameterSyntax ::= SEQUENCE {
         key     IA5String,
         server  IA5String,
         path    IA5String
        }

   Values adhering to these syntaxes are encoded as strings by LDAP
   servers.




Howard                        Experimental                      [Page 5]

RFC 2307      Using LDAP as a Network Information Service     March 1998


3. Attribute definitions

   This section contains attribute definitions to be implemented by DUAs
   supporting this schema.

        ( nisSchema.1.0 NAME 'uidNumber'
          DESC 'An integer uniquely identifying a user in an
                administrative domain'
          EQUALITY integerMatch SYNTAX 'INTEGER' SINGLE-VALUE )

        ( nisSchema.1.1 NAME 'gidNumber'
          DESC 'An integer uniquely identifying a group in an
                administrative domain'
          EQUALITY integerMatch SYNTAX 'INTEGER' SINGLE-VALUE )

        ( nisSchema.1.2 NAME 'gecos'
          DESC 'The GECOS field; the common name'
          EQUALITY caseIgnoreIA5Match
          SUBSTRINGS caseIgnoreIA5SubstringsMatch
          SYNTAX 'IA5String' SINGLE-VALUE )

        ( nisSchema.1.3 NAME 'homeDirectory'
          DESC 'The absolute path to the home directory'
          EQUALITY caseExactIA5Match
          SYNTAX 'IA5String' SINGLE-VALUE )

        ( nisSchema.1.4 NAME 'loginShell'
          DESC 'The path to the login shell'
          EQUALITY caseExactIA5Match
          SYNTAX 'IA5String' SINGLE-VALUE )

        ( nisSchema.1.5 NAME 'shadowLastChange'
          EQUALITY integerMatch
          SYNTAX 'INTEGER' SINGLE-VALUE )

        ( nisSchema.1.6 NAME 'shadowMin'
          EQUALITY integerMatch
          SYNTAX 'INTEGER' SINGLE-VALUE )

        ( nisSchema.1.7 NAME 'shadowMax'
          EQUALITY integerMatch
          SYNTAX 'INTEGER' SINGLE-VALUE )

        ( nisSchema.1.8 NAME 'shadowWarning'
          EQUALITY integerMatch
          SYNTAX 'INTEGER' SINGLE-VALUE )

        ( nisSchema.1.9 NAME 'shadowInactive'



Howard                        Experimental                      [Page 6]

RFC 2307      Using LDAP as a Network Information Service     March 1998


          EQUALITY integerMatch
          SYNTAX 'INTEGER' SINGLE-VALUE )

        ( nisSchema.1.10 NAME 'shadowExpire'
          EQUALITY integerMatch
          SYNTAX 'INTEGER' SINGLE-VALUE )

        ( nisSchema.1.11 NAME 'shadowFlag'
          EQUALITY integerMatch
          SYNTAX 'INTEGER' SINGLE-VALUE )

        ( nisSchema.1.12 NAME 'memberUid'
          EQUALITY caseExactIA5Match
          SUBSTRINGS caseExactIA5SubstringsMatch
          SYNTAX 'IA5String' )

        ( nisSchema.1.13 NAME 'memberNisNetgroup'
          EQUALITY caseExactIA5Match
          SUBSTRINGS caseExactIA5SubstringsMatch
          SYNTAX 'IA5String' )

        ( nisSchema.1.14 NAME 'nisNetgroupTriple'
          DESC 'Netgroup triple'
          SYNTAX 'nisNetgroupTripleSyntax' )

        ( nisSchema.1.15 NAME 'ipServicePort'
          EQUALITY integerMatch
          SYNTAX 'INTEGER' SINGLE-VALUE )

        ( nisSchema.1.16 NAME 'ipServiceProtocol'
          SUP name )

        ( nisSchema.1.17 NAME 'ipProtocolNumber'
          EQUALITY integerMatch
          SYNTAX 'INTEGER' SINGLE-VALUE )

        ( nisSchema.1.18 NAME 'oncRpcNumber'
          EQUALITY integerMatch
          SYNTAX 'INTEGER' SINGLE-VALUE )

        ( nisSchema.1.19 NAME 'ipHostNumber'
          DESC 'IP address as a dotted decimal, eg. 192.168.1.1,
                omitting leading zeros'
          EQUALITY caseIgnoreIA5Match
          SYNTAX 'IA5String{128}' )

        ( nisSchema.1.20 NAME 'ipNetworkNumber'
          DESC 'IP network as a dotted decimal, eg. 192.168,



Howard                        Experimental                      [Page 7]

RFC 2307      Using LDAP as a Network Information Service     March 1998


                omitting leading zeros'
          EQUALITY caseIgnoreIA5Match
          SYNTAX 'IA5String{128}' SINGLE-VALUE )

        ( nisSchema.1.21 NAME 'ipNetmaskNumber'
          DESC 'IP netmask as a dotted decimal, eg. 255.255.255.0,
                omitting leading zeros'
          EQUALITY caseIgnoreIA5Match
          SYNTAX 'IA5String{128}' SINGLE-VALUE )

        ( nisSchema.1.22 NAME 'macAddress'
          DESC 'MAC address in maximal, colon separated hex
                notation, eg. 00:00:92:90:ee:e2'
          EQUALITY caseIgnoreIA5Match
          SYNTAX 'IA5String{128}' )

        ( nisSchema.1.23 NAME 'bootParameter'
          DESC 'rpc.bootparamd parameter'
          SYNTAX 'bootParameterSyntax' )

        ( nisSchema.1.24 NAME 'bootFile'
          DESC 'Boot image name'
          EQUALITY caseExactIA5Match
          SYNTAX 'IA5String' )

        ( nisSchema.1.26 NAME 'nisMapName'
          SUP name )

        ( nisSchema.1.27 NAME 'nisMapEntry'
          EQUALITY caseExactIA5Match
          SUBSTRINGS caseExactIA5SubstringsMatch
          SYNTAX 'IA5String{1024}' SINGLE-VALUE )

4. Class definitions

   This section contains class definitions to be implemented by DUAs
   supporting the schema.

   The rfc822MailGroup object class MAY be used to represent a mail
   group for the purpose of alias expansion. Several alternative schemes
   for mail routing and delivery using LDAP directories, which are
   outside the scope of this document.

        ( nisSchema.2.0 NAME 'posixAccount' SUP top AUXILIARY
          DESC 'Abstraction of an account with POSIX attributes'
          MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory )
          MAY ( userPassword $ loginShell $ gecos $ description ) )




Howard                        Experimental                      [Page 8]

RFC 2307      Using LDAP as a Network Information Service     March 1998


        ( nisSchema.2.1 NAME 'shadowAccount' SUP top AUXILIARY
          DESC 'Additional attributes for shadow passwords'
          MUST uid
          MAY ( userPassword $ shadowLastChange $ shadowMin
                shadowMax $ shadowWarning $ shadowInactive $
                shadowExpire $ shadowFlag $ description ) )

        ( nisSchema.2.2 NAME 'posixGroup' SUP top STRUCTURAL
          DESC 'Abstraction of a group of accounts'
          MUST ( cn $ gidNumber )
          MAY ( userPassword $ memberUid $ description ) )

        ( nisSchema.2.3 NAME 'ipService' SUP top STRUCTURAL
          DESC 'Abstraction an Internet Protocol service.
                Maps an IP port and protocol (such as tcp or udp)
                to one or more names; the distinguished value of
                the cn attribute denotes the service's canonical
                name'
          MUST ( cn $ ipServicePort $ ipServiceProtocol )
          MAY ( description ) )

        ( nisSchema.2.4 NAME 'ipProtocol' SUP top STRUCTURAL
          DESC 'Abstraction of an IP protocol. Maps a protocol number
                to one or more names. The distinguished value of the cn
                attribute denotes the protocol's canonical name'
          MUST ( cn $ ipProtocolNumber $ description )
          MAY description )

        ( nisSchema.2.5 NAME 'oncRpc' SUP top STRUCTURAL
          DESC 'Abstraction of an Open Network Computing (ONC)
               [RFC1057] Remote Procedure Call (RPC) binding.
               This class maps an ONC RPC number to a name.
               The distinguished value of the cn attribute denotes
               the RPC service's canonical name'
          MUST ( cn $ oncRpcNumber $ description )
          MAY description )

        ( nisSchema.2.6 NAME 'ipHost' SUP top AUXILIARY

          DESC 'Abstraction of a host, an IP device. The distinguished
                value of the cn attribute denotes the host's canonical
                name. Device SHOULD be used as a structural class'
          MUST ( cn $ ipHostNumber )
          MAY ( l $ description $ manager ) )

        ( nisSchema.2.7 NAME 'ipNetwork' SUP top STRUCTURAL
          DESC 'Abstraction of a network. The distinguished value of
                the cn attribute denotes the network's canonical name'



Howard                        Experimental                      [Page 9]

RFC 2307      Using LDAP as a Network Information Service     March 1998


          MUST ( cn $ ipNetworkNumber )
          MAY ( ipNetmaskNumber $ l $ description $ manager ) )

        ( nisSchema.2.8 NAME 'nisNetgroup' SUP top STRUCTURAL
          DESC 'Abstraction of a netgroup. May refer to other netgroups'
          MUST cn
          MAY ( nisNetgroupTriple $ memberNisNetgroup $ description ) )

        ( nisSchema.2.09 NAME 'nisMap' SUP top STRUCTURAL
          DESC 'A generic abstraction of a NIS map'
          MUST nisMapName
          MAY description )

        ( nisSchema.2.10 NAME 'nisObject' SUP top STRUCTURAL
          DESC 'An entry in a NIS map'
          MUST ( cn $ nisMapEntry $ nisMapName )
          MAY description )

        ( nisSchema.2.11 NAME 'ieee802Device' SUP top AUXILIARY
          DESC 'A device with a MAC address; device SHOULD be
                used as a structural class'
          MAY macAddress )

        ( nisSchema.2.12 NAME 'bootableDevice' SUP top AUXILIARY
          DESC 'A device with boot parameters; device SHOULD be
                used as a structural class'
          MAY ( bootFile $ bootParameter ) )

5. Implementation details

5.1. Suggested resolution methods

   The preferred means of directing a client application (one using the
   shared services of the C library) to use LDAP as its information
   source for the functions listed in 5.2 is to modify the source code
   to directly query LDAP. As the source