RFC 7953
Calendar Availability
Calendar Availability ๐ฆ
okay bestie, RFC 7953 is literally about giving your calendar a glow-up โจ It's Request for Comments 7953, titled "Calendar Availability." It's an IETF Standards Track document from August 2016, so it's an official spec and not just someone's opinion ๐
It was written by C. Daboo from Apple and M. Douglass from Spherical Cow Group. Its ISSN is 2070-1721. It also updates RFC 4791, RFC 5545 and RFC 6638, which means it adds new stuff on top of those three specs ๐
Abstract โจ
okay so this doc defines a brand-new iCalendar component (that's RFC 5545 territory ๐) for publishing the time periods when someone is available or unavailable. It's giving "my schedule, but make it a rule." You can use it in normal iCalendar free-busy lookups, including the free-busy requests in the iCalendar Transport-independent Interoperability Protocol (iTIP; RFC 5546), to make repeating blocks of free or busy time with exceptions wherever you need them ๐ฆ
It also extends the Calendaring Extensions to WebDAV (CalDAV) calendar access protocol (RFC 4791) and its scheduling protocol (RFC 6638). This shows how the new component fits into checking free-busy time ๐
Status of This Memo ๐ธ
this one is an Internet Standards Track document ๐
It's a product of the Internet Engineering Task Force (IETF), so it represents the consensus of the IETF community. It got public review and was approved for publication by the Internet Engineering Steering Group (IESG). If you want more on Internet Standards, check out Section 2 of RFC 7841 ๐
For the current status, any errata, and how to send feedback, go to http://www.rfc-editor.org/info/rfc7953 ๐ฅ
Copyright Notice ๐
Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved, obviously ๐
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they were in effect on the date of publication. Please actually read these, because they explain your rights and restrictions for this document ๐ Any Code Components pulled out of this document must include the Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as the Simplified BSD License describes ๐ซถ
Table of Contents ๐ง
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Conventions Used in This Document . . . . . . . . . . . . . . 3
3. iCalendar Extensions . . . . . . . . . . . . . . . . . . . . 4
3.1. VAVAILABILITY Component . . . . . . . . . . . . . . . . . 4
3.2. Busy Time Type . . . . . . . . . . . . . . . . . . . . . 10
4. Combining VAVAILABILITY Components . . . . . . . . . . . . . 10
5. Calculating Free-Busy Time . . . . . . . . . . . . . . . . . 12
5.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . 13
6. Use with iTIP . . . . . . . . . . . . . . . . . . . . . . . . 15
7. CalDAV Extensions . . . . . . . . . . . . . . . . . . . . . . 15
7.1. CalDAV Requirements Overview . . . . . . . . . . . . . . 15
7.2. New Features in CalDAV . . . . . . . . . . . . . . . . . 16
8. Security Considerations . . . . . . . . . . . . . . . . . . . 19
9. Privacy Considerations . . . . . . . . . . . . . . . . . . . 19
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20
10.1. Component Registrations . . . . . . . . . . . . . . . . 20
10.2. Property Registrations . . . . . . . . . . . . . . . . . 20
11. Normative References . . . . . . . . . . . . . . . . . . . . 20
Appendix A. Example Calendar #1 . . . . . . . . . . . . . . . . 22
Appendix B. Example Calendar #2 . . . . . . . . . . . . . . . . 23
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 24
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24
1. Introduction ๐
calendar users often have regular stretches of time when they're either open for booking or always unavailable ๐ For example, an office worker usually only wants to look free to their coworkers during normal 'office hours' (e.g., Monday through Friday, 9 am through 5 pm) ๐ผ Or a university professor might only be available to students during a set window, like Thursday afternoons, 2 pm through 5 pm, but only during term time ๐ Ideally, users should be able to set these periods straight from their calendar user agent, and have them count automatically in the normal free-busy lookup for that user โจ It also ought to be possible to show different available periods depending on who's asking ๐
iCalendar [RFC5545] has a "VFREEBUSY" component that can represent fixed busy time periods. But it has no way to describe a repeating period of available or unavailable time ๐ญ Since repeating patterns are super common, "VFREEBUSY" components just aren't enough to solve this ๐
So this spec defines a new type of iCalendar component for publishing user availability ๐ฆ
CalDAV [RFC4791] lets calendar users access and manage calendar data, and exchange that data through scheduling operations ๐ธ Part of that is the CalDAV calendar-access [RFC4791] feature, which provides a CALDAV:free-busy-query REPORT that returns free-busy information for a calendar collection or a hierarchy of calendar collections ๐ The CalDAV calendar-auto-schedule [RFC6638] feature can also work out free-busy information for a calendar user ๐ซถ Both of these look through user calendars for events that 'block time', and the blocked-out periods come back inside a "VFREEBUSY" component ๐ฅ
This spec extends the CalDAV calendar-access and CalDAV calendar-auto-schedule features so the new iCalendar availability components can be stored and manipulated. It also lets free-busy lookups use info from any of those components, if they're present ๐
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] ๐
When XML element types in the namespaces "DAV:" and "urn:ietf:params:xml:ns:caldav" are mentioned outside of an XML fragment, the strings "DAV:" and "CALDAV:" get prefixed to the element type names, respectively ๐ง
3. iCalendar Extensions ๐ธ
this spec adds a new "VAVAILABILITY" calendar component to iCalendar ๐ The "VAVAILABILITY" component is basically a container for new "AVAILABLE" subcomponents ๐ฆ
The whole point of "VAVAILABILITY" is to group available time info over a specific range of time ๐ Inside that range, certain time spans get marked as available using a set of "AVAILABLE" calendar subcomponents โจ Together, they can describe available time that repeats over set periods and can change over time ๐
Here's the vibe, drawn out:
Time Range
<=========================================================>
+-------------------------------------------------+
| VAVAILABILITY |
+-------------------------------------------------+
+------------+ +------------+
| AVAILABLE | | AVAILABLE |
+------------+ +------------+
<-> <-----> <-----------> Busy Time
the overall time range is at the top ๐ A "VAVAILABILITY" component covers part of that range. Any time the "VAVAILABILITY" component covers is treated as busy, except for the ranges covered by the "AVAILABLE" components inside it ๐
3.1. VAVAILABILITY Component
Component Name: VAVAILABILITY ๐
Purpose: Groups together the properties and subcomponents that describe the availability of a calendar user ๐
Format Definition: okay so a VAVAILABILITY calendar component is written like this ๐
availabilityc = "BEGIN" ":" "VAVAILABILITY" CRLF
availabilityprop *availablec
"END" ":" "VAVAILABILITY" CRLF
availabilityprop = *(
;
; the following are REQUIRED
; but MUST NOT occur more than once
;
dtstamp / uid
;
; the following are OPTIONAL
; but MUST NOT occur more than once
;
busytype / class / created / description /
dtstart / last-mod / location / organizer /
priority /seq / summary / url /
;
; Either 'dtend' or 'duration' MAY appear
; in an 'availableprop', but 'dtend' and
; 'duration' MUST NOT occur in the same
; 'availabilityprop'.
; 'duration' MUST NOT be present if
; 'dtstart' is not present
;
dtend / duration /
;
; the following are OPTIONAL
; and MAY occur more than once
;
categories / comment / contact /
x-prop / iana-prop
;
)
availablec = "BEGIN" ":" "AVAILABLE" CRLF
availableprop
"END" ":" "AVAILABLE" CRLF
availableprop = *(
;
; the following are REQUIRED
; but MUST NOT occur more than once
;
dtstamp / dtstart / uid /
;
; Either 'dtend' or 'duration' MAY appear in
; an 'availableprop', but 'dtend' and
; 'duration' MUST NOT occur in the same
; 'availableprop'.
;
dtend / duration /
;
; the following are OPTIONAL
; but MUST NOT occur more than once
;
created / description / last-mod /
location / recurid / rrule / summary /
;
; the following are OPTIONAL
; and MAY occur more than once
;
categories / comment / contact / exdate /
rdate / x-prop / iana-prop
;
)
Description: A VAVAILABILITY component is basically a window of time that says "here's when I'm available" โจ It can have a start time and an end time, or a start time and a duration. No DTSTART? Then the start is unbounded ๐ No DTEND or DURATION? Then the end is unbounded too. Inside that window, everything defaults to a free-busy type of BUSY-UNAVAILABLE (see Section 3.2), except for the times covered by AVAILABLE subcomponents. Those are the free-time slots ๐ฆ
AVAILABLE subcomponents MAY include recurrence properties so they can repeat, and those repeats can be overridden with normal iCalendar recurrence behaviour, aka by using the RECURRENCE-ID property ๐
If they're specified, the DTSTART and DTEND properties in VAVAILABILITY components and AVAILABLE subcomponents MUST be DATE-TIME values, written either as a date with UTC time or as a date with local time plus a time zone reference ๐ฐ๏ธ
The iCalendar object that holds the VAVAILABILITY component MUST contain the right VTIMEZONE components for every unique TZID parameter value used in any DATE-TIME property in all components, unless [RFC7809] is in effect ๐
When it's used to publish available time, the ORGANIZER property tells you which calendar user that published available time belongs to ๐
If the PRIORITY property is specified in VAVAILABILITY components, it decides how that component gets combined with other VAVAILABILITY components. See Section 4 for the full tea โ
Other calendar properties MAY be specified in VAVAILABILITY or AVAILABLE components. They count as attributes of that marked block of time, and how you use them is up to the application ๐
For example, LOCATION could show that someone is in one place for part of the week and somewhere else the rest of the week (but check Section 9 before you add extra data like this, bestie ๐).
Example: Here's a VAVAILABILITY component showing a user who's always available Monday to Friday, 9:00 am to 5:00 pm, in the America/Montreal time zone ๐
BEGIN:VAVAILABILITY
ORGANIZER:mailto:bernard@example.com
UID:0428C7D2-688E-4D2E-AC52-CD112E2469DF
DTSTAMP:20111005T133225Z
BEGIN:AVAILABLE
UID:34EDA59B-6BB1-4E94-A66C-64999089C0AF
SUMMARY:Monday to Friday from 9:00 to 17:00
DTSTART;TZID=America/Montreal:20111002T090000
DTEND;TZID=America/Montreal:20111002T170000
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
END:AVAILABLE
END:VAVAILABILITY
Now this one is giving main character energy ๐ It shows a user available Monday through Thursday, 9:00 am to 5:00 pm, at the main office, and Friday, 9:00 am to 12:00 pm, at the branch office, all in America/Montreal, between October 2nd and December 2nd 2011 ๐ขโจ
BEGIN:VAVAILABILITY
ORGANIZER:mailto:bernard@example.com
UID:84D0F948-7FC6-4C1D-BBF3-BA9827B424B5
DTSTAMP:20111005T133225Z
DTSTART;TZID=America/Montreal:20111002T000000
DTEND;TZID=America/Montreal:20111202T000000
BEGIN:AVAILABLE
UID:7B33093A-7F98-4EED-B381-A5652530F04D
SUMMARY:Monday to Thursday from 9:00 to 17:00
DTSTART;TZID=America/Montreal:20111002T090000
DTEND;TZID=America/Montreal:20111002T170000
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH
LOCATION:Main Office
END:AVAILABLE
BEGIN:AVAILABLE
UID:DF39DC9E-D8C3-492F-9101-0434E8FC1896
SUMMARY:Friday from 9:00 to 12:00
DTSTART;TZID=America/Montreal:20111006T090000
DTEND;TZID=America/Montreal:20111006T120000
RRULE:FREQ=WEEKLY
LOCATION:Branch Office
END:AVAILABLE
END:VAVAILABILITY
Next up is a traveling worker ๐งณโ๏ธ Same deal, Monday to Friday, 9:00 am to 5:00 pm each day. But for three weeks they're in Montreal, then one week in Denver, then back to Montreal. Each of those stretches gets its own VAVAILABILITY component. The last one has no DTEND, so it keeps going "forever" ๐ฅน This example shows one way to represent "blocks" of available time. Section 4 has another approach that uses priorities ๐ง
BEGIN:VAVAILABILITY
ORGANIZER:mailto:bernard@example.com
UID:BE082249-7BDD-4FE0-BDBA-DE6598C32FC9
DTSTAMP:20111005T133225Z
DTSTART;TZID=America/Montreal:20111002T000000
DTEND;TZID=America/Montreal:20111023T030000
BEGIN:AVAILABLE
UID:54602321-CEDB-4620-9099-757583263981
SUMMARY:Monday to Friday from 9:00 to 17:00
DTSTART;TZID=America/Montreal:20111002T090000
DTEND;TZID=America/Montreal:20111002T170000
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
LOCATION:Montreal
END:AVAILABLE
END:VAVAILABILITY
BEGIN:VAVAILABILITY
ORGANIZER:mailto:bernard@example.com
UID:A1FF55E3-555C-433A-8548-BF4864B5621E
DTSTAMP:20111005T133225Z
DTSTART;TZID=America/Denver:20111023T000000
DTEND;TZID=America/Denver:20111030T000000
BEGIN:AVAILABLE
UID:57DD4AAF-3835-46B5-8A39-B3B253157F01
SUMMARY:Monday to Friday from 9:00 to 17:00
DTSTART;TZID=America/Denver:20111023T090000
DTEND;TZID=America/Denver:20111023T170000
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
LOCATION:Denver
END:AVAILABLE
END:VAVAILABILITY
BEGIN:VAVAILABILITY
ORGANIZER:mailto:bernard@example.com
UID:1852F9E1-E0AA-4572-B4C4-ED1680A4DA40
DTSTAMP:20111005T133225Z
DTSTART;TZID=America/Montreal:20111030T030000
BEGIN:AVAILABLE
UID:D27C421F-16C2-4ECB-8352-C45CA352C72A
SUMMARY:Monday to Friday from 9:00 to 17:00
DTSTART;TZID=America/Montreal:20111030T090000
DTEND;TZID=America/Montreal:20111030T170000
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
LOCATION:Montreal
END:AVAILABLE
END:VAVAILABILITY
3.2. Busy Time Type
Property Name: BUSYTYPE ๐ซถ
Purpose: This property sets the default busy time type ๐
Value Type: TEXT ๐
Property Parameters: IANA and nonstandard property parameters can be specified on this property ๐งฉ
Conformance: This property can be specified within VAVAILABILITY calendar components ๐
Format Definition: the notation for this property looks like this ๐
busytype = "BUSYTYPE" busytypeparam ":" busytypevalue CRLF
busytypeparam = *(";" other-param)
busytypevalue = "BUSY" / "BUSY-UNAVAILABLE" /
"BUSY-TENTATIVE" / iana-token / x-name
; Default is "BUSY-UNAVAILABLE".
Description: BUSYTYPE is how you set the default busy time type โจ The values match the ones used by the FBTYPE parameter on a FREEBUSY property, with one plot twist: the FREE value is not used in this property ๐
โโ๏ธ If it's not specified on a component that allows this property, the default is BUSY-UNAVAILABLE ๐
Example: here's what it looks like ๐ธ
BUSYTYPE:BUSY
4. Combining VAVAILABILITY Components โจ
okay so the VAVAILABILITY component lets a calendar user describe their availability over long stretches of time using recurrence patterns ๐๏ธ and honestly that availability is usually pretty steady from year to year ๐
BUT life is messy ๐ people take vacations or spend a few weeks at a different office, so for that stretch they need to redefine their availability. Instead of editing the existing one, the PRIORITY property lets a new VAVAILABILITY component override others with a lower ordinal priority ๐ฅ Quick heads-up: iCalendar [RFC5545] defines PRIORITY so that 0 is undefined, 1 is the highest priority, and 9 is the lowest ๐
When you're combining VAVAILABILITY components, a missing PRIORITY property or a value of 0 means the lowest level of priority ๐ซถ When two or more of them overlap and have the same PRIORITY value, the busy time type that wins is decided in this order: BUSY > BUSY-UNAVAILABLE > BUSY-TENTATIVE. So if one component has a BUSYTYPE of BUSY and another has a BUSYTYPE of BUSY-UNAVAILABLE, the effective busy time type over the overlapping range is BUSY ๐ It's up to whoever creates these components to make sure the combo gives a consistent, expected result, so please be careful bestie ๐ฅน
To work out the available time, sort the intersecting VAVAILABILITY components by priority. The order from lowest to highest PRIORITY values is 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 โจ
Then step through that list. For each component, the time range it covers gets set to busy, and then the parts of it defined by its AVAILABLE components get set to free ๐ฆ
Also, if any VAVAILABILITY component completely covers the date range you care about, any lower priority ones can be ignored ๐
Usually a person's "default" availability (think business hours, Monday through Friday, 9:00 am to 5:00 pm) uses the lowest priority, which is zero ๐ Any overrides on top of that use higher priorities as needed ๐ Now, to avoid constantly readjusting PRIORITY values every time you need to slide an override in between two existing ones, priority values SHOULD be "spaced out" across the whole range ๐ The table below shows what I mean. The first row is the priority range from low to high, the second row is the matching PRIORITY property value, and the third row shows which VAVAILABILITY component holds that priority. The "default" availability gets priority zero (that's {a} in the table) ๐ง Then the first override is made with priority 5 ({b}), a later one can slot in between them using priority 7 ({c}), and another one that takes precedence over everything gets priority 3 ({d}) ๐ As you can see, there are still open "slots" for more VAVAILABILITY components with other priorities whenever you need them โจ
+-----+----+----+-----+----+-----+----+-----+----+------+
| Low | | | | | | | | | High |
+-----+----+----+-----+----+-----+----+-----+----+------+
| 0 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
+-----+----+----+-----+----+-----+----+-----+----+------+
| {a} | | | {c} | | {b} | | {d} | | |
+-----+----+----+-----+----+-----+----+-----+----+------+
5. Calculating Free-Busy Time ๐ซง
This section is all about how free-busy time info for a calendar user gets calculated when VAVAILABILITY components are involved ๐
An iCalendar VFREEBUSY component carries "rolled-up" free-busy time info for a calendar user ๐ You can get one as the result of an iTIP [RFC5546] free-busy request, or some other way, like a CalDAV calendar-access CALDAV:free-busy-query REPORT ๐ซถ
When one or more VAVAILABILITY components show up and intersect the time range of the free-busy request, you calculate the available time first, as outlined in Section 4 ๐ง Once that's done, regular VEVENT and VFREEBUSY components can be "overlaid" in the usual way to block out time ๐ธ
Here's an example procedure for this:
- Start by marking the entire period of the free-busy request as free ๐ฆ
- For each
VAVAILABILITYcomponent, ordered byPRIORITY(lowest to highest):- A. Check whether the
VAVAILABILITYintersects the time range of the free-busy request. If it doesn't, ignore it ๐ - B. Check whether the
VAVAILABILITYis completely overridden by a higher priority component. If it is, ignore it ๐ - C. For the time period the
VAVAILABILITYcovers, mark time in the free-busy result set as busy, using the busy time type from theBUSYTYPEproperty in thatVAVAILABILITYcomponent ๐ฅ - D. Add the
VAVAILABILITYcomponent to a list for further processing in step 3, as long as it wasn't ignored ๐
- A. Check whether the
- For each
VAVAILABILITYcomponent in the list from step 2, in order from first to last:- A. For each
AVAILABLEcomponent in thatVAVAILABILITYcomponent:- i. Expand all the recurring instances, taking overridden instances into account. Ignore instances (or parts of instances) that fall outside the free-busy request time range or the time period given by the
VAVAILABILITYcomponent ๐๏ธ - ii. For each instance, mark the matching time in the free-busy result set as free โจ
- i. Expand all the recurring instances, taking overridden instances into account. Ignore instances (or parts of instances) that fall outside the free-busy request time range or the time period given by the
- A. For each
- For each
VEVENTorVFREEBUSYcomponent, apply normal free-busy processing within the free-busy request time range ๐
5.1. Examples ๐
In the examples below, a table represents the time slots for the period of a free-busy request ๐ Each time slot is two hours long. The column header shows the hours from midnight local time ๐ Each row under the headers is one step in working out the free-busy result set, following the procedure above ๐งฉ
Every cell under the column header holds a single character for the free-busy type of that time period at the end of the step shown in that row. The characters are:
Fmeans "FREE" time in that slot ๐ฆBmeans "BUSY" time in that slot ๐ดUmeans "BUSY-UNAVAILABLE" time in that slot ๐Tmeans "BUSY-TENTATIVE" time in that slot ๐ทImeans data to be ignored in that slot (as per step 2.B above) ๐
5.1.1. Simple Example ๐
Appendix A shows the user's calendar. It has one VAVAILABILITY component giving available time within the requested time range of 8:00 am to 6:00 pm, plus one VEVENT component for a two hour meeting starting at 12:00 pm ๐
A free-busy request for Monday, 6th November 2011, midnight to midnight in the America/Montreal time zone gets calculated like this, using the steps above ๐งฎ
+------+----+----+----+----+----+----+----+----+----+----+----+----+
| Step | 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 |
+------+----+----+----+----+----+----+----+----+----+----+----+----+
| 1. | F | F | F | F | F | F | F | F | F | F | F | F |
| 2. | U | U | U | U | U | U | U | U | U | U | U | U |
| 3. | U | U | U | U | F | F | F | F | F | U | U | U |
| 4. | U | U | U | U | F | F | B | F | F | U | U | U |
+------+----+----+----+----+----+----+----+----+----+----+----+----+
5.1.2. Further Example ๐ฆ
Appendix B shows another way to represent the availability of the traveling worker from before ๐งณ Their base availability is Monday through Friday, 8:00 am to 6:00 pm each day, and it's set up as a VAVAILABILITY with the default PRIORITY (there's no DTEND property, so this availability is unbounded) โพ๏ธ For the week the calendar user is working in Denver (October 23rd through October 30th), their availability is a VAVAILABILITY component with priority 1, which overrides the base availability ๐
There's also a two hour meeting starting at 12:00 pm (in the America/Denver time zone) ๐ฐ
A free-busy request for Monday, 24th October 2011, midnight to midnight in the America/Montreal time zone gets calculated like this, using the steps above. Heads up: there's a two hour offset in the in the available time compared to the previous example ๐ That's because of the two hour difference between the time zone of the free-busy request and the time zone of the user's availability and meeting ๐ "2.P0" shows the base availability, and "2.P1" shows the higher priority availability ๐ "3.P1" only shows the higher priority availability contributing to the overall free-busy, since the default availability is ignored (as per step 2.B described above) ๐
+------+----+----+----+----+----+----+----+----+----+----+----+----+
| Step | 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 |
+------+----+----+----+----+----+----+----+----+----+----+----+----+
| 1. | F | F | F | F | F | F | F | F | F | F | F | F |
| 2.P0 | I | I | I | I | I | I | I | I | I | I | I | I |
| 2.P1 | U | U | U | U | U | U | U | U | U | U | U | U |
| 3.P1 | U | U | U | U | U | F | F | F | F | F | U | U |
| 4. | U | U | U | U | U | F | F | B | F | F | U | U |
+------+----+----+----+----+----+----+----+----+----+----+----+----+
6. Use with iTIP ๐จ
This spec doesn't define how VAVAILABILITY components get used in scheduling messages sent over the iTIP [RFC5546] protocol ๐ The expectation is that future specs will cover how iTIP scheduling can make use of VAVAILABILITY components ๐ฎ
7. CalDAV Extensions ๐
7.1. CalDAV Requirements Overview ๐โจ
okay so this is the checklist for what a CalDAV server has to do once it's handling VAVAILABILITY components in stored calendar data ๐ a server:
- MUST advertise support for
VAVAILABILITYcomponents inCALDAV:supported-calendar-component-setproperties on calendars that allow storing of such components ๐ - MUST support
CALDAV:free-busy-queryREPORTs that aggregate the info in anyVAVAILABILITYcomponents in the calendar collections the request targets ๐ฅ - MUST support
VAVAILABILITYcomponents stored in aCALDAV:calendar-availabilityWeb Distributed Authoring and Versioning (WebDAV) property on a CalDAV scheduling Inbox collection, if the CalDAV calendar-auto-schedule feature is supported ๐ฆ - MUST support iTIP [RFC5546] free-busy requests that aggregate the info in any
VAVAILABILITYcomponents in calendar collections that contribute to free-busy, or in anyVAVAILABILITYcomponents stored in theCALDAV:calendar-availabilityproperty on the CalDAV scheduling Inbox collection of the calendar user the iTIP free-busy request targets, if the CalDAV calendar-auto-schedule feature is available ๐ธ
Processing of VAVAILABILITY components MUST conform to all the requirements CalDAV imposes on calendar object resources (see Section 4.1 of [RFC4791]). it's giving strict-but-fair energy ๐ซถ
7.2. New Features in CalDAV ๐
7.2.1. Calendar Availability Support
A server supporting the features described in this document MUST include calendar-availability as a field in the DAV response header from an OPTIONS request. a value of calendar-availability in the DAV response header tells clients that the server supports all the requirements in this document, so clients know they're good to go โจ
7.2.1.1. Example: Using OPTIONS for the Discovery of Calendar Availability Support
Here's the vibe check in action ๐
>> Request <<
OPTIONS /home/bernard/calendars/ HTTP/1.1
Host: cal.example.com
>> Response <<
HTTP/1.1 200 OK
Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE
Allow: PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL
DAV: 1, 2, 3, access-control, calendar-access,
calendar-availability
Date: Fri, 11 Nov 2005 09:32:12 GMT
Content-Length: 0
In this example, the OPTIONS method returns calendar-availability in the DAV response header, which means the collection /home/bernard/calendars/ supports the new features defined in this specification. main character discovery moment ๐
7.2.2. CalDAV Time Range Queries
Section 9.9 of [RFC4791] explains how to specify time ranges to limit the set of calendar components the server returns. this spec extends [RFC4791] to cover how time range filtering works on VAVAILABILITY components ๐ง
A VAVAILABILITY component is said to overlap a given time range if the condition for the matching component state in the table below is satisfied. the conditions depend on whether DTSTART, DTEND, and DURATION are present in the VAVAILABILITY component. ngl this table is the whole plot ๐ also, as specified above, the DTEND value MUST be a DATE-TIME value equal to or after the DTSTART value, if specified ๐
+------------------------------------------------------------+
| VAVAILABILITY has the DTSTART property? |
| +--------------------------------------------------------+
| | VAVAILABILITY has the DTEND property? |
| | +----------------------------------------------------+
| | | VAVAILABILITY has the DURATION property? |
| | | +------------------------------------------------+
| | | | Condition to evaluate |
+---+---+---+------------------------------------------------+
| Y | Y | N | (start < DTEND AND end > DTSTART) |
+---+---+---+------------------------------------------------+
| Y | N | Y | (start < DTSTART+DURATION AND end > DTSTART) |
+---+---+---+------------------------------------------------+
| Y | N | N | (end > DTSTART) |
+---+---+---+------------------------------------------------+
| N | Y | N | (start < DTEND) |
+---+---+---+------------------------------------------------+
| N | N | * | TRUE |
+---+---+---+------------------------------------------------+
7.2.3. CALDAV:free-busy-query REPORT
A CALDAV:free-busy-query REPORT can run on a calendar collection that holds iCalendar VAVAILABILITY components. when it does, the server MUST aggregate the info in any VAVAILABILITY components when generating the free-busy response, as described in Section 5 ๐ฅ
7.2.4. CALDAV:calendar-availability Property
Name: calendar-availability
Namespace: urn:ietf:params:xml:ns:caldav
Purpose: defines a VAVAILABILITY component that gets used when calculating free-busy time for an iTIP free-busy request aimed at the calendar user who owns the Inbox ๐ฌ
Conformance: this property MAY be protected and SHOULD NOT be returned by a PROPFIND DAV:allprop request. support for this property is REQUIRED. the value of this property MUST be a valid iCalendar object containing only one VAVAILABILITY component, plus optionally VTIMEZONE components. other iCalendar components MUST NOT be present. VTIMEZONE components SHOULD NOT be present if [RFC7809] is in effect. for more complex availability scenarios, clients can store multiple VAVAILABILITY components in the calendar user's calendar collections ๐ธ
Description: this property lets a user specify their availability by putting a VAVAILABILITY component in its value. if it's present, the server MUST use this VAVAILABILITY component when determining free-busy information as part of an iTIP free-busy request the server is handling ๐
Definition:
<!ELEMENT calendar-availability (#PCDATA) >
; Data value MUST be an iCalendar object containing
; "VAVAILABILITY" or "VTIMEZONE" components.
Example:
<C:calendar-availability xmlns:D="DAV:"
xmlns:C="urn:ietf:params:xml:ns:caldav"
>BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//example.com//iCalendar 2.0//EN
VERSION:2.0
BEGIN:VAVAILABILITY
UID:9BADC1F6-0FC4-44BF-AC3D-993BEC8C962A
DTSTAMP:20111005T133225Z
DTSTART;TZID=America/Montreal:20111002T000000
BEGIN:AVAILABLE
UID:6C9F69C3-BDA8-424E-B2CB-7012E796DDF7
SUMMARY:Monday to Friday from 9:00 to 18:00
DTSTART;TZID=America/Montreal:20111002T090000
DTEND;TZID=America/Montreal:20111002T180000
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
END:AVAILABLE
END:VAVAILABILITY
END:VCALENDAR
</C:calendar-availability>
7.2.5. iTIP Free-Busy Requests
the CalDAV calendar-auto-schedule feature (see Section 5 of [RFC6638]) has a mechanism for requesting free-busy info over the CalDAV protocol ๐จ any VAVAILABILITY components in any calendar collections targeted during such a request MUST be included in the overall free-busy calculation. on top of that, the VAVAILABILITY component in the CALDAV:calendar-availability property on the owner's Inbox MUST also be included in the free-busy calculation. all of these VAVAILABILITY components get processed the same way, as per Section 5 ๐ซถ
8. Security Considerations ๐๐
okay, this part is serious bestie. calculating availability gets complicated fast, especially with multiple overlapping time ranges, so CalDAV servers MUST limit how complex the availability data a client stores can be ๐
an attacker who can "inject" availability info into someone's calendar data could make sure that user never looks free for meetings, or looks free at the worst possible times. that's a whole disaster โ ๏ธ calendar systems MUST ensure that availability info for a calendar user can only be changed by authorized users ๐
the security considerations in [RFC5545], [RFC5546], [RFC4791], [RFC6638], and [RFC7809] MUST also be followed ๐ก๏ธ
9. Privacy Considerations ๐ต๏ธโโ๏ธ๐ฆ
free-busy and availability info can be used by attackers to figure out where someone is or how "active" they are overall ๐ any calendar system that lets a user expose their free-busy and availability info MUST limit access to that info to only authorized users ๐
when VAVAILABILITY components get sent to or shared with other calendar users, be careful not to expose more than each recipient needs. for example, a business owner probably doesn't want customers knowing where they are or what they're doing, but family members might be fine sharing that with each other ๐
so calendar systems that let VAVAILABILITY components be sent or shared to other calendar users MUST provide a way to remove nonessential properties (e.g., SUMMARY, LOCATION, and DESCRIPTION) ๐
iCalendar VFREEBUSY info generated from VAVAILABILITY components MUST NOT include anything other than busy or free time periods. in particular, user-specified property values such as SUMMARY, LOCATION, and DESCRIPTION MUST NOT be copied into the free-busy result data ๐
โโ๏ธ
the privacy considerations in [RFC5545], [RFC5546], [RFC4791], [RFC6638], and [RFC7809] MUST also be followed ๐
10. IANA Considerations ๐๐
10.1. Component Registrations
This document defines the following new iCalendar components, which have been added to the registry defined in Section 8.3.1 of [RFC5545] โจ
+---------------+---------+------------------------+
| Component | Status | Reference |
+---------------+---------+------------------------+
| VAVAILABILITY | Current | RFC 7953, Section 3.1 |
| AVAILABLE | Current | RFC 7953, Section 3.1 |
+---------------+---------+------------------------+
10.2. Property Registrations
This document defines the following new iCalendar properties, which have been added to the registry defined in Section 8.3.2 of [RFC5545] ๐
+----------+---------+------------------------+
| Property | Status | Reference |
+----------+---------+------------------------+
| BUSYTYPE | Current | RFC 7953, Section 3.2 |
+----------+---------+------------------------+
11. Normative References โจ
okay bestie, these are the docs this whole spec leans on, so they're the homework you actually need ๐๐ซถ
- [RFC2119]: Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997,
http://www.rfc-editor.org/info/rfc2119. - [RFC4791]: Daboo, C., Desruisseaux, B., and L. Dusseault, "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791, DOI 10.17487/RFC4791, March 2007,
http://www.rfc-editor.org/info/rfc4791. - [RFC5545]: Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, DOI 10.17487/RFC5545, September 2009,
http://www.rfc-editor.org/info/rfc5545. - [RFC5546]: Daboo, C., Ed., "iCalendar Transport-Independent Interoperability Protocol (iTIP)", RFC 5546, DOI 10.17487/RFC5546, December 2009,
http://www.rfc-editor.org/info/rfc5546. - [RFC6638]: Daboo, C. and B. Desruisseaux, "Scheduling Extensions to CalDAV", RFC 6638, DOI 10.17487/RFC6638, June 2012,
http://www.rfc-editor.org/info/rfc6638. - [RFC7809]: Daboo, C., "Calendaring Extensions to WebDAV (CalDAV): Time Zones by Reference", RFC 7809, DOI 10.17487/RFC7809, March 2016,
http://www.rfc-editor.org/info/rfc7809.
Appendix A. Example Calendar #1 ๐๏ธ
okay this one is giving busy Monday energy ๐ผ there's a meeting, and then there's a recurring availability block that's basically "I'm free 8 to 6, weekdays only" ๐
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//example.com//iCalendar 2.0//EN
VERSION:2.0
BEGIN:VEVENT
DTSTAMP:20111113T044111Z
DTSTART;TZID=America/Montreal:20111106T120000
DURATION:PT2H
SUMMARY:Meeting
UID:768CB0C2-8642-43F7-A6C4-F8BB04B829B4
END:VEVENT
BEGIN:VAVAILABILITY
UID:452DFCA7-3203-4A3D-9A9A-99753A383B41
DTSTAMP:20111005T133225Z
DTSTART;TZID=America/Montreal:20111002T000000
BEGIN:AVAILABLE
UID:466D5C68-5C4A-4078-AF5D-9C55EA9145D7
SUMMARY:Monday to Friday from 8:00 to 18:00
DTSTART;TZID=America/Montreal:20111002T080000
DTEND;TZID=America/Montreal:20111002T180000
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
END:AVAILABLE
END:VAVAILABILITY
END:VCALENDAR
Appendix B. Example Calendar #2 ๐ธ
this one is a whole travel era ๐งณโ๏ธ there's a lunch meeting in Denver, and then TWO availability blocks from two different organizers. one is Montreal hours, the other is Denver hours for one specific week. the way the second block has PRIORITY:1 and the dates are scoped to just that weekโฆ it's giving very intentional scheduling ๐
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//example.com//iCalendar 2.0//EN
VERSION:2.0
BEGIN:VEVENT
DTSTAMP:20111113T044111Z
DTSTART;TZID=America/Denver:20111106T120000
DURATION:PT2H
SUMMARY:Lunch meeting in Denver
UID:2346C09A-42BF-439E-916C-FC83AF869171
END:VEVENT
BEGIN:VAVAILABILITY
ORGANIZER:mailto:bernard@example.com
UID:627A87FA-E5F1-43C0-B3B1-567DA10F2A83
DTSTAMP:20111005T133225Z
DTSTART;TZID=America/Montreal:20111002T000000
BEGIN:AVAILABLE
UID:A833E850-892B-43F6-98B6-C15A6BFC5D27
SUMMARY:Monday to Friday from 9:00 to 17:00
DTSTART;TZID=America/Montreal:20111002T080000
DTEND;TZID=America/Montreal:20111002T180000
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
LOCATION:Montreal
END:AVAILABLE
END:VAVAILABILITY
BEGIN:VAVAILABILITY
ORGANIZER:mailto:bernard@example.com
UID:F01411E3-38B8-4490-8A1F-0CCEC57A0943
DTSTAMP:20111005T133225Z
DTSTART;TZID=America/Denver:20111023T000000
DTEND;TZID=America/Denver:20111030T000000
PRIORITY:1
BEGIN:AVAILABLE
UID:A35AA091-3846-48ED-96F6-881E8A0D0A93
SUMMARY:Monday to Friday from 9:00 to 17:00
DTSTART;TZID=America/Denver:20111023T080000
DTEND;TZID=America/Denver:20111023T180000
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
LOCATION:Denver
END:AVAILABLE
END:VAVAILABILITY
END:VCALENDAR
Acknowledgements ๐ซถ
big thank you to the people who gave feedback, bestie ๐ Toby Considine, Bernard Desruisseaux, Alexey Melnikov, Daniel Migault, Ken Murchison, Evert Pot, and Dave Thewlis are all iconic for that ๐ and this whole spec came out of discussions at the Calendaring and Scheduling Consortium, so shoutout to them too ๐
Authors' Addresses ๐ฆ
these are the two people who wrote it, so here's where to find them โจ
Cyrus Daboo
Apple Inc.
1 Infinite Loop
Cupertino, CA 95014
United States of America
Email: cyrus@daboo.name
URI: http://www.apple.com/
Michael Douglass
Spherical Cow Group
226 3rd Street
Troy, NY 12180
United States of America
Email: mdouglass@sphericalcowgroup.com
URI: http://sphericalcowgroup.com
and that's a wrap on RFC 7953, literally so good ๐๐๐
๐ฆ where this page comes from
- ietf: rfc7953 2016-08
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms