Skip to main content

CoAP Protocol Negotiation
draft-silverajan-core-coap-protocol-negotiation-00

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Expired".
Author Bill Silverajan
Last updated 2015-03-09
RFC stream (None)
Formats
Stream Stream state (No stream defined)
Consensus boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-silverajan-core-coap-protocol-negotiation-00
CoRE Working Group                                         B. Silverajan
Internet-Draft                          Tampere University of Technology
Intended status: Informational                             March 9, 2015
Expires: September 10, 2015

                       CoAP Protocol Negotiation
           draft-silverajan-core-coap-protocol-negotiation-00

Abstract

   CoAP has been standardised as an application level REST-based
   protocol.  This document introduces a way for CoAP clients and
   servers to interact with resources by agreeing upon alternate
   locations as well as transport and protocol configurations.

Status of This Memo

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

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   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."

   This Internet-Draft will expire on September 10, 2015.

Copyright Notice

   Copyright (c) 2015 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
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Silverajan             Expires September 10, 2015               [Page 1]
Internet-Draft          CoAP Protocol Negotiation             March 2015

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  New Link Attribute and Relation types . . . . . . . . . . . .   3
   3.  Examples  . . . . . . . . . . . . . . . . . . . . . . . . . .   3
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   5
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
   6.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .   5
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   5
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .   5
     7.2.  Informative References  . . . . . . . . . . . . . . . . .   5
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   5

1.  Introduction

   The Constrained Application Protocol (CoAP) [RFC7252] provides a
   lightweight request-response messaging mechanism for retrieving and
   manipulating resources identified by Uniform Resource Identifiers
   (URIs).  However URIs have a twofold purpose in CoAP: In addition to
   identifying resources, URIs are also used as locators for origin
   servers, proxies and endpoints delivering resource representations to
   clients.  Should an origin server wish to serve a resource over
   multiple transports, a single CoAP URI cannot be used to express the
   identity of the resource independently of alternate underlying
   transports or protocol configurations.  Similarly, if the server
   wishes to serve representations of the resource from a different
   endpoint and path, the URI mechanism is incapable of capturing the
   relationship between these alternate representations or locations.

   This draft proposes a new link format attribute as well as a new link
   relation type that together enable an origin server to serve a
   resource from other protocol configuratons or endpoints.  CoAP
   clients then interact with an origin server's CoRE resource discovery
   interface to obtain a set of links describing alternate locations of
   resources.

   This is useful in the following cases:

   1.  CoAP clients interacting with Type T1 or T2 CoAP origin servers
       (see Section 3 of
       [I-D.silverajan-core-coap-alternative-transports]) either before
       or during an ongoing transaction to communicate using CoAP over a
       different protocol configuration or alternative transport.

   2.  Avoiding URI aliases [WWWArchv1], where a single resource is
       represented with multiple URIs, without describing relations
       among the alternate representations.

Silverajan             Expires September 10, 2015               [Page 2]
Internet-Draft          CoAP Protocol Negotiation             March 2015

   3.  Allowing intermediate nodes such as CoAP-based proxies to
       intelligently cache and respond to CoAP clients with the same
       resource representation requested over alternative transports or
       server endpoints.

   4.  Ability to separate the CoAP resource paths from web-based CoAP
       endpoint path in a URI.

2.  New Link Attribute and Relation types

   A CoAP server wishing to allow interactions with resources from
   multiple locations or transports can do so by specifying the
   Transport Type "tt" link attribute, which is an opaque string.
   Multiple transport types can be included in the value of this
   parameter, each separated by a space.  In such cases, transport types
   appear in a prioritised list, with the most preferred transport type
   by the CoAP server specified first and the lowest priority transport
   type last.

   At the same time, each transport type supported by the server is also
   described with an "altloc" link relation type.  The "altloc" relation
   type specifices a URI (containing the URI scheme, authority and
   optionally path) providing an alternate endpoint location up to but
   not including the resource path of a representation.

   Both "tt" and "altloc" are optional CoAP features.  If supported,
   they occur at the granularity level of an origin server, ie. they
   cannot be applied selectively on some resources only.  Therefore
   "altloc" is always anchored at the root resource ("/").
   Additionally, the "tt" link attribute and "altloc" relation type can
   be ignored by unsupported CoAP clients.

   (TBD: As type T1 nodes may not have all transports active at all
   times, should a lifetime value be reflected in server responses?)

3.  Examples

   Example 1 shows a CoAP server returning all transport types and the
   alternate resource locations to a CoAP client performing a CoAP
   Request to ./well-known/core

   In this case, the server supplies two different locations to interact
   with resources using CoAP over TCP.  At the same time, the path to
   the WebSocket endpoint is provided in addition to the FQDN of the
   server, for using CoAP over WebSockets.

Silverajan             Expires September 10, 2015               [Page 3]
Internet-Draft          CoAP Protocol Negotiation             March 2015

   REQ: GET /.well-known/core

   RES: 2.05 Content
   </sensors>;ct=40;title="Sensor Index", tt="tcp ws sms",
   </sensors/temp>;rt="temperature-c";if="sensor",
   </sensors/light>;rt="light-lux";if="sensor",
   <coap+tcp://server.example.com/>;rel="altloc",
   <coap+tcp://server.example.net/>;rel="altloc",
   <coap+ws://server.example.com/ws-endpoint/>;rel="altloc",
   <coap+sms://001234567>;rel="altloc"

                   Figure 1: Example of Server response

   Example 2 shows a CoAP client actively soliciting a CoAP server for
   all supported transport types and protocol configurations.

   REQ: GET /.well-known/core?tt=*

   RES: 2.05 Content
   </sensors>;tt="tcp sms ws"
   <coap+tcp://server.example.com/>;rel="altloc",
   <coap+tcp://server.example.net/>;rel="altloc",
   <coap+ws://server.example.com/ws-endpoint/>;rel="altloc",
   <coap+sms://001234567/>;rel="altloc"

     Figure 2: CoAP client discovering transports supported by a CoAP
                                  server.

   Example 3 shows a CoAP client explicitly soliciting support for a
   specific transport type using a query filter parameter.

   REQ: GET /.well-known/core?tt=sms

   RES: 2.05 Content
   </sensors>;tt="tcp sms ws"
   <coap+sms://001234567/>;rel="altloc"

   Figure 3: CoAP client looking for a specific transport to use with a
                               CoAP server.

Silverajan             Expires September 10, 2015               [Page 4]
Internet-Draft          CoAP Protocol Negotiation             March 2015

4.  IANA Considerations

   New link attributes and link relations need to be registered.

5.  Security Considerations

   Probably lots.  (TBD)

6.  Acknowledgements

   Thanks to Klaus Hartke for comments and reviewing this draft, and
   Teemu Savolainen for initial discussions about protocol negotations
   and lifetime values.

7.  References

7.1.  Normative References

   [RFC7252]  Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
              Application Protocol (CoAP)", RFC 7252, June 2014.

7.2.  Informative References

   [I-D.silverajan-core-coap-alternative-transports]
              Silverajan, B. and T. Savolainen, "CoAP Communication with
              Alternative Transports", draft-silverajan-core-coap-
              alternative-transports-07 (work in progress), December
              2014.

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

   [WWWArchv1]
              http://www.w3.org/TR/webarch/#uri-aliases, "Architecture
              of the World Wide Web, Volume One", December 2004.

Author's Address

   Bilhanan Silverajan
   Tampere University of Technology
   Korkeakoulunkatu 10
   FI-33720 Tampere
   Finland

   Email: bilhanan.silverajan@tut.fi

Silverajan             Expires September 10, 2015               [Page 5]