<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc2616 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml">
<!ENTITY rfc3744 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3744.xml">
<!ENTITY rfc4918 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4918.xml">
]> 

<?rfc rfcedstyle="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc number="5397" category="std" xmlns:x="http://purl.org/net/xml2rfc/ext">
  <front>
    <title abbrev="WebDAV Current Principal">WebDAV Current Principal Extension</title>
    <author initials="W." surname="Sanchez" fullname="Wilfredo Sanchez">
      <organization abbrev="Apple Inc.">Apple Inc.</organization>
      <address>
        <postal>
          <street>1 Infinite Loop</street>
          <city>Cupertino</city>
          <region>CA</region>
          <code>95014</code> 
          <country>USA</country>
        </postal>
        <email>wsanchez@wsanchez.net</email>
        <uri>http://www.apple.com/</uri>
      </address>
    </author>
    <author initials="C." surname="Daboo" fullname="Cyrus Daboo">
      <organization abbrev="Apple Inc.">Apple Inc.</organization>
      <address>
        <postal>
          <street>1 Infinite Loop</street>
          <city>Cupertino</city>
          <region>CA</region>
          <code>95014</code> 
          <country>USA</country>
        </postal>
        <email>cyrus@daboo.name</email>
        <uri>http://www.apple.com/</uri>
      </address>
    </author>
    <date month="December" year="2008" />
    <area>
      Applications 
    </area>

 <!-- [rfced] Please insert any keywords (beyond those that appear in
    the title) for use on http://www.rfc-editor.org/rfcsearch.html. -->

    <abstract>
      <t>
        This specification defines a new WebDAV property that allows clients to quickly determine the principal corresponding to the current authenticated user.
      </t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction">
      <t>
        WebDAV <xref target="RFC4918"/> is an extension to HTTP <xref target="RFC2616" /> to support improved document authoring capabilities. The WebDAV Access Control Protocol ("WebDAV ACL") <xref target="RFC3744"/> extension adds access control capabilities to WebDAV. It introduces the concept of a "principal" resource, which is used to represent information about authenticated entities on the system.
      </t>
      <t>
        Some clients have a need to determine which <xref target="RFC3744"/> principal a server is associating with the currently authenticated HTTP user.  While <xref target="RFC3744"/> defines a DAV:current-user-privilege-set property for retrieving the privileges granted to that principal, there is no recommended way to identify the principal in question, which is necessary to perform other useful operations.  For example, a client may wish to determine which groups the current user is a member of, or modify a property of the principal resource associated with the current user.
      </t>
      <t>
        The DAV:principal-match REPORT provides some useful functionality, but there are common situations where the results from that query can be ambiguous.  For example, not only is an individual user principal returned, but also every group principal that the user is a member of, and there is no clear way to distinguish which is which.
      </t>
      <t>
        This specification proposes an extension to WebDAV ACL that adds a DAV:current-user-principal property to resources under access control on the server. This property provides a URL to a principal resource corresponding to the currently authenticated user.  This allows a client to "bootstrap" itself by performing additional queries on the principal resource to obtain additional information from that resource, which is the purpose of this extension.  Note that while it is possible for multiple URLs to refer to the same principal resource, or for multiple principal resources to correspond to a single principal, this specification only allows for a single http(s) URL in the DAV:current-user-principal property.  If a client wishes to obtain alternate URLs for the principal, it can query the principal resource for this information; it is not the purpose of this extension to provide a complete list of such URLs, but simply to provide a means to locate a resource which contains that (and other) information.
      </t>
    </section>
    <section title="Conventions Used in This Document">
      <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>
      <t>
        When XML element types in the namespace "DAV:" are referenced in this document outside of the context of an XML fragment, the string "DAV:" will be prefixed to the element type names. 
      </t>
      <t>
       Processing of XML by clients and servers MUST follow the rules defined in <xref target="RFC4918" x:fmt="sec" x:sec="17"/> of WebDAV <xref target="RFC4918" />.
      </t>
      <t>
       Some of the declarations refer to XML elements defined by WebDAV <xref target="RFC4918" />.
      </t>
    </section>
    <section title="DAV:current-user-principal">
<iref item="DAV:current-user-principal property" primary="true"/>
<iref item="Properties" subitem="DAV:current-user-principal" primary="true"/>
      <t>
