idnits 2.17.1 draft-ietf-calext-subscription-upgrade-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC5545], [RFC7240]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. -- The draft header indicates that this document updates RFC5988, but the abstract doesn't seem to mention this, which it should. -- The abstract seems to indicate that this document updates RFC7240, but the header doesn't have an 'Updates:' line to match this. -- The abstract seems to indicate that this document updates RFC5545, but the header doesn't have an 'Updates:' line to match this. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 566 has weird spacing: '...ference subsc...' == Line 573 has weird spacing: '...ference this ...' == Line 575 has weird spacing: '...ference limit...' == Line 582 has weird spacing: '...ference this ...' == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: The value MUST be a URI. This will generally be a data URI representing an opaque token. Client MUST not attempt to interpret the data URI value. (Using the creation date from RFC5988, updated by this document, for RFC5378 checks: 2006-06-19) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (1 February 2021) is 1177 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 5988 (Obsoleted by RFC 8288) Summary: 2 errors (**), 0 flaws (~~), 6 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Douglass 3 Internet-Draft 1 February 2021 4 Updates: 5988 (if approved) 5 Intended status: Standards Track 6 Expires: 5 August 2021 8 Calendar subscription upgrades 9 draft-ietf-calext-subscription-upgrade-03 11 Abstract 13 This specification updates [RFC5545] to add the value DELETED to the 14 STATUS property. 16 This specification also updates [RFC7240] to add the subscribe- 17 enhanced-get and limit preferences. 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at https://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on 5 August 2021. 36 Copyright Notice 38 Copyright (c) 2021 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 43 license-info) in effect on the date of publication of this document. 44 Please review these documents carefully, as they describe your rights 45 and restrictions with respect to this document. Code Components 46 extracted from this document must include Simplified BSD License text 47 as described in Section 4.e of the Trust Legal Provisions and are 48 provided without warranty as described in the Simplified BSD License. 50 Table of Contents 52 1. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 2 53 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 54 2.1. Terms and Definitions . . . . . . . . . . . . . . . . . . 3 55 3. Discovering alternative access methods . . . . . . . . . . . 3 56 4. Enhanced GET . . . . . . . . . . . . . . . . . . . . . . . . 4 57 4.1. General . . . . . . . . . . . . . . . . . . . . . . . . . 4 58 4.2. Deletions . . . . . . . . . . . . . . . . . . . . . . . . 5 59 4.3. Handling of invalid sync tokens . . . . . . . . . . . . . 5 60 4.4. Paging the response . . . . . . . . . . . . . . . . . . . 5 61 4.5. Caching of responses . . . . . . . . . . . . . . . . . . 6 62 4.6. Examples . . . . . . . . . . . . . . . . . . . . . . . . 6 63 5. Changes to the iCalendar specifications . . . . . . . . . . . 8 64 5.1. Redefined Status property . . . . . . . . . . . . . . . . 8 65 6. Header Field: Sync-Token . . . . . . . . . . . . . . . . . . 10 66 7. New Prefer header field preferences . . . . . . . . . . . . . 10 67 7.1. Preference subscribe-enhanced-get . . . . . . . . . . . . 10 68 7.2. Preference limit . . . . . . . . . . . . . . . . . . . . 11 69 8. Link relations . . . . . . . . . . . . . . . . . . . . . . . 11 70 8.1. General . . . . . . . . . . . . . . . . . . . . . . . . . 11 71 8.2. subscribe-caldav . . . . . . . . . . . . . . . . . . . . 11 72 8.3. subscribe-caldav-auth . . . . . . . . . . . . . . . . . . 11 73 8.4. subscribe-webdav-sync . . . . . . . . . . . . . . . . . . 11 74 8.5. subscribe-enhanced-get . . . . . . . . . . . . . . . . . 12 75 9. Security Considerations . . . . . . . . . . . . . . . . . . . 12 76 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 77 10.1. Sync-Token HTTP Header Field Registration . . . . . . . 12 78 10.2. Preference Registrations . . . . . . . . . . . . . . . . 12 79 10.3. Link Relation Registrations . . . . . . . . . . . . . . 13 80 11. Normative references . . . . . . . . . . . . . . . . . . . . 13 81 Appendix A. Open issues . . . . . . . . . . . . . . . . . . . . 14 82 Appendix B. Change log . . . . . . . . . . . . . . . . . . . . . 14 83 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 15 85 1. Acknowledgements 87 The author would also like to thank the members of the CalConnect 88 Calendar Sharing technical committee and the following individuals 89 for contributing their ideas and support: 91 Marten Gajda, Ken Murchison, Garry Shutler 93 The authors would also like to thank CalConnect, the Calendaring and 94 Scheduling Consortium, for advice with this specification. 96 2. Introduction 98 Currently clients subscribe to calendar feeds as an iCalendar file 99 which is often published as a resource accessible using the 100 unofficial 'webcal' scheme. 102 The only available option for updating that resource is the usual 103 HTTP polling of cached resources using Etags. 105 There is the usual tension between clients wishing to see a timely 106 response to changes and servers not wishing to be overloaded by 107 frequent requests for possibly large amounts of data. 109 This specification introduces an approach whereby clients can 110 discover a more performant access method. Given the location of the 111 resource as an iCalendar file, the client can perfom a HEAD request 112 on the resource and inspect the returned headers which will offer a 113 number of alternative access methods. 115 Given that many clients and servers already support CalDAV this 116 provides an easy upgrade path for those clients. Additionally an 117 enhanced GET protocol is specified here to allow a light weight 118 implementation. 120 The use of subscription upgtafe may help reduce load on servers, but 121 perhaps more inportantly it allows mobile devices to use a more 122 efficient update mechanism reducing data tranferred and presumably 123 improving battery life. 125 2.1. Terms and Definitions 127 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 128 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 129 "OPTIONAL" in this document are to be interpreted as described in BCP 130 14 [RFC2119] [RFC8174] when, and only when, they appear in all 131 capitals, as shown here. 133 Additionally, the rule for URI is included from [RFC3986]. 135 3. Discovering alternative access methods 137 The advertising of other access points is achieved through the use of 138 the LINK header as defined in [RFC5988]. New link relation types are 139 defined in this specification - each being associated with a protocol 140 or protocol subset. 142 These LINK headers will be delivered when a client carries out a HEAD 143 request targeting the URL of the resource. 145 EXAMPLE 147 This is an example of a HEAD request and the response from a server 148 that supports the enhanced GET method. 150 >> Request << 152 HEAD /caldata/events.ics HTTP/1.1 153 Host: example.com 154 Accept: text/calendar 156 >> Response << 158 HTTP/1.1 200 OK 159 Content-Length: xxxx 160 Link: ; 161 rel="subscribe-enhanced-get" 163 Figure 1 165 Note that the target for an upgraded service may be the same as for 166 the initial resource. 168 4. Enhanced GET 170 4.1. General 172 This is a lightweight protocol which allows simple clients to 173 efficiently discover and download changes in the targeted resource. 175 It has many similarities to WebDAV sync and for a server could be 176 implemented as an extension of the specification. 178 In this protocol the client MUST include the Prefer header field 179 preference "subscribe-enhanced-get". If a sync token is available it 180 is passed as a Sync-Token header field. 182 The resource is treated as a set of individual events each of which 183 may be updated or deleted separately. The client will first fetch 184 the entire iCalendar file. On subsequent requests it uses the Prefer 185 header field and a Sync-Token header field to indicate that it wants 186 a set of changes since the last fetch. 188 If no Sync-Token header field is supplied the server SHOULD respond 189 with a full set of data. Otherwise, if the token is valid, it SHOULD 190 return with a set of changed entities. 192 In both cases the server should set the Preference-Applied header 193 field and a new Sync-Token header field value. 195 4.2. Deletions 197 When an entity (VEVENT, VTODO or other valid top-level component) is 198 deleted from the source data the server needs to be able to inform a 199 client of the deletion. This specification introduces a new value 200 for the STATUS property of DELETED. 202 On the first enhanced GET after the entity has been deleted a 203 skeleton, but valid, entity will be returned with STATUS: DELETED. 204 The receiving client is free to remove the entity or update it's 205 STATUS property. 207 On subsequent fetches the entity will not be returned. 209 4.3. Handling of invalid sync tokens 211 When a server receives an invalid token it MUST return a 409 status 212 (Conflict). The server MAY choose to return an error message in the 213 body. 215 The client SHOULD respond to this error by restarting the interaction 216 from scratch, i.e. retrieve the full set of data then poll for 217 updates. 219 4.4. Paging the response 221 A client may explicitly request a limit on the size of the response 222 by specifying the Prefer header field preference "limit=n" where n is 223 the number of components. 225 When a server receives a request specifying such a limit it SHOULD 226 limit the response to that number of components. If the limit causes 227 a truncation in the response the server should respond with a 228 Preference-Applied header specifying the limit that was applied and 229 return a sync token which may be used to retrieve the next batch of 230 data. 232 This allows the client to immediately resubmit a request for the next 233 batch using the updated token. 235 A server MAY choose to limit the response size. The behavior SHOULD 236 be as if the client had provided a preference for that size - 237 allowing the client to retrieve the full set of data in batches. 239 4.5. Caching of responses 241 To enable proper caching of responses the server SHOULD provide a 242 VARY header field in responses that names the Prefer and Sync-Token 243 header fields along with any other that are appropriate. 245 Clients should order the preferences as following so that identical 246 responses can be identified: 248 * subscribe-enhanced-get 250 * limit 252 4.6. Examples 254 EXAMPLE 1 256 This is an example of the initial request and response from a server 257 that supports the enhanced GET method. Note the use of the Vary 258 header so a caching proxy can key off the client's Sync-Token and 259 preference. 261 >> Request << 263 GET /events.ics HTTP/1.1 264 Host: example.com 265 Accept: text/calendar 266 Prefer: subscribe-enhanced-get 268 >> Response << 270 HTTP/1.1 200 OK 271 Content-Length: xxxx 272 Sync-Token: "data:,1234567" 273 Preference-Applied: subscribe-enhanced-get 274 Vary: Prefer, Sync-Token 276 BEGIN:VCALENDAR: 277 ? /* full feed */ 278 END:VCALENDAR 280 Figure 2 282 EXAMPLE 2 284 This is an example of the subsequent request and response when no 285 changes have occurred. 287 >> Request << 289 GET /events.ics HTTP/1.1 290 Host: example.com 291 Accept: text/calendar 292 Prefer: subscribe-enhanced-get 293 Sync-Token: "data:,1234567" 295 >> Response << 297 HTTP/1.1 304 Not Modified 298 Content-Length: 0 299 Sync-Token: "data:,1234567" 300 Preference-Applied: subscribe-enhanced-get 301 Vary: Prefer, Sync-Token 303 Figure 3 305 EXAMPLE 3 307 This is an example of the subsequent request and response for an old 308 or invalid token. 310 >> Request << 312 GET /events.ics HTTP/1.1 313 Host: example.com 314 Accept: text/calendar 315 Sync-Token: "data:,1234567" 316 Prefer: subscribe-enhanced-get 318 >> Response << 320 HTTP/1.1 409 Conflict 321 Content-Length: xxxx 322 Preference-Applied: subscribe-enhanced-get 324 Figure 4 326 EXAMPLE 4 328 This is an example of the subsequent request and response when 329 changes have occurred. 331 >> Request << 333 GET /events.ics HTTP/1.1 334 Host: example.com 335 Accept: text/calendar 336 Sync-Token: "data:,1234567" 337 Prefer: subscribe-enhanced-get 339 >> Response << 341 HTTP/1.1 200 OK 342 Content-Type: text/calendar 343 Vary: Prefer, Sync-Token 344 Sync-Token: "data:,4567890" 345 Preference-Applied: subscribe-enhanced-get 347 BEGIN:VCALENDAR: 348 ... only new/changed events 349 ... deleted events have STATUS:DELETED 350 END:VCALENDAR 352 Figure 5 354 5. Changes to the iCalendar specifications 356 This specification updates [RFC5545] to add the value DELETED to the 357 STATUS property. 359 5.1. Redefined Status property 361 Property name STATUS 363 Purpose This property defines the overall status or confirmation for 364 the calendar component. 366 Value Type TEXT 368 Property Parameters IANA and non-standard property parameters can be 369 specified on this property. 371 Conformance This property can be specified once in "VEVENT", 372 "VTODO", or "VJOURNAL" calendar components. 374 Description In a group-scheduled calendar component, the property is 375 used by the "Organizer" to provide a confirmation of the event to 376 the "Attendees". For example in a "VEVENT" calendar component, 377 the "Organizer" can indicate that a meeting is tentative, 378 confirmed, or cancelled. In a "VTODO" calendar component, the 379 "Organizer" can indicate that an action item needs action, is 380 completed, is in process or being worked on, or has been 381 cancelled. In a "VJOURNAL" calendar component, the "Organizer" 382 can indicate that a journal entry is draft, final, or has been 383 cancelled or removed. 385 Format Definition 387 This property is defined by the following notation: 389 status = "STATUS" statparam ":" statvalue CRLF 391 statparam = *(";" other-param) 393 statvalue = (statvalue-event 394 / statvalue-todo 395 / statvalue-jour) 397 statvalue-event = "TENTATIVE" ;Indicates event is tentative. 398 / "CONFIRMED" ;Indicates event is definite. 399 / "CANCELLED" ;Indicates event was cancelled. 400 / "DELETED" ;Indicates event was deleted. 401 ;Status values for a "VEVENT" 403 statvalue-todo = "NEEDS-ACTION" ;Indicates to-do needs action. 404 / "COMPLETED" ;Indicates to-do completed. 405 / "IN-PROCESS" ;Indicates to-do in process of. 406 / "CANCELLED" ;Indicates to-do was cancelled. 407 / "DELETED" ;Indicates to-do was deleted. 408 ;Status values for "VTODO". 410 statvalue-jour = "DRAFT" ;Indicates journal is draft. 411 / "FINAL" ;Indicates journal is final. 412 / "CANCELLED" ;Indicates journal is removed. 413 / "DELETED" ;Indicates journal was deleted. 414 ;Status values for "VJOURNAL". 416 Figure 6 418 Example 420 EXAMPLE 1 422 The following is an example of this property for a "VEVENT" calendar 423 component: 425 STATUS:TENTATIVE 426 Figure 7 428 EXAMPLE 2 430 The following is an example of this property for a "VTODO" calendar 431 component: 433 STATUS:NEEDS-ACTION 435 Figure 8 437 EXAMPLE 3 439 The following is an example of this property for a "VJOURNAL" 440 calendar component: 442 STATUS:DRAFT 444 Figure 9 446 6. Header Field: Sync-Token 448 This specification defines a new header field Sync-Token for use by 449 the enhanced GET method. 451 Accept = DQUOTE URI DQUOTE 453 Figure 10 455 The value MUST be a URI. This will generally be a data URI 456 representing an opaque token. Client MUST not attempt to interpret 457 the data URI value. 459 EXAMPLE 461 This is an example of the Sync-Token header field: 463 Sync-Token: "data:,1234567" 465 Figure 11 467 7. New Prefer header field preferences 469 7.1. Preference subscribe-enhanced-get 471 This indicates that the client expects the server to handle the GET 472 method according to the specifications for enhanced get. 474 pref-subscribe-enhanced-get = "subscribe-enhanced-get" 476 Figure 12 478 7.2. Preference limit 480 This preference parameter provides a limit on the number of 481 components returned for enhanced get. 483 pref-limit = "limit" BWS "=" BWS 1*DIGIT 485 Figure 13 487 8. Link relations 489 8.1. General 491 This clause defines a number of new link relations required to 492 facilitate subscription upgrades. 494 8.2. subscribe-caldav 496 This specifies an access point which is a full implementation of 497 caldav but requires no authentication. The end point allows the full 498 range of reports as defined by the CalDAV specification. 500 The client MUST follow the specification to determine exactly what 501 operations are allowed on the access point - for example to determine 502 if sync-report is supported. 504 The URL MAY include some form of token to allow write access to the 505 targeted collection. The client must check it's permissions to 506 determine whether or not it has been granted write access. 508 8.3. subscribe-caldav-auth 510 This specifies an access point which is a full implementation of 511 caldav and requires authentication. This may allow read-write access 512 to the resource. 514 The client MUST follow the specification to determine exactly what 515 operations are allowed on the access point - for example to determine 516 if sync-report is supported. 518 8.4. subscribe-webdav-sync 520 This specifies an access point which supports only webdav sync. 522 This allows the client to issue a sync-report on the resource to 523 obtain updates. 525 The client MUST follow that specification. 527 8.5. subscribe-enhanced-get 529 This specifies an access point which supports something new. 531 The client MUST follow that specification. 533 9. Security Considerations 535 Applications using these properties need to be aware of the risks 536 entailed in using the URIs provided as values. See [RFC3986] for a 537 discussion of the security considerations relating to URIs. == 538 Privacy Considerations 540 Properties with a "URI" value type can expose their users to privacy 541 leaks as any network access of the URI data can be tracked. Clients 542 SHOULD NOT automatically download data referenced by the URI without 543 explicit instruction from users. This specification does not 544 introduce any additional privacy concerns beyond those described in 545 [RFC5545]. 547 10. IANA Considerations 549 10.1. Sync-Token HTTP Header Field Registration 551 This specification updates the "Message Headers" registry entry for 552 "Sync-Token" in [RFC3864] to refer to this document. 554 Header Field Name: Sync-Token 555 Protocol: http 556 Status: standard 557 Reference: 559 Figure 14 561 10.2. Preference Registrations 563 The following preferences have been added to the HTTP Preferences 564 Registry defined in [RFC7240] 566 Preference subscribe-enhanced-get 568 Value None. 570 Description Marks the interaction as enhanced get and provides the 571 optional sync-token and page size. 573 Reference this document 575 Preference limit 577 Value An integer page size. 579 Description Provide a limit on the number of components in the 580 response. 582 Reference this document 584 10.3. Link Relation Registrations 586 This document defines the following new iCalendar properties to be 587 added to the registry defined in [RFC5545]: 589 +========================+=============+=============+ 590 | Relation Name | Description | Reference | 591 +========================+=============+=============+ 592 | subscribe-caldav | Current | Section 8.2 | 593 +------------------------+-------------+-------------+ 594 | subscribe-caldav_auth | Current | Section 8.3 | 595 +------------------------+-------------+-------------+ 596 | subscribe-webdav-sync | Current | Section 8.4 | 597 +------------------------+-------------+-------------+ 598 | subscribe-enhanced_get | Current | Section 8.5 | 599 +------------------------+-------------+-------------+ 601 Table 1 603 11. Normative references 605 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 606 Requirement Levels", IETF RFC 2119, IETF RFC 2119, 607 DOI 10.17487/RFC2119, March 1997, 608 . 610 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 611 Procedures for Message Header Fields", IETF RFC 3864, 612 IETF RFC 3864, DOI 10.17487/RFC3864, September 2004, 613 . 615 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 616 Resource Identifier (URI): Generic Syntax", IETF RFC 3986, 617 IETF RFC 3986, DOI 10.17487/RFC3986, January 2005, 618 . 620 [RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and 621 Scheduling Core Object Specification (iCalendar)", IETF 622 RFC 5545, IETF RFC 5545, DOI 10.17487/RFC5545, September 623 2009, . 625 [RFC5988] Nottingham, M., "Web Linking", IETF RFC 5988, IETF RFC 626 5988, DOI 10.17487/RFC5988, October 2010, 627 . 629 [RFC7240] Snell, J., "Prefer Header for HTTP", IETF RFC 7240, 630 IETF RFC 7240, DOI 10.17487/RFC7240, June 2014, 631 . 633 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 634 2119 Key Words", IETF RFC 8174, IETF RFC 8174, 635 DOI 10.17487/RFC8174, May 2017, 636 . 638 Appendix A. Open issues 640 Vary Ensure we get that right. 642 Appendix B. Change log 644 calext00 2019-06-05 MD 646 * First calext version 648 * Use Sync-Token header rather than parameter 650 v04 2019-03-07 MD 652 * Reference to RFC 6538 - WebDAV sync and RFC 7240 Prefer 654 * Go back to HEAD 656 * New Preference and parameters. 658 * Examples 660 * More text for extended get. Talk about deletions. 662 v01 2017-02-17 MD 663 * Add text about OPTIONS 665 * Add text abut read/write CalDAV 667 v00 2017-02-15 MD 669 * First pass 671 Author's Address 673 Michael Douglass 675 Email: mdouglass@bedework.com