-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdav-notifications.xml
383 lines (374 loc) · 21.4 KB
/
dav-notifications.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
<?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 rfc3339 PUBLIC '' 'bibxml/reference.RFC.3339.xml'>
<!ENTITY rfc3744 PUBLIC '' 'bibxml/reference.RFC.3744.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 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='webdav-notifications-00'>
<front>
<title abbrev="WebDAV User Notifications">WebDAV: User Notifications</title>
<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>
<uri>http://www.apple.com/</uri>
</address>
</author>
<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>
<uri>https://fruux.com/</uri>
</address>
</author>
<date/>
<abstract>
<t>
This specification defines an extension to WebDAV that allows the server to provide notifications to users.
</t>
</abstract>
</front>
<middle>
<section title='Introduction'>
<t>
It is often useful for servers to communicate arbitrary
information to the end-users for a WebDAV system, such as a
system status, message of the day or to notify users of
changes that were made to shared resources by other users.
</t>
<t>
This specification defines a generic "notification" mechanism
that allows a server to do that. Whilst primarily aimed at
<xref target="RFC4791">CalDAV</xref> and <xref target="RFC6352">CardDAV</xref>
this mechanism has been designed to be adaptable to other
applications of <xref target='RFC4918'>WebDAV</xref>.
</t>
</section>
<section title="Open Issues">
<t>
<list style="numbers">
<t>None?</t>
</list>
</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:" is referenced
in this document outside of the context of an XML fragment,
the string "DAV:" will be prefixed to the element type name.
</t>
</section>
<section title="Requirements Overview">
<t>
To add support for WebDAV notifications, a server MUST at
least have support for <xref target="RFC4918">WebDAV Class 3</xref>.
</t>
<t>
WebDAV notifications also defines new properties on principal
resources, which are defined in <xref target="RFC3744">RFC3744</xref>.
</t>
</section>
<section title="Notifications">
<t>When this feature is available, a <xref target="DAV:notification-URL">DAV:notification-URL</xref> property appears on principal resources for those principals who are able to receive notifications. That property specifies a single DAV:href element whose content refers to a WebDAV collection resource. Notification "messages" are deposited into this collection and can be retrieved by clients and acted on accordingly.</t>
<t>The notification collection referenced by the <xref target="DAV:notification-URL">DAV:notification-URL</xref> property MUST have a DAV:resourcetype property with DAV:collection and <xref target="DAV:notifications">DAV:notifications</xref> child elements.</t>
<t>Notification "messages" are XML documents stored as resources in the notification collection. Each XML document contains a <xref target="DAV:notification">DAV:notification</xref> element as its root. The root element contains a DAV:dtstamp element, and one additional element which represents the type of notification being conveyed in the message. That child element will typically contain additional content that describes the notification.</t>
<t>Each notification resource has a <xref target="DAV:notificationtype">DAV:notificationtype</xref> property which contains as its single child element an empty element that matches the child element of the notification resource XML document root. Any attributes on the child element in the XML document are also present in the property child element.</t>
<t>Notifications are automatically generated by the server with an appropriate resource stored in the notifications collection of the user to whom the notification is targeted. Clients SHOULD monitor the notification collection looking for new notification resources. When doing so, clients SHOULD look at the <xref target="DAV:notificationtype">DAV:notificationtype</xref> property to ensure that the notification is of a type that the client can handle. Once a client has handled the notification in whatever way is appropriate it SHOULD delete the notification resource. Clients SHOULD remove notifications being displayed to a user when the notification resource is removed from the notification collection, to enable the user to dismiss a notification on one device and have it automatically removed from others. Clients MUST ignore all notifications for types they do not recognize. Servers MAY delete notification resources on their own if they determine that the notifications are no longer relevant or valid. Servers MAY coalesce notifications as appropriate.</t>
<t>Servers MUST prevent clients from adding resources in the notification collection.</t>
<section title="Mime type" anchor="mime-type">
<t>
The "application/davnotification+xml" MIME media type MUST
be used for transfer of WebDAV notifications.
</t>
<t hangText="Example:">This is an example of a Content-Type header:
<figure>
<artwork><![CDATA[Content-Type: application/davnotification+xml]]></artwork>
</figure>
</t>
<t>
HTTP GET requests that expect to receive a WebDAV
notification resource, SHOULD include an "Accept" header
that includes "application/davnotification+xml".
</t>
<t>
Requests that do not include this header, SHOULD be
rejected with a HTTP 406 status code.
</t>
</section>
<section title="Additional Principal Properties" anchor='principal-properties'>
<t>This section defines new properties for WebDAV principal resources as defined in <xref target="RFC3744">RFC3744</xref>. These properties are likely to be protected but the server MAY allow them to be written by appropriate users.</t>
<section title="DAV:notification-URL Property" anchor="DAV:notification-URL">
<t>
<list style="hanging">
<t hangText="Name:">notification-URL</t>
<t hangText="Namespace:">DAV:</t>
<t hangText="Purpose:">Identify the URL of the notification collection owned by the associated principal resource.</t>
<t hangText="Protected:">This property SHOULD be protected.</t>
<t hangText="PROPFIND behavior:">This property SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of <xref target="RFC4918"/>).</t>
<t hangText="COPY/MOVE behavior:">This property value SHOULD be preserved in COPY and MOVE operations.</t>
<t hangText="Description:">This property is needed for a client to determine where the notification collection of the current user is located so that processing of notification messages can occur. If not present, then the associated principal is not enabled for notification messages on the server.</t>
<t hangText="Definition:">
<figure>
<artwork><![CDATA[
<!ELEMENT notification-URL (DAV:href)>]]></artwork>
</figure>
</t>
</list>
</t>
</section>
</section>
<section title="Properties on Notification Resources" anchor='notification-properties'>
<t>The following new WebDAV properties are defined for notification resources.</t>
<section title="DAV:notificationtype Property" anchor="DAV:notificationtype">
<t>
<list style="hanging">
<t hangText="Name:">notificationtype</t>
<t hangText="Namespace:">DAV:</t>
<t hangText="Purpose:">Identify the type of notification of the corresponding resource.</t>
<t hangText="Protected:">This property MUST be protected.</t>
<t hangText="PROPFIND behavior:">This property SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of <xref target="RFC4918"/>).</t>
<t hangText="COPY/MOVE behavior:">This property value MUST be preserved in COPY and MOVE operations.</t>
<t hangText="Description:">This property allows a client, via a PROPFIND Depth:1 request, to quickly find notification messages that the client can handle in a notification collection. The single child element is the notification resource root element's child defining the notification itself. This element MUST be empty, though any attributes on the element in the notification resource MUST be present in the property element.</t>
<t hangText="Definition:">
<figure>
<artwork><![CDATA[
<!ELEMENT notificationtype ANY>
<!-- Child elements are empty but will have appropriate attributes.
Any valid notification message child element can appear.-->]]></artwork>
</figure>
</t>
</list>
</t>
</section>
</section>
<section title='XML Element Definitions'>
<section title="DAV:notifications" anchor="DAV:notifications">
<t>
<list style="hanging">
<t hangText="Name:">notifications</t>
<t hangText="Namespace:">DAV:</t>
<t hangText="Purpose:">Indicates a notification collection.</t>
<t hangText="Description:">This XML element is used in a DAV:resourcetype element to indicate that the corresponding resource is a notification collection.</t>
<t hangText="Definition:">
<figure>
<artwork><![CDATA[
<!ELEMENT notifications EMPTY>]]></artwork>
</figure>
</t>
</list>
</t>
</section>
<section title="DAV:notification" anchor="DAV:notification">
<t>
<list style="hanging">
<t hangText="Name:">notification</t>
<t hangText="Namespace:">DAV:</t>
<t hangText="Purpose:">Notification message root element.</t>
<t hangText="Description:">The root element used in notification resources.</t>
<t hangText="Definition:">
<figure>
<artwork><![CDATA[
<!ELEMENT notification (dtstamp, XXX) >
<!-- Any notification type element can appear after
DAV:dtstamp -->]]></artwork>
</figure>
</t>
</list>
</t>
</section>
<section title="DAV:dtstamp" anchor="DAV:dtstamp">
<t>
<list style="hanging">
<t hangText="Name:">dtstamp</t>
<t hangText="Namespace:">DAV:</t>
<t hangText="Purpose:">Date-time stamp.</t>
<t hangText="Description:">DAV:dtstamp is an element whose content MUST conform to the
"date-time" production in <xref target="RFC3339" />. In addition, an uppercase "T"
character MUST be used to separate date and time, and an uppercase
"Z" character MUST be present.</t>
<t hangText="Definition:">
<figure>
<artwork><![CDATA[
<!ELEMENT dtstamp (#PCDATA)>
<!-- Value is a date-time in UTZ as per [RFC3339] -->]]></artwork>
</figure>
</t>
</list>
</t>
</section>
</section>
</section>
<section title="Notification Definitions">
<t>This section defines a set of common notification types.</t>
<section title="System Status Notification">
<t>The system status notification is used to convey an URI and/or textual description to the user. The assumption is that the URI points to a webpage where the current system status is described in detail, with the provided description being a summary of that. A "type" attribute on the element is used to indicate the importance of the current status notification, and has the values "low", "medium" and "high", representing the increasing level of importance of the message respectively.</t>
<t>Servers might have knowledge of an agent's language preferences, in which case it MAY localise the DAV:description value as appropriate based on the calendar user accessing the notification, but if it does, it SHOULD include an xml:lang attribute on the DAV:description element to indicate what language is being used.</t>
<section title="DAV:systemstatus Element Definition" anchor="DAV:systemstatus">
<t>
<list style="hanging">
<t hangText="Name:">systemstatus</t>
<t hangText="Namespace:">DAV:</t>
<t hangText="Purpose:">Indicates a system status notification.</t>
<t hangText="Description:">This XML element is used in a DAV:notification element to describe a system status notification.</t>
<t hangText="Definition:">
<figure>
<artwork><![CDATA[
<!ELEMENT systemstatus (DAV:href?, DAV:description?)>
<!ATTLIST systemstatus type (low | medium | high) "low">
<!-- One of DAV:href or DAV:description MUST be present -->
]]></artwork>
</figure>
</t>
<t hangText="Example:">This is an example of the body of a notification resource for an emergency system outage:
<figure>
<artwork><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<D:notification xmlns:D="DAV:">
<D:dtstamp>2011-12-09T11:12:53-05:00</D:dtstamp>
<D:systemstatus type="high">
<D:href>http://example.com/emergency_shutdown.html</D:href>
<D:description xml:lang='en_US'>
Emergency shutdown now
</D:description>
</D:systemstatus>
</D:notification>]]></artwork>
</figure>
</t>
<t hangText="Example:">This is an example of the WebDAV property on the example notification resource above:
<figure>
<artwork><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<D:notificationtype xmlns:D="DAV:">
<D:systemstatus type="high" />
</D:notificationtype>]]></artwork>
</figure>
</t>
</list>
</t>
</section>
</section>
</section>
<section title='Security Considerations' anchor="security">
<t>
TBD: More?
</t>
</section>
<section title='IANA Considerations'>
<t>
This document defines a MIME media type for use of WebDAV
notifications in an XML format. This media type SHOULD be used
for the transfer of WebDAV notifications.
</t>
<t>
<list style="hanging">
<t hangText="Type name:">application</t>
<t hangText="Subtype name:">davnotification+xml</t>
<t hangText="Required parameters:">none</t>
<t hangText="Optional parameters:">none</t>
<t hangText="Encoding considerations:">Identical to those of "application/xml" as described in <xref target="RFC7303">RFC7303</xref>.</t>
<t hangText="Security considerations:">See <xref target="security" />.</t>
<t hangText="Interoperability considerations:">There are no known interoperability issues.</t>
<t hangText="Published specification:">This specification.</t>
<t hangText="Applications that use this media type:">No known applications currently use this media type.</t>
<t hangText="Fragment identifier considerations:">N/A.</t>
</list>
</t>
<t>Additional information</t>
<t>
<list style="hanging">
<t hangText="Deprecated alias names for this type">N/A.</t>
<t hangText="Magic number(s)">N/A.</t>
<t hangText="File extension(s)">xml</t>
<t hangText="Macintosh file type code(s)">TEXT</t>
<t hangText="Intended usage">COMMON</t>
<t hangText="Restrictions on usage">There are no restrictions on where this media</t>
<t hangText="Author">See the "Authors' Addresses" section of this document.</t>
<t hangText="Change Controller">IETF</t>
</list>
</t>
</section>
<section title='Acknowledgments'>
<t>
This specification is the result of discussions between the various Apple calendar server and client teams.
</t>
</section>
</middle>
<back>
<references title='Normative References'>
&rfc2119;
&rfc3339;
&rfc4918;
&rfc6352;
&rfc7303;
</references>
<references title='Informative References'>
&rfc3744;
&rfc4791;
</references>
<section title='Backwards-compatibility with earlier drafts'>
<t>
An earlier draft of this specification is already widely
deployed among both servers and clients.
</t>
<t>
This specification, informally known as 'caldav-notifications'
largely uses the same structure as this specification, but
where the "DAV:" xml namespace is used in this specification,
the earlier draft uses "http://calendarserver.org/ns/".
</t>
<t>
It is possible to conform to both that draft and this
specification by either creating two different collections, as
identified by "notification-URL" in each respective namespace.
Alternatively it's possible to use the same resource for
both, but use content-negotation using the Accept header to
ask the server for a specific representation of a notification.
</t>
</section>
<!--
<section title='Change History'>
<t>Changes in -01:
<list style='numbers'>
<t></t>
</list>
</t>
</section>
-->
</back>
</rfc>