Internet DRAFT - draft-baum-jmap-portability-extensions
draft-baum-jmap-portability-extensions
JMAP J.M. Baum, Ed.
Internet-Draft H.J. Happel, Ed.
Intended status: Standards Track audriga
Expires: 13 May 2024 10 November 2023
JMAP Migration and Portability Extensions
draft-baum-jmap-portability-extensions-00
Abstract
JMAP (RFC8620) is a generic, efficient, mobile friendly and scalable
protocol that can be used for data of any type. This makes it a good
fit for migrations or data portability use cases. This extension
adds additional features useful (but not limited to) those use cases.
It adds a feature exposing details about the product, backend and
environment of a JMAP server.
It also adds a data model for extending the JMAP Response with log
messages, particularly helpful for debugging.
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 13 May 2024.
Copyright Notice
Copyright (c) 2023 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
Baum & Happel Expires 13 May 2024 [Page 1]
Internet-Draft JMAP Portability Extensions November 2023
and restrictions with respect to this document. Code Components
extracted from this document must include Revised BSD License text as
described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Revised BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Conventions Used In This Document . . . . . . . . . . . . 3
1.2. Addition to the capabilities object . . . . . . . . . . . 3
1.2.1. urn:ietf:params:jmap:core:backendinfo . . . . . . . . 3
1.2.2. urn:ietf:params:jmap:debug . . . . . . . . . . . . . 5
2. Structured Data Exchange Extension . . . . . . . . . . . . . 5
3. Security considerations . . . . . . . . . . . . . . . . . . . 6
4. IANA considerations . . . . . . . . . . . . . . . . . . . . . 6
4.1. JMAP Capability Registration for "backendinfo" . . . . . 6
4.2. JMAP Capability registration for "debug" . . . . . . . . 7
4.3. JMAP Datatype Registration for "LogLine" . . . . . . . . 7
5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7
6. Normative References . . . . . . . . . . . . . . . . . . . . 7
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8
1. Introduction
Every server-side software has its own quirks. For example, a JMAP
server might only have partially implemented the JMAP standard or
design decisions might have been taken that let the server deviate
from what is actually required by [RFC8620]. Servers might also have
unintended bugs or have certain restrictions that are not
sufficiently reflected by their list of supported server
capabilities.
JMAP as a protocol for data migration and portability targets a large
variety of pre-existing systems. Especially legacy systems often
come with a lot of constraints that may prohibit them from fully
complying with the JMAP standard. Interoperable clients that aim to
have a successful structured data exchange with such "unique" servers
need to handle these quirks with workarounds on the client-side.
Clients only want to apply special workarounds in situations where
they are truly necessary. This is typically done by identifying
which server-side software they are communicating with.
Baum & Happel Expires 13 May 2024 [Page 2]
Internet-Draft JMAP Portability Extensions November 2023
JMAP does not provide a standardized way to retrieve an identifier of
the product that is residing on the server side. Due to the lack of
standardization clients are left to identify misbehaving servers by
error-prone means. Examples are checking against a list of known
URLs or checking known unique responses, typically only sent by
certain products. This makes identifying products time-consuming and
brittle.
Related functionality in other standards are the PRODID property in
iCalendar [RFC5545] and vCard [RFC6350], which allows identifying the
product that produced the files. ManageSieve [RFC5804] and JMAP
Sieve [I-D.ietf-jmap-sieve] define an implementation property, which
allows identifying the Sieve implementation.
Additionally, server-side logs are very valuable to analyze issues a
client may run into. Usually, logs are either stored locally on the
instances or sent to a dedicated logging server. However, data
migrations often take place in constrained environments under which
access to server-side logs is limited. JMAP can be leveraged to
supply log messages along-side the usual data exchange. This also
removes the need to operate a separate logging infrastructure or have
dedicated channels for log messages.
1.1. 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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
The definitions of JSON keys and datatypes in the document follow the
conventions described in the core JMAP specification [RFC8620].
1.2. Addition to the capabilities object
The capabilities object is returned as part of the JMAP Session
object; see [RFC8620], Section 2. This document defines two
additional capability URIs.
1.2.1. urn:ietf:params:jmap:core:backendinfo
This extension defines one additional
urn:ietf:params:jmap:core:backendinfo server capability that provides
details about the product, backend and environment.
Baum & Happel Expires 13 May 2024 [Page 3]
Internet-Draft JMAP Portability Extensions November 2023
The value of this property in the JMAP Session capabilities property
is an object that MUST contain the following information on server
capabilities:
* *apiBackend*: SoftwareInfo|null Information on the JMAP API
backend component.
* *product*: SoftwareInfo|null Information on the overall
application or product.
* *environment*: String|null Information on the environment the
software is running in.
A *SoftwareInfo* object has the following properties:
* *name*: String The JMAP API backend software.
* *version*: String|null The software version.
This extension does not add anything to the account's
accountCapabilities property.
Here is an example JSON snippet:
{
"capabilities": {
"urn:ietf:params:jmap:core:backendinfo": {
"apiBackend": {
"name": "OpenXPort/Horde",
"version": "1.0.0"
},
"product": {
"name": "Horde Webmailer",
"version": "1.0.0"
},
"environment": {
"name": "PHP",
"version": "5.5"
}
}
},
...
}
Baum & Happel Expires 13 May 2024 [Page 4]
Internet-Draft JMAP Portability Extensions November 2023
1.2.2. urn:ietf:params:jmap:debug
Represents support for the *logs* property in the JMAP method
response (defined in RFC8620 Section 3.4 (https://www.rfc-
editor.org/rfc/rfc8620.html#section-3.4)) and the "problem details"
types (defined in RFC8620 Section 3.6.1 (https://www.rfc-
editor.org/rfc/rfc8620.html#section-3.6.1)) using the *LogLine* data
type.
The value of this property in the JMAP Session and account's
capabilities property is an empty object.
2. Structured Data Exchange Extension
The *Response* object as well as all "problem details" objects will
be extended via:
* *logs*: LogLine[] (optional) An array of log lines that were
created while processing the request.
A *LogLine* object has the following properties:
* *level*: String The log level of the log message. MUST be one of
the eight levels defined in RFC5424
(https://datatracker.ietf.org/doc/html/rfc5424): debug, info,
notice, warning, error, critical, alert or emergency.
* *message*: String The log message
* *timestamp*: UTCDate The date the log message was logged.
* *class*: String|null The name of the class that is currently
logging.
* *file*: String|null The file that initiated the log line.
* *line*: String|null The exact line in the file where the log
function is being called.
An example list of logs sent alongside a response to Core/echo would
look like:
Baum & Happel Expires 13 May 2024 [Page 5]
Internet-Draft JMAP Portability Extensions November 2023
{
"logs" : [
{
"file" : "Logger.php",
"level" : "info",
"line" : 32,
"message" : "Array Logger has been successfully initialized",
"timestamp" : "2022-01-18T10:26:56+01:00"
},
{
"file" : "ErrorHandler.php",
"level" : "warning",
"line" : 52,
"message" : "fopen(bridge.php):
failed to open stream: No such file or directory",
"timestamp" : "2022-01-18T10:26:56+01:00"
},
...
],
"methodResponses" : [
[
"Core/echo",
...
3. Security considerations
All security considerations of JMAP [RFC8620] apply to this
specification.
Log messages might contain sensitive user data as well as detailed
information about the system on which an API server has been
installed. Appropriate measures must be taken to restrict access to
JMAP Debug to trusted parties only.
4. IANA considerations
4.1. JMAP Capability Registration for "backendinfo"
IANA will register the "backendinfo" JMAP Capability as follows:
Capability Name: urn:ietf:params:jmap:backendinfo
Specification document: this document
Intended use: common
Change Controller: IETF
Baum & Happel Expires 13 May 2024 [Page 6]
Internet-Draft JMAP Portability Extensions November 2023
Security and privacy considerations: this document, Section 3.
4.2. JMAP Capability registration for "debug"
IANA is requested to register the "debug" JMAP Capability as follows:
Capability Name: urn:ietf:params:jmap:debug
Specification document: this document
Intended use: common
Change Controller: IETF
Security and privacy considerations: this document, Section 3.
4.3. JMAP Datatype Registration for "LogLine"
IANA will register the "LogLine" Data Type as folows:
Type Name: "LogLine"
Can reference blobs: No
Can use for state change: No
Capability: urn:ietf:params:jmap:debug
Reference: this document
5. Acknowledgements
Bron Gondwana, Neil Jenkins, Alexey Melnikov, Ken Murchison, Robert
Stepanek and the JMAP working group at the IETF.
6. Normative References
[I-D.ietf-jmap-sieve]
Murchison, K., "JMAP for Sieve Scripts", Work in Progress,
Internet-Draft, draft-ietf-jmap-sieve-16, 7 November 2023,
<https://datatracker.ietf.org/doc/html/draft-ietf-jmap-
sieve-16>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
Baum & Happel Expires 13 May 2024 [Page 7]
Internet-Draft JMAP Portability Extensions November 2023
[RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and
Scheduling Core Object Specification (iCalendar)",
RFC 5545, DOI 10.17487/RFC5545, September 2009,
<https://www.rfc-editor.org/info/rfc5545>.
[RFC5804] Melnikov, A., Ed. and T. Martin, "A Protocol for Remotely
Managing Sieve Scripts", RFC 5804, DOI 10.17487/RFC5804,
July 2010, <https://www.rfc-editor.org/info/rfc5804>.
[RFC6350] Perreault, S., "vCard Format Specification", RFC 6350,
DOI 10.17487/RFC6350, August 2011,
<https://www.rfc-editor.org/info/rfc6350>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8620] Jenkins, N. and C. Newman, "The JSON Meta Application
Protocol (JMAP)", RFC 8620, DOI 10.17487/RFC8620, July
2019, <https://www.rfc-editor.org/info/rfc8620>.
Authors' Addresses
Joris Baum (editor)
audriga
Alter Schlachthof 57
76137 Karlsruhe
Germany
Email: joris@audriga.com
URI: https://www.audriga.com
Hans-Joerg (editor)
audriga
Alter Schlachthof 57
76137 Karlsruhe
Germany
Email: hans-joerg@audriga.com
URI: https://www.audriga.com
Baum & Happel Expires 13 May 2024 [Page 8]