Network Working Group                                           C. Daboo
Internet-Draft                                                Apple Inc.
Expires: November 22, 2009                                  May 21, 2009


        Use of SRV records for locating CalDAV calendar services
                       draft-daboo-srv-caldav-00

Status of This Memo

   This Internet-Draft is submitted to IETF in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on November 22, 2009.

Copyright Notice

   Copyright (c) 2009 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents in effect on the date of
   publication of this document (http://trustee.ietf.org/license-info).
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.

Abstract

   This specification describes how SRV records can be used to locate a
   CalDAV based calendar service.





Daboo                   Expires November 22, 2009               [Page 1]


Internet-Draft               SRV for CalDAV                     May 2009


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 3
   2.  Conventions Used in This Document . . . . . . . . . . . . . . . 3
   3.  CalDAV SRV service types  . . . . . . . . . . . . . . . . . . . 3
   4.  CalDAV Client "Bootstrapping" . . . . . . . . . . . . . . . . . 3
   5.  Security Considerations . . . . . . . . . . . . . . . . . . . . 4
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5
   7.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 5
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . . . 5
     8.1.  Normative References  . . . . . . . . . . . . . . . . . . . 5
     8.2.  Informative References  . . . . . . . . . . . . . . . . . . 6







































Daboo                   Expires November 22, 2009               [Page 2]


Internet-Draft               SRV for CalDAV                     May 2009


1.  Introduction

   [RFC2782] defines a DNS-based service discovery protocol that has
   been widely adopted as a means of locating particular services within
   a local area network and beyond, using SRV RR records.

   [RFC4791] defines the CalDAV Calendar Access protocol, based on HTTP
   [RFC2616], for accessing calendar data stored on a server.  CalDAV
   clients need to be able to discover appropriate CalDAV servers within
   their local area network and at other domains.

   This specification defines new SRV service types for the CalDAV
   protocol, and gives an example of how clients can use this together
   with other protocol features to enable simple client configuration.

2.  Conventions Used in This Document

   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 [RFC2119].

3.  CalDAV SRV service types

   This specification adds two service types for use with SRV records:

   caldav:  Identifies a CalDAV server that uses HTTP without transport
      layer security ([RFC2818]).

   caldavs:  Identifies a CalDAV server that uses HTTP with transport
      layer security ([RFC2818]).

   Clients SHOULD honor "TTL", "Priority" and "Weight" values in the SRV
   records, as described by [RFC2782].

   Example: service record for server without transport layer security

       _caldav._tcp     SRV 0 1 80 calendar.example.com.

   Example: service record for server with transport layer security

       _caldavs._tcp    SRV 0 1 443 calendar.example.com.

4.  CalDAV Client "Bootstrapping"

   This section describes a procedure that CalDAV clients MAY use to do
   their initial configuration based on minimal user input.

   Minimal input from a user would consist of a calendar user address.



Daboo                   Expires November 22, 2009               [Page 3]


Internet-Draft               SRV for CalDAV                     May 2009


   A calendar user address is defined by iCalendar
   [I-D.ietf-calsify-rfc2445bis] to be a URI [RFC3986].  Provided a user
   identifier and a domain name can be extracted from the URI, this
   simple "bootstrap" configuration can be done.

   If the calendar user address is a "mailto:" [RFC2368] URI, the
   "mailbox" portion of the URI is examined and the "local-part" and
   "domain" portions extracted.  The "local-part" is used for the user
   identifier and the "domain" is used as the service domain.

   If the calendar user address is an "http:" [RFC2616] or "https:"
   [RFC2818] URI, the "userinfo" and "host" portion of the URI is
   extracted.  The "userinfo" is used for the user identifier and the
   "host" is used as the service domain.

   Once the user identifier and service domain have been extracted, the
   following is done:

   1.  An SRV lookup for _caldavs._tcp is done against the extracted
       service domain.

   2.  If no result is found for _caldavs._tcp, the client can try
       _caldav._tcp provided non-SSL connections are appropriate.

   3.  If an SRV record is returned the client extracts the server host
       name and port number

   4.  The client does an authenticated "PROPFIND" [RFC4791] request
       using the user identifier, host name and port number and a
       request URI of "/".  The body of the request should include the
       DAV:current-user-principal [RFC5397] property as one of the
       properties to return.  Note that clients MUST properly handle
       HTTP redirect response statuses for the request.

   5.  If the DAV:current-user-principal property is returned, the
       client uses the value for the principal-URI of the calendar user.
       Given that quantity, it can do a "PROPFIND" on the principal-URI
       and discover additional properties for configuration.

   6.  If the DAV:current-user-principal property is not returned, then
       the client will need to request the principal-URI path from the
       user in order to continue with configuration.

5.  Security Considerations

   Clients that support transport layer security as defined by [RFC2818]
   SHOULD try the "caldavs" service first before trying the "caldav"
   service.  If a user has explicitly requested a connection with



Daboo                   Expires November 22, 2009               [Page 4]


Internet-Draft               SRV for CalDAV                     May 2009


   transport layer security, the client MUST NOT use any service
   information returned for the "caldav" service.

   A malicious attacker with access to the DNS server data can
   potentially cause clients to connect to any server chosen by the
   attacker.  In the absence of a secure DNS option, clients SHOULD
   check that the host name returned in the SRV record matches the
   original service domain that was queried.  If the host is not in the
   queried domain, clients SHOULD verify with the user that the SRV host
   name is suitable for use before executing any CalDAV requests against
   the host.

6.  IANA Considerations

   This document does not require any actions on the part of IANA.

7.  Acknowledgments

   This specification was suggested by discussion that took place within
   the Calendaring and Scheduling Consortium's CalDAV Technical
   Committee.  The authors thank the participants of that group for
   their input.  The "bootstrapping" process is based on diagrams
   developed by Wilfredo Sanchez.

8.  References

8.1.  Normative References

   [RFC2119]                      Bradner, S., "Key words for use in
                                  RFCs to Indicate Requirement Levels",
                                  BCP 14, RFC 2119, March 1997.

   [RFC2368]                      Hoffman, P., Masinter, L., and J.
                                  Zawinski, "The mailto URL scheme",
                                  RFC 2368, July 1998.

   [RFC2616]                      Fielding, R., Gettys, J., Mogul, J.,
                                  Frystyk, H., Masinter, L., Leach, P.,
                                  and T. Berners-Lee, "Hypertext
                                  Transfer Protocol -- HTTP/1.1",
                                  RFC 2616, June 1999.

   [RFC2782]                      Gulbrandsen, A., Vixie, P., and L.
                                  Esibov, "A DNS RR for specifying the
                                  location of services (DNS SRV)",
                                  RFC 2782, February 2000.

   [RFC2818]                      Rescorla, E., "HTTP Over TLS",



Daboo                   Expires November 22, 2009               [Page 5]


Internet-Draft               SRV for CalDAV                     May 2009


                                  RFC 2818, May 2000.

   [RFC3986]                      Berners-Lee, T., Fielding, R., and L.
                                  Masinter, "Uniform Resource Identifier
                                  (URI): Generic Syntax", STD 66,
                                  RFC 3986, January 2005.

   [RFC4791]                      Daboo, C., Desruisseaux, B., and L.
                                  Dusseault, "Calendaring Extensions to
                                  WebDAV (CalDAV)", RFC 4791,
                                  March 2007.

8.2.  Informative References

   [I-D.ietf-calsify-rfc2445bis]  Desruisseaux, B., "Internet
                                  Calendaring and Scheduling Core Object
                                  Specification (iCalendar)",
                                  draft-ietf-calsify-rfc2445bis-10 (work
                                  in progress), April 2009.

   [RFC5397]                      Sanchez, W. and C. Daboo, "WebDAV
                                  Current Principal Extension",
                                  RFC 5397, December 2008.

Author's Address

   Cyrus Daboo
   Apple Inc.
   1 Infinite Loop
   Cupertino, CA  95014
   USA

   EMail: cyrus@daboo.name
   URI:   http://www.apple.com/

















Daboo                   Expires November 22, 2009               [Page 6]