<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc1034  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.1034.xml'>
<!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
<!ENTITY rfc2307 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2307.xml'>
<!ENTITY rfc3530 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3530.xml'>
<!ENTITY rfc4120 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4120.xml'>
<!ENTITY rfc5280 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5280.xml'>
<!ENTITY rfc5661  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5661.xml'>
<!ENTITY rfc5716  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5716.xml'>
<!ENTITY rfc6680  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6680.xml'>
<!ENTITY rpcsecgss3  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.williams-rpcsecgssv3.xml'>
<!ENTITY pku2u  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-zhu-pku2u-09.xml'>
<!ENTITY krb5generalpac  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-sorce-krbwg-general-pac-01.xml'>
]>

<?rfc toc="yes" ?>
<?rfc tocindent="no" ?>
<?rfc symrefs="yes" ?>

<rfc category="std" ipr="trust200902" docName="draft-adamson-nfsv4-multi-domain-federated-fs-reqs-02">

    <front>
	<title>NFSv4 Multi-Domain FedFS Requirements</title>

	<author initials='W.A.' surname="Adamson" fullname='William A. (Andy) Adamson'>
	    <organization>NetApp</organization>
	    <address>
		<email>andros@netapp.com </email>
	    </address>
	</author>

	<author initials='N.' surname="Williams" fullname='Nicolas Williams'>
	    <organization>Cryptonector</organization>
	    <address>
		<email>nico@cryptonector.com</email>
	    </address>
	</author>
	<date/>
	<area>Internet </area>
	<workgroup>NFSv4 Working Group</workgroup>

	<abstract>
	    <t> This document describes constraints to the NFSv4.0 and
	        NFSv4.1 protocols as well as the use of multi-domain
	    	capable file systems, name resolution services, and security
		services required to fully enable a multi-domain NFSv4
		federated file system.
	    </t>
	</abstract>
    </front>

    <middle>

	<section title="Requirements notation">
            <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
		"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
		and "OPTIONAL" in this document are to be interpreted as
		described in <xref target="RFC2119"/>.
            </t>
	</section>


	<section title="Introduction">

             <t>The <xref target="RFC3530">NFSv4.0</xref> and
		<xref target="RFC5661">NFSv4.1</xref>
                (hereafter referred to as NFSv4) protocols enable the construction
		of a distributed
		file system which can join NFSv4 servers from multiple
		NFSv4 domains, each potentially using separate
		name resolution services and separate security services,
		into a common multi-domain name space.
            </t>

	    <t> The Federated File System (FedFS)
		<xref target="RFC5716"></xref>
	        describes the requirements
		and administrative tools to construct a uniform file server based
		namespace that is capable of spanning a whole enterprise
		and that is easy to manage.
	    </t>

            <t> An NFSv4 multi-domain capable filesystem uses 
	        local ID forms that can represent
	        identities from both local and remote NFSv4 domains.
	        An NFSv4 multi-domain FedFS joins
	        multiple NFSv4 domains each consisting of
		NFSv4 servers that export multi-domain capable filesystems,
		and that employ potentially separate name resolution services and
		separate security services into a uniform NFSv4 server-based
		name space capable of spanning multiple enterprises.
            </t>

	    <t> This document describes constraints to the NFSv4.0 and
	        NFSv4.1 protocols as well as the use of multi-domain
	    	capable file systems, name resolution services, and security
		services required to fully enable an NFSv4 multi-domain
		federated file system.
            </t>

	</section>  <!--Introduction --> 

	<section title="Terminology">

	    <t>
                <list style="hanging">

                    <t> Domain: This term is used in multiple contexts where
		        it has different meanings. Here we provide specific
			definitions.

                	<list style="hanging">

			    <t> DNS domain: a set of computers, services, or any
			        internet resource identified by an
			        <xref target="RFC1034">DNS domain name</xref>.
			    </t>

			    <t> Security realm or domain: a set of configured
			        security providers, users, groups, security roles,
				and security policies running a single security
				protocol and administered by a single
				entity. E.g. a Kerberos Realm. While a typical
				configuration is to use the uppercase DNS domain
				name as the Kerberos realm name they are
				independent.
		            </t>

			    <t> NFSv4 domain: a set of users, groups and
			        computers running NFSv4 protocols administered by
				a single entity, and identified by a unique NFSv4
				domain name. See <xref target="RFC5661"/> Section
				5.9 "Interpreting owner and owner_group".
				An NFSv4 domain can include multiple DNS domains
				and multiple security realms.
		            </t>

			    <t> Multi-domain: In this document this always refers
			    	to multiple NFSv4 domains.
			    </t>

			    <t> FedFS domain: A file name space that can cross
			        multiple shares on multiple file servers using
				file-access protocols such as NFSv4 or
				<xref target="CIFS">CIFS</xref>.  A FedFS
				domain is typically a single administrative entity,
				and has a name that is similar to a DNS domain name.
				Also known as a Federation.
		            </t>

			    <t> Administrative domain: a set of users, groups,
			        computers and services administered by a single
				entity. Can include multiple DNS domains, NFSv4
				domains, security domains, and FedFS domains.
		            </t>

                        </list>
		    </t>

		    <t> Local representation of identity: an object such as
                        a uidNumber (UID) or gidNumber (GID) [RFC2307],
                        or a Windows Security Identifier (SID), or other
                        such representation of a user or a group
                        of users on-disk in a file system.
		    </t>

		    <t> Global ID: A representation of identity that is globally
                        unique. Examples include the name@domain or ID@domain
                        NFSv4 syntax, and the Windows Security Identifier (SID). 
		    </t>

		    <t> Name Service: provides the mapping between
			{NFSv4 domain, name} and {NFSv4 domain, ID} via lookups.
			Can be applied to local or remote domains. Often provided
			by a Directory Service such as LDAP.
		    </t>

		    <t> ID mapping: Is a mapping between
			{remote NFSv4 domain, remote NFSv4 domain ID}
		        and {local representation of identity}.
		    </t>

		    <t> Principal: an RPCSEC_GSS authentication identity.
		        Usually, but not always, a user; rarely, if ever,
			a group; sometimes a host.
		    </t>

		    <t> Authorization Context: A collection of information
			about a principal such as username, userID,
			group membership, etcetera used in authorization
			decisions. 
		    </t>
                </list>
	    </t>
	</section>  <!--Terminology -->

	<section anchor="BGnd" title="Background">

	    <t> NFSv4 deals with two kinds of identities: authentication
		identities (referred to here as "principals") and
		authorization identities ("users" and "groups" of
		users).  NFSv4 supports multiple authentication methods,
		each authenticating an "initiator principal" (typically
		representing a user) to an "acceptor principal" (always
		corresponding to the NFSv4 server).  NFSv4 does not prescribe
		how to represent authorization identities on file
		systems.  All file access decisions constitute
		"authorization" and are made by NFSv4 servers using
		authorization context information and file metadata related
		to authorization, such as a file's access control list
		(ACL).
            </t>

	    <t> NFSv4 servers therefore must perform two kinds of
		mappings:
            </t>

                <t>
		    <list style="numbers">

		        <t> A mapping between
			    the authentication identity and the
			    authorization context information.
                        </t>

		        <t> A mapping between
			    the on-the-wire authorization identity
		            representation and the on-disk authorization
			    identity representation.
                        </t>

                    </list>
                </t>

	    <t> Many aspects of these mappings are entirely implementation
		specific, but some require multi-domain capable name resolution
		and security services. In order to interoperate in a
		multi-domain NFSv4 FedFS file system, NFSv4 servers must use such
		services in compatible ways.
	    </t>

	</section>  <!--Background --> 

	<section title="Multi-domain Constraints to the NFSv4 Protocol">

	    <section title="Name@domain Constraints">

	        <t> NFSv4 uses a syntax of the form "name@domain" as the
		    on wire representation of the "who" field of an NFSv4 
		    access control entry (ACE)
		    for users and groups.  This design provides a level of
		    indirection that allows NFSv4 clients and servers
		    with different internal representations of authorization
		    identity to interoperate even when referring to authorization
		    identities from different NFSv4 domains.
                </t>

	        <t> NFSv4 multi-domain capable sites need to meet the following
		    requirements in order to ensure that NFSv4 clients
		    and servers can map between name@domain and internal
		    representations reliably:
                </t>

                <t>
		    <list style="symbols">

	    		<t> The NFSv4 domain portion of name@domain 
			    MUST be unique within the FedFS NFSv4 multi-domain
			    namespace.  See <xref target="RFC3530"></xref>
			    section 5.9 "Interpreting owner and owner_group"
			    for a discussion on NFSv4 domain configuration.
	    		</t>

		        <t> The name portion of name@domain MUST be unique
			    within the specified NFSv4 domain.
                        </t>

		        <t> Every local representation of a user and of a
			    group MUST have a canonical name@domain, and it
			    must be possible to return the canonical
			    name@domain for any identity stored on disk, at
			    least when required infrastructure servers (such
			    as name services) are online.
                        </t>
		    </list>
	        </t>

	    </section> <!-- name@domain constraint -->

	    <section title="RPC Security Constraints">

	        <figure>
		    <preamble>
		        As described in <xref target="RFC5661"></xref>
		        section 2.2.1.1 "RPC Security Flavors":
		    </preamble>

                    <artwork>
            NFSv4.1 clients and servers MUST implement RPCSEC_GSS.
            (This requirement to implement is not a requirement
            to use.) Other flavors, such as AUTH_NONE, and AUTH_SYS,
            MAY be implemented as well.
                    </artwork>
	        </figure>

                <t> The underlying RPCSEC_GSS security mechanism used in a
		    multi-domain NFSv4 FedFS is REQUIRED to employ a method
		    of cross NFSv4 domain trust so that a principal from a security
		    service in one NFSv4 domain can be authenticated in another
		    NFSv4 domain that uses a security service with the same security
		    mechanism.  Kerberos, and
		    <xref target="I-D.zhu-pku2u">PKU2U </xref>
		    are examples of such security services.
		</t>

	        <t> The AUTH_NONE security flavor can be useful in a multi-domain
		    NFSv4 FedFS to grant universal access to public data without
		    any credentials.
                </t>

	        <t> The AUTH_SYS security flavor uses a host-based
		    authentication model where the weakly authenticated
		    host (the NFSv4 client) asserts the user's authorization
                    identities using small integers, <xref target="RFC2307">
		    uidNumber and gidNumber </xref>, as user and group identity
		    representations.  Because this authorization ID representation
		    has no DNS domain component, AUTH_SYS can only be
		    used in a name space where all NFSv4 clients and servers share
		    an <xref target="RFC2307"/> name service.  A shared
		    name service is required because uidNumbers and
		    gidNumbers are passed in the RPC credential; there is no
		    negotiation of namespace in AUTH_SYS.  Collisions can
		    occur if multiple name services are used.
		    AUTH_SYS can not be used in an NFSv4 multi-domain federated
		    file system.
	        </t>
	        <t> A new version of RPCSEC_GSS  <xref
		    target="I-D.williams-rpcsecgssv3"/> includes a modernized
		    replacement for AUTH_SYS which addresses this issue.
	        </t>

	    <!--
		ANDROS: more fully describe the AUTH_SYS replacement
		and note that it can be used.
	    -->

	    </section> <!-- RPC Security Constraints -->

	</section> <!-- Multi-domain Constraints to the NFSv4 Protocol -->

        <section title="NFSv4 Multi-domain File Access">

            <t> In the mult-domain case where a principal is seeking
                access to files on a NFSv4 server in a different NFSv4 domain,
		the NFSv4 server must [ANDROS: MUST?]
		obtain, in a secure manner, the principal's
		authorization information from an authoritative source: e.g. a
		name service in the principal's NFSv4 domain.
		The NFSv4 server then needs to map the remote principal
		and the authorization information such as the principal's primary
		group and group membership list into a local representation of ID
		suitable for use in file system ACLs. This is the first mapping
		described in <xref target="BGnd"/> "Background".
	    </t>

	    <t> In the local NFSv4 domain case where the principal is
		seeking access to files on an NFSv4 server in the local NFSv4
		domain, the server has knowledge of the local policies and
		methods for obtaining the principal's authorization information
		and the mapping to local representation of identity.
		In the multi-domain case there can be no assumption of such
		knowledge.
	    </t>

            <section anchor="AuthResolution" title="Resolving Multi-domain Authorization Information">

            <t> There are several methods the remote NFSv4 domain authoritative
                authorization information for a principal can be obtained:

                <list style="numbers">

                    <t> A mechanism specific GSS-API authorization payload
                        containing credential authorization data. This is
			the preferred method as it avoids requiring any
			knowledge of a remote NFSv4 domain name service.
                    </t>

                    <t> An authenticated NFSv4 server local NFSv4 domain name query
		        when there is a security agreement between the two
			multi-domain name services plus regular update data
			feeds so that the NFSv4 server local NFSv4 domain name
			service is authoritative for the principal's remote NFSv4
			domain.  This requires the local NFSv4 domain to have detailed
			knowledge of the remote NFSv4 domain's name authoritative
			name service.
                    </t>

                    <t> An authenticated direct query from the NFSv4 server to the
                        principal's NFSv4 domain authoritative name service.
                        This requires the NFSv4 server to have detailed
			knowledge of the remote NFSv4 domain's authoritative
			name service.
			[ANDROS: Define a protocol for this?]
                    </t>

                </list></t>

            <t> The authorization data information should be obtained via
                the GSS-API name attribute interface
                <xref target="RFC6680"/>
                either via a single attribute for the credential authorization
                data or via discrete GSS-API name attributes
                corresponding to the authorization data elements.
            </t>

            <t> Note that the retrieval of attribute values used by the GSS-API
                name attribute interface implementation could utilize any
                of the above mentioned methods of obtaining the authorization
                information which demonstrates the usefulness of the API.
            </t>
            </section> <!--Resolving Multi-domain Authorization Information -->
            <section title="GSS-API Authorization Payload">

                <t> To avoid requiring detailed knowledge of remote NFSv4 domain
		    name services, authorization context information SHOULD be
                    obtained from the credentials authenticating a
                    principal; the GSS-API represents such information
                    as attributes of the initiator principal name.
                </t>

                <t> For example:
                    <list style="symbols">
                        <t> Kerberos 5 <xref target='RFC4120'/> has
                            a method for conveying "authorization data", both
                            client-asserted as well as KDC-authenticated
                            authorization data. Some KDC implementation,
			    notably Windows KDCs, use this feature to convey a
			    <xref target="PAC"> "privilege attribute
			    certificate" </xref> listing the principal's user
			    and group global IDs as "security identifiers"
			    (SIDs).
                        </t>

                        <t> Some KDCs (will) issue Kerberos Tickets with the
                            <xref target="I-D.sorce-krbwg-general-pac"> General
                            PAD </xref> (PAD) as Kerberos authorization data
			    listing user and group names along with their
			    uidNumber and gidNumber [RFC2307], the name
			    of the DNS domain [ANDROS: review General PAD RFC
			    to ensure this can be the NFSv4 domain] along with a
			    unique DNS domain identifier and other information.
                            The General PAD authorization data MUST be
                            authenticated in the sense that its contents must
			    come from an authenticated, trusted source, such
			    as a name server or the issuer of the principal's
                            credential.
			</t>

			<t> PKIX <xref target='RFC5280'/> certificates allow
			    for extensions that could be used similarly.
		        </t>
                    </list>
                </t>

                <t> The authorization context information in a GSS-API
		    authorization payload can be considered a single,
		    authenticated, discrete GSS-API name attribute, in which
		    case the NFSv4 server must parse it into its individual
		    elements and ID-Map or use name services to map the
		    information to local ID representations.
		    [ANDROS: clarify - is it one name attribute or not. If not,
		    how can you tell?]
                </t>

            </section> <!--  GSS-API Authorization Payload  -->

        </section> <!-- NFSv4 Multi-domain File Access -->

        <section title="Setting and Retrieving NFSv4 Multi-domain ACLs">

	    <!--
		A remote group needs a local instance only when it is to be used
		in an ACL on disk.

		A remote group's local instance membership only includes members with
		a local user account. (just like all other groups).

		Once a remote group has a local instance, it's membership can be
		updated by an authenticated authoritative source.

		Each mech specific GSS-API auth payload is such a source, so
		a remote pricipal's group member ship from the auth payload can
		be used to update
		any remote groups in the auth payload that have a local instance.

		If there is a security agreement between the two multi-domain name
		services plus regular update data feeds then local instance of a
		remote groups membership can be updated during said regular feeds.
		This can be painful as the remote feed can/will contain may members
		that do not have a local account and these members must be filtered
		from the local group instance.
	    -->


	    <t> When servicing a set acl request, the NFSv4 server must
		be able to map the name@domain in the ACE who field to
		a local representation of ID. When servicing a get acl
		request, the NFSv4 server must be able to map the 
		local representation of ID in the file system ACL to
		the name@domain form. This mapping between name@domain and
		local representation of ID must [ANDROS: MUST?] be done against
		an authoritative source.  This is the second mapping
                described in <xref target="BGnd"/> "Background".
	    </t>
            <t> The local name-service is authoritative for these mappings
		for remote users and groups
	        when one of the first two <xref target="AuthResolution">
		methods in </xref> is used to keep the local name-service
		updated with remote information.
	    </t>


        </section> <!-- Setting and Retrieving NFSv4 Multi-domain ACLs -->

	<section title="Security Considerations">

	    <t>Some considerations to come</t>

	</section> <!-- Security Considerations -->

    </middle>

    <back>

	<references title="Normative References">
	    &rfc1034;
	    &rfc2119;
	    &rfc2307;
	    &rfc3530;
	    &rfc4120;
	    &rfc5661;
	    &rfc5716;
	    &rfc6680;
	    &pku2u;
	    &krb5generalpac;
            <reference anchor="PAC">
                <front>
                    <title>Utilizing the Windows 2000 Authorization Data in
			Kerberos Tickets for Access Control to Resources
		    </title>
                    <author initials="J. " surname="Brezak" fullname="J.Brezak">
                        <organization>Microsoft Corporation</organization>
                    </author>
                    <date month="October" year="2002" />
                </front>
            </reference>
            <reference anchor="CIFS">
                <front>
                    <title>[MS-CIFS] — v20130118 Common Internet File System
			(CIFS) Protocol
		    </title>
                    <author>
                        <organization>Microsoft Corporation</organization>
                    </author>
                    <date month="January" year="2013" />
                </front>
            </reference>
	</references>
        <references title="Informative References">
            &rpcsecgss3;
            &rfc5280;
	</references>


    </back>
</rfc>
