Skip to content

Commit

Permalink
CalDAV/CardDAV requirements (#74)
Browse files Browse the repository at this point in the history
* CalDAV/CardDAV requirements

* Minor changes

* CalDAV Scheduling inbox/outbox SHOULD support content updates
  • Loading branch information
rfc2822 authored Mar 6, 2025
1 parent c32d208 commit 1037199
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
29 changes: 20 additions & 9 deletions content.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ A _property update_ occurs when the WebDAV properties of the collection or its m

A server SHOULD support a `depth` of 0 and MAY support `1` and `infinite`. In case of `infinite`, the limitations described in {{Section 3.3 of RFC6578}} apply: notifications about changes in members which are not supported by the `DAV:sync-collection` report may not be sent.

2. The optional `{DAV:}prop` element (as it may be used in a `PROPFIND` request) specified a list of properties that the client is interested in. The list of properties MUST NOT contain properties that represent a content update, especially `{DAV:}getetag`, `{DAV:}getlastmodified` and `{DAV:}sync-token`. If the `{DAV:}prop` element is not present or empty, the server chooses the properties that it considers to be useful for the client. If the `{DAV:}prop` element is present, but contains properties for which property update notifications are not supported, the server MAY ignore those properties, or treat the request as if it was sent with empty `{DAV:prop}`.
2. The optional `{DAV:}prop` element (as it may be used in a `PROPFIND` request) specified a list of properties that the client is interested in. The list of properties MUST NOT contain properties that represent a content update, especially `{DAV:}getetag`, `{DAV:}getlastmodified` and `{DAV:}sync-token`. If the `{DAV:}prop` element is not present or empty, the server chooses the properties that it considers to be useful for the client. If the `{DAV:}prop` element is present, but contains properties for which property update notifications are not supported, the server MAY ignore those properties (instead of rejecting the request with a `trigger-not-supported` response).

### Response

Expand All @@ -218,7 +218,7 @@ Allowed response codes:
* 204 if the subscription was registered
* 403 with precondition `invalid-subscription` when the request doesn't contain a valid `subscription`
* 403 with precondition `push-not-available` if WebDAV-Push is not available for this collection or if the user is not allowed to register a push subscription for it
* 403 with precondition `trigger-not-supported` when the request doesn't contain a trigger of when a requested trigger is not supported by the server or the collection
* 403 with precondition `trigger-not-supported` when the request doesn't contain a trigger or when a requested trigger is not supported by the server or the collection
* other response code with usual HTTP/WebDAV semantics

When a subscription is registered the first time, the server creates a URL that identifies that registration (registration URL) which can be used to remove the subscription. The server MUST send the registration URL in the `Location` header.
Expand All @@ -239,9 +239,7 @@ Location: https://example.com/webdav/subscriptions/io6Efei4ooph
Expires: Wed, 02 Oct 2024 07:28:00 GMT
~~~

### Preconditions

The `trigger-not-supported` element contains the trigger(s) that are not supported, together with the sync level/depth. If certain requested properties of a property update notification request are not supported, the `{DAV:}prop` element contains only the unsupported properties. If multiple triggers are not supported, the server can return either all of them or the first one and then abort the request.
The `trigger-not-supported` precondition element contains the trigger(s) that are not supported, together with the sync level/depth. If certain requested properties of a property update notification request are not supported, the `{DAV:}prop` element contains only the unsupported properties. If multiple triggers are not supported, the server can return either all of them or the first one and then abort the request.


## Subscription Updates
Expand Down Expand Up @@ -330,14 +328,27 @@ An invalid subscription is a subscription that push notifications can't be deliv
A server MAY use some logic like remembering the last successful delivery plus some tolerance interval to defer removal of an invalid subscription for some time. Doing so will make WebDAV-Push more reliable in case of temporary problems and avoid temporal "holes" between subscription removal and re-registration.



# CalDAV/CardDAV

[^todo] Specific implementation notes for CalDAV/CardDAV. Especially a recommendation of what clients shall subscribe to and why:
WebDAV-Push can be used with CalDAV ({{RFC4791}}) and CardDAV ({{RFC6352}}) to provide short-time update notifications when collections (calendars, address books) or entries (contacts, events, …) change.

Depending on the features of a CalDAV/CardDAV client, it could for instance subscribe to:

- content updates of a home-set to become notified about new collections,
- content updates of a collection (usually with a sync-level of 1) to become notified about modified entries,
- property updates of a collection (usually with a depth of zero) to become notified about changes of properties like display name, calendar color and access permissions,
- property updates (for instance display name) of a principal to update real names of collection owners.

* homesets → content updates may trigger calendar list refresh
* calendars / address books → content updates may trigger sync, property updates may trigger calendar meta-data refresh
* principals → keep displayed user data up-to-date
CalDAV/CardDAV servers that support WebDAV-Push SHOULD support:

- content updates with a `{DAV:}sync-level` of at least 1 on
- `calendar-home-set` and `addressbook-home-set` collections,
- calendars and address books (collections which have a `{DAV:}resourcetype` of `{CALDAV:}calendar` or `{CARDDAV:}addressbook`),
- scheduling inbox and outbox collections (collections which have a `{DAV:}resourcetype` of `{CALDAV:}schedule-inbox` or `{CALDAV:}schedule-outbox` as defined in {{Section 2 of RFC6638}});
- property updates with a `{DAV:}depth` of at least 0 on
- calendars and address books,
- principals (collections with have a `{DAV:}resourcetype` of `{DAV:}principal` as defined in {{Section 4 of RFC3744}}).


# Security Considerations
Expand Down
4 changes: 4 additions & 0 deletions webdav-push.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ normative:
RFC9111:

informative:
RFC3744:
RFC4791:
RFC6352:
RFC6638:
UnifiedPush:
title: UnifiedPush
target: https://unifiedpush.org
Expand Down

0 comments on commit 1037199

Please sign in to comment.