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

Document Type Active Internet-Draft (jmap WG)
Last updated 2020-02-20 (latest revision 2020-01-31)
Replaces draft-murchison-jmap-websocket
Stream IETF
Intended RFC status Proposed Standard
Formats plain text xml pdf htmlized bibtex
Reviews
Stream WG state Submitted to IESG for Publication
Document shepherd Jim Fenton
Shepherd write-up Show (last changed 2019-11-25)
IESG IESG state Approved-announcement to be sent::Point Raised - writeup needed
Consensus Boilerplate Yes
Telechat date
Responsible AD Alexey Melnikov
Send notices to Jim Fenton <fenton@bluepopcorn.net>
IANA IANA review state IANA OK - Actions Needed
JMAP                                                        K. Murchison
Internet-Draft                                                  Fastmail
Intended status: Standards Track                        January 31, 2020
Expires: August 3, 2020

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

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.

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 August 3, 2020.

Copyright Notice

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

Murchison                Expires August 3, 2020                 [Page 1]
Internet-Draft             JMAP Over WebSocket              January 2020

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.  Authentication  . . . . . . . . . . . . . . . . . . . . .   4
     4.2.  Handshake . . . . . . . . . . . . . . . . . . . . . . . .   4
     4.3.  WebSocket Messages  . . . . . . . . . . . . . . . . . . .   5
       4.3.1.  Handling Invalid Data . . . . . . . . . . . . . . . .   5
       4.3.2.  JMAP Requests . . . . . . . . . . . . . . . . . . . .   5
       4.3.3.  JMAP Responses  . . . . . . . . . . . . . . . . . . .   6
       4.3.4.  JMAP Request-Level Errors . . . . . . . . . . . . . .   6
       4.3.5.  JMAP Push Notifications . . . . . . . . . . . . . . .   6
     4.4.  Examples  . . . . . . . . . . . . . . . . . . . . . . . .   7
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .  12
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  12
     6.1.  Registration of the WebSocket JMAP Subprotocol  . . . . .  12
   7.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .  12
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  12
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .  12
     8.2.  Informative References  . . . . . . . . . . . . . . . . .  14
   Appendix A.  Change History (To be removed by RFC Editor before
                publication) . . . . . . . . . . . . . . . . . . . .  14
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  16

1.  Introduction

   JMAP [RFC8620] 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, reauthenticating for every JMAP
   API request may harm performance.

   The WebSocket [RFC6455] 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.

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

Murchison                Expires August 3, 2020                 [Page 2]
Show full document text