<?rfc compact="no" ?>
          <list style="hanging">
            <t hangText="Name:">  
              current-user-principal
            </t>
            <t hangText="Namespace:">
              DAV:
            </t>
            <t hangText="Purpose:">
              Indicates a URL for the currently authenticated user's principal resource on the server.
            </t>
            <t hangText="Value:">
              A single DAV:href or DAV:unauthenticated element.
            </t>
            <t hangText="Protected:">
              This property is computed on a per-request basis, and therefore is protected.
            </t>
            <t hangText="Description:">
              The DAV:current-user-principal property contains either a DAV:href or DAV:unauthenticated XML element. The DAV:href element contains a URL to a principal resource corresponding to the currently authenticated user. That URL MUST be one of the URLs in the DAV:principal-URL or DAV:alternate-URI-set properties defined on the principal resource and MUST be an http(s) scheme URL. When authentication has not been done or has failed, this property MUST contain the DAV:unauthenticated pseudo-principal.
            </t>
            <t>
              In some cases, there may be multiple principal resources corresponding to the same authenticated principal. In that case, the server is free to choose any one of the principal resource URIs for the value of the DAV:current-user-principal property. However, servers SHOULD be consistent and use the same principal resource URI for each authenticated principal.
            </t>
            <t hangText="COPY/MOVE behavior:">
              This property is computed on a per-request basis, and is thus never copied or moved.
            </t>
            <t hangText="Definition:">
              <figure>
                <artwork type="application/xml-dtd"><![CDATA[
   <!ELEMENT current-user-principal (unauthenticated | href)>
   <!-- href value: a URL to a principal resource -->
]]></artwork>
              </figure>
            </t>
            <t hangText="Example:">
              <figure>
                <artwork type="example"><![CDATA[
   <D:current-user-principal xmlns:D="DAV:">
     <D:href>/principals/users/cdaboo</D:href>
   </D:current-user-principal>
]]></artwork>
              </figure>
            </t>
          </list>
<?rfc compact="yes" ?>
      </t>
    </section>

      <section title="Security Considerations">
      <t>
        This specification does not introduce any additional security issues beyond those defined for HTTP <xref target="RFC2616"/>, WebDAV <xref target="RFC4918"/>, and WebDAV ACL <xref target="RFC3744"/>.
      </t>
    </section>

    <section title="Acknowledgments">
      <t>
        This specification is based on discussions that took place within the Calendaring and Scheduling Consortium's CalDAV Technical Committee.  The authors thank the participants of that group for their input.
      </t>
      <t>
        The authors thank Julian Reschke for his valuable input via the WebDAV working group mailing list.
      </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      

<reference anchor="RFC2119">

<front>
<title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials="S." surname="Bradner" fullname="Scott Bradner">
<organization>Harvard University</organization>
<address>
<postal>
<street>1350 Mass. Ave.</street>
<street>Cambridge</street>
<street>MA 02138</street></postal>
<phone>- +1 617 495 3864</phone>
<email>sob@harvard.edu</email></address></author>
<date year="1997" month="March"/>
<area>General</area>
<keyword>keyword</keyword>
<abstract>
<t>
   In many standards track documents several words are used to signify
   the requirements in the specification.  These words are often
   capitalized.  This document defines these words as they should be
   interpreted in IETF documents.  Authors who follow these guidelines
   should incorporate this phrase near the beginning of their document:

<list>
<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
      RFC 2119.
</t></list></t>
<t>
   Note that the force of these words is modified by the requirement
   level of the document in which they are used.
</t></abstract></front>

<seriesInfo name="BCP" value="14"/>
<seriesInfo name="RFC" value="2119"/>
<format type="TXT" octets="4723" target="ftp://ftp.isi.edu/in-notes/rfc2119.txt"/>
<format type="HTML" octets="17491" target="http://xml.resource.org/public/rfc/html/rfc2119.html"/>
<format type="XML" octets="5777" target="http://xml.resource.org/public/rfc/xml/rfc2119.xml"/>
</reference>
 
      

<reference anchor="RFC2616">

<front>
<title abbrev="HTTP/1.1">Hypertext Transfer Protocol -- HTTP/1.1</title>
<author initials="R." surname="Fielding" fullname="Roy T. Fielding">
<organization abbrev="UC Irvine">Department of Information and Computer Science</organization>
<address>
<postal>
<street>University of California, Irvine</street>
<city>Irvine</city>
<region>CA</region>
<code>92697-3425</code></postal>
<facsimile>+1(949)824-1715</facsimile>
<email>fielding@ics.uci.edu</email></address></author>
<author initials="J." surname="Gettys" fullname="James Gettys">
<organization abbrev="Compaq/W3C">World Wide Web Consortium</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code></postal>
<facsimile>+1(617)258-8682</facsimile>
<email>jg@w3.org</email></address></author>
<author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
<organization abbrev="Compaq">Compaq Computer Corporation</organization>
<address>
<postal>
<street>Western Research Laboratory</street>
<street>250 University Avenue</street>
<city>Palo Alto</city>
<region>CA</region>
<code>94305</code></postal>
<email>mogul@wrl.dec.com</email></address></author>
<author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
<organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code></postal>
<facsimile>+1(617)258-8682</facsimile>
<email>frystyk@w3.org</email></address></author>
<author initials="L." surname="Masinter" fullname="Larry Masinter">
<organization abbrev="Xerox">Xerox Corporation</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>3333 Coyote Hill Road</street>
<city>Palo Alto</city>
<region>CA</region>
<code>94034</code></postal>
<email>masinter@parc.xerox.com</email></address></author>
<author initials="P." surname="Leach" fullname="Paul J. Leach">
<organization abbrev="Microsoft">Microsoft Corporation</organization>
<address>
<postal>
<street>1 Microsoft Way</street>
<city>Redmond</city>
<region>WA</region>
<code>98052</code></postal>
<email>paulle@microsoft.com</email></address></author>
<author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
<organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code></postal>
<facsimile>+1(617)258-8682</facsimile>
<email>timbl@w3.org</email></address></author>
<date year="1999" month="June"/>
<abstract>
<t>
   The Hypertext Transfer Protocol (HTTP) is an application-level
   protocol for distributed, collaborative, hypermedia information
   systems. It is a generic, stateless, protocol which can be used for
   many tasks beyond its use for hypertext, such as name servers and
   distributed object management systems, through extension of its
   request methods, error codes and headers . A feature of HTTP is
   the typing and negotiation of data representation, allowing systems
   to be built independently of the data being transferred.
