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-00.txt < prev    next >
Text File  |  1997-04-17  |  42KB  |  1,138 lines

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