home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_a_c / draft-ietf-asid-nis-schema-01.txt < prev    next >
Text File  |  1997-06-05  |  42KB  |  1,137 lines

  1.  
  2.  
  3. Application Working Group                                      L. Howard
  4. INTERNET-DRAFT                                    Independent Consultant
  5. Expires in six months from                                   4 June 1997
  6. Intended Category: Experimental
  7.  
  8.  
  9.  
  10.       An Approach for Using LDAP as a Network Information Service
  11.                   <draft-ietf-asid-nis-schema-01.txt>
  12.  
  13.  
  14.  
  15. Status of this Memo
  16.  
  17.    This document is an Internet-Draft. Internet-Drafts are working
  18.    documents of the Internet Engineering Task Force (IETF), its areas,
  19.    and its working groups. Note that other groups may also distribute
  20.    working documents as Internet-Drafts.
  21.  
  22.    Internet-Drafts are draft documents valid for a maximum of six
  23.    months. Internet-Drafts may be updated, replaced, or made obsolete by
  24.    other documents at any time. It is not appropriate to use Internet-
  25.    Drafts as reference material or to cite them other than as a "working
  26.    draft" or "work in progress".
  27.  
  28.    To learn the current status of any Internet-Draft, please check the
  29.    1id-abstracts.txt listing contained in the Internet-Drafts Shadow
  30.    Directories on ds.internic.net (US East Coast), nic.nordu.net
  31.    (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific
  32.    Rim).
  33.  
  34.    Distribution of this document is unlimited.
  35.  
  36. Abstract
  37.  
  38.    This document describes an experimental mechanism for mapping POSIX
  39.    [13] and TCP/IP network-related entities into X.500 entries so that
  40.    they may be resolved with the Lightweight Directory Access Protocol
  41.    [1]. A set of attribute types and object classes are proposed, along
  42.    with specific guidelines for interpreting them.
  43.  
  44.    The intention is to assist the deployment of LDAP as an
  45.    organizational nameservice. No proposed solutions are intended as
  46.    standards for the Internet. Rather, it is hoped that a general
  47.    consensus will emerge as to the appropriate solution to such
  48.    problems, leading eventually to the adoption of standards. The
  49.    proposed mechanism has already been implemented with some success.
  50.  
  51.  
  52.  
  53.  
  54. Howard                                                          [Page 1]
  55.  
  56.  
  57.  
  58.  
  59.  
  60. Internet Draft              NIS X.500 schema                 4 June 1997
  61.  
  62.  
  63. 1. Background and Motivation
  64.  
  65.    The Unix operating system, and its derivatives (specifically, those
  66.    which support TCP/IP and conform to the POSIX XPG.4 specification)
  67.    require a means of looking up entities, by matching them against
  68.    search criteria or by enumeration. (Other operating systems that
  69.    support TCP/IP may provide some means of resolving some of these
  70.    entities. This schema applies to those environments also.)
  71.  
  72.    These entities include users, groups, IP services (which map names to
  73.    IP ports and protocols, and vice versa), IP protocols (which map
  74.    names to IP protocol numbers and vice versa), RPCs (which map names
  75.    to ONC Remote Procedure Call [12] numbers and vice versa), NIS
  76.    netgroups, booting information (boot parameters and MAC address
  77.    mappings), filesystem mounts, IP hosts and networks, and RFC822 mail
  78.    aliases.
  79.  
  80.    Resolution requests are made through a set of C functions, provided
  81.    in the Unix C library. For example, the Unix command line tool 'ls',
  82.    which enumerates the contents of a filesystem directory, uses the C
  83.    library function getpwuid(3c) in order to map user IDs to login
  84.    names. Once the request is made, it is resolved using a 'nameservice'
  85.    which is supported by the client library. The nameservice may be, at
  86.    its simplest, a collection of files in the local filesystem which are
  87.    opened and searched by the C library. Other common nameservices
  88.    include the Network Information Service (NIS) and the Domain Name
  89.    System (DNS). (The latter is typically only used for resolving hosts
  90.    and networks.) Both these nameservices have the advantage of being
  91.    distributed and thus permitting a common set of entities to be shared
  92.    amongst many clients.
  93.  
  94.    LDAP is a distributed, hierarchical directory service access protocol
  95.    which is used to access repositories of users and other network-
  96.    related entities. Because LDAP is usually not tightly integrated with
  97.    the operating system, information such as users needs to be kept both
  98.    in LDAP and in an operating system supported nameservice such as NIS.
  99.    By using LDAP as the the primary means of resolving these entities,
  100.    these redundancy issues are minimized and the scalability of LDAP can
  101.    be exploited. (By comparison, NIS services based on flat files do not
  102.    have the scalability or extensibility of LDAP or X.500.)
  103.  
  104.         "In general, it is advantageous for different network
  105.         applications and services to refer to the directory for
  106.         user account information, rather than each service keeping
  107.         its own collection of user account records, which requires
  108.         the network administrator to separately create or destroy
  109.         user entities, passwords, etc., in many different systems
  110.         each time a user joins or leaves the organization." [4]
  111.  
  112.  
  113.  
  114. Howard                                                          [Page 2]
  115.  
  116.  
  117.  
  118.  
  119.  
  120. Internet Draft              NIS X.500 schema                 4 June 1997
  121.  
  122.  
  123.    The object classes and attributes defined below are suitable for
  124.    representing the aforementioned entities in a form compatible with
  125.    LDAP and X.500 directory services. While the schema is by no means
  126.    deemed to be authoritative, it is considered desirable to have a
  127.    single, open schema rather than the proliferation of multiple
  128.    proprietary schema.  This document is one step towards such a schema.
  129.  
  130. 2. General Issues
  131.  
  132. 2.1. Terminology
  133.  
  134.    In this document, the term 'NIS-related entities' is used rather
  135.    loosely to refer to those entities (described in the previous
  136.    section) which are typically repesented in the Network Information
  137.    Service. (NIS was previously known as Yellow Pages, or YP.) It should
  138.    not be inferred from this that deploying LDAP for resolving such
  139.    entities requires NIS to be used (as a gateway or otherwise). The
  140.    host and network classes are generically applicable, and may be
  141.    implemented on operating systems other than Unix that wish to use
  142.    LDAP to resolve these entities.
  143.  
  144.    The 'DUA' (directory user agent) refers to the LDAP client querying
  145.    these entities, such as an LDAP to NIS gateway or the C library.  The
  146.    'client' refers to the application which ultimately makes use of the
  147.    information returned by the resolution. It is irrelevant whether the
  148.    DUA and the client reside within the same address space. The act of
  149.    the DUA making this information to the client is termed
  150.    'republishing'.
  151.  
  152.    To avoid confusion, the term 'login name' refers to the user's login
  153.    name (being the value of the uid attribute) and the term 'user ID'
  154.    refers to he user's integer identification number (being the value of
  155.    the posixUidNumber attribute).  The term 'principal' is used to
  156.    distinguish accounts that may be used for authentication from those
  157.    that are not.
  158.  
  159.    The term 'nameservice' refers to a service, such as NIS or flat
  160.    files, that is used by the operating system to resolve entities
  161.    within a single, local naming context. Contrast this with a
  162.    'directory service' such as LDAP, which support extensible schema and
  163.    multiple naming contexts.
  164.  
  165.    The phrase 'resolving an entity' or 'resolution of entities' refers
  166.    to enumerating NIS-related entities of a given type, or matching them
  167.    against a given search criterion. One or more entities are returned
  168.    as a result of successful 'resolutions' (a 'match' operation will
  169.    only return one entity).
  170.  
  171.  
  172.  
  173.  
  174. Howard                                                          [Page 3]
  175.  
  176.  
  177.  
  178.  
  179.  
  180. Internet Draft              NIS X.500 schema                 4 June 1997
  181.  
  182.  
  183.    Note that the use of the attribute and class prefix 'posix' does not
  184.    confer any endorsement of this schema by the POSIX standards body.
  185.    The prefix was chosen as a more appropriate prefix than 'unix', the
  186.    other suitable candidate.  Where necessary, the term 'POSIX entity'
  187.    is used to refer to users and groups; the term 'TCP/IP entity' is
  188.    used to refer to protocols, services, hosts, and networks. (The
  189.    latter category does not mandate the host operating system supporting
  190.    the interfaces required for resolving POSIX entities.) NIS netgroups,
  191.    ONC RPC binding information, and mounts fall outside these
  192.    categories.
  193.  
  194. 2.2. Attributes
  195.  
  196.    The attributes and classes defined in this document are summarized
  197.    below.  The reader is referred to [2] for the BFN for attribute type
  198.    definitions.
  199.  
  200.    The following attributes are defined in this document:
  201.  
  202.            posixUidNumber
  203.            posixPrimaryGidNumber
  204.            posixGidNumber
  205.            posixGecos
  206.            posixHomeDirectory
  207.            posixShell
  208.            shadowLastChange
  209.            shadowMin
  210.            shadowMax
  211.            shadowWarn
  212.            shadowInactive
  213.            shadowExpire
  214.            shadowFlag
  215.            memberUid
  216.            memberNISNetgroup
  217.            memberHost
  218.            ipServicePort
  219.            ipServiceProtocol
  220.            ipProtocolNumber
  221.            oNCRPCNumber
  222.            mountOption
  223.            mountType
  224.            mountDirectory
  225.            mountDumpFrequency
  226.            mountPassNo
  227.            ipHostNumber
  228.            ipNetworkNumber
  229.            ipNetmaskNumber
  230.            macAddress
  231.  
  232.  
  233.  
  234. Howard                                                          [Page 4]
  235.  
  236.  
  237.  
  238.  
  239.  
  240. Internet Draft              NIS X.500 schema                 4 June 1997
  241.  
  242.  
  243.            bootParameter
  244.            bootFile
  245.            nISDomain
  246.  
  247.    Additionally, the attributes defined in [2] and [9] are imported.
  248.  
  249. 2.3. Object classes
  250.  
  251.    The reader is referred to [2] for the BFN for object class
  252.    definition.
  253.  
  254.    The following object classes are defined in this document:
  255.  
  256.            posixAccount
  257.            posixGroup
  258.            ipService
  259.            ipProtocol
  260.            oNCRPC
  261.            mount
  262.            ipHost
  263.            ipNetwork
  264.            nISNetgroup
  265.  
  266.    Additionally, the classes defined in [2] and [9] are imported.
  267.  
  268. 3. Attribute definitions
  269.  
  270.    This section contains attribute definitions which must be implemented
  271.    by DUAs supporting the schema.
  272.  
  273.         ( TBD.0.0 NAME 'posixUidNumber'
  274.           DESC 'An integer uniquely identifying a user in an
  275.                 administrative domain'
  276.           EQUALITY integerMatch SYNTAX 'INTEGER' SINGLE-VALUE )
  277.  
  278.         ( TBD.0.1 NAME 'posixPrimaryGidNumber'
  279.           DESC 'An integer uniquely identifying a group in an
  280.                 administrative domain'
  281.           EQUALITY integerMatch SYNTAX 'INTEGER' SINGLE-VALUE )
  282.  
  283.         ( TBD.0.2 NAME 'posixGidNumber'
  284.           DESC 'An integer uniquely identifying a group in an
  285.                 administrative domain'
  286.           EQUALITY integerMatch SYNTAX 'INTEGER' SINGLE-VALUE )
  287.  
  288.         ( TBD.0.3 NAME 'posixGecos'
  289.           DESC 'The GECOS field (the user's full name et al)'
  290.           EQUALITY caseIgnoreIA5Match
  291.  
  292.  
  293.  
  294. Howard                                                          [Page 5]
  295.  
  296.  
  297.  
  298.  
  299.  
  300. Internet Draft              NIS X.500 schema                 4 June 1997
  301.  
  302.  
  303.           SUBSTRINGS caseIgnoreIA5SubstringsMatch
  304.           SYNTAX 'IA5String' SINGLE-VALUE )
  305.  
  306.         ( TBD.0.4 NAME 'posixHomeDirectory'
  307.           DESC 'The absolute path of the user's home directory'
  308.           EQUALITY caseExactIA5Match
  309.           SYNTAX 'IA5String' SINGLE-VALUE )
  310.  
  311.         ( TBD.0.5 NAME 'posixShell'
  312.           DESC 'The absolute path of the user's shell'
  313.           EQUALITY caseExactIA5Match
  314.           SYNTAX 'IA5String' SINGLE-VALUE )
  315.  
  316.         ( TBD.0.6 NAME 'shadowLastChange' EQUALITY integerMatch
  317.           SYNTAX 'INTEGER' SINGLE-VALUE )
  318.  
  319.         ( TBD.0.7 NAME 'shadowMin' EQUALITY integerMatch
  320.           SYNTAX 'INTEGER' SINGLE-VALUE )
  321.  
  322.         ( TBD.0.8 NAME 'shadowMax' EQUALITY integerMatch
  323.           SYNTAX 'INTEGER' SINGLE-VALUE )
  324.  
  325.         ( TBD.0.9 NAME 'shadowWarn' EQUALITY integerMatch
  326.           SYNTAX 'INTEGER' SINGLE-VALUE )
  327.  
  328.         ( TBD.0.10 NAME 'shadowInactive' EQUALITY integerMatch
  329.           SYNTAX 'INTEGER' SINGLE-VALUE )
  330.  
  331.         ( TBD.0.11 NAME 'shadowExpire' EQUALITY integerMatch
  332.           SYNTAX 'INTEGER' SINGLE-VALUE )
  333.  
  334.         ( TBD.0.12 NAME 'shadowFlag' EQUALITY integerMatch
  335.           SYNTAX 'INTEGER' SINGLE-VALUE )
  336.  
  337.         ( TBD.0.13 NAME 'memberUid' EQUALITY caseIgnoreIA5Match
  338.           SUBSTRINGS caseIgnoreIA5SubstringsMatch
  339.           SYNTAX 'IA5String{128}' )
  340.  
  341.         ( TBD.0.14 NAME 'memberNISNetgroup' EQUALITY caseIgnoreIA5Match
  342.           SUBSTRINGS caseIgnoreIA5SubstringsMatch
  343.           SYNTAX 'IA5String' )
  344.  
  345.         ( TBD.0.15 NAME 'memberHost' EQUALITY caseIgnoreIA5Match
  346.           SUBSTRINGS caseIgnoreIA5SubstringsMatch
  347.           SYNTAX 'IA5String' )
  348.  
  349.         ( TBD.0.16 NAME 'ipServicePort' EQUALITY integerMatch
  350.           SYNTAX 'INTEGER' SINGLE-VALUE )
  351.  
  352.  
  353.  
  354. Howard                                                          [Page 6]
  355.  
  356.  
  357.  
  358.  
  359.  
  360. Internet Draft              NIS X.500 schema                 4 June 1997
  361.  
  362.  
  363.         ( TBD.0.17 NAME 'ipServiceProtocol' EQUALITY caseIgnoreIA5Match
  364.           SYNTAX 'IA5String' )
  365.  
  366.         ( TBD.0.18 NAME 'ipProtocolNumber' EQUALITY integerMatch
  367.           SYNTAX 'INTEGER' SINGLE-VALUE )
  368.  
  369.         ( TBD.0.19 NAME 'oNCRPCNumber' EQUALITY integerMatch
  370.           SYNTAX 'INTEGER' SINGLE-VALUE  )
  371.  
  372.         ( TBD.0.20 NAME 'mountOption' EQUALITY caseIgnoreIA5Match
  373.           SYNTAX 'IA5String' )
  374.  
  375.         ( TBD.0.21 NAME 'mountType' EQUALITY caseIgnoreIA5Match
  376.           SYNTAX 'IA5String' SINGLE-VALUE )
  377.  
  378.         ( TBD.0.22 NAME 'mountDirectory' EQUALITY caseExactIA5Match
  379.           SYNTAX 'IA5String' SINGLE-VALUE )
  380.  
  381.         ( TBD.0.23 NAME 'mountDumpFrequency' EQUALITY integerMatch
  382.           SYNTAX 'INTEGER' SINGLE-VALUE )
  383.  
  384.         ( TBD.0.24 NAME 'mountPassNo' EQUALITY integerMatch
  385.           SYNTAX 'INTEGER' SINGLE-VALUE )
  386.  
  387.         ( TBD.0.25 NAME 'ipHostNumber'
  388.           DESC 'IP address in dotted decimal notation, eg. 192.168.1.1'
  389.           EQUALITY caseIgnoreIA5Match
  390.           SYNTAX 'IA5String{128}' )
  391.  
  392.         ( TBD.0.26 NAME 'ipNetworkNumber'
  393.           DESC 'IP address in dotted decimal notation, eg. 192.168'
  394.           EQUALITY caseIgnoreIA5Match
  395.           SYNTAX 'IA5String{128}' )
  396.  
  397.         ( TBD.0.27 NAME 'ipNetmaskNumber'
  398.           DESC 'IP address in dotted decimal notation, eg. 255.255.255.0'
  399.           EQUALITY caseIgnoreIA5Match
  400.           SYNTAX 'IA5String{128}' )
  401.  
  402.         ( TBD.0.28 NAME 'macAddress'
  403.           DESC 'MAC address in colon-separated hex notation, for
  404.                 example 0:0:92:90:ee:e2'
  405.           EQUALITY caseIgnoreIA5Match
  406.           SYNTAX 'IA5String{128}' )
  407.  
  408.         ( TBD.0.29 NAME 'bootParameter'
  409.           DESC 'rpc.bootparamd parameter; informal syntax is key=value'
  410.           EQUALITY caseExactIA5Match
  411.  
  412.  
  413.  
  414. Howard                                                          [Page 7]
  415.  
  416.  
  417.  
  418.  
  419.  
  420. Internet Draft              NIS X.500 schema                 4 June 1997
  421.  
  422.  
  423.           SYNTAX 'IA5String' )
  424.  
  425.         ( TBD.0.30 NAME 'bootFile' EQUALITY caseExactIA5Match
  426.           STRINGS caseExactSubstringsIA5Match SYNTAX 'IA5String' )
  427.  
  428.         ( TBD.0.31 NAME 'nISDomain' EQUALITY caseIgnoreIA5Match
  429.           SUBSTRINGS caseIgnoreIA5SubstringsMatch
  430.           SYNTAX 'IA5String' )
  431.  
  432.  
  433.  
  434. 4. Class definitions
  435.  
  436.    This section contains class definitions which must be implemented by
  437.    DUAs supporting the schema.
  438.  
  439.    The definitions under the OID 2.5.6 are imported. The rfc822MailGroup
  440.    object class may used to represent a mail group for the purpose of
  441.    alias expansion. (Several alternative schemes for mail routing and
  442.    delivery using LDAP directories have been proposed [4]; these issues
  443.    will not be considered in detail here.)
  444.  
  445.         ( TBD.1.0 NAME 'posixAccount' SUP top STRUCTURAL
  446.           DESC 'Abstraction of an account.
  447.                 The uid attribute is the account's login name.'
  448.           MUST ( cn $ uid $ posixUidNumber $
  449.                  posixPrimaryGidNumber $ posixHomeDirectory )
  450.           MAY ( userPassword $ posixShell $ posixGecos $
  451.                 shadowLastChange $ shadowMin $ shadowMax $
  452.                 shadowWarn $ shadowInactive $ shadowExpire $
  453.                 shadowFlag ) )
  454.  
  455.         ( TBD.1.1 NAME 'posixGroup' SUP top STRUCTURAL
  456.           DESC 'Abstraction of a group of accounts.'
  457.           MUST ( cn $ posixGidNumber ) MAY ( groupPassword $ memberUid ) )
  458.  
  459.         ( TBD.1.2 NAME 'ipService' SUP top STRUCTURAL
  460.           DESC 'Abstraction an Internet Protocol service. Maps an IP
  461.                 port and protocol (eg. tcp or udp) to one or more names.
  462.                 The distinguished value of the cn attribute denotes the
  463.                 service's canonical name.'
  464.           MUST ( cn $ ipServicePort $ ipServiceProtocol ) )
  465.  
  466.         ( TBD.1.3 NAME 'ipProtocol' SUP top STRUCTURAL
  467.           DESC 'Abstraction of an IP protocol. Maps a protocol number to
  468.                 one or more names. The distinguished value of the cn
  469.                 attribute denotes the protocol's canonical name.'
  470.           MUST ( cn $ ipProtocolNumber ) )
  471.  
  472.  
  473.  
  474. Howard                                                          [Page 8]
  475.  
  476.  
  477.  
  478.  
  479.  
  480. Internet Draft              NIS X.500 schema                 4 June 1997
  481.  
  482.  
  483.         ( TBD.1.4 NAME 'oNCRPC' SUP top STRUCTURAL
  484.           DESC 'Abstraction of an Open Network Computing (ONC) [12]
  485.                 Remote Procedure Call (RPC) binding. Maps an ONC RPC
  486.                 number to a name. The distinguished value of the cn
  487.                 attribute denotes the RPC service's canonical name.'
  488.           MUST ( cn $ oNCRPCNumber ) )
  489.  
  490.         ( TBD.1.5 NAME 'mount' SUP top STRUCTURAL
  491.           DESC 'Abstraction of a filesystem mount.'
  492.           MUST ( cn $ mountDirectory $ mountType )
  493.           MAY ( mountOption $ mountDumpFrequency $ mountPassNo ) )
  494.  
  495.         ( TBD.1.6 NAME 'ipHost' SUP domainRelatedObject STRUCTURAL
  496.           DESC 'Abstraction of a host. The schema defined in [3] is used
  497.                 to denote the canonical hostname, by mapping the
  498.                 distinguished name into a DNS domain name.
  499.                 The associatedDomain attribute is used for
  500.                 interrogating the DIT, and as such must contain values
  501.                 for the host's canonical name and its aliases.'
  502.           MUST ( dc $ ipHostNumber )
  503.           MAY ( macAddress $ bootParameter $ bootFile $
  504.                 l $ description $ manager ) )
  505.  
  506.         ( TBD.1.7 NAME 'ipNetwork' SUP domainRelatedObject
  507.           STRUCTURAL
  508.           DESC 'Abstraction of a network.'
  509.           MUST ( dc $ ipNetworkNumber )
  510.           MAY ( ipNetmaskNumber $ l $ description $ manager ) )
  511.  
  512.         ( TBD.1.8 NAME 'nISNetgroup' SUP top STRUCTURAL
  513.           DESC 'Abstraction of a netgroup. May refer to other netgroups.'
  514.           MUST cn
  515.           MAY ( memberUid $ memberHost $ memberNISNetgroup $ nISDomain ) )
  516.  
  517.  
  518.  
  519. 5. Implementation details
  520.  
  521. 5.1. Resolution methods
  522.  
  523.    The ideal means of directing a client application (one using the
  524.    shared services of the C library) to use LDAP as its information
  525.    source for the functions listed in 5.2 is to modify the source code
  526.    to directly query LDAP. As the source code to commercial C libraries
  527.    and applications is rarely available to the end-user, it is
  528.    acceptable to emulate a supported nameservice (such as NIS) and
  529.    modify the resolution code to use LDAP.  (This is also an appropriate
  530.    opportunity to perform caching of entries across client address
  531.  
  532.  
  533.  
  534. Howard                                                          [Page 9]
  535.  
  536.  
  537.  
  538.  
  539.  
  540. Internet Draft              NIS X.500 schema                 4 June 1997
  541.  
  542.  
  543.    spaces.) In the case of NIS, reference implementations are widely
  544.    available and the client-server RPC interface is well known.  Some
  545.    operating systems and C libraries support end-user extensible
  546.    resolvers using dynamically loadable libraries and a nameservice
  547.    "switch". In any case, the precise means by which the operating
  548.    system is directed to use LDAP is not at issue; this is left to the
  549.    implementor to decide.
  550.  
  551. 5.2. Affected resolver calls
  552.  
  553.    The following entry points are found in the C libraries of most Unix
  554.    and POSIX compliant systems. An LDAP search filter [5] which may be
  555.    used to satisfy the function call is included alongside each function
  556.    name, with printf(3s) format notation used to denote the function
  557.    parameter(s), if any. Note that the POSIX specification does not
  558.    define the enumeration routines (such as getpwent(3c)); however, the
  559.    filters are included here for completeness. With the exception of
  560.    getmntent(3c), those functions in section 3c of Unix manual pages
  561.    relate to POSIX entities, and those in section 3n relate to TCP/IP
  562.    entities. Long lines are broken with the '\' character.
  563.  
  564.         getpwnam(3c)            (&(objectClass=posixAccount)(uid=%s))
  565.         getpwuid(3c)            (&(objectClass=posixAccount)\
  566.                                 (posixUidNumber=%d))
  567.         getpwent(3c)            (objectClass=posixAccount)
  568.  
  569.         getgrnam(3c)            (&(objectClass=posixGroup)(cn=%s))
  570.         getgrgid(3c)            (&(objectClass=posixGroup)\
  571.                                 (posixGidNumber=%d))
  572.         getgrent(3c)            (objectClass=posixGroup)
  573.  
  574.         getservbyname(3n)       (&(objectClass=ipService)\
  575.                                 (&(cn=%s)(ipServiceProtocol=%s)))
  576.         getservbyport(3n)       (&(objectClass=ipService)\
  577.                                 (&(ipServicePort=%d)\
  578.                                 (ipServiceProtocol=%s)))
  579.         getservent(3n)          (objectClass=ipService)
  580.  
  581.         getrpcbyname(3n)        (&(objectClass=oNCRPC)(cn=%s))
  582.         getrpcbynumber(3n)      (&(objectClass=oNCRPC)(oNCRPCNumber=%d))
  583.         getrpcent(3n)           (objectClass=oNCRPC)
  584.  
  585.         getprotobyname(3n)      (&(objectClass=ipProtocol)(cn=%s))
  586.         getprotobynumber(3n)    (&(objectClass=ipProtocol)\
  587.                                 (ipProtocolNumber=%d))
  588.         getprotoent(3n)         (objectClass=ipProtocol)
  589.  
  590.         gethostbyname(3n)       (&(objectClass=ipHost)\
  591.  
  592.  
  593.  
  594. Howard                                                         [Page 10]
  595.  
  596.  
  597.  
  598.  
  599.  
  600. Internet Draft              NIS X.500 schema                 4 June 1997
  601.  
  602.  
  603.                                 (associatedDomain=%s))
  604.         gethostbyaddr(3n)       (&(objectClass=ipHost)(ipHostNumber=%s))
  605.         gethostent(3n)          (objectClass=ipHost)
  606.  
  607.         getnetbyname(3n)        (&(objectClass=ipNetwork)\
  608.                                 (associatedDomain=%s))
  609.         getnetbyaddr(3n)        (&(objectClass=ipNetwork)\
  610.                                 (ipNetworkNumber=%s))
  611.         getnetent(3n)           (objectClass=ipNetwork)
  612.  
  613.         getnetgrent(3n)         (objectClass=nISNetgroup)
  614.  
  615.         getaliasbyname(3n)      (&(objectClass=rfc822MailGroup)(cn=%s))
  616.         getaliasent(3n)         (objectClass=rfc822MailGroup)
  617.  
  618.         getmntent(3c)           (objectClass=mount)
  619.  
  620.  
  621. 5.3. Interpreting user and group entries
  622.  
  623.    User and group resolution is initiated by the functions prefixed by
  624.    getpw and getgr respectively. A user's login name is denoted by the
  625.    value of the uid attribute (which will typically be used as a
  626.    relative distinguished name); a group's name is denoted by a value of
  627.    the cn attribute.
  628.  
  629.    An account's GECOS field is preferably determined by a value of the
  630.    posixGecos attribute. If no posixGecos attribute exists, the value of
  631.    the cn attribute must be used. (The existence of the posixGecos
  632.    attribute allows attributes embedded in the GECOS field, such as a
  633.    user's telephone number, to be returned to the client without
  634.    overloading the cn attribute.)
  635.  
  636.    An entry of class posixAccount without a userPassword attribute must
  637.    be denied the opportunity to authenticate. For example, the client
  638.    may be returned a non-matchable password such as "*" by the DUA.
  639.  
  640.    A user which is a member of a posixGroup which has no groupPassword
  641.    attribute must not be allowed to authenticate themself as a member of
  642.    that group, unless the user's posixPrimaryGidNumber attribute implies
  643.    a user has the same group ID (in which case the operating system may
  644.    determine this implicitly).
  645.  
  646.    userPassword and groupPassword values must be represented by
  647.    following BNF syntax:
  648.  
  649.         <passwordValue> ::= <encryptionSchemePrefix> <encryptedPassword>
  650.         <encryptionSchemePrefix> ::= '{' <encryptionScheme> '}'
  651.  
  652.  
  653.  
  654. Howard                                                         [Page 11]
  655.  
  656.  
  657.  
  658.  
  659.  
  660. Internet Draft              NIS X.500 schema                 4 June 1997
  661.  
  662.  
  663.         <encryptionScheme> ::= 'crypt'
  664.         <encryptedPassword> ::= encrypted password
  665.  
  666.    (where the encrypted password consists of a plaintext key encrypted
  667.    using crypt(3) with a two-character random salt)
  668.  
  669.    Operating systems which support different one way encoding functions
  670.    may choose a different encryptionScheme; crypt(3) is only considered
  671.    here.
  672.  
  673.    userPassword and groupPassword values which do not adhere to the BNF
  674.    above must not be used for authentication. (The DUA must iterate
  675.    through the values of the attribute until a value matching the above
  676.    BNF is found.) Only if encryptedPassword is an empty string does the
  677.    user have no password.
  678.  
  679.    A DUA may make use of the attributes prefixed by shadow in order to
  680.    provide shadow password service (getspnam(3c) and getspent(3c)). In
  681.    such cases, the DUA must not make use of the userPassword attribute
  682.    for getpwnam(3c) et al, and must return a non-matchable password
  683.    (such as "x") to the client instead.
  684.  
  685. 5.4. Interpreting hosts and networks
  686.  
  687.    The means for representing DNS [6] domains in LDAP distinguished
  688.    names described in [3] and [9] is used in part to represent TCP/IP
  689.    hosts and networks in LDAP.
  690.  
  691.    Potentially contentious is the use of the ipHostNumber attribute
  692.    instead of the dNSRecord attribute.  The rationale is that, in order
  693.    to minimize the responsibility placed on the DUA, attribute values
  694.    ought to directly contain the information they seek to represent.
  695.    This contrasts with, for example, a dNSRecord value which expresses a
  696.    complete DNS resource record including time to live and class data.
  697.  
  698.    While dNSRecords are suitable for building a DNS gateway to LDAP
  699.    (which may ultimately fulfill the purpose of resolving hosts), this
  700.    information is extraneous to performing host lookups directly with
  701.    LDAP.
  702.  
  703.    Additionally, it is considered more appropriate for an entity, and
  704.    all its aliases, to be represented by a single entry in the DIT,
  705.    which is not always possible when a DNS resource record is mapped
  706.    directly to an LDAP entry.
  707.  
  708.    This document redefines (although not to the extent of excluding the
  709.    existing definition) the ipNetwork class defined in [3], for naming
  710.    consistency with ipHost.  The ipNetworkNumber attribute is also used
  711.  
  712.  
  713.  
  714. Howard                                                         [Page 12]
  715.  
  716.  
  717.  
  718.  
  719.  
  720. Internet Draft              NIS X.500 schema                 4 June 1997
  721.  
  722.  
  723.    in the siteContact object class [14].  (The trailing zeros in a
  724.    network address should be omitted.)
  725.  
  726.    If an entry of class ipHost or ipNetwork belongs to a naming context
  727.    denoted by relative distinguished names (RDNs) [10] of attribute type
  728.    dc (domainComponent), then the distinguished name (DN) is transformed
  729.    into a domain name system (DNS) suffix by concatenating each RDN
  730.    value with a period ('.').
  731.  
  732.    For example, an entry of class ipHost with a DN of dc=foo, dc=bar,
  733.    dc=edu or dc=foo, dc=bar, dc=edu, o=Internet is parsed into the host
  734.    name foo.bar.edu. If the naming context is does not contain 'dc'
  735.    values, a non-qualified host name is returned. For organizations
  736.    which wish to use existing X.500 container classes to form their
  737.    context (ie. organization and organizationalUnit) the RDN components
  738.    of incorrect type are skipped by the DUA in determining the domain
  739.    name. As such, a DN of dc=foo, dc=bar, dc=edu, o=Ace Industry, c=US
  740.    may be parsed as foo.bar.edu. As this may be considered a naming
  741.    violation, this document does not specifically endorse this.
  742.  
  743. 5.5. Interpreting other entities
  744.  
  745.    In general, a one-to-one mapping between entities and LDAP entries is
  746.    proposed, in that each entity has exactly one representation in the
  747.    DIT. In some cases this is not feasible; for example, a service which
  748.    is represented in more than one protocol domain. Consider the
  749.    following entry:
  750.  
  751.            dn: cn=domain, dc=aceindustry, dc=com
  752.            cn: domain
  753.            cn: nameserver
  754.            objectClass: top
  755.            objectClass: ipService
  756.            ipServicePort: 53
  757.            ipServiceProtocol: tcp
  758.            ipServiceProtocol: udp
  759.  
  760.    This entry would map to the following two (2) services entities:
  761.  
  762.            domain  53/tcp  nameserver
  763.            domain  53/udp  nameserver
  764.  
  765.    While the above two entities could have been equally represented as
  766.    separate LDAP entities, with different distinguished names (such as
  767.    cn=domain+ipServiceProtocol=tcp, ... and
  768.    cn=domain+ipServiceProtocol=udp, ...) it is considered that
  769.    representing them as a single entry is more convenient.
  770.  
  771.  
  772.  
  773.  
  774. Howard                                                         [Page 13]
  775.  
  776.  
  777.  
  778.  
  779.  
  780. Internet Draft              NIS X.500 schema                 4 June 1997
  781.  
  782.  
  783.    The mount class represents mount entities as they would be found
  784.    directly in /etc/fstab. Granted, this information is used primarily
  785.    at boot time when access to non-local nameservices may be restricted.
  786.    It may be considered useful to use LDAP to represent the
  787.    configuration data for automount daemons; such a schema is outside
  788.    the scope of this document. (However, the DUA may hint to the client
  789.    that certain information is to be used by the automounter using the
  790.    mountOption attribute.)
  791.  
  792.    With the exception of userPassword and groupPassword values, which
  793.    must be parsed according to the BNF considered in section 5.2, any
  794.    empty values (those that consist of a zero length string) are
  795.    returned by the DUA to the client. The client may not make sense of
  796.    them, but this situation is no different to parsing files which
  797.    contain empty fields. (By contrast, the DUA must reject any entries
  798.    which do not conform to the schema, ie. are missing certain mandatory
  799.    attributes.)
  800.  
  801. 5.6. Canonicalizing entries with multi-valued naming attributes
  802.  
  803.    For entities such as services, protocols, and RPCs, where there may
  804.    be one or more aliases, the respective entry's relative distinguished
  805.    name is used to form the canonical name.  Any other values for the
  806.    same attribute are used as aliases. For example, the service
  807.    described in section 5.5 has the canonical name 'domain' and exactly
  808.    one alias, 'nameserver'.
  809.  
  810.    The schema in this document generally only defines one attribute per
  811.    class which is suitable for distinguishing an entity (excluding any
  812.    attributes with integer syntax; it is assumed that entries will be
  813.    distinguished based on name). Usually, this is the common name (cn)
  814.    attribute.  (For users, either the cn or uid attributes may be used
  815.    to canonicalize an entry. For hosts and networks, the entire
  816.    distinguished name is considered, as per section 5.4.) This fact aids
  817.    the DUA in determining the canonical name of an entity: it can simply
  818.    examine the value of the relative distinguished name. Aliases are
  819.    thus any values of the distinguishing attribute (such as cn) which do
  820.    not match the canonical name of the entity.
  821.  
  822.    In the event that a different attribute is used to distinguish the
  823.    entry, as may be the case with conforming entries that belong to
  824.    additional object classes, it is possible that the entity's canonical
  825.    name cannot be deduced from the RDN. In this situation, the DUA must
  826.    choose one of the non-distinguished values to represent the entity's
  827.    canonical name. Because the directory server guarantees no ordering
  828.    of attribute values, attempting to distinguish an entry in a
  829.    deterministic fashion may require the DUA to maintain a mapping
  830.    between entries' DNs and their canonical names as considered by the
  831.  
  832.  
  833.  
  834. Howard                                                         [Page 14]
  835.  
  836.  
  837.  
  838.  
  839.  
  840. Internet Draft              NIS X.500 schema                 4 June 1997
  841.  
  842.  
  843.    DUA. This document does not require this, nor does it advocate that
  844.    such situations be resolved by mapping one DIT entry into multiple
  845.    entities.
  846.  
  847. 6. Implementation focus
  848.  
  849.    A NIS to LDAP gateway daemon has been developed which supports the
  850.    schema defined in this document. A set of extensions to a particular
  851.    implementation of the Mach operating system has also been developed,
  852.    which sidesteps NIS and uses LDAP directly.
  853.  
  854.    Work is underway to develop a freely available (under the GNU General
  855.    Library Public License) reference implementation of the C library
  856.    resolution code that supports LDAP using the draft schema. The code
  857.    will be compatible with the Free Software Foundation's GNU C library
  858.    and other C libraries which support the Name Service Switch (NSS).
  859.  
  860.    The alias lookup functions referred to in section 5.2 are presently
  861.    available only in the GNU C library, and (albeit with different
  862.    names) in the C library of one commercial Unix vendor. It is
  863.    anticipated that the mail transport agent (MTA) will typically
  864.    consult LDAP or NIS directly instead of using the C library; however,
  865.    support for the suggested library calls is encouraged.
  866.  
  867.    The author has made available a freely distributable set of Perl
  868.    scripts for parsing configuration files such as /etc/passwd and
  869.    /etc/hosts and generating LDIF data suitable for preparing an LDIF
  870.    database. It would be a relatively trivial effort to write utilities
  871.    to export LDIF data to flat files, such that information stored in an
  872.    LDAP-compatible directory service could be regularly dumped into NIS
  873.    maps or flat files.
  874.  
  875. 7. Security considerations
  876.  
  877.    The entirety of related security considerations are outside the scope
  878.    of this document. However, it should be noted that making passwords
  879.    encrypted with a widely understood one way function (such as
  880.    crypt(3)) available to non-privileged users is potentially dangerous
  881.    because it exposes them to dictionary and brute-force attacks.  It is
  882.    proposed only for compatibility with existing Unix implementations.
  883.    Sites where security is critical may consider using Kerberos or
  884.    another authentication service for logins. A variation on this is to
  885.    authenticate to an LDAP server by binding over an encrypted
  886.    connection (such as SSL [8]).
  887.  
  888.    Alternatively, the encrypted password could be made available only to
  889.    a subset of privileged DUAs, which would provide 'shadow' password
  890.    service to client applications.
  891.  
  892.  
  893.  
  894. Howard                                                         [Page 15]
  895.  
  896.  
  897.  
  898.  
  899.  
  900. Internet Draft              NIS X.500 schema                 4 June 1997
  901.  
  902.  
  903.    Because the schema represents operating system-level entities, access
  904.    to these entities should be granted on a discretionary basis.  (That
  905.    said, there is little point in restricting access to data which will
  906.    be republished without restriction, eg. by a NIS server.) It is
  907.    particularly important that only administrators can modify entries
  908.    defined in this schema, with the exception of allowing a principal to
  909.    change their password (which may be done on behalf of the user by a
  910.    client bound as a superior principal, such that password restrictions
  911.    may be enforced). For example, if a user were allowed to change the
  912.    value of their posixUidNumber attribute, they could subvert security
  913.    by equivalencing their account with the root account.
  914.  
  915.    A subtree of the DIT which is to be republished by a DUA (such as a
  916.    NIS gateway) should be within the same administrative domain that the
  917.    republishing DUA represents. (For example, principals outside an
  918.    organization, while conceivably part of the DIT, should not be
  919.    considered with the same degree of authority as those within the
  920.    organization.)
  921.  
  922. 8. Acknowledgements
  923.  
  924.    Thanks to Leif Hedstrom of Netscape Communications Corporation and
  925.    Mark Wahl of Critical Angle Inc. for their contributions to the
  926.    development of this schema.
  927.  
  928. 9. References
  929.  
  930.    [1]  M. Wahl, T. Howes, S. Kille, "Lightweight Directory Access
  931.         Protocol (Version 3)", INTERNET-DRAFT <draft-ietf-asid-ldapv3-
  932.         protocol-03.txt>, October 1996.
  933.  
  934.    [2]  M. Wahl, T. Howes, S. Kille, "Lightweight Directory Access
  935.         Protocol: Standard and Pilot Attribute Definitions", INTERNET-
  936.         DRAFT <draft-ietf-asid-ldapv3-attributes-03.txt>, October 1996.
  937.  
  938.    [3]  S. Kille, "X.500 and Domains", RFC 1279, November 1991.
  939.  
  940.    [4]  H. Lachman, "LDAP-based Routing of SMTP Messages: Approach Used
  941.         by Netscape", INTERNET-DRAFT <draft-ietf-asid-email-routing-ns-
  942.         00.txt>, March 1997.
  943.  
  944.    [5]  T. Howes, "A String Representation of LDAP Search Filters",
  945.         INTERNET-DRAFT <draft-ietf-asid-ldapv3-filter-00.txt>, March
  946.         1997. See also [10].
  947.  
  948.    [6]  P. Mockapetris, "Domain names - concepts and facilities", RFC
  949.         1034, November 1987.
  950.  
  951.  
  952.  
  953.  
  954. Howard                                                         [Page 16]
  955.  
  956.  
  957.  
  958.  
  959.  
  960. Internet Draft              NIS X.500 schema                 4 June 1997
  961.  
  962.  
  963.    [7]  "Information Processing Systems - Open Systems Interconnection -
  964.         The Directory: Overview of Concepts, Models and Service",
  965.         ISO/IEC JTC 1/SC21, International Standard 9594-1, 1988.
  966.  
  967.    [8]  A. O. Freier, P. Karlton, P. Kocher, "The SSL Protocol, Version
  968.         3.0", INTERNET-DRAFT <draft-ietf-tls-ssl-version3-00.txt>
  969.         November 1996.
  970.  
  971.    [9]  S. Kille, M. Wahl, "An Approach for Using Domains in LDAP
  972.         Distinguished Names", INTERNET-DRAFT <draft-ietf-asid-ldap-
  973.         domains-00.txt>, July 1996.
  974.  
  975.    [10] S. Kille, "A String Representation of Distinguished Names", RFC
  976.         1779, March 1995.
  977.  
  978.    [11] G. Good, "The LDAP Data Interchange Format (LDIF)", INTERNET-
  979.         DRAFT <draft-ietf-asid-ldif-00.txt>, November 1996.
  980.  
  981.    [12] Sun Microsystems, Inc., "RPC: Remote Procedure Call: Protocol
  982.         Specification Version 2", RFC 1057, June 1988.
  983.  
  984.    [13] ISO/IEC 9945-1:1990, Information Technology - Portable Operating
  985.         Systems Interface (POSIX) - Part 1: Systems Application
  986.         Programming Interface (API) [C Language]
  987.  
  988.    [14] M. T. Rose, "The Little Black Book: Mail Bonding with OSI
  989.         Directory Services", ISBN 0-13-683210-5, Prentice-Hall, Inc.,
  990.         1992.
  991.  
  992. 10. Author's Address
  993.  
  994.    Luke Howard
  995.    PO Box 59
  996.    Central Park Vic 3145
  997.    Australia
  998.    Email: lukeh@xedoc.com
  999.  
  1000.  
  1001. A. Example entries
  1002.  
  1003.    The examples described in this section are provided to illustrate the
  1004.    schema described in this draft. They do not purport to be a
  1005.    authoritative reference. Entries are presented in LDIF notation [11].
  1006.  
  1007.    The following entry is an example of the posixAccount class:
  1008.  
  1009.            dn: uid=lukeh, dc=aceindustry, dc=com
  1010.            cn: Luke Howard
  1011.  
  1012.  
  1013.  
  1014. Howard                                                         [Page 17]
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020. Internet Draft              NIS X.500 schema                 4 June 1997
  1021.  
  1022.  
  1023.            objectClass: top
  1024.            objectClass: person
  1025.            objectClass: posixAccount
  1026.            sn: Howard
  1027.            telephoneNumber: +61 3 9428 0788
  1028.            uid: lukeh
  1029.            userPassword: {crypt}X5/DBrWPOQQaI
  1030.            posixGecos: Luke Howard
  1031.            posixShell: /bin/csh
  1032.            posixUidNumber: 10
  1033.            posixPrimaryGidNumber: 10
  1034.            posixHomeDirectory: /home/lukeh
  1035.  
  1036.  
  1037.    This corresponds the Unix password file entry:
  1038.  
  1039.         lukeh:X5/DBrWPOQQaI:10:10:Luke Howard:/home/lukeh:/bin/sh
  1040.  
  1041.    Note that the userPassword value is parsed into a password suitable
  1042.    for matching with crypt(3). Attributes such as telephoneNumber and sn
  1043.    (which belong to classes other than posixAccount), are not used in
  1044.    determining the corresponding password file entry but may be useful
  1045.    to other LDAP clients. (In most cases, entries of class posixAccount
  1046.    will also inherit from person or organizationalPerson.)
  1047.  
  1048.    The following entry is an example of the ipHost class:
  1049.  
  1050.            dn: dc=yoyo, dc=aceindustry, dc=com
  1051.            dc: yoyo
  1052.            objectClass: top
  1053.            objectClass: ipHost
  1054.            objectClass: domainRelatedObject
  1055.            associatedDomain: yoyo.aceindustry.com
  1056.            associatedDomain: www.aceindustry.com
  1057.            ipHostNumber: 10.0.0.1
  1058.            macAddress: 0:0:92:90:ee:e2
  1059.            bootFile: unix
  1060.            bootParameter: root=fs:/nfsroot/yoyo
  1061.            bootParameter: swap=fs:/nfsswap/yoyo
  1062.            bootParameter: dump=fs:/nfsdump/yoyo
  1063.  
  1064.    This entry represents the host yoyo.aceindustry.com, also known as
  1065.    www.aceindustry.com. Note that the associatedDomain values are used
  1066.    in searching for the entry, but the distinguished name is parsed to
  1067.    determine the host's canonical name. The MAC address, boot image, and
  1068.    two boot parameters are also specified in this entry.  (Thus, the NIS
  1069.    maps prefixed by 'hosts', 'ethers', and 'bootparams' could all be
  1070.    derived from similar entries.)
  1071.  
  1072.  
  1073.  
  1074. Howard                                                         [Page 18]
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080. Internet Draft              NIS X.500 schema                 4 June 1997
  1081.  
  1082.  
  1083.    An example of the nISNetgroup class:
  1084.  
  1085.            dn: cn=nightfly, dc=aceindustry, dc=com
  1086.            cn: nightfly
  1087.            objectClass: top
  1088.            objectClass: nISNetgroup
  1089.            memberUid: lukeh
  1090.            memberUid: fagen
  1091.            memberHost: yoyo.aceindustry.com
  1092.            nISDomain: yp.aceindustry.com
  1093.  
  1094.    This entry represents the netgroup 'nightfly' which contains the
  1095.    users lukeh and fagen, and the host yoyo.aceindustry.com; and which
  1096.    belongs to the NIS domain yp.aceindustry.com.
  1097.  
  1098.    Finally, an example of the ipProtocol class:
  1099.  
  1100.            dn: cn=tcp, dc=aceindustry, dc=com
  1101.            objectClass: top
  1102.            objectClass: ipProtocol
  1103.            cn: tcp
  1104.            cn: TCP
  1105.            ipProtocolNumber: 6
  1106.  
  1107.    This entry represents the protocol named 'tcp' whose protocol number
  1108.    is 6.
  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. Howard                                                         [Page 19]
  1135.  
  1136.  
  1137.