</t>
<t>
   HTTP has been in use by the World-Wide Web global information
   initiative since 1990. This specification defines the protocol
   referred to as "HTTP/1.1", and is an update to RFC 2068 .
</t></abstract></front>

<seriesInfo name="RFC" value="2616"/>
<format type="TXT" octets="422317" target="ftp://ftp.isi.edu/in-notes/rfc2616.txt"/>
<format type="PS" octets="5529857" target="ftp://ftp.isi.edu/in-notes/rfc2616.ps"/>
<format type="PDF" octets="550558" target="ftp://ftp.isi.edu/in-notes/rfc2616.pdf"/>
<format type="HTML" octets="636125" target="http://xml.resource.org/public/rfc/html/rfc2616.html"/>
<format type="XML" octets="493420" target="http://xml.resource.org/public/rfc/xml/rfc2616.xml"/>
</reference>

      

<reference anchor="RFC3744">

<front>
<title abbrev="WebDAV Access Control Protocol">Web Distributed Authoring and Versioning (WebDAV) Access&#160;Control&#160;Protocol</title>
<author initials="G." surname="Clemm" fullname="Geoffrey Clemm">
<organization>IBM</organization>
<address>
<postal>
<street>20 Maguire Road</street>
<city>Lexington</city>
<region>MA</region>
<code>02421</code></postal>
<email>geoffrey.clemm@us.ibm.com</email></address></author>
<author initials="J. F." surname="Reschke" fullname="Julian F. Reschke">
<organization abbrev="greenbytes">greenbytes GmbH</organization>
<address>
<postal>
<street>Salzmannstrasse 152</street>
<city>Muenster</city>
<region>NW</region>
<code>48159</code>
<country>Germany</country></postal>
<email>julian.reschke@greenbytes.de</email></address></author>
<author initials="E." surname="Sedlar" fullname="Eric Sedlar">
<organization>Oracle Corporation</organization>
<address>
<postal>
<street>500 Oracle Parkway</street>
<city>Redwood Shores</city>
<region>CA</region>
<code>94065</code></postal>
<email>eric.sedlar@oracle.com</email></address></author>
<author initials="J." surname="Whitehead" fullname="Jim Whitehead">
<organization abbrev="U.C. Santa Cruz">U.C. Santa Cruz, Dept. of Computer Science</organization>
<address>
<postal>
<street>1156 High Street</street>
<city>Santa Cruz</city>
<region>CA</region>
<code>95064</code></postal>
<email>ejw@cse.ucsc.edu</email></address></author>
<date year="2004" month="May"/>
<abstract>
<t>
        This document specifies a set of methods, headers, message bodies,
        properties, and reports that define Access Control extensions to the
        WebDAV Distributed Authoring Protocol.  This protocol permits a client to
        read and modify access control lists that instruct a server whether to
        allow or deny operations upon a resource (such as HyperText Transfer
        Protocol (HTTP) method invocations) by a given principal.  A lightweight
        representation of principals as Web resources supports integration of a
        wide range of user management repositories.  Search operations allow
        discovery and manipulation of principals using human names.
      </t></abstract></front>

<seriesInfo name="RFC" value="3744"/>
<format type="TXT" octets="146623" target="ftp://ftp.isi.edu/in-notes/rfc3744.txt"/>
<format type="HTML" octets="228863" target="http://xml.resource.org/public/rfc/html/rfc3744.html"/>
<format type="XML" octets="171435" target="http://xml.resource.org/public/rfc/xml/rfc3744.xml"/>
</reference>

      

<reference anchor="RFC4918">

<front>
<title>HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</title>
<author initials="L." surname="Dusseault" fullname="L. Dusseault"/>
<date year="2007" month="June"/>
<abstract>
<t>Web Distributed Authoring and Versioning (WebDAV) consists of a set of methods, headers, and content-types ancillary to HTTP/1.1 for the management of resource properties, creation and management of resource collections, URL namespace manipulation, and resource locking (collision avoidance).&lt;/t&gt;&lt;t&gt; RFC 2518 was published in February 1999, and this specification obsoletes RFC 2518 with minor revisions mostly due to interoperability experience. [STANDARDS TRACK]</t></abstract></front>

<seriesInfo name="RFC" value="4918"/>
<format type="TXT" octets="276352" target="ftp://ftp.isi.edu/in-notes/rfc4918.txt"/>
</reference>

    </references>

  </back>
</rfc>