home *** CD-ROM | disk | FTP | other *** search
/ Internet Core Protocols / Oreilly-InternetCoreProtocols.iso / RFCs / rfc2623.txt < prev    next >
Encoding:
Text File  |  1999-10-14  |  42.6 KB  |  1,068 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                          M. Eisler
  8. Request for Comments: 2623                        Sun Microsystems, Inc.
  9. Category: Standards Track                                      June 1999
  10.  
  11.  
  12.    NFS Version 2 and Version 3 Security Issues and the NFS Protocol's
  13.                    Use of RPCSEC_GSS and Kerberos V5
  14.  
  15. Status of this Memo
  16.  
  17.    This document specifies an Internet standards track protocol for the
  18.    Internet community, and requests discussion and suggestions for
  19.    improvements.  Please refer to the current edition of the "Internet
  20.    Official Protocol Standards" (STD 1) for the standardization state
  21.    and status of this protocol.  Distribution of this memo is unlimited.
  22.  
  23. Copyright Notice
  24.  
  25.    Copyright (C) The Internet Society (1999).  All Rights Reserved.
  26.  
  27. Abstract
  28.  
  29.    This memorandum clarifies various security issues involving the NFS
  30.    protocol (Version 2 and Version 3 only) and then describes how the
  31.    Version 2 and Version 3 of the NFS protocol use the RPCSEC_GSS
  32.    security flavor protocol and Kerberos V5.  This memorandum is
  33.    provided so that people can write compatible implementations.
  34.  
  35. Table of Contents
  36.  
  37.    1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
  38.    1.1.  Overview of RPC Security Architecture  . . . . . . . . . . . 3
  39.    2.  Overview of NFS Security . . . . . . . . . . . . . . . . . . . 3
  40.    2.1.  Port Monitoring  . . . . . . . . . . . . . . . . . . . . . . 3
  41.    2.1.1.  MOUNT Protocol . . . . . . . . . . . . . . . . . . . . . . 4
  42.    2.2.  RPC Security Flavors . . . . . . . . . . . . . . . . . . . . 4
  43.    2.2.1.  AUTH_SYS . . . . . . . . . . . . . . . . . . . . . . . . . 5
  44.    2.2.2.  AUTH_DH and AUTH_KERB4 . . . . . . . . . . . . . . . . . . 5
  45.    2.2.3.  RPCSEC_GSS . . . . . . . . . . . . . . . . . . . . . . . . 5
  46.    2.3.  Authentication for NFS Procedures  . . . . . . . . . . . . . 6
  47.    2.3.1.  NULL Procedure . . . . . . . . . . . . . . . . . . . . . . 6
  48.    2.3.2.  NFS Procedures Used at Mount Time  . . . . . . . . . . . . 6
  49.    2.4.  Binding Security Flavors to Exports  . . . . . . . . . . . . 7
  50.    2.5.  Anonymous Mapping  . . . . . . . . . . . . . . . . . . . . . 7
  51.    2.6.  Host-based Access Control  . . . . . . . . . . . . . . . . . 8
  52.    2.7.  Security Flavor Negotiation  . . . . . . . . . . . . . . . . 8
  53.    2.8.  Registering Flavors  . . . . . . . . . . . . . . . . . . . . 9
  54.    3.  The NFS Protocol's Use of RPCSEC_GSS . . . . . . . . . . . .   9
  55.  
  56.  
  57.  
  58. Eisler                      Standards Track                     [Page 1]
  59.  
  60. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  61.  
  62.  
  63.    3.1.  Server Principal . . . . . . . . . . . . . . . . . . . . .   9
  64.    3.2.  Negotiation  . . . . . . . . . . . . . . . . . . . . . . .   9
  65.    3.3.  Changing RPCSEC_GSS Parameters . . . . . . . . . . . . . .  10
  66.    3.4.  Registering Pseudo Flavors and Mappings  . . . . . . . . .  11
  67.    4.  The NFS Protocol over Kerberos V5  . . . . . . . . . . . . .  11
  68.    4.1.  Issues with Kerberos V5 QOPs . . . . . . . . . . . . . . .  12
  69.    4.2.  The NFS Protocol over Kerberos V5 Pseudo Flavor
  70.          Registration Entry . . . . . . . . . . . . . . . . . . . .  13
  71.    5.  Security Considerations  . . . . . . . . . . . . . . . . . .  14
  72.    6.  IANA Considerations [RFC2434]  . . . . . . . . . . . . . . .  14
  73.    6.1.  Pseudo Flavor Number . . . . . . . . . . . . . . . . . . .  14
  74.    6.2.  String Name of Pseudo Flavor . . . . . . . . . . . . . . .  15
  75.    6.2.1.  Name Space Size  . . . . . . . . . . . . . . . . . . . .  15
  76.    6.2.2.  Delegation . . . . . . . . . . . . . . . . . . . . . . .  15
  77.    6.2.3.  Outside Review . . . . . . . . . . . . . . . . . . . . .  15
  78.    6.3.  GSS-API Mechanism OID  . . . . . . . . . . . . . . . . . .  15
  79.    6.4.  GSS-API Mechanism Algorithm Values . . . . . . . . . . . .  15
  80.    6.5.  RPCSEC_GSS Security Service  . . . . . . . . . . . . . . .  16
  81.    References . . . . . . . . . . . . . . . . . . . . . . . . . . .  16
  82.    Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . .  17
  83.    Author's Address . . . . . . . . . . . . . . . . . . . . . . . .  18
  84.    Full Copyright Statement . . . . . . . . . . . . . . . . . . . .  19
  85.  
  86. 1.  Introduction
  87.  
  88.    The NFS protocol provides transparent remote access to shared file
  89.    systems across networks. The NFS protocol is designed to be machine,
  90.    operating system, network architecture, and security mechanism, and
  91.    transport protocol independent. This independence is achieved through
  92.    the use of ONC Remote Procedure Call (RPC) primitives built on top of
  93.    an eXternal Data Representation (XDR).  NFS protocol Version 2 is
  94.    specified in the Network File System Protocol Specification
  95.    [RFC1094]. A description of the initial implementation can be found
  96.    in [Sandberg]. NFS protocol Version 3 is specified in the NFS Version
  97.    3 Protocol Specification [RFC1813]. A description of some initial
  98.    implementations can be found in [Pawlowski].
  99.  
  100.    For the remainder of this document, whenever it refers to the NFS
  101.    protocol, it means NFS Version 2 and Version 3, unless otherwise
  102.    stated.
  103.  
  104.    The RPC protocol is specified in the Remote Procedure Call Protocol
  105.    Specification Version 2 [RFC1831]. The XDR protocol is specified in
  106.    External Data Representation Standard [RFC1832].
  107.  
  108.    A new RPC security flavor, RPCSEC_GSS, has been specified [RFC2203].
  109.    This new flavor allows application protocols built on top of RPC to
  110.    access security mechanisms that adhere to the GSS-API specification
  111.  
  112.  
  113.  
  114. Eisler                      Standards Track                     [Page 2]
  115.  
  116. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  117.  
  118.  
  119.    [RFC2078].
  120.  
  121.    The purpose of this document is to clarify NFS security issues and to
  122.    specify how the NFS protocol uses RPCSEC_GSS. This document will also
  123.    describe how NFS works over Kerberos V5, via RPCSEC_GSS.
  124.  
  125.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  126.    "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and "OPTIONAL" in this
  127.    document are to be interpreted as described in [RFC2119].
  128.  
  129. 1.1.  Overview of RPC Security Architecture
  130.  
  131.    The RPC protocol includes a slot for security parameters (referred to
  132.    as an authentication flavor in the RPC specification [RFC1831]) on
  133.    every call.  The contents of the security parameters are determined
  134.    by the type of authentication used by the server and client. A server
  135.    may support several different flavors of authentication at once.
  136.    Some of the better known flavors are summarized as follows:
  137.  
  138.    *    The AUTH_NONE flavor provides null authentication, that is, no
  139.         authentication information is passed.
  140.  
  141.    *    The AUTH_SYS flavor provides a UNIX-style user identifier, group
  142.         identifier, and an array of supplemental group identifiers with
  143.         each call.
  144.  
  145.    *    The AUTH_DH (sometimes referred to as AUTH_DES [RFC1057]) flavor
  146.         provides DES-encrypted authentication parameters based on a
  147.         network-wide string name, with session keys exchanged via the
  148.         Diffie-Hellman public key scheme.
  149.  
  150.    *    The AUTH_KERB4 flavor provides DES encrypted authentication
  151.         parameters based on a network-wide string name (the name is a
  152.         Kerberos Version 4 principal identifier) with session keys
  153.         exchanged via Kerberos Version 4 secret keys.
  154.  
  155.    The NFS protocol is not limited to the above list of security
  156.    flavors.
  157.  
  158. 2.  Overview of NFS Security
  159.  
  160. 2.1.  Port Monitoring
  161.  
  162.    Many NFS servers will require that the client send its NFS requests
  163.    from UDP or TCP source ports with values < 1024. The theory is that
  164.    binding to ports < 1024 is a privileged operation on the client, and
  165.    so the client is enforcing file access permissions on its end. The
  166.    theory breaks down because:
  167.  
  168.  
  169.  
  170. Eisler                      Standards Track                     [Page 3]
  171.  
  172. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  173.  
  174.  
  175.    *    On many operating systems, there are no constraints on what port
  176.         what user can bind to.
  177.  
  178.    *    Just because the client host enforces the privilege on binding
  179.         to ports < 1024 does not necessarily mean that a non-privileged
  180.         user cannot gain access to the port binding privilege. For
  181.         example with a single-user desk-top host running a UNIX
  182.         operating system, the user may have knowledge of the root user
  183.         password. And even if he does not have that knowledge, with
  184.         physical access to the desk-top machine, root privileges are
  185.         trivially acquired.
  186.  
  187.    In some rare cases, when the system administrator can be certain that
  188.    the clients are trusted and under control (in particular, protected
  189.    from physical attack), relying of trusted ports MAY be a reliable
  190.    form of security.
  191.  
  192.    In most cases, the use of privileged ports and port monitoring for
  193.    security is at best an inconvenience to the attacker and SHOULD NOT
  194.    be depended on.
  195.  
  196.    To maximize interoperability:
  197.  
  198.    *    NFS clients SHOULD attempt to bind to ports < 1024. In some
  199.         cases, if they fail to bind (because either the user does not
  200.         have the privilege to do so, or there is no free port < 1024),
  201.         the NFS client MAY wish to attempt the NFS operation over a port
  202.         >= 1024.
  203.  
  204.    *    NFS servers that implement port monitoring SHOULD provide a
  205.         method to turn it off.
  206.  
  207.    *    Whether port monitoring is enabled or not, NFS servers SHOULD
  208.         NOT reject NFS requests to the NULL procedure (procedure number
  209.         0). See subsection 2.3.1, "NULL procedure" for a complete
  210.         explanation.
  211.  
  212. 2.1.1.  MOUNT Protocol
  213.  
  214.    The port monitoring issues and recommendations apply to the MOUNT
  215.    protocol as well.
  216.  
  217. 2.2.  RPC Security Flavors
  218.  
  219.    The NFS server checks permissions by taking the credentials from the
  220.    RPC security information in each remote request. Each flavor packages
  221.    credentials differently.
  222.  
  223.  
  224.  
  225.  
  226. Eisler                      Standards Track                     [Page 4]
  227.  
  228. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  229.  
  230.  
  231. 2.2.1.  AUTH_SYS
  232.  
  233.    Using the AUTH_SYS flavor of authentication, the server gets the
  234.    client's effective user identifier, effective group identifier and
  235.    supplemental group identifiers on each call, and uses them to check
  236.    access. Using user identifiers and group identifiers implies that the
  237.    client and server either share the same identifier name space or do
  238.    local user and group identifier mapping.
  239.  
  240.    For those sites that do not implement a consistent user identifier
  241.    and group identifier space, NFS implementations must agree on the
  242.    mapping of user and group identifiers between NFS clients and
  243.    servers.
  244.  
  245. 2.2.2.  AUTH_DH and AUTH_KERB4
  246.  
  247.    The AUTH_DH and AUTH_KERB4 styles of security are based on a
  248.    network-wide name. They provide greater security through the use of
  249.    DES encryption and public keys in the case of AUTH_DH, and DES
  250.    encryption and Kerberos secret keys (and tickets) in the AUTH_KERB4
  251.    case. Again, the server and client must agree on the identity of a
  252.    particular name on the network, but the name to identity mapping is
  253.    more operating system independent than the user identifier and group
  254.    identifier mapping in AUTH_SYS. Also, because the authentication
  255.    parameters are encrypted, a malicious user must know another user's
  256.    network password or private key to masquerade as that user.
  257.    Similarly, the server returns a verifier that is also encrypted so
  258.    that masquerading as a server requires knowing a network password.
  259.  
  260. 2.2.3.  RPCSEC_GSS
  261.  
  262.    The RPCSEC_GSS style of security is based on a security-mechanism-
  263.    specific principal name. GSS-API mechanisms provide security through
  264.    the use of cryptography. The cryptographic protections are used in
  265.    the construction of the credential on calls, and in the verifiers on
  266.    replies. Optionally, cryptographic protections will be in the body of
  267.    the calls and replies.
  268.  
  269.    Note that the discussion of AUTH_NONE, AUTH_SYS, AUTH_DH, AUTH_KERB4,
  270.    and RPCSEC_GSS does not imply that the NFS protocol is limited to
  271.    using those five flavors.
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Eisler                      Standards Track                     [Page 5]
  283.  
  284. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  285.  
  286.  
  287. 2.3.  Authentication for NFS Procedures
  288.  
  289. 2.3.1.  NULL Procedure
  290.  
  291.    The NULL procedure is typically used by NFS clients to determine if
  292.    an NFS server is operating and responding to requests (in other
  293.    words, to "ping" the NFS server). Some NFS servers require that a
  294.    client using the NULL procedure:
  295.  
  296.    *    send the request from TCP or UDP port < 1024.  There does not
  297.         seem to be any value in this because the NULL procedure is of
  298.         very low overhead and certainly no more overhead than the cost
  299.         of processing a NULL procedure and returning an authentication
  300.         error. Moreover, by sending back an authentication error, the
  301.         server has confirmed the information that the client was
  302.         interested in: is the server operating?
  303.  
  304.    *    be authenticated with a flavor stronger than AUTH_SYS. This is a
  305.         problem because the RPCSEC_GSS protocol uses NULL for control
  306.         messages.
  307.  
  308.    NFS servers SHOULD:
  309.  
  310.    *    accept the NULL procedure ping over AUTH_NONE and AUTH_SYS, in
  311.         addition to other RPC security flavors, and
  312.  
  313.    *    NOT require that the source port be < 1024 on a NULL procedure
  314.         ping.
  315.  
  316. 2.3.2.  NFS Procedures Used at Mount Time
  317.  
  318.    Certain NFS procedures are used at the time the NFS client mounts a
  319.    file system from the server.  Some NFS server implementations will
  320.    not require authentication for these NFS procedures.  For NFS
  321.    protocol Version 2, these procedures are GETATTR and STATFS. For
  322.    Version 3, the procedure is FSINFO.
  323.  
  324.    The reason for not requiring authentication is described as follows.
  325.    When the NFS client mounts a NFS server's file system, the identity
  326.    of the caller on the client is typically an administrative entity (in
  327.    UNIX operating systems, this is usually the "root" user).  It is
  328.    often the case that, for unattended operation in concert with an
  329.    automounter [Callaghan], the AUTH_DH, AUTH_KERB4, or RPCSEC_GSS
  330.    credentials for the administrative entity associated with an
  331.    automounter are not available. If so, the NFS client will use
  332.    AUTH_NONE or AUTH_SYS for the initial NFS operations used to mount a
  333.    file system.  While an attacker could exploit this implementation
  334.    artifact, the exposure is limited to gaining the attributes of a file
  335.  
  336.  
  337.  
  338. Eisler                      Standards Track                     [Page 6]
  339.  
  340. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  341.  
  342.  
  343.    or a file system's characteristics. This OPTIONAL trade off favors
  344.    the opportunity for improved ease of use.
  345.  
  346. 2.4.  Binding Security Flavors to Exports
  347.  
  348.    NFS servers MAY export file systems with specific security flavors
  349.    bound to the export.  In the event a client uses a security flavor
  350.    that is not the one of the flavors the file system was exported with,
  351.    NFS server implementations MAY:
  352.  
  353.    *    reject the request with an error (either an NFS error or an RPC
  354.         level authentication error), or
  355.  
  356.    *    allow the request, but map the user's credentials to a user
  357.         other than the one the client intended. Typically the user that
  358.         is the result of this mapping is a user with limited access on
  359.         the system, such as user "nobody" on UNIX systems.
  360.  
  361.    If a client uses AUTH_NONE, the server's options are the same as the
  362.    above, except that AUTH_NONE carries with it no user identity. In
  363.    order to allow the request, on many operating systems the server will
  364.    assign a user identity. Typically this assignment will be a user with
  365.    limited access on the system, such as user "nobody" on UNIX systems.
  366.  
  367. 2.5.  Anonymous Mapping
  368.  
  369.    The following passage is excerpted verbatim from RFC 1813, section
  370.    4.4 "Permission Issues" (except that "may" has been changed to
  371.    "MAY"):
  372.  
  373.       In most operating systems, a particular user (on UNIX, the uid 0)
  374.       has access to all files, no matter what permission and ownership
  375.       they have. This superuser permission MAY not be allowed on the
  376.       server, since anyone who can become superuser on their client
  377.       could gain access to all remote files. A UNIX server by default
  378.       maps uid 0 to a distinguished value (UID_NOBODY), as well as
  379.       mapping the groups list, before doing its access checking. A
  380.       server implementation MAY provide a mechanism to change this
  381.       mapping. This works except for NFS version 3 protocol root file
  382.       systems (required for diskless NFS version 3 protocol client
  383.       support), where superuser access cannot be avoided.  Export
  384.       options are used, on the server, to restrict the set of clients
  385.       allowed superuser access.
  386.  
  387.    The issues identified as applying to NFS protocol Version 3 in the
  388.    above passage also apply to Version 2.
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Eisler                      Standards Track                     [Page 7]
  395.  
  396. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  397.  
  398.  
  399. 2.6.  Host-based Access Control
  400.  
  401.    In some NFS server implementations, a host-based access control
  402.    method is used whereby file systems can be exported to lists of
  403.    clients.  File systems may also be exported for read-only or read-
  404.    write access.  Several of these implementations will check access
  405.    only at mount time, during the request for the file handle via the
  406.    MOUNT protocol handshake.  The lack of authorization checking during
  407.    subsequent NFS requests has the following consequences:
  408.  
  409.    *    NFS servers are not able to repudiate access to the file system
  410.         by an NFS client after the client has mounted the file system.
  411.  
  412.    *    An attacker can circumvent the MOUNT server's access control to
  413.         gain access to a file system that the attacker is not authorized
  414.         for. The circumvention is accomplished by either stealing a file
  415.         handle (usually by snooping the network traffic between an
  416.         legitimate client and server) or guessing a file handle.  For
  417.         this attack to succeed, the attacker must still be able
  418.         impersonate a user's credentials, which is simple for AUTH_SYS,
  419.         but harder for AUTH_DH, AUTH_KERB4, and RPCSEC_GSS.
  420.  
  421.    *    WebNFS clients that use the public file handle lookup [RFC2054]
  422.         will not go through the MOUNT protocol to acquire initial file
  423.         handle of the NFS file system. Enforcing access control via the
  424.         MOUNT protocol is going to be a little use. Granted, some WebNFS
  425.         server implementations cope with this by limiting the use of the
  426.         public file handle to file systems exported to every client on
  427.         the Internet.
  428.  
  429.    Thus, NFS server implementations SHOULD check the client's
  430.    authorization on each NFS request.
  431.  
  432. 2.7.  Security Flavor Negotiation
  433.  
  434.    Any application protocol that supports multiple styles of security
  435.    will have the issue of negotiating the security method to be used.
  436.    NFS Version 2 had no support for security flavor negotiation.  It was
  437.    up to the client to guess, or depend on prior knowledge.  Often the
  438.    prior knowledge would be available in the form of security options
  439.    specified in a directory service used for the purpose of
  440.    automounting.
  441.  
  442.    The MOUNT Version 3 protocol, associated with NFS Version 3, solves
  443.    the problem by having the response to the MNT procedure include a
  444.    list of flavors in the MNT procedure. Note that because some NFS
  445.    servers will export file systems to specific lists of clients, with
  446.    different access (read-only versus read-write), and with different
  447.  
  448.  
  449.  
  450. Eisler                      Standards Track                     [Page 8]
  451.  
  452. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  453.  
  454.  
  455.    security flavors, it is possible a client might get back multiple
  456.    security flavors in the list returned in the MNT response. The use of
  457.    one flavor instead of another might imply read-only instead of read-
  458.    write access, or perhaps some other degradation of access. For this
  459.    reason, a NFS client SHOULD use the first flavor in the list that it
  460.    supports, on the assumption that the best access is provided by the
  461.    first flavor. NFS servers that support the ability to export file
  462.    systems with multiple security flavors SHOULD either present the best
  463.    accessing flavor first to the client, or leave the order under the
  464.    control of the system administrator.
  465.  
  466. 2.8.  Registering Flavors
  467.  
  468.    When one develops a new RPC security flavor, iana@iana.org MUST be
  469.    contacted to get a unique flavor assignment. To simplify NFS client
  470.    and server administration, having a simple ASCII string name for the
  471.    flavor is useful. Currently, the following assignments exist:
  472.  
  473.       flavor       string name
  474.  
  475.       AUTH_NONE    none
  476.       AUTH_SYS     sys
  477.       AUTH_DH      dh
  478.       AUTH_KERB4   krb4
  479.  
  480.    A string name for a new flavor SHOULD be assigned.  String name
  481.    assignments can be registered by contacting iana@iana.org.
  482.  
  483. 3.  The NFS Protocol's Use of RPCSEC_GSS
  484.  
  485. 3.1.  Server Principal
  486.  
  487.    When using RPCSEC_GSS, the NFS server MUST identify itself in GSS-API
  488.    via a GSS_C_NT_HOSTBASED_SERVICE name type.
  489.    GSS_C_NT_HOSTBASED_SERVICE names are of the form:
  490.  
  491.         service@hostname
  492.  
  493.    For NFS, the "service" element is
  494.  
  495.         nfs
  496.  
  497. 3.2.  Negotiation
  498.  
  499.    RPCSEC_GSS is a single security flavor over which different security
  500.    mechanisms can be multiplexed. Within a mechanism, GSS-API provides
  501.    for the support of multiple quality of protections (QOPs), which are
  502.    pairs of cryptographic algorithms. Each algorithm in the QOP consists
  503.  
  504.  
  505.  
  506. Eisler                      Standards Track                     [Page 9]
  507.  
  508. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  509.  
  510.  
  511.    of an encryption algorithm for privacy and a checksum algorithm for
  512.    integrity.  RPCSEC_GSS lets one protect the RPC request/response pair
  513.    with plain header authentication, message integrity, and message
  514.    privacy.  Thus RPCSEC_GSS effectively supports M * Q * 3 different
  515.    styles of security, where M is the number of mechanisms supported, Q
  516.    is the average number of QOPs supported for each mechanism, and 3
  517.    enumerates authentication, integrity, and privacy.
  518.  
  519.    Because RPCSEC_GSS encodes many styles of security, just adding
  520.    RPCSEC_GSS to the list of flavors returned in MOUNT Version 3's MNT
  521.    response is not going to be of much use to the NFS client.
  522.  
  523.    The solution is the creation of a concept called "pseudo flavors."
  524.    Pseudo flavors are 32 bit integers that are allocated out of the same
  525.    number space as regular RPC security flavors like AUTH_NONE,
  526.    AUTH_SYS, AUTH_DH, AUTH_KERB4, and RPCSEC_GSS. The idea is that each
  527.    pseudo flavor will map to a specific triple of security mechanism,
  528.    quality of protection, and service. The service will be one of
  529.    authentication, integrity, and privacy. Note that integrity includes
  530.    authentication, and privacy includes integrity. RPCSEC_GSS uses
  531.    constants named rpc_gss_svc_none, rpc_gss_svc_integrity, and
  532.    rpc_gss_svc_privacy, for authentication, integrity, and privacy
  533.    respectively.
  534.  
  535.    Thus, instead of returning RPCSEC_GSS, a MOUNT Version 3 server will
  536.    instead return one or more pseudo flavors if the NFS server supports
  537.    RPCSEC_GSS and if the file system has been exported with one or more
  538.    <mechanism, QOP, service> triples.  See section 4, "The NFS Protocol
  539.    over Kerberos V5" for an example of pseudo flavor to triple mapping.
  540.  
  541. 3.3.  Changing RPCSEC_GSS Parameters
  542.  
  543.    Once an RPCSEC_GSS session or context has been set up (via the
  544.    RPCSEC_GSS_INIT and RPCSEC_GSS_CONTINUE_INIT control procedures of
  545.    RPCSEC_GSS), the NFS server MAY lock the <mechanism, QOP, service>
  546.    triple for the duration of the session.  While RPCSEC_GSS allows for
  547.    the use of different QOPs and services on each message, it would be
  548.    expensive for the NFS server to re-consult its table of exported file
  549.    systems to see if the triple was allowed. Moreover, by the time the
  550.    NFS server's dispatch routine was reached, the typical RPC subsystem
  551.    would already have performed the appropriate GSS-API operation,
  552.    GSS_VerifyMIC() or GSS_Unwrap(), if the respective integrity or
  553.    privacy services were selected. If the file system being accessed
  554.    were not exported with integrity or privacy, or with the particular
  555.    QOP used to perform the integrity or privacy service, then it would
  556.    be possible to execute a denial of service attack, whereby the
  557.    objective of the caller is to deny CPU service to legitimate users of
  558.    the NFS server's machine processors.
  559.  
  560.  
  561.  
  562. Eisler                      Standards Track                    [Page 10]
  563.  
  564. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  565.  
  566.  
  567.    Thus, in general, clients SHOULD NOT assume that they will be
  568.    permitted to alter the <mechanism, QOP, service> triple once the data
  569.    exchange phase of RPCSEC_GSS has started.
  570.  
  571. 3.4.  Registering Pseudo Flavors and Mappings
  572.  
  573.    Pseudo flavor numbers MUST be registered via same method as regular
  574.    RPC security flavor numbers via iana@iana.org.
  575.  
  576.    Once the pseudo flavor number has been assigned, registrants SHOULD
  577.    register the mapping with iana@iana.org. The mapping registration
  578.    MUST contain:
  579.  
  580.    *    the pseudo flavor number, an ASCII string name for the flavor
  581.         (for example "none" has been assigned for AUTH_NONE), and
  582.  
  583.    *    the <mechanism, algorithm(s), service> triple.  As per the GSS-
  584.         API specification, the mechanism MUST be identified with a
  585.         unique ISO object identifier (OID). The reason why the second
  586.         component of the triple is not necessarily a QOP value is that
  587.         GSS-API allows mechanisms much latitude in the mapping of the
  588.         algorithm used in the default quality of protection (See
  589.         subsection 4.1, "Issues with Kerberos V5 QOPs," for a detailed
  590.         discussion). With some mechanisms, the second component of the
  591.         triple will be a QOP. Internally, on the NFS implementation, it
  592.         is expected that the triple would use a QOP for the second
  593.         component.
  594.  
  595.    The mapping registration SHOULD also contain:
  596.  
  597.    *    A reference to an RFC describing how the NFS protocol works
  598.         over the pseudo flavor(s), including the pseudo flavor
  599.         number(s), string name(s) for the flavor(s), and any other
  600.         issues, including how the registrant is interpreting the GSS-API
  601.         mechanism.
  602.  
  603.    *    A reference to the GSS-API mechanism used.
  604.  
  605.    An example of a complete registration is provided in subsection 4.2,
  606.    "The NFS Protocol over Kerberos V5 Pseudo Flavor Registration Entry."
  607.  
  608. 4.  The NFS Protocol over Kerberos V5
  609.  
  610.    The NFS protocol uses Kerberos V5 security using the RPCSEC_GSS
  611.    security flavor.  The GSS-API security mechanism for Kerberos V5 that
  612.    the NFS/RPCSEC_GSS protocol stack uses is described in the Kerberos
  613.    V5 GSS-API description [RFC1964].
  614.  
  615.  
  616.  
  617.  
  618. Eisler                      Standards Track                    [Page 11]
  619.  
  620. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  621.  
  622.  
  623. 4.1.  Issues with Kerberos V5 QOPs
  624.  
  625.    The Kerberos V5 GSS-API description defines three algorithms for
  626.    integrity:
  627.  
  628.    *    DES MAC MD5
  629.  
  630.    *    MD2.5
  631.  
  632.    *    DES-MAC
  633.  
  634.    RFC 1964 states that MD2.5 "may be significantly weaker than DES MAC
  635.    MD5." RFC 1964 also states that DES-MAC "may not be present in all
  636.    implementations."
  637.  
  638.    Thus the description of operation of NFS clients and servers over
  639.    Kerberos V5 is limited to the DES MAC MD5 integrity algorithm.
  640.  
  641.    NFS clients and servers operating over Kerberos V5 MUST support the
  642.    DES MAC MD5 integrity algorithm. RFC 1964 lists a single algorithm
  643.    for privacy: 56 bit DES.  NFS clients and servers SHOULD support the
  644.    56 bit DES privacy algorithm.
  645.  
  646.    GSS-API has the concept of a default QOP of zero which means
  647.    different integrity and privacy algorithms to different GSS-API
  648.    mechanisms. In Kerberos V5, the default QOP of zero means to use the
  649.    56 bit DES algorithm (when doing a GSS_Wrap() operation with the
  650.    conf_req_flag set to 1).
  651.  
  652.    For Kerberos V5, the default QOP of zero means different integrity
  653.    algorithms to different implementations of Kerberos V5.  Furthermore,
  654.    during the processing of a token in GSS_Unwrap(), and
  655.    GSS_VerifyMIC(), at least one reference implementation of the
  656.    Kerberos V5 GSS-API mechanism [MIT], always returns a QOP of zero,
  657.    regardless of integrity algorithm encoded in the token.  For such
  658.    implementations, it means that the caller of GSS_Unwrap() and
  659.    GSS_VerifyMIC() cannot know the actual integrity algorithm used.
  660.    Given that each integrity algorithm has a different degree of
  661.    security, this situation may not be acceptable to the user of GSS-
  662.    API. An implementation of Kerberos V5 under GSS-API for use under NFS
  663.    MUST NOT do this.
  664.  
  665.    For the purposes of NFS, as a simplification, some Kerberos V5 GSS-
  666.    API mechanisms MAY map QOP 0 to always mean DES MAC MD5 integrity,
  667.    and when using GSS_VerifyMIC() and GSS_Unwrap(), always map the DES
  668.    MAC MD5 integrity that is specified to QOP 0.
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Eisler                      Standards Track                    [Page 12]
  675.  
  676. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  677.  
  678.  
  679. 4.2.  The NFS Protocol over Kerberos V5 Pseudo Flavor Registration Entry
  680.  
  681.    Here are the pseudo flavor mappings for the NFS protocol using
  682.  
  683.    Kerberos V5 security:
  684.  
  685.  columns:
  686.  
  687.  1 == number of pseudo flavor
  688.  2 == name of pseudo flavor
  689.  3 == mechanism's OID
  690.  4 == mechanism's algorithm(s)
  691.  5 == RPCSEC_GSS service
  692.  
  693.  1      2     3                    4              5
  694.  -----------------------------------------------------------------------
  695.  390003 krb5  1.2.840.113554.1.2.2 DES MAC MD5    rpc_gss_svc_none
  696.  390004 krb5i 1.2.840.113554.1.2.2 DES MAC MD5    rpc_gss_svc_integrity
  697.  390005 krb5p 1.2.840.113554.1.2.2 DES MAC MD5    rpc_gss_svc_privacy
  698.                                    for integrity,
  699.                                    and 56 bit DES
  700.                                    for privacy.
  701.  
  702.    An implementation of NFS over RPCSEC_GSS/GSS-API/Kerberos V5 that
  703.    maps the default QOP to DES MAC MD5 (and vice versa), would implement
  704.    a mapping of:
  705.  
  706.       columns:
  707.  
  708.       1 == number of pseudo flavor
  709.       2 == name of pseudo flavor
  710.       3 == mechanism's OID
  711.       4 == QOP
  712.       5 == RPCSEC_GSS service
  713.  
  714.       1      2     3                     4  5
  715.       -----------------------------------------------------------
  716.       390003 krb5  1.2.840.113554.1.2.2  0  rpc_gss_svc_none
  717.       390004 krb5i 1.2.840.113554.1.2.2  0  rpc_gss_svc_integrity
  718.       390005 krb5p 1.2.840.113554.1.2.2  0  rpc_gss_svc_privacy
  719.  
  720.    The reference for the GSS-API mechanism with the above OID is
  721.    [RFC1964].
  722.  
  723.    The reference for how the NFS protocol MUST work over Kerberos V5 is
  724.    this document.
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Eisler                      Standards Track                    [Page 13]
  731.  
  732. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  733.  
  734.  
  735. 5.  Security Considerations
  736.  
  737.    Version 3 of the MOUNT protocol is used to negotiate the security
  738.    flavor to be used by the NFS Version 3 client. If the NFS client uses
  739.    a weak security flavor like AUTH_SYS to query a Version 3 MOUNT
  740.    server, then the following attacks are possible by an attacker in the
  741.    middle:
  742.  
  743.    *    The attacker in the middle can coax the NFS client into using a
  744.         weaker form of security than what the real NFS server requires.
  745.         However, once the NFS client selects a security flavor when it
  746.         sends a request to real NFS server, if the flavor is
  747.         unacceptable, the NFS client's NFS request will be rejected. So
  748.         at worst, a denial of service attack is possible. In theory, the
  749.         NFS client could contact the MOUNT server using a stronger
  750.         security flavor, but this would require that the client know in
  751.         advance what security flavors the MOUNT server supports.
  752.  
  753.    *    If the client and server support a common set of security
  754.         flavors, such that the client considers one preferable to the
  755.         other (for example, one might have privacy and other not),
  756.         unless the client uses a strong security flavor in the MOUNT
  757.         protocol query, an attacker in the middle could cause the client
  758.         to use the weaker form of security.  Again, a client could
  759.         contact the MOUNT server using a stronger form of security.
  760.  
  761. 6.  IANA Considerations [RFC2434]
  762.  
  763.    This memorandum describes how NFS Version 2 and Version 3 work over
  764.    RPC's RPCSEC_GSS security flavor. This memorandum requires that
  765.    triples of { GSS-API mechanism OID, GSS-API mechanism algorithm,
  766.    RPCSEC_GSS security service } be mapped to a unique RPC security
  767.    flavor number, which is a pseudo flavor that does not appear in an
  768.    RPC protocol header.  This memorandum also encourages that an ASCII
  769.    string name be registered with the triple.
  770.  
  771.    Thus there are five different kinds of objects to consider guidelines
  772.    for.
  773.  
  774. 6.1.  Pseudo Flavor Number
  775.  
  776.    The considerations of assignment, allocation, and delegation of
  777.    pseudo flavor numbers are no different than that the considerations
  778.    for RPC security flavors, as both are assigned from the same number
  779.    space.  IANA is already responsible for the assigned of RPC security
  780.    flavors, and because this memorandum does not specify the RPC
  781.    protocol [RFC1831], it is beyond the scope of this memorandum to
  782.    guide IANA in the assignment of flavor numbers.
  783.  
  784.  
  785.  
  786. Eisler                      Standards Track                    [Page 14]
  787.  
  788. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  789.  
  790.  
  791. 6.2.  String Name of Pseudo Flavor
  792.  
  793.    This memorandum introduces the concept of a string name to be
  794.    associated with the RPC pseudo flavor number, and so it is within the
  795.    scope of this memorandum to provide guidance to IANA.
  796.  
  797. 6.2.1.  Name Space Size
  798.  
  799.    There are no limits placed on the length of the unique string name by
  800.    this memorandum, so the size of the name space is infinite. However,
  801.    IANA may want to prevent the hoarding or reservation of names. The
  802.    simplest way to do this is by requiring the registrant to provide the
  803.    GSS-API mechanism OID, GSS-API quality of protection, the RPCSEC_GSS
  804.    security service, and flavor number, with the request for a flavor
  805.    name. If the registrant does not have a flavor number, then
  806.    guidelines for flavor number assignments will indirectly limit the
  807.    assignment of flavor names.
  808.  
  809. 6.2.2.  Delegation
  810.  
  811.    The simplest way to handle delegation is to delegate portions of the
  812.    RPC security flavor number space with the RPC flavor name space. The
  813.    guidelines for delegation of the flavor name space are thus
  814.    equivalent to guidelines for delegations of the flavor number space.
  815.  
  816. 6.2.3.  Outside Review
  817.  
  818.    Because string names can be trademarks, IANA may want to seek legal
  819.    counsel to review a proposed pseudo flavor name. Other than that, no
  820.    outside review is necessary.
  821.  
  822. 6.3.  GSS-API Mechanism OID
  823.  
  824.    This memorandum assumes that the mechanism OID associated with the
  825.    pseudo flavor has already been allocated. OIDs are allocated by the
  826.    International Standards Organization and the International
  827.    Telecommunication Union. Both organizations have delegated assignment
  828.    authority for subsets of the OID number space to other organizations.
  829.    Presumably, IANA has received authority to assign OIDs to GSS-API
  830.    mechanisms. Because this memorandum does not specify the GSS-API
  831.    protocol (see [RFC2078]) it is beyond the scope of this memorandum to
  832.    guide IANA in the assignment of GSS-API mechanism OIDs.
  833.  
  834. 6.4.  GSS-API Mechanism Algorithm Values
  835.  
  836.    This memorandum assumes that the algorithm value for a given GSS-API
  837.    mechanism has already been allocated. Algorithm values are controlled
  838.    by the owner of the GSS-API mechanism, though the owner may delegate
  839.  
  840.  
  841.  
  842. Eisler                      Standards Track                    [Page 15]
  843.  
  844. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  845.  
  846.  
  847.    assignment of algorithm values to a body such as IANA. Because this
  848.    memorandum does not specify GSS-API mechanisms, such as [RFC1964], it
  849.    is beyond the scope of this memorandum to guide IANA in the
  850.    assignment of a mechanism's algorithm value(s).
  851.  
  852. 6.5.  RPCSEC_GSS Security Service
  853.  
  854.    There are only three security services and they are enumerated and
  855.    described in [RFC2203]. No guideline to IANA is necessary.
  856.  
  857. References
  858.  
  859.    [RFC1094] Sun Microsystems, Inc., "NFS: Network File System
  860.              Protocol Specification", RFC 1094, March 1989.
  861.              http://www.ietf.org/rfc/rfc1094.txt
  862.  
  863.    [Sandberg]
  864.              Sandberg, R., Goldberg, D., Kleiman, S., Walsh, D., Lyon,
  865.              B. (1985). "Design and Implementation of the Sun Network
  866.              Filesystem,"  Proceedings of the 1985 Summer USENIX
  867.              Technical Conference.
  868.  
  869.    [RFC1813] Callaghan, B., Pawlowski, B. and P. Staubach, "NFS
  870.              Version 3 Protocol Specification", RFC 1813, June 1995.
  871.              http://www.ietf.org/rfc/rfc1813.txt
  872.  
  873.    [RFC1831] Srinivasan, R., "RPC: Remote Procedure Call Protocol
  874.              Specification Version 2", RFC 1831, August 1995.
  875.              http://www.ietf.org/rfc/rfc1831.txt
  876.  
  877.    [RFC1832] Srinivasan, R., "XDR: External Data Representation
  878.              Standard", RFC 1832, August 1995.
  879.              http://www.ietf.org/rfc/rfc1832.txt
  880.  
  881.    [Pawlowski]
  882.              Pawlowski, B., Juszczak, C., Staubach, P., Smith, C.,
  883.              Lebel, D. and D. Hitz, "NFS Version 3 Design and
  884.              Implementation", Proceedings of the USENIX Summer 1994
  885.              Technical Conference.
  886.  
  887.    [RFC2203] Eisler, M., Chiu, A. and L. Ling, "RPCSEC_GSS Protocol
  888.              Specification", RFC 2203, September 1997.
  889.              http://www.ietf.org/rfc/rfc2203.txt
  890.  
  891.    [RFC2078] Linn, J., "Generic Security Service Application
  892.              Program Interface, Version 2", RFC 2078, January 1997.
  893.              http://www.ietf.org/rfc/rfc2078.txt
  894.  
  895.  
  896.  
  897.  
  898. Eisler                      Standards Track                    [Page 16]
  899.  
  900. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  901.  
  902.  
  903.    [RFC1057] Sun Microsystems, Inc., "RPC: Remote Procedure Call
  904.              Protocol Specification Version 2", RFC 1057, June 1988.
  905.              This RFC is being referenced for its description of the
  906.              AUTH_DH (AUTH_DES) RPC security flavor.
  907.              http://www.ietf.org/rfc/rfc1057.txt
  908.  
  909.    [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
  910.              Requirement Levels", BCP 14, RFC 2119, March 1997.
  911.              http://www.ietf.org/rfc/rfc2119.txt
  912.  
  913.    [Callaghan]
  914.              Callaghan, B., Singh, S. (1993). "The Autofs Automounter,"
  915.              Proceedings of the 1993 Summer USENIX Technical Conference.
  916.  
  917.    [RFC1964] Linn, J., "The Kerberos Version 5 GSS-API
  918.              Mechanism", RFC 1964, June 1996.
  919.              http://www.ietf.org/rfc/rfc1964.txt
  920.  
  921.    [RFC2054] Callaghan, B., "WebNFS Client Specification", RFC
  922.              2054, October 1996.
  923.              http://www.ietf.org/rfc/rfc2054.txt
  924.  
  925.    [RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing
  926.              an IANA Considerations Section in RFCs", BCP 26, RFC
  927.              2434, October 1998.
  928.              http://www.ietf.org/rfc/rfc2434.txt
  929.  
  930.    [MIT]     Massachusetts Institute of Technology (1998). "Kerberos:
  931.              The Network Authentication Protocol." The Web site for
  932.              downloading MIT's implementation of Kerberos V5, including
  933.              implementations of RFC 1510 and RFC 1964.
  934.              http://web.mit.edu/kerberos/www/index.html
  935.  
  936. Acknowledgments
  937.  
  938.    The author thanks:
  939.  
  940.    *    Brent Callaghan, John Hawkinson, Jack Kabat, Lin Ling, Steve
  941.         Nahm, Joyce Reynolds, and David Robinson for their review
  942.         comments.
  943.  
  944.    *    John Linn, for his explanation of QOP handling in RFC 1964.
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Eisler                      Standards Track                    [Page 17]
  955.  
  956. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  957.  
  958.  
  959. Author's Address
  960.  
  961.    Address comments related to this memorandum to:
  962.  
  963.    nfsv4-wg@sunroof.eng.sun.com
  964.  
  965.    Mike Eisler
  966.    Sun Microsystems, Inc.
  967.    5565 Wilson Road
  968.    Colorado Springs, CO 80919
  969.  
  970.    Phone: 1-719-599-9026
  971.    EMail: mre@eng.sun.com
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Eisler                      Standards Track                    [Page 18]
  1011.  
  1012. RFC 2623       NFS Security, RPCSEC_GSS, and Kerberos V5       June 1999
  1013.  
  1014.  
  1015. 14.  Full Copyright Statement
  1016.  
  1017.    Copyright (C) The Internet Society (1999).  All Rights Reserved.
  1018.  
  1019.    This document and translations of it may be copied and furnished to
  1020.    others, and derivative works that comment on or otherwise explain it
  1021.    or assist in its implmentation may be prepared, copied, published and
  1022.    distributed, in whole or in part, without restriction of any kind,
  1023.    provided that the above copyright notice and this paragraph are
  1024.    included on all such copies and derivative works.  However, this
  1025.    document itself may not be modified in any way, such as by removing
  1026.    the copyright notice or references to the Internet Society or other
  1027.    Internet organizations, except as needed for the purpose of eveloping
  1028.    Internet standards in which case the procedures for copyrights
  1029.    defined in the Internet Standards process must be followed, or as
  1030.    required to translate it into languages other than English.
  1031.  
  1032.    The limited permissions granted above are perpetual and will not be
  1033.    revoked by the Internet Society or its successors or assigns.
  1034.  
  1035.    This document and the information contained herein is provided on an
  1036.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  1037.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  1038.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  1039.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  1040.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  1041.  
  1042. Acknowledgement
  1043.  
  1044.    Funding for the RFC Editor function is currently provided by the
  1045.    Internet Society.
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Eisler                      Standards Track                    [Page 19]
  1067.  
  1068.