A JSON Meta Application Protocol (JMAP) Subprotocol for WebSocket
draft-murchison-jmap-websocket-01

Document Type Active Internet-Draft (individual)
Last updated 2018-08-03
Stream (None)
Intended RFC status (None)
Formats plain text xml pdf html bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Independent Submission                                      K. Murchison
Internet-Draft                                                  FastMail
Intended status: Standards Track                          August 3, 2018
Expires: February 4, 2019

   A JSON Meta Application Protocol (JMAP) Subprotocol for WebSocket
                   draft-murchison-jmap-websocket-01

Abstract

   This document defines a binding for the JSON Meta Application
   Protocol (JMAP) over a WebSocket transport layer.  A WebSocket
   binding for JMAP provides higher performance than the current HTTP
   binding for JMAP.

Open Issues

   o  Should we allow push notifications over the WS connection?

   o  Should we allow out of order processing od requests?

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 https://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 February 4, 2019.

Copyright Notice

   Copyright (c) 2018 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
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents

Murchison               Expires February 4, 2019                [Page 1]
Internet-Draft             JMAP Over WebSocket               August 2018

   carefully, as they describe your rights and restrictions with respect
   to this document.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Conventions Used in This Document . . . . . . . . . . . . . .   3
   3.  Discovering Support for JMAP over WebSocket . . . . . . . . .   3
   4.  JMAP Subprotocol  . . . . . . . . . . . . . . . . . . . . . .   3
     4.1.  Handshake . . . . . . . . . . . . . . . . . . . . . . . .   3
     4.2.  WebSocket Messages  . . . . . . . . . . . . . . . . . . .   4
     4.3.  Examples  . . . . . . . . . . . . . . . . . . . . . . . .   4
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   6
   6.  Privacy Considerations  . . . . . . . . . . . . . . . . . . .   7
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   7
     7.1.  Registration of the WebSocket JMAP Sub-Protocol . . . . .   7
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   7
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .   7
     8.2.  Informative References  . . . . . . . . . . . . . . . . .   8
     8.3.  URIs  . . . . . . . . . . . . . . . . . . . . . . . . . .   8
   Appendix A.  Change History (To be removed by RFC Editor before
                publication) . . . . . . . . . . . . . . . . . . . .   8
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   8

1.  Introduction

   JMAP over HTTP requires that every JMAP API request be authenticated.
   Depending on the type of authentication used by the JMAP client and
   the configuration of the JMAP server, authentication could be an
   expensive operation both in time and resources.  In such
   circumstances, authenticating every JMAP API request may harm
   performance.

   The WebSocket binding for JMAP eliminates this performance hit by
   authenticating just the WebSocket handshake request and having those
   credentials remain in effect for the duration of the WebSocket
   connection.

   Furthermore, the WebSocket binding for JMAP can optionally compress
   [RFC7692] JMAP API requests.  Although compression of HTTP responses
   is ubiquitous, compression of HTTP requests has very low, if any
   deployment, and therefore isn't an option for JMAP API requests over
   HTTP.

Murchison               Expires February 4, 2019                [Page 2]
Internet-Draft             JMAP Over WebSocket               August 2018

2.  Conventions Used in This Document

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [1] [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   The same terminology is used in this document as in the core JMAP
   specification.

3.  Discovering Support for JMAP over WebSocket

   The capabilities object is returned as part of the standard JMAP
Show full document text