<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [
<!ENTITY rfc2119 PUBLIC '' 'bibxml/reference.RFC.2119.xml'>
<!ENTITY rfc4791 PUBLIC '' 'bibxml/reference.RFC.4791.xml'>
<!ENTITY rfc4918 PUBLIC '' 'bibxml/reference.RFC.4918.xml'>
<!ENTITY rfc6352 PUBLIC '' 'bibxml/reference.RFC.6352.xml'>
<!ENTITY rfc6638 PUBLIC '' 'bibxml/reference.RFC.6638.xml'>
<!ENTITY rfc7303 PUBLIC '' 'bibxml/reference.RFC.7303.xml'>
]>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc strict="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc ipr="trust200902" docName='draft-pot-caldav-sharing-01'>
    <front>
        <title abbrev="CalDAV Calendar Sharing">CalDAV Calendar Sharing</title>
        <author initials="E." surname="Pot" fullname="Evert Pot">
            <organization abbrev="fruux GmbH">
                fruux GmbH
            </organization>
            <address>
                <postal>
                    <street>Koenigsstrasse 32</street>
                    <city>Muenster</city>
                    <region>NRW</region>
                    <code>48143</code>
                    <country>Germany</country>
                </postal>
                <email>me@evertpot.com</email>
                <uri>https://fruux.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>
        <author initials="E." surname="York" fullname="Eric York">
            <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></email>
                <uri>http://www.apple.com/</uri>
            </address>
        </author>
        <date/>
        <abstract>
            <t>
                This specification defines sharing calendars between users on
                a CalDAV server.
            </t>
        </abstract>
    </front>
    <middle>
        <section title='Introduction'>

            <t>
                Users of <xref target="RFC4791">CalDAV</xref> often require a
                mechanism to share a calendar with other users.
            </t>
            <t>
                In the past this use-case has been fulfilled by non-standard
                means. This specification aims to describe a standard way for
                clients and servers to share calendars.
            </t>
            <t>
                Sharing calendars is for the most part completely implemented
                using <!--<xref target="-->draft-pot-webdav-resource-sharing<!--" />-->,
                but there are a few considerations specific to CalDAV to ensure
                that mechanisms such as scheduling still behaves as expected.
            </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 namespaces "DAV:" and "urn:ietf:params:xml:ns:caldav" are referenced in this document outside of the context of an XML fragment, the string "DAV:" and "CALDAV:" will be prefixed to the element type names respectively.
              </t>
              <!--
            <t>Terms Used:
                <list style='hanging'>
                    <t hangText='Sharer'>...</t>
                </list>
            </t>-->
        </section>

        <section title="Calendar sharing" anchor="calendar-sharing">
            <t>
              While the <!--<xref target="-->draft-pot-webdav-resource-sharing<!--" />-->
              specification allows sharing of potentially any resource on a
              server, this specification only concerns itself with sharing
              calendar collections, as defined in <xref target="RFC4791">CalDAV</xref>.
            </t>
            <t>
                Sharing of resources other than calendar collections is not
                addressed in this specification.
            </t>
        </section>

        <section title='Per-instance calendar data' anchor="per-instance-calendar-data">
            <t>
                Servers that support calendar sharing MUST support "per-instance"
                calendar data in calendar object resources stored in shared
                calendars. This allows each sharee and the sharer to store
                their own alarms and free busy transparency status without
                "interfering" with other users who also have access to the
                same calendar object resources.
            </t>
            <t>
                For calendaring object resources in shared calendar
                collections, the server MUST treat the following iCalendar
                data objects as per-instance:
            </t>
            <t>
              <list style="empty">
                <t>TRANSP property</t>
                <t>VALARM component</t>
              </list>
            </t>
        </section>

        <section title='Scheduling' anchor="scheduling">
            <t>
                <xref target="RFC6638">CalDAV Scheduling</xref> defines how a
                CalDAV server carries out scheduling operations when calendar
                object resources are created, modified or deleted and include
                "ORGANIZER" and "ATTENDEE" iCalendar properties.
            </t>
            <t>
              Normally when a server schedules events, the server will
              determine the intent of the user and the action to take by
              inspecting the "ATTENDEE" and "ORGANIZER" properties, and
              comparing this to the values of the CALDAV:calendar-user-address-set
              property defined on the principal resource of the user who owns
              the calendar-home in which the relevant calendar is contained.
              However, this can be problematic when a calendar is shared, and
              appears in multiple calendar collections.
            </t>
            <t>
              For example, if both sharer and sharee appear as an ORGANIZER of
              an event, a HTTP DELETE might either cause an event to be
              cancelled for everyone, or just DECLINED by an attendee depending
              on who is considered to be the relevant principal performing the
              action.
            </t>
            <t>
              This issue can be described more precisely as follows: if a user
              performs a scheduling operation on a scheduled calendar object,
              does the user act on behalf of theirselves, or on behalf of the
              sharer of the calendar?
            </t>
            <t>
              We've identified that there's some use-cases where you'd want the
              user to act on behalf of theirselves, and some where the action
              should be on behalf of the owner. This specification supports both
              use-cases.
            </t>
            <section title="The CALDAV:calendar-user-address-set WebDAV property" anchor="CALDAV:calendar-user-address-set">
                <t>
                  Section 2.4.1 of <xref target="RFC6638"/> describes a
                  CALDAV:calendar-user-address-set WebDAV property defined on
                  WebDAV principals.
                </t>
                <t>
                  This specification extends its usage and allows it to also
                  be defined on individual calendars.
                </t>
                <t>
                  Clients conforming to this specification should inspect
                  every calendar for the existance of this property before
                  doing scheduling operations, whether the calendar is
                  shared or not. Only if the property is not defined on a
                  calendar, it should fall back to the
                  "CALDAV:calendar-user-address-set" property defined on the principal
                  which owns the calendar-home in which the calendar is
                  contained in.
                </t>
                <t>
                  This allows a CalDAV server to indicate to clients on behalf
                  of whom the user-agent should perform scheduling operations.
                </t>
            </section>
            <section title="Scheduling on read-only calendars">
               <t>
                 Clients and Servers should NOT allow a user to perform
                 scheduling operations on calendar objects appearing in
                 calendars for which they were not granted read-write
                 access.
               </t>
            </section>
            <section title='Example use-case: a secretary' anchor="secretary-usecase">
              <t>
                A user might need a different user on a calendaring system to
                manage his or her calendars. This person might be a secretary
                acting on behalf of a busy individual.
              </t>
              <t>
                In this particular use-case, when the secretary creates an event,
                or accepts an invitation, the action must be taken on behalf of
                the owner of the calendar.
              </t>
              <t>
                Therefore, the CalDAV server should provide a
                CALDAV:calendar-user-address-set property on the sharee's instance of
                the calendar. This property should contain the same value as the
                CALDAV:calendar-user-address-set property set on the sharer's principal
                resource.
              </t>
            </section>
            <section title='Example use-case: a team calendar' anchor="team-usecase">
              <t>
                On a calendaring server, there might be a calendar containing
                events which is shared to an team of several people.
              </t>
              <t>
                This calendar might contain regular meetings for various members
                in the team. The team calendar is shared to everyone to keep
                people in the loop with who is meeting who.
              </t>
              <t>
                When a new scheduling object is created by a user, and this user
                invites several attendees who are also members of the team, these
                members need to be able to update their attendence status.
                In this scenario, every sharee acts on behalf of theirselves in
                the context of the team calendar.
              </t>
              <t>
                Therefore, the CALDAV:calendar-user-address-set property should for
                every instance of the shared calendar either be omitted, or match
                the sharee principal's value for CALDAV:calendar-user-address-set.
              </t>
            </section>
            <section title="Effects on schedule-default-calendar-url">
               <t>
                 The schedule-default-calendar-url WebDAV property, which is
                 defined in Section 9.2 of <xref target="RFC6638"/> defines in
                 which CalDAV calendar new invitations should be delivered.
               </t>
               <t>
                 This specification restricts this property further. The value
                 of schedule-default-calendar-url MUST NOT point to a calendar
                 for which the CALDAV:calendar-user-address-set property is defined and
                 does not match the value of the principal
                 schedule-default-calendar-url is pointing to.
               </t>
             </section>
             <section title="Effects on items delivered to the scheduling inbox">
               <t>
                 RFC6638 defines a "Scheduling Inbox Collection". This
                 collection contains notifications of scheduling messages.
               </t>
               <t>
                 If a user is performing scheduling operations on behalf of
                 another user, a CalDAV server MAY also choose to deliver
                 scheduling notifications to sharees for calendars owned by
                 a different user.
               </t>
               <t>
                 If a CalDAV server implements this, the CalDAV server MUST
                 only deliver scheduling messages that relate to scheduling
                 objects that appear on shared calendars.
               </t>
             </section>
             <section title="Calendar objects appearing more than once in a calendar-home">
               <t>
                 Implementors of this specification should be aware a calendar
                 object with a particular UID might appear more than once
                 in a single users' calendar home.
               </t>
               <t>
                 An example of this is a situation where a user invites a user
                 to an event, and then also invites the same user to share
                 the calendar where the invitiation was created.
               </t>
               <t>
                 The event might also contain vastly different information. The
                 user might for example only have been invited to a single
                 instance of a recurring event.
               </t>
               <t>
                 Calendaring user agents MAY coelesce events that appear on
                 multiple calendars via their user interface.
               </t>
               <t>
                 A server MUST NOT de-duplicate events.
               </t>
             </section>
             <section title="Contribution towards free-busy">
                <t>
                  When calculating free-busy information, the
                  CALDAV:calendar-user-address-set property must be considered.
                </t>
                <t>
                  The implication is that if the CALDAV:calendar-user-address-set is
                  set on a calendar, and it doesn't match the
                  CALDAV:calendar-user-address-set for whom the freebusy report is
                  requested, then the CALDAV:calendar-user-address-set set on the
                  calendar MUST be used to calculate the report.
                </t>
                <t>
                  However, generally shared calendars in which you schedule
                  on behalf of a different user should not be considered,
                  because they SHOULD have a "CALDAV:schedule-calendar-transp"
                  property set with a value of "CALDAV:transparent".
                </t>
             </section>
        </section>
    </middle>
    <back>
        <references title='Normative References'>
            &rfc2119;
            &rfc4791;
            &rfc4918;
            &rfc6352;
            &rfc6638;
            &rfc7303;
        </references>
<!--
<references title='Informative References'>
</references>
-->
        <section title='Change History'>
            <t>Changes in -01:
              <list style='numbers'>
                    <t>Added support for CALDAV:calendar-user-address-set on calendars.</t>
                    <t>Add a large amount of detailed information about scheduling-related behavior.</t>
                </list>
            </t>
        </section>
    </back>
</rfc>
