Calendering Extensions C. Daboo Internet-Draft Apple Intended Status: Informational A
Total Page:16
File Type:pdf, Size:1020Kb
Calendering Extensions C. Daboo Internet-Draft Apple Intended status: Informational A. Quillaud Expires: January 24, 2018 Oracle K. Murchison, Ed. FastMail July 23, 2017 CalDAV Managed Attachments draft-ietf-calext-caldav-attachments-03 Abstract This specification defines an extension to the calendar access protocol (CalDAV) to allow attachments associated with iCalendar data to be stored and managed on the server. This specification documents existing code deployed by multiple vendors. It is published as an Informational specification rather than Standards-Track due to its non-standard method of updating an existing resource via HTTP. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on January 24, 2018. Copyright Notice Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of Daboo, et al. Expires January 24, 2018 [Page 1] Internet-Draft CalDAV Managed Attachments July 2017 publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . 3 2. Conventions Used in This Document . 3 3. Overview . 3 3.1. Requirements . 4 3.2. Discovering Support for Managed Attachments . 4 3.3. POST Request for Managing Attachments . 5 3.4. Adding attachments . 6 3.5. Updating Attachments . 9 3.6. Removing Attachments via POST . 12 3.7. Adding Existing Managed Attachments via PUT . 14 3.8. Updating Attachments via PUT . 14 3.9. Removing Attachments via PUT . 14 3.10. Retrieving Attachments . 14 3.11. Error Handling . 15 3.12. Additional Considerations . 16 4. Modifications to iCalendar Syntax . 17 4.1. SIZE Property Parameter . 17 4.2. FILENAME Property Parameter . 18 4.3. MANAGED-ID Property Parameter . 18 5. Additional Message Header Fields . 19 5.1. Cal-Managed-ID Response Header Field . 19 6. Additional WebDAV Properties . 19 6.1. CALDAV:managed-attachments-server-URL property . 19 6.2. CALDAV:max-attachment-size property . 20 6.3. CALDAV:max-attachments-per-resource property . 21 7. Implementation Status . 22 8. Security Considerations . 24 9. IANA Considerations . 24 9.1. Parameter Registrations . 24 9.2. Message Header Field Registrations . 24 10. Acknowledgments . 25 11. References . 25 11.1. Normative References . 25 11.2. Informative References . 26 11.3. URIs . 27 Appendix A. Change History (To be removed by RFC Editor before publication) . 27 Appendix B. Example Involving Recurring Events . 29 Authors' Addresses . 36 Daboo, et al. Expires January 24, 2018 [Page 2] Internet-Draft CalDAV Managed Attachments July 2017 1. Introduction The iCalendar [RFC5545] data format is used to represent calendar data and is used with iTIP [RFC5546] to handle scheduling operations between calendar users. [RFC4791] defines the CalDAV Calendar Access protocol, based on HTTP [RFC7230], for accessing calendar data stored on a server. Calendar users often want to include attachments with their calendar data events or tasks (for example a copy of a presentation, or the meeting agenda). iCalendar provides an "ATTACH" property whose value is either the inline Base64 encoded attachment data, or a URL specifying the location of the attachment data. Use of inline attachment data is not ideal with CalDAV because the data would need to be uploaded to the server each time a change to the calendar data is done - even minor changes such as a change to the summary. Whilst a client could choose to use a URL value instead, the problem then becomes where and how the client discovers an appropriate URL to use and how it ensures that only those attendees listed in the event or task are able to access it. This specification solves this problem by having the client send the attachment to the server, separately from the iCalendar data, and the server takes care of adding appropriate "ATTACH" properties in the iCalendar data as well as managing access privileges . The server can also provide additional information to the client about each attachment in the iCalendar data, such as the size and an identifier. 2. Conventions Used in This Document The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. The notation used in this memo is the ABNF notation of [RFC5234] as used by iCalendar [RFC5545]. Any syntax elements shown below that are not explicitly defined in this specification come from iCalendar [RFC5545]. 3. Overview There are four main operations a client needs to do with attachments for calendar data: add, update, remove, and retrieve. The first three operations are carried out by the client issuing an HTTP POST request on the calendar object resource to which the attachment is Daboo, et al. Expires January 24, 2018 [Page 3] Internet-Draft CalDAV Managed Attachments July 2017 associated and specifying the appropriate "action" query parameter (see Section 3.3). In the case of the remove operation, the client can alternatively directly update the calendar object resource and remove the relevant "ATTACH" properties (see Section 3.9). The retrieve operation is accomplished by simply issuing an HTTP GET request targeting the attachment URI specified by the calendar resource's "ATTACH" property (see Section 3.10). iCalendar data stored in a CalDAV calendar object resource can contain multiple components when recurrences are involved. In such a situation, the client needs to be able to target a specific recurrence instance or multiple instances when adding or deleting attachments. As a result, the POST request needs to provide a way for the client to specify which recurrence instances should be targeted for the attachment operation. This is accomplished through use of additional query parameters on the POST request-URI. 3.1. Requirements A server that supports the features described in this specification is REQUIRED to support the CalDAV "calendar-access" [RFC4791] features. In addition, such a server SHOULD support the "return=representation" Prefer header field [RFC7240] preference on successful HTTP PUT and POST requests targeting existing calendar object resources, by returning the new representation of that calendar resource (including its new ETag header field value) in the response. 3.2. Discovering Support for Managed Attachments A server supporting the features described in this specification MUST include "calendar-managed-attachments" as a field in the DAV response header field from an OPTIONS request on a calendar home collection. A server might choose to not support storing managed attachments on a per-recurrence instance basis (i.e., they can only be added to all instances as a whole). If that is the case, the server MUST include "calendar-managed-attachments-no-recurrence" as a field in the DAV response header field from an OPTIONS request on a calendar home collection. When that field is present, clients MUST NOT attempt any managed attachment operations that target specific recurrence instances. Daboo, et al. Expires January 24, 2018 [Page 4] Internet-Draft CalDAV Managed Attachments July 2017 3.3. POST Request for Managing Attachments An HTTP POST request is used to add, update, or remove attachments. The request-URI will contain various query parameters to specify the behavior. 3.3.1. action= Query Parameter The "action" query parameter is used to identify which attachment operation the client is requesting. This parameter MUST be present once on each POST request used to manage attachments. One of these three values MUST be used: attachment-add Indicates an operation that is adding an attachment to a calendar object resource. See Section 3.4 for more details. attachment-update Indicates an operation that is updating an existing attachment on a calendar object resource. See Section 3.5 for more details. attachment-remove Indicates an operation that is removing an attachment from a calendar object resource. See Section 3.6 for more details. Example: http://calendar.example.com/events/1.ics?action=attachment-add 3.3.2. rid= Query Parameter The "rid" query parameter is used to identify which recurrence instances are being targeted by the client for the attachment operation. This query parameter MUST contain one or more items, separated by commas (0x2C). The item values can be in one of two forms: Master instance The value "M" (case-insensitive) refers to the "master" recurrence instance, i.e., the component that does not include a "RECURRENCE-ID" property. This item MUST be present only once. Specific instance A specific iCalendar instance is targeted by using its "RECURRENCE-ID" value as the item value. That value MUST correspond to the RECURRENCE-ID value as stored in the calendar object resource (i.e. without any conversion to UTC). If multiple items of this form are used, they MUST be unique values. Daboo, et al. Expires January 24, 2018 [Page 5] Internet-Draft CalDAV Managed Attachments July 2017 If the "rid" query parameter is not present, all recurrence instances in the calendar object resource are targeted.