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

Document Type Active Internet-Draft (jmap WG)
Last updated 2019-03-10
Replaces draft-murchison-jmap-websocket
Stream IETF
Intended RFC status (None)
Formats plain text xml pdf html bibtex
Stream WG state WG Document
Document shepherd No shepherd assigned
IESG IESG state I-D Exists
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to (None)
JMAP                                                        K. Murchison
Internet-Draft                                                  FastMail
Intended status: Standards Track                          March 10, 2019
Expires: September 11, 2019

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

Abstract

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

Open Issues

   o  Should push over WebSocket make use of the EventSource Last-Event-
      ID request header field (or a similar facility; e.g., as an extra
      query parameter)?  And if so, where would the server state token
      be returned to the user?  As a new property in the StateChange
      object?

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 September 11, 2019.

Copyright Notice

   Copyright (c) 2019 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

Murchison              Expires September 11, 2019               [Page 1]
Internet-Draft             JMAP Over WebSocket                March 2019

   (https://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.

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 . . . . . . . . . . . . . . . . . . . . . . . .   4
     4.2.  WebSocket Messages  . . . . . . . . . . . . . . . . . . .   4
       4.2.1.  JMAP Requests . . . . . . . . . . . . . . . . . . . .   5
       4.2.2.  JMAP Responses  . . . . . . . . . . . . . . . . . . .   5
       4.2.3.  JMAP Request-level Errors . . . . . . . . . . . . . .   5
       4.2.4.  JMAP Push Notifications . . . . . . . . . . . . . . .   5
     4.3.  Examples  . . . . . . . . . . . . . . . . . . . . . . . .   6
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .  10
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  10
     6.1.  Registration of the WebSocket JMAP Subprotocol  . . . . .  10
   7.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .  10
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  10
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .  10
     8.2.  Informative References  . . . . . . . . . . . . . . . . .  11
     8.3.  URIs  . . . . . . . . . . . . . . . . . . . . . . . . . .  11
   Appendix A.  Change History (To be removed by RFC Editor before
                publication) . . . . . . . . . . . . . . . . . . . .  11
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  12

1.  Introduction

   JMAP [I-D.ietf-jmap-core] over HTTP [RFC7235] 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.  This binding supports JMAP API requests and responses,
   with optional support for push notifications.

Murchison              Expires September 11, 2019               [Page 2]
Internet-Draft             JMAP Over WebSocket                March 2019

   Furthermore, the WebSocket binding for JMAP can optionally compress
Show full document text