Re: [Jmap] WGLC review of draft-jmap-blob-07

Bron Gondwana <brong@fastmailteam.com> Mon, 20 December 2021 13:47 UTC

Return-Path: <brong@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 447CF3A0C69 for <jmap@ietfa.amsl.com>; Mon, 20 Dec 2021 05:47:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmailteam.com header.b=S0oU+mR6; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=TJZiuEDL
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U8DjrAizmCUo for <jmap@ietfa.amsl.com>; Mon, 20 Dec 2021 05:47:09 -0800 (PST)
Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BB2D43A0C4F for <jmap@ietf.org>; Mon, 20 Dec 2021 05:47:09 -0800 (PST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 444DD3200E31; Mon, 20 Dec 2021 08:47:05 -0500 (EST)
Received: from imap43 ([10.202.2.93]) by compute1.internal (MEProxy); Mon, 20 Dec 2021 08:47:05 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=mime-version:message-id:in-reply-to :references:date:from:to:cc:subject:content-type; s=fm1; bh=BaLR 6jxWDRWXxyfb0ZclIlDxX9+P948ScN3T1LJAjTE=; b=S0oU+mR6d7fYMEUO3n33 hz20Hs6mdeo0KUy9VnYuhhdszdTK9E1dCjTt1J//rDI7SeN/pWS11t40qfK0+RCm VdMFs9potRZ0E/wpuN5PuzR/9MFiCL1uEross09QasMe3/jGNTZx5ZT4hQ2n8K/Q nGQP2mn+IvKyArinxZcdXZJKHZ9gSAZlDH4N2q5bL5ljMhG58LTcysW7WdxRwnbS +Qbn24yP0/RIBH0G+zQXJwdXsi3Sp4ASGoGHSY/iqiczu8W/JqnOEOrAA8+2WW/G CJJPlXhZ/KcDAAKakRkMAlzjuZOADERNDpiRg97xJwBBB1RkiBKt6zJHqMKLBQuk GA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=BaLR6j xWDRWXxyfb0ZclIlDxX9+P948ScN3T1LJAjTE=; b=TJZiuEDLAfBsfkV7aQ3tbq uua33edfye3lYLOgCw+dGyJHe8xZA3GWAY5gBgtV+JrU73RLWNKE8jA56HQ6EXRe 5O5kWXtB/SlXFldzPnAazhCtylxZbqkXMiJG0QJvqwPib1c93+tyWE8i9cnjmIe4 aaIRU6rua0fazQed9k5JQQEssgKBe9QYzu7GhUauI55P1RFibiV2Lziy7eteZ9kZ 2VhzXLYm9xn0AkLAkjb6HJdEnGgWazgiafI2kGWtGTpnj+7S3H1urLytflB4f04e eh8pi7ArG59HstmQZwTGx44ufA86UPN3SkGFXo55nMAbOeLZHQsQ+5/0G4LwbMCw ==
X-ME-Sender: <xms:WInAYQVop6vS-bD1JGr6S6TKL-oq-SW0IKNKYQp_t-cM7ree9lKn9A> <xme:WInAYUnkTQC2AVp--R95QSOujSOy8gYHUbfVP0He63MY3ZY4cQ89Fs2c8Oq3jHSGe EoLacutV04>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddtvddgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesrgdtreerreerjeenucfhrhhomhepfdeurhho nhcuifhonhgufigrnhgrfdcuoegsrhhonhhgsehfrghsthhmrghilhhtvggrmhdrtghomh eqnecuggftrfgrthhtvghrnhepffdvkeefgeelieeutedttdffheevvefffeekuddvtddt keeigfejuddvhfdvudelnecuffhomhgrihhnpehivghtfhdrohhrghenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsrhhonhhgsehfrghsthhm rghilhhtvggrmhdrtghomh
X-ME-Proxy: <xmx:WInAYUYh8NSDD1HRIz0H4HTiF9z7BYzzdOnstUTQaiXMX7PVMNW66g> <xmx:WInAYfV6jg2WNb6H1lRiHhapKZJoQQpwCeHbGAsRtv4dpasTUpDY9w> <xmx:WInAYak8QtRE-4xeBSFyqRVkMgCHhcF1UP9N4IHFTd4kZ177OcvjMQ> <xmx:WInAYRvhCQkJ7Rhtr5deTOwM5QfSGS1rlc5I0hXYgJE6CIVrNkAL0w>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 20903AC0DD1; Mon, 20 Dec 2021 08:47:04 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.5.0-alpha0-4524-g5e5d2efdba-fm-20211214.001-g5e5d2efd
Mime-Version: 1.0
Message-Id: <9af2f7e5-1dcb-4cef-8b59-7b6e7ca2cb76@dogfood.fastmail.com>
In-Reply-To: <EA834DC9-333D-418A-B682-65C01EC01C0C@bluepopcorn.net>
References: <EA834DC9-333D-418A-B682-65C01EC01C0C@bluepopcorn.net>
Date: Tue, 21 Dec 2021 00:46:29 +1100
From: Bron Gondwana <brong@fastmailteam.com>
To: Jim Fenton <fenton@bluepopcorn.net>, Neil Jenkins <neilj@fastmailteam.com>
Cc: IETF JMAP Mailing List <jmap@ietf.org>
Content-Type: multipart/alternative; boundary="8ea8f6f2b51e4f9f8211f67d927c5549"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/3jKso76jXDlXOCcoqrlUMx0gJck>
Subject: Re: [Jmap] WGLC review of draft-jmap-blob-07
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Dec 2021 13:47:14 -0000

Thanks Jim, and sorry for taking so long to get back to you!

Neil - you're added to explicit CC because I have a question for you in here about the 'ifInState' and 'state' fields in a Blob/{get,set} and what we should do about it.

On Tue, Dec 7, 2021, at 11:42, Jim Fenton wrote:
> I had a look at draft-ietf-jmap-blob-07, and have a few comments. Please bear in mind that I don’t have a great deal of experience with the other jmap documents, so some of this might be due to that.
> 
> General:
> 
> I found the large number of examples in the document to be a little distracting. I would prefer to see them in a non-normative appendix. At a minimum, it should be made clear that they’re informative examples, so they aren’t depended upon in the event of a conflict between the normative text and the example.

This is tricky in general - I have found that not having enough examples leads to poorer quality implementations.  In the event of a conflict between the normative text and an example, that's just as bad as a conflict between one part of the normative text and another part of the normative text, and requires errata.  I don't see much value in "making it clear that they're informative" because people will check against them anyway.

Which probably means for the one which I wrote by hand, I should test it against a real implementation!  I'm as sure that it's right as I am that the prose is right though!

All the other examples exist as test cases in our Cassandane test framework for Cyrus IMAP, because that was easier than trying to write them by hand!

> Specific sections:
> 
> Section 3: This appears to be a normative reference to [RFC8620], so that document should be moved from informative to normative in the references.

Oh for sure - that will be mmark.  I used the "normative" version of the RFC link coding: `[@!RFC8620]` everywhere except the registry table, so it decided I didn't really mean normative.  Woohoo.  Fixed.

Thanks, and my apologies for not proof-reading that myself.  The other two informative references should stay that way, as you can implement this without them.

> 
> Section 3.1: “This” is apparently a reference to the section title. What is it about “this” that represents support: I guess the advertisement of this string in the capabilities object? Please make that more specific so that the section fully specifies what happens. 

Updated with language cribbed from RFC9007 which is the most recent published JMAP extension that does something similar.

> What happens if some of the parameters (e.g., MaxSizeBlobSet) aren’t included: do they assume default values are are the limits nonexistent? If this appears in accountCapabilities, I presume it also has to appear in capabilities; is that specified somewhere?

No, it can only appear in accountCapabilities, as specified in the previous paragraph.

I have gone back and made it a MUST that servers support 64 items, and that clients assume that if it's not present.  Likewise I've said that a lack of maxSizeBlobSet just means "assume that it's maxSizeUpload".

> 
> Section 4.1.1: Is this a subset of the Blob/set method, and if so how is it distinguished?

A standard set method, per RFC8620:

https://datatracker.ietf.org/doc/html/rfc8620#section-5.3

It is distinguished by being the `create` argument to a standard `/set` method.  All `/set` methods take arguments.  But you make a good point - I should probably define that Blobs do not have a state as such, so it is an error to provide ifInState argument.

Neil - do we have a good generic way to handle objects for which there's no valid `state`?

> “exactly one of”, “Also optionally” isn’t as formal a definition as I’m used to in IETF standards-track documents. Often, something like this is specified using ABNF. I don’t have a good idea if this is unambiguous or not.

JMAP has not used ABNF in any of its specifications.  How would you propose saying a set containing precisely one of A, B or C in prose?

> “can not contain” -> “MUST not contain”

Yes, thanks - fixed.

> Sections 4.1.2, 4.1.3: will result -> MUST result

Hmm.... maybe.  At least within the scope of this document that is true.

It would be possible within this JMAP syntax for a future specification (which must be selected with a new capability) to alter this behaviour (for example: by adding an expiry time to unreferenced blobs and allowing `update` to change the expiry time and `delete` to remove the blob immediately).  So I don't want to sling too many MUSTs around for the behaviour of things which are legitimate extension points.

I would prefer to leave this as is.  It's clear enough without encouraging implementations to hard code assumptions by scattering MUST.

> Section 4.2: Do the null meanings of offset and length have the same meaning as for create?

Yes.  I guess it was unclear if you queried it.  Improved.

> 
> Is it possible to request both data:asText and data:asBase64? 

Yes.  This is quite expected to anybody familiar with JMAP, where you can fetch multiple representations of the same data in the same request.  RFC8621 in particular allows fetching different representations of headers using very similar syntax - but it's an error to set the same field twice, e.g:

   o  If a "bodyStructure" property is given, there MUST NOT be
      "textBody", "htmlBody", or "attachments" properties.

   o  If given, the "bodyStructure" EmailBodyPart MUST NOT contain a
      property representing a header field that is already defined on
      the top-level Email object.

   o  Within an EmailBodyPart:

      *  The client may specify a partId OR a blobId, but not both.  If
         a partId is given, this partId MUST be present in the
         "bodyValues" property.

But you can certainly fetch either or both with an Email/get.

> Some of the requirements seem not to be in normative style, e.g. “the size value is always” might be stated as “the size value MUST be” and “the key isEncodingProblem is set to true” -> “the key isEncodingProblem MUST be set to true”

Hmm.  Yes.  Am fixing these ones and reviewing for similar.

> Section 6.3: I’m confused about creating a registry where the existing entries reference a number of different existing specifications. Is this a registry that was overlooked in the past? (If so, glad you’re adding it)

Yes.  There was much discussion on that very topic.  It was overlooked to a large extent because there was no real need for it until this document added backreferences.  You could also follow the JMAP capabilities registry to find the documents for each one, and then read the descriptions for the types that they provide... though that wasn't really clear about whether you could ask for push notifications about them.

And definitely the existing documents did not specify whether their types were amenable to being used for backreferences - because that wasn't a thing yet! - so this document defines that for the existing types in existing documents.  Future documents will need to specify each of their types and whether they can be used for backreferences or push notifications in this registry as well.

> Nit:
> 
> Is blob capitalized? It’s inconsistent but mostly capitalized here, but RFC 8620 doesn’t capitalize it.

Mu.  Blob-the-object is capitalised, in the same way that RFC8621 capitalises 'Email' when referencing an object.  It shouldn't be otherwise.  I've gone through and lowered all the cases where it's not directly referencing the JMAP wire object.   I could see an argument for going the other way too, but I'm happy with lower.

I've uploaded a -08 just to show my workings.  Let me know if that resolves everything to your satisfaction other than maybe the open question that I've asked Neil for advice/suggestions on.

Thanks,

Bron.

--
  Bron Gondwana, CEO, Fastmail Pty Ltd
  brong@fastmailteam.com