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

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
<!ENTITY rfc1034 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.1034.xml'>
<!ENTITY rfc1813 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.1813.xml'>
<!ENTITY rfc1831 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.1831.xml'>
<!ENTITY rfc2203 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2203.xml'>
<!ENTITY rfc2307 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2307.xml'>
<!ENTITY rfc2743 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2743.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 rfc4511 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4511.xml'>
<!ENTITY rfc5280 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5280.xml'>
<!ENTITY nfsv41  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-nfsv4-minorversion1.xml'>
<!ENTITY fedfsreqts  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-nfsv4-federated-fs-reqts.xml'>
<!ENTITY rfc2307bis  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.howard-rfc2307bis.xml'>

<!-- 
<!ENTITY fedfsdnssrv  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-nfsv4-federated-fs-dns-srv-namespace.xml'>
-->

<!ENTITY rpcsecgss3  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.williams-rpcsecgssv3.xml'>
<!ENTITY gssnamexts  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-kitten-gssapi-naming-exts.xml'>
]>

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

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

    <front>
	<title>NFSv4 Multi-Domain Access</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='K.W.' surname="Coffman" fullname='Kevin Coffman'>
	    <organization>CITI, University of Michigan</organization>
	    <address>
		<email>kwc@umich.edu </email>
	    </address>
	</author>

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

	<abstract>
	    <t>The Network File System, version 4 (NFSv4) uses a
		representation of identity that allows the use of users
		and groups from multiple, distinct administrative
		domains, and NFSv4 allows the use of security mechanisms
		that authenticate principals from multiple, distinct
		administrative domains.  This document describes methods
		by which NFSv4 clients and servers can handle
		principals, users, groups from multiple administrative
		domains.</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">NFS Version 4</xref> protocol
		enables the construction of a distributed file system
		which can join NFSv4.0 or <xref
		    target="I-D.ietf-nfsv4-minorversion1">NFSv4.1</xref>
		servers from multiple administrative domains, each
		potentially using separate
		name resolution services and separate security services,
		into a common multi-domain name space.</t>

	    <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 principals" (always
		corresponding to the server).  NFSv4 does not prescribe
		how to represent authorization identities on file
		systems.  All file access decisions constitute
		"authorization" and are made by servers using
		information about client principals (such as username,
		group memberships, and so on) and file metadata related
		to authorization, such as a file's access control list
		(ACL).</t>

	    <t>Authentication in NFSv4 occurs at the the <xref
		    target="RFC2203">RPCSEC_GSS</xref> layer where
		<xref target="RFC2743"> GSS-API mechanisms </xref>
		are used to authenticate users on NFSv4 clients to NFSv4
		servers, and to provide security services such as
		confidentiality and integrity protection for the
		protocol's messages.  The NFSv4 protocol specifies no
		particular representation for authentication identities
		as these are entirely mechanism-specific</t>

	    <t>Authorization for file object access is done at the NFSv4
		protocol layer (i.e., above the RPCSEC_GSS layer), on
		the server side, based on an authenticated client
		principal's authorization context and the authorization
		meta-data of the file system objects that the client
		wishes to access.  File authorization meta-data is set
		and retrieved in the NFSv4 <xref
		    target="RFC1831">RPC</xref> layer, specifically via
		the object's owner, owner_group and acl, dacl and sacl
		attributes (the last three being ACLs).  ACLs are lists
		of ACL entries (ACEs).  Each ACE has a "who" field
		identifying a subject to whom some permision is granted
		or denied.  The owner and owner_group attributes and the
		who ACE field, all reference users and groups.  On the
		wire, the protocol represents users and groups as
		strings of characters with this form: name@domain, where
		&lt;name&gt; is a user or group name, and &lt;domain&gt;
		is a the name of an administrative domain, more
		specifically a <xref target="RFC1034">DNS</xref>
		domainname.</t>

	    <t>NFSv4 server implementations usually do not, and really
		ought not, store authorization identities on disk in the
		same form as is used on the wire.  The reason is that
		users' and groups' names change all too often, while
		searching for and updating file authorization meta-data
		after a user/group name change is not trivial,
		particularly in a global namespace spanning multiple
		administrative domains.</t>

	    <t>NFSv4 servers therefore must perform two kinds of
		mappings: a) authentication identity to authorization
		context (a principal's user ID, group memberships,
		etcetera), and on-the-wire authorization identity
		representation to on-disk authorization identity
		representation.  Many aspects of these mappings are
		entirely implementation-specific, but some require name
		resolution services, and in order to interoperate
		servers must use such services in compatible ways.  Many
		implementations are limited to being able to represent
		users and groups from a single domain.</t>

	    <t>In this document we address both of those kind of
		mappings, describing possible implementation strategies,
		and specifying a name service for interoperation in a
		global namespace <xref
		    target="I-D.ietf-nfsv4-federated-fs-reqts"/>.</t>

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

	<section title="Background">

	    <t>NFSv4 uses a syntax of the form "name@domain" to
		represent, on the wire, the NFSv4 ACL name for users and
		groups.  This design provides a level of indirection
		that allows a client and server with different internal
		representations of authorization identity to
		interoperate even when referring to authorization
		identities from different administrative domains.</t>

	    <t>Multi-domain capable sites need to meet certain
		requirements in order to ensure that clients and servers
		can map name@domain to internal representations
		reliably:</t>

	    <t>
		<list style="symbols">

		    <t>name@domain MUST be unique within the DNS 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>

	    <figure>

		<preamble>
		    As described in <xref
			target="I-D.ietf-nfsv4-minorversion1"></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 AUTH_NONE security flavor can be useful to the
		multi-domain NFSv4 or federated name space 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]
		client asserts the user's authorization identities using
		small integers as user and group identity
		representations.  Because of the small integer
		authorization ID representation, AUTH_SYS can only be
		used in a name space where all clients and servers share
		a uidNumber and gidNumber translation service.  A shared
		translation 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 translation services are used.  These
		and other issues are addressed in <xref
		    target="I-D.williams-rpcsecgssv3"/> which describes
		a new version of RPCSEC_GSS that includes a modernized
		replacement for AUTH_SYS.</t>

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

	<section title="Terminology">

	    <t>
		<list style="hanging">

		    <t>Identity: a way to refer to a user or group.</t>

		    <t>Principal: an entity that is authenticated by
			RPCSEC_GSS (usually, but not always, a user;
			rarely, if ever, a group; sometimes a host).</t>

		    <t>Authorization context: the set of user and group
			IDs, privileges, labels, and other items
			relevant to authorization, corresponding to a
			subject (user or principal).</t>

<!--
		    <t>Security descriptor: the set of items relevant to
			authorization that are associated with an
			object.  E.g., a file's owner user ID and access
			control list (ACL).</t>
-->

		    <t>Domain-local ID: Most installations assign
			numeric, local identifiers to users and groups,
			using a namespace local to their domain.  We
			call this a domain-local ID.</t>

		    <t>Local representation of identity: an item such as
			a POSIX user IDentifier (UID) or group ID (GID),
			or a Windows Security IDentifier (SID), or other
			such local representation of a user or a group
			of users.</t>

		    <t>Global representation of identity: a tuple
			consisting of a domain identifier (possibly the
			domain's name itself) and a domain-local
			user/group ID.  We do not propose a standard
			global representation of identity, but the
			concept is useful.</t>

		    <t>Domain: a set of users and computers administered
			by a single entity, and identified by a DNS
			domain name.</t>

		    <t>POSIX IDs: small non-negative integers (typically
			0..2^31 or 0..2^32) identifiers.  The namespace
			of user IDs (UIDs) is distinct from the
			namespace of group IDs (GIDs).</t>

		    <t>Windows SIDs: an identifier of security entities,
			including users and groups.  The form of a SID
			is:
			S-1-&lt;authority&gt;&lt;RID_0&gt;&lt;RID_1&gt;&lt;RID_n&gt;
			By convention some authority numbers denote
			security entities, identified by RID_n, local to
			a domain identified by RIDs 0..n-1.  Domain RIDs
			are usually generated randomly within a "forest"
			of domains.</t>

		    <t>Name resolution: mapping from {domain, name} to
			{domain, ID}, and vice-versa via lookups. Can be
			applied to local or remote domains.</t>

		    <t>ID mapping: {domain-remote ID } to { domain-local
			ID } mappings.</t>

		    <t>Logon service:  { user ID } -> { groups user is a
			member of, and other authorization context }</t>

		</list>
	    </t>
	</section>  <!--Terminology --> 

	<section anchor="ONDISK" title="Local Representations of Global Identity">

	    <t>Multi-domain support starts at the fileserver where local
		ID forms need to be able to represent global identities
		from both, local and remote domains.  Local
		representation of global identity also applies to
		clients, particularly clients with local filesystems.
		There's a range of local solutions to this multi-domain
		ID representation problem. In this section we describe
		several approaches to representing a
		&lt;name&gt;@&lt;local or remote domain&gt; on disk.
		None of these approaches are REQUIRED; all are
		INFORMATIVE.  However, conventions relating to the use
		of name services are NORMATIVE.</t>

	    <section title="Storing Name@Domainname">

		<t>One simple approach to the multiple domain problem is
		    the identity function applied to name@domain, with
		    the resultant ID stored on disk.</t>
		
		<t>This approach imposes a severe constraint on the
		    administrators of these domains: user and group
		    names must never be reused, as there is also no
		    realistic way to keep the name@domain on disk
		    representation up to date with user, group or domain
		    renames and removals.  Consider a remote domain's
		    NFSv4 servers where real-time employee join/leave
		    data may be (typically is!) considered privileged,
		    and remote servers may not be sufficiently
		    privileged to access it [elaborate...].</t>

	    </section>

	    <section anchor="ID@DOMAIN" title="Storing Remote-ID@Domainname">

		<t>Most installations assign numeric, local identifiers
		    to users and groups, using a namespace local to
		    their domain.  We call this a domain-local ID.  We
		    can then construct a global identity form consisting
		    of a domain ID and a domain-local user/group ID.</t>

		<t>The user or group renaming issue can be addressed by
		    using a global identity form where domain-local IDs
		    are required.  I.e., use name resolution to lookup
		    name@domain to find the ID local to the domain, and
		    join the ID with the result of the identity function
		    applied to the domain.  This function still has
		    a renaming problem with respect to DNS domain
		    renames, but that is a realistically manageable
		    problem.</t>

		<section anchor="STORE" title="Storing Remote-ID@Domain-ID">

		    <t>The DNS domain renaming issue in the previous
			section can be addressed by assigning and
			publishing a unique ID to each DNS domain.
			I.e., use name resolution to lookup name@domain
			to find some ID local to the domain, lookup the
			domain ID and store &lt;remote-ID,domain-ID&gt;.</t>

		</section>

		<section anchor="small-IDs" title="ID Mapping">

		    <t>Many file systems exported by NFS only store
			32-bit user and group IDs which limit their
			ability to utilize the on disk representation
			described in <xref target="ID@DOMAIN"></xref>.
			Such systems may need to use an additional
			service to map between &lt;remote users, local
			user IDs&gt; and &lt;remote groups, local group
			IDs&gt;.  We call this an "ID mapping
			service".</t>

		    <t>The use of an ID mapping service is not strictly
			necessary if the system operates on IDs large
			enough such that &lt;user/group ID, domain
			ID&gt; can be encoded into a native ID.
			However, a large class of operating systems,
			those which are Unix or Unix-like operating
			systems, such as Solaris and Linux, use 32-bit
			UIDs and GIDs in many services and therefore need
			mapping for backwards compatibility reasons.</t>

		    <t>One example of such a service is to keep a local
			or distributed database for dynamically
			assigning a local 32 bit ID to every
			&lt;ID&gt;@&lt;domain-ID&gt;, or one could do
			that only for remote domains, reserving only a
			small part of the local 32-bit ID namespace for
			remote domains'
			users/groups.</t>

		    <t>The remote ID and remote domain are then used as
			inputs to a name resolution service which
			contacts the remote domain name service to
			resolve the remote name.</t>

		</section>

	    </section>

	    <section title="Use of Name Services">

		<t>Such file systems often use a distributed directory
		    service for assigning domain local 32 bit IDs to
		    remote users and groups.  The <xref
			target="NIS">Network Information Service</xref>
		    and the <xref target="RFC4511">Lightweight Directory
			Access Protocol</xref> are the two broadly
		    used distributed directory service protocols used
		    for this purpose.  LDAP is used instead of NIS in
		    environments where scale and security are issues.
		    <xref target="LDAP-EXT"></xref> expands the LDAP
		    protocol to include mappings between name@domain and
		    local user and group IDs.</t>

		<t>Support for LDAP <xref target="RFC4511"/> with the
		    RFC2307 schema <xref target="RFC2307"/> is
		    REQUIRED.</t>

		<section title="Using LDAP with RFC2307 Schema">

		    <t>Name resolution consists of searches with scope
			'sub', a base DN corresponding to a domain (more
			on this below) and a filter of either of these
			forms, with matching on objectClass being
			optional:</t>

		    <t>
			<list style='symbols'>

			    <t>((objectClass=posixAccount)(uid="&lt;username&gt;))</t>

			    <t>((objectClass=posixGroup)(cn="&lt;groupname&gt;))</t>

			    <t>((objectClass=posixAccount)(uidNumber="&lt;UID&gt;))</t>

			    <t>((objectClass=posixGroup)(gidNumber="&lt;GID&gt;))</t>

			</list>
		    </t>

		    <t>The base DN should be formatted from a domain's
			DNS domainname as follows.  First format the
			domainname as a string, then strip the trailing
			dot ('.'), if any, then replace all dots ('.')
			with ",DC=", then prepend "DC=" to the resulting
			string.  For example, foo.bar.example becomes
			"DC=foo,DC=bar,DC=example".  This convention is
			REQUIRED to be implemented.  Domains with base
			DNs that do not match this convention may be
			used, but their domainname-to-base-DN mappings
			must be published where NFSv4 clients and
			servers may find them; we provide no conventions
			for publishing such mappings.  Implementations
			MUST support the use of LDAP referrals to find
			LDAP servers authoritative for any given base
			DN.</t>

		    <t>For example, to resolve a user named
			joe@foo.bar.example to a remote ID a system
			would do an LDAP search with
			DC=foo,DC=bar,DC=example as the base DN,
			scope='sub' and with a filter of
			((objectClass=posixAccount)(uid="&lt;username&gt;))
			looking for the uidNumber attribute.</t>

		</section>

		<section title="Using Active Directory LDAP">

		    <t>[Add text describing searches by which to resolve
			name@domain to SIDs and vice versa.]</t>

		</section>

		<section title="Resolving Domain Names to Domain IDs">

		    <t>[Add text on mapping domainnames to domain
			IDs.]</t>

		</section>

		<section title="LDAP DIT Construction for a Federated Namespace">

		    <t>[Add text on federated namespace LDAP DIT
			construction, and caching services.</t>

		</section>

	    </section>

	</section>

	<section anchor="V4ACCESS" title="GSS-API Principal-to-NFSv4 Authorization Context">

	    <t>In order to authorize user access to files, the NFSv4
		server must map the RPCSEC_GSS client principal name or
		the underlying GSS-API security context to local
		security information including a local ID, a set of
		group IDs and other user privileges.  This security
		information is contained in an "authorization context"
		(also called an "access token" in some systems).</t>

	    <t>Authorization contexts consist of:</t>

	    <t>
		<list style="numbers">

		    <t>UserID: This field contains the principal's
			global ID and/or local ID mapping thereof, and
			the name@domain form thereof.</t>

		    <t>PrimarygroupID: This field contains the global ID
			and/or local ID mapping thereof for the
			principal's primary group, and the name@domain
			form thereof.</t>

		    <t>Groups: This field contains an array of group IDs
			for the groups that the user is a member of, in
			global ID form and/or local ID mappings thereof,
			as well as in name@domain name@domain forms.</t>

		    <t>As yet unspecified field(s) for privileges and
			authorizations granted to the principal, if
			any.</t>

		    <t>As yet unspecified field(s) for other privilege
			information such as the multi-level security
			label range/set of the principal.</t>

		    <t>Implementation-specific items relevant to
			authorization.</t>

		</list>
	    </t>

	    <t>The RPCSEC_GSS client principal authorization context
		determination may be mechanism-specific, and even
		operating system-specific, but from the NFSv4 server's
		point of view, it is a generic facility.  Below we
		describe several methods of authorization context
		determination.</t>

	    <!--
	    <t>We define a <xref
		    target="I-D.ietf-kitten-gssapi-naming-exts"/> NFSv4
		authorization context name attribute for NFSv4 as
		follows.  The NFSv4 authorization context MUST be
		authenticated in the sense that its contents must come
		from an authenticated, trusted source, such as a
		directory server or the issuer of the client principal's
		credential.</t>
	    -->

	    <t>The NFSv4 authorization context SHOULD be obtained via
		discrete GSS-API name attributes <xref
		    target="I-D.ietf-kitten-gssapi-naming-exts"/>
		corresponding to the above elements of authorization
		contexts.  URIs for those attributes are TBD.  If the
		named attribute interface is not available, or the
		attributes are not available, other means of determining
		a principal's authorization context SHOULD be used, such
		as those described in <xref target="AUTHCRED"></xref>
		and <xref target="PRINC_TO_USER"></xref>.</t>

	    <section anchor="AUTHCRED" title="Using GSS-API Naming Extensions">

		<t>Authorization context information can sometimes be
		    obtained from the credentials authenticating a
		    principal; the GSS-API represents such information
		    as attributes of the initiator prinicpal's name.
		    For example: Kerberos 5 <xref target='RFC4120'/> has
		    a method for conveying "authorization data", both
		    client-asserted as well as KDC-authenticated
		    authorization data, and one KDC implementation uses
		    this feature to convey a "privilege attribute
		    certificate" (PAC) listing the principal's user and
		    group "security identifiers" (SIDs).  PKIX <xref
			target='RFC5280'/> certificates allow for
		    extensions that could be used similarly.</t>

		<section title="Using a PAC">

		    <t>The Windows operating system uses something
			called a "PAC", which contains a user Security
			IDentifier (SID) and a list of group SIDs.  Some
			Kerberos Key Distribution Centers (KDCs),
			notably Windows KDCs, issue Kerberos Tickets
			with PACs as Kerberos authorization data.  When
			a client principal is authenticated using such a
			ticket, the server SHOULD extract the PAC from
			the client's ticket and map, if need be, the
			SIDs in the PAC to local ID representations.</t>

		    <t>The authorization context information in a PAC
			can be considered a single, authenticated,
			discrete GSS-API name attribute, in which case
			the server must parse it into its individual
			elements.</t>

		    <t>[Add references.]</t>

		</section> <!-- Using a PAC -->

	    </section> <!-- Using Authenticated Credential Extensions -->

	    <section anchor="PRINC_TO_USER" title="Mapping Principal Names to Usernames">

		<t>If suitable and sufficient authenticated name
		    attributes for the client principal are not
		    available, then the server may try to map the client
		    principal name to a local notion of user account,
		    and then lookup that user account's authorization
		    context information through name service
		    lookups.</t>

		<t>One simple method for Kerberos principal-to-username
		    mapping is to first apply an algorithmic or
		    table-based Kerberos client principal realm name to
		    domain name mapping, then a client principal name to
		    username mapping.  Finally, the server can look up
		    the user's authorization context using the user's
		    domain's name services.</t>

		<t>A trivial Kerberos realm-name-to-domainname mapping
		    consists of case-folding the realm name to
		    lower-case.  [Add notes about internationalization.]
		    Servers MUST implement this mapping as an option,
		    possibly as a default option.</t>

		<t>A trivial Kerberos principal name to username
		    mapping for 1-component principal names,
		    is the identity function.  Servers MUST implement
		    this mapping as an option, possibly as a default
		    option.</t>

		<section title="Using a Name Service to Map Principal Names to User Accounts">

		    <t>Name services such as the Solaris gsscred
			database where the local identity is looked
			up in a database keyed by the GSS exported
			name token, or LDAP with the extension
			described in <xref target="GSSAUTH"></xref>,
			can be used to map principal names to user
			accounts.</t>

		    </section> <!-- Using a Name Service to Map Principal Names to User Accounts -->

		</section> <!-- Mapping Principal Names to Usernames -->

		<section title="User Group Membership Determination">

		    <t>User group membership is easy to determine for
			users in a system's local domain: the operating
			system will already know how to do that.</t>

		    <t>User group membership in remote domain's groups,
			or for remote users, may be determined using
			LDAP with the RFC2307 schema.  The RFC2307
			schema does not define the values of the
			'memberUid' attribute, but in practice it seems
			that those are expected to be the names of users
			as found in the 'uid' attribute of
			'posixAccount' entries.  There is work in
			progress to <xref
			    target="I-D.howard-rfc2307bis">update
			    RFC2307</xref> to allow the use of DNs in
			the memberUid attribute, as well as group
			nesting.  Such use of memberUid should be
			backwards-compatible, since implementations that
			don't know about that use of memberUid will end
			up ignoring values which are not plain
			usernames.</t>

		    <t>Assuming the ability to store DNs in the
			memberUid attribute, then, group membership
			determination can be done as follows.  Given a
			user ID whose DN has been resolved:</t>

		    <t>
			<list style='numbers'>

			    <t>Search the user's domain for groups
				that the user is a member of in the
				user's home domain.  Filter out groups
				that are not local to the user's home
				domain.</t>

			    <t>Search the server's domain for groups
				that the user is a member of in the
				server's home domain.</t>

			    <t>Search the server's domain for groups
				that the user's group memberships
				determined in step 1 are members of.</t>

			    <t>Continue searching for nested group
				memberships given the list of groups
				from steps 2 and 3.</t>

			</list>
		    </t>

		    <t>However, the above procedure has the same
			user/group name renaming issue.  By skipping
			step 2 we can get down to just a group renaming
			issue.  To fully address the rename issue we
			need either a new attribute or value type for
			memberUid, storing user/group IDs in
			some global ID representation.</t>

		    <t>[Add text defining such a new attribute/value
			type.]</t>

		</section>

	</section> <!-- GSS-API Principal NFSv4 Access Token  -->

	<section anchor="LDAP-EXT" title="LDAP Schema Extensions for Multi-Domain NFSv4">

	    <section anchor="GSSAUTH" title="LDAP Attribute for Principal Name to Local ID Translation" >

		<t>The gSSPrincipal objectclass allows for the use of the gSSAuthName 
		    attribute described in the following section.</t>

		<figure> 
		    <artwork>
                     objectclass ( 1.3.6.1.4.1.250.10.7
                     NAME 'gSSPrincipal'
                     DESC 'GSS Principal Name'
                     SUP  posixAccount
                     MAY ( gSSAuthName ) )
		    </artwork>
		</figure> 

		<t>Here we present a new LDAP attribute that provides a
		    method for the translations between a local
		    ID and (multiple) GSS-API security principals, used
		    as described in <xref
			target="PRINC_TO_USER"></xref>.</t>

		<figure>

		    <preamble>
			The gSSAuthName attribute stores a user's
			GSS-API principal name in exported name token
			form (see <xref target="RFC2743"/>).
		    </preamble>

		    <artwork>
                        attributetype ( 1.3.6.1.4.1.250.10.6
                        NAME ( 'gSSAuthName')
                        DESC 'GSS-API exported principal name
                        exported token'
                        EQUALITY bitStringMatch
                        SYNTAX 1.3.6.1.4.1.1466.115.121.1.6)
		    </artwork>
		</figure>

	    </section>

	    <!--
	    <section anchor="REMOTEID" title="LDAP Attribute for Remote ID translation" >

		<t>[This section needs a lot more work, or to be
		    removed.  I can't see any reason why this attribute
		    is needed at all.  -Nico]</t>

		<t>The remoteID attribute implements the optional <xref
			target="STORE">ID mapping </xref> of
		    domain-remote ID to domain-local ID. The remoteID is
		    used as a more stable identifier of a remote user
		    than the remote name, which can change with
		    renames.</t>

		<figure>
		    <artwork>
                        attributetype ( 1.3.6.1.4.1.250.10.8
                        NAME ( 'remoteID')
                        DESC 'An integer uniquely identifying a
                        user in a remote administrative domain'
                        EQUALITY integerMatch
                        SYNTAX 'INTEGER' SINGLE-VALUE)
		    </artwork>
		</figure>

	    </section>
	    -->

	</section>

	<section title="Name Resolution">

	    <t>As noted in <xref target="STORE"></xref>, most local
		representations require a name service to perform ID to
		name translations.  Implementations are REQUIRED to
		support the use of LDAP as a name service, relying on
		LDAP referrals for federated namespace construction.</t>

	    <t>Note that in a topographically widely separated set of
		domains the need to do name service lookups in various
		domains' name services may prove brittle, resulting in
		non-deterministic server behavior (e.g., sometimes a
		user can access share, sometimes they cannot; sometimes
		they appear to be members of some group, sometimes they
		do not).  To avoid this, site administrators may wish to
		maintain local caches of remote domains' name
		services such that LDAP searches for users/groups in
		remote domains can be satisfied locally for some set of
		key attributes (such as naming and ID attributes), with
		referrals used in all other cases.</t>

	    <t>Domains in a federated namespace may provide each other
		with LDAP LDIF delta feeds by which to maintain cached
		LDAP contents up to date.</t>

	    <section title="Using LDAP Caching Proxies">

		<t>Many sites use a distributed name service such as
		    <xref target="RFC4511">Lightweight Directory Access
			Protocol</xref> for distributing system
		    configuration data and providing name translation.
		    <xref target="RFC2307">RFC2307</xref> defines the
		    LDAP posixAccount object class and an associated set
		    of attributes used to resolve account information
		    such as user IDs to login names and group IDs to
		    group names.</t>

		<t>The LDAP posixAccount schema can be used to map
		    between the multiple domain local ID and the NFSv4
		    name@domain form by adding remote domain DN
		    hierarchies to the local LDAP name service.</t>

		<t>An LDAP service set up in this way is a caching proxy
		    because it caches remote domain information. The DN
		    hierarchy structure has the advantage of aiding
		    delta feeds from remote domains because each
		    domain's information is in it's own DN subtree.</t>

		<t>An example follows that shows the DN hierarchy for
		    sample.com's LDAP service.</t>

		<figure anchor="ldap-hierarchy">
		    <artwork>
                        dc=com/
                        dc=sample/
                        ou=People/
                        [all the rfc2307 people entries for
                        sample.com]
                        uid=bob

                        dc=edu/
                        dc=university/
                        ou=People/
                        [all the rfc2307 people entries for the
                        remote domain university.edu]
                        uid=alice
		    </artwork>

		    <postamble>
			An LDAP hierarchy for two domains, the local
			sample.com domain and the remote university.edu
			domain.
		    </postamble>

		</figure>

		<figure anchor="multi-domain-ldap">

		    <preamble>
			More detail on two entries from sample.com's
			LDAP service:
		    </preamble>

		    <artwork>
                        dn: uid=bob,ou=People,dc=sample,dc=com
                        objectClass: top
                        objectClass: person
                        objectClass: organizationalPerson
                        objectClass: inetorgperson
                        objectClass: gSSPrincipal
                        cn: Bob B. Bar
                        sn: Bar
                        uidNumber: 5989
                        gidNumber: 100
                        gSSAuthName: &lt;bob@SAMPLE.COM&gt;
                        gSSAuthName: &lt;bob@SAMPLE-ENG.COM&gt;

                        dn: uid=alice,ou=People,dc=university,dc=edu
                        objectClass: top
                        objectClass: person
                        objectClass: organizationalPerson
                        objectClass: inetorgperson
                        objectClass: gSSPrincipal
                        cn: Alice A. Answer
                        sn: Answer
                        uidNumber: 5990
                        gidNumber: 100
                        remoteID: 1234
                        gSSAuthName: &lt;alice@UNIVERSITY.EDU&gt;
		    </artwork>
		</figure>

		<t><xref target="multi-domain-ldap"></xref> shows two
		    entries in the sample.com LDAP service also shown in
		    <xref target="ldap-hierarchy"></xref>.  One entry is
		    for a local user Bob and one entry for a remote user
		    alice. The mappings of the local uidNumber to an
		    NFSv4 name@domain are also shown where the NFSv4
		    name@domain is expressed as a concatenation of the
		    posixAccount uid attribute and the DN domain.</t>

		<t><xref target="multi-domain-ldap"></xref> also
		    demonstrates the use of the gSSAuthName and remoteID
		    attributes. User bob@sample.com has a principal in
		    both the SAMPLE.COM and the SAMPLE_ENG.COM Kerberos
		    realms, and both map to his uidNumber. User
		    alice@university.edu has a principal in the
		    UNIVERSITY.EDU Kerberos realm, and a remoteID of
		    1234 which is her uidNumber in the university.edu
		    name service.</t>

	    </section> <!-- Local tMapping of Remote Names -->

	    <section title="LDAP Schema Extensions for ID Mapping">

		<t>[Add text.]</t>

	    </section>

	</section> <!-- Name Resolution -->


	<section title="Multi-Domain Access Summary" >

	    <t>File systems exported by the NFSv4 file server need to be
		able to represent user and group IDs from multiple
		domains.</t>

	    <t>The RPCSEC_GSS client presents the GSS principal to the
		NFSv4 server which maps the GSS principal into the
		principal's authorization context via methods described
		in <xref target="V4ACCESS"></xref>. The authorization
		context information is used to determine file access.
		Depending
		on the local representation as described in <xref
		    target="ONDISK"></xref>, ID mapping and/or name
		resolution may be required to translate between IDs and
		names contained in the authorization context.</t>

	    <t>An NFSv4 SETATTR or GETATTR with an acl attribute
		presented to the NFSv4 server may also require ID
		mapping and/or name resolution to translate between the
		name@domain and the local file system ID.</t>

	</section> <!-- Summary -->

	<section title="Security Considerations">

	    <t>Yet to be determined</t>

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

    </middle>

    <back>

	<references title="Normative References">
	    &rfc2119;
	    &rfc1034;
	    &rfc3530;&rfc1831;&rfc2203;
	    &rfc2743;&rfc4120;
	    &rfc4511;&rfc2307;&rfc2307bis;
	    &fedfsreqts;
	    &gssnamexts;
	    &nfsv41;
	</references>

	    <!--
	<references title="Informative References">
	    &fedfsdnssrv;
	    &rpcsecgss3;
	    &rfc1813;
	    &rfc5280;

	    <reference anchor="AFS_ACM">
		<front>
		    <title>ANDREW: A Distributed Personal Computing Environment  (# 4)</title>
		    <author initials="J.M." surname="Morris" fullname="J.H. Morris">
			<organization></organization>
		    </author>
		    <author initials="M.S." surname="Satyanarayanan" fullname="M. Satyanarayanan">
			<organization></organization>
		    </author>
		    <author initials="M.C." surname="Conner" fullname="M.H Conner">
			<organization></organization>
		    </author>
		    <author initials="D.R." surname="Rosenthal" fullname="D.S.H. Rosenthal">
			<organization></organization>
		    </author>
		    <author initials="F.S." surname="Smith" fullname="F.D. Smith">
			<organization></organization>
		    </author>
		    <date month="March" year="1986" />
		</front>
		<seriesInfo name="Communications of the ACM" value="Vol. 29, No. 3"/>
	    </reference>

	    <reference anchor="AD-LDAP">
		<front>
		    <title>Active Directory LDAP Compliance</title>
		    <author>
			<organization>Microsoft Corporation</organization>
		    </author>
		    <date month="October" year="2003" />
		</front>
	    </reference>

	    -->

	<references title="Informative References">
	    &rpcsecgss3;
	    &rfc5280;

	    <reference anchor="NIS">
		<front>
		    <title>System and Network Administration</title>
		    <author>
			<organization>Sun Microsystems</organization>
		    </author>
		    <date month="March" year="1990" />
		</front>
	    </reference>


	</references>

    </back>
</rfc>
