RFC 6352: CardDAV - A Summary
RFC 6352 defines CardDAV, a standard protocol for accessing and managing contact information (vCards) using the widely-used WebDAV protocol as its foundation. Essentially, it's a way to synchronize your contacts between your devices (phone, computer, etc.) and a server, similar to how CalDAV works for calendars.
Purpose of the Document:
The document's primary goal is to standardize how contact information is shared and synchronized over the internet. Before CardDAV, different contact synchronization methods were proprietary and often didn't work well together. RFC 6352 provides a common, interoperable way for applications to access, create, update, and delete contact data on a server. It leverages the existing, well-understood WebDAV infrastructure, making implementation easier.
Key Requirements & How CardDAV Builds on WebDAV:
CardDAV extends WebDAV, it doesn't replace it. Here's how:
- WebDAV Foundation: CardDAV relies on the core WebDAV functionalities like:
- HTTP Methods: Uses standard HTTP methods like GET, PUT, POST, DELETE, PROPFIND, PROPPATCH.
- Resource Identification: Contacts are represented as resources identified by URLs.
- Property Management: WebDAV properties are used to store metadata about contacts.
- CardDAV Specific Extensions: CardDAV adds specific features on top of WebDAV:
- Addressbooks as Collections: Contact collections (addressbooks) are represented as WebDAV collections.
- vCard Format: Contact data is stored in the vCard format (versions 2.1, 3.0, and 4.0 are supported).
- Synchronization Tokens (Sync-Token): This is crucial. CardDAV uses sync tokens to efficiently synchronize changes. The server provides a token representing the latest state of the addressbook. Clients send this token with each request, and the server only sends changes made since that token was issued. This minimizes data transfer.
- Resource Discovery: Mechanisms to discover available addressbooks.
- Search: Allows clients to search for contacts within an addressbook.
- Support for Multiple Addressbooks: Users can have multiple addressbooks, each with its own URL and synchronization state.
Core Requirements for a CardDAV Server (Simplified):
- Support WebDAV: Must fully implement a compliant WebDAV server.
- vCard Handling: Must be able to parse and serialize vCard data.
- Addressbook Collections: Must treat addressbooks as WebDAV collections.
- Sync-Token Generation & Validation: Must generate and validate synchronization tokens. This is the heart of efficient synchronization.
- Resource Discovery: Provide a way for clients to discover available addressbooks (often through a root-level collection).
- Authentication & Authorization: Securely authenticate users and control access to addressbooks.
- Property Support: Support specific CardDAV properties (defined in the RFC) for metadata.
In simpler terms:
Imagine WebDAV as the basic plumbing for file sharing. CardDAV takes that plumbing and adds specific "fittings" and rules for handling contact information (vCards). It tells applications how to store, retrieve, and synchronize contacts using the existing WebDAV infrastructure. The sync-token is the key to making this efficient – it avoids sending the entire addressbook every time you check for updates.
Who benefits from this standard?
- Application Developers: Provides a standard API for building contact synchronization features into their apps.
- Server Implementers: Offers a clear specification for building CardDAV servers.
- Users: Enables interoperability between different contact management applications and servers. You can use your favorite app with your favorite server, knowing they'll work together.
You can find the full, detailed specification at the link you provided: https://datatracker.ietf.org/doc/html/rfc6352 This summary provides a high-level overview.