Re: [Jmap] Review: draft-ietf-jmap-calendars-03

Neil Jenkins <neilj@fastmailteam.com> Mon, 20 July 2020 04:18 UTC

Return-Path: <neilj@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 CA4633A0A0C for <jmap@ietfa.amsl.com>; Sun, 19 Jul 2020 21:18:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.119
X-Spam-Level:
X-Spam-Status: No, score=-2.119 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_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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=ZeTql+cN; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=NurrSQlr
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 lxT2I406AZzh for <jmap@ietfa.amsl.com>; Sun, 19 Jul 2020 21:18:53 -0700 (PDT)
Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BF7C03A0A3F for <jmap@ietf.org>; Sun, 19 Jul 2020 21:18:50 -0700 (PDT)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 12D9A882 for <jmap@ietf.org>; Mon, 20 Jul 2020 00:18:50 -0400 (EDT)
Received: from imap7 ([10.202.2.57]) by compute4.internal (MEProxy); Mon, 20 Jul 2020 00:18:50 -0400
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:subject:content-type; s=fm3; bh=DkDgYg1 +cdRqgg+G9reKWZuI/7CjnLye/O84S/2X10w=; b=ZeTql+cN0kUwxsDbs1e1jUR 9f4QIT5Ovqn7tyuDioSaD0KRGh7bOBl/ye9ldUktZEDkWj4cDdkWoQDXPiOHLk4L 1dtYaSbzDxqnR2MonlvLaVk1gz6+dM+nGFt/w2NVYC8dIVdrD3hCdQ/rLsTqgdEk C7TQVzwmuD2x/aBdyVDD9C5/r9I2yirK/l9zdqUTqerBZ+UbhUGd08cMGhj8c+Hb Uk9G51/WIL9qmU9bjd9K3M37fLvRH2hXUcZeJAk1YxEq3jE2MJ+9w8rtLyqUYwrU TeT6M4GvAFZOxg5lPL3IThnVcEi/6XHkVpPmc4s/0oy74aOUc5CNQBYV5qda+JA= =
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm3; bh=DkDgYg 1+cdRqgg+G9reKWZuI/7CjnLye/O84S/2X10w=; b=NurrSQlrQtaOAj527nAcIo 6SVclW6w/jvsM6xog0oqSJkU9plB8ylzlyGAmxGzXQcA+zRDZUo9t7VeSk7qhv4w YvWlIydZkWBTUNyfTlatUnlgx/h7iY83brHSl1SqYRZ9nxgLWMQV7BTijmrWFdYA LY078VeuUlXIDPgT5Fq2UDPLEIrSxzJ1PcgSqpMoDStlGpdlcyhK8yBkszeEhHQw Z1rJJAhDTBs/y+nHNiCwM9ytrXFMbrK2V5z6VlPP3wXD42Lo7k+VLBOkFYcRnuFB f6sqT/eYVljimZwIULLp5TA74OHVfomq98O97evunlixvXoPsyspS9/KvuW1bHLA ==
X-ME-Sender: <xms:KRsVX4WCty8FvqCzN1gEwhTPHWUNkSK1YaxUJUDFmJeOwcIgJQpzbQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrgedvgdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsegrtderreerredtnecuhfhrohhmpedfpfgvihhl ucflvghnkhhinhhsfdcuoehnvghilhhjsehfrghsthhmrghilhhtvggrmhdrtghomheqne cuggftrfgrthhtvghrnhepvedvtedvudelkefhgefhteeftedtlefhheefveffveelkedu tdduffeiveejvefhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepnhgvihhljhesfhgrshhtmhgrihhlthgvrghmrdgtohhm
X-ME-Proxy: <xmx:KRsVX8ks-CDVuUMo8K4BSJSQ3mUPucNAd8VpZTeVcuPjxK8HIlXSwQ> <xmx:KRsVX8b_k5AvFZdGgcF1AINHpOEMbOZlz-c_VUal79hqCmQhDkLTGw> <xmx:KRsVX3U3O0qGmTaXg1y2Eva38CR4Qa6c9v0l2F0dpzKQTG1dNUqc6Q> <xmx:KRsVX4nEy91Y5odaNDn7SINwwu_hXtJgJ5lcRqNBz4V1v_d3pL-0mg>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6A775180269; Mon, 20 Jul 2020 00:18:49 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-77-g15cf182-fm-20200720.002-g15cf182a
Mime-Version: 1.0
Message-Id: <044b2bbb-9f69-486a-841d-1cc9bad4356d@dogfood.fastmail.com>
In-Reply-To: <100ecc03-66db-4ee0-b56c-be20f605ff8b@dogfood.fastmail.com>
References: <100ecc03-66db-4ee0-b56c-be20f605ff8b@dogfood.fastmail.com>
Date: Mon, 20 Jul 2020 14:18:47 +1000
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
Content-Type: multipart/alternative; boundary="74585330248344cdb33db52ee8cb7e2e"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/445qZHKUjS3bn2xVjoXqjALDVAA>
Subject: Re: [Jmap] Review: draft-ietf-jmap-calendars-03
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 Jul 2020 04:18:59 -0000

On Mon, 13 Jul 2020, at 23:22, Bron Gondwana wrote:
> *Why do this rather than defining properties on the Account object directly and then adding an Account/query mechanism *which allows you to filter to accounts which support "urn:ietf:params:jmap:calendars" as part of the query parameters?

For several reasons, including:
 1. You may have access to more than one account containing calendar principals. These are separate namespaces and need to remain so. Making it all part of one thing would break this, making it much harder to transparently proxy different backends via a single JMAP endpoint.
 2. You may not have access to the account (you are only allowed to call getAvailability); so you can't represent the principal as an account.
 3. The standard get/changes etc. methods have consistency guarantees tied to an account. This would be undefined, or require redefining if you needed to do it for querying accounts, which makes the spec more complex. These guarantees may not be possible to make when the set of accounts actually comes from multiple different backends.

> *2. Calendar Principals*
> 
> All the object properties appear to be required with no default value.  Should they have default values given (generaly null) in the spec?  Particularly where null is a valid value, it appears that would be a sensible default.

Since you can't create a principal via this spec, it's unclear to me what a default would mean for these properties.

> *3. Calendars***
> 
> Likewise, should color be optional (default #000000 or whatever).

I'll make it nullable and that can be the default.

> Speaking of color - I believe that the CSS color specs should be normative references, since you can't build a compliant implementation without them.

I'm not sure I can do this in the markdown source; this will probably need fixing up at the end when I do final edits in the XML. I'll make sure we do this though.

> Likewise isSubscribed should probably default to true if not specified, since a server which doesn't care about subscriptions would just return the calendars that you can see..  

It's a bit more nuanced than that. The spec says:

*This SHOULD default to false for Calendars in shared accounts the user has access to and true for any new Calendars created by the user themself.*

> And probably ditto for everything else that doesn't have a default.

I've added in defaults for all other calendar properties where it makes sense.

>    o  *timeZone*: "String|null" The time zone to use for events without
      a time zone when the server needs to resolve them into absolute
      time, e.g., for reminders, queries, or availability calculation.
      The value MUST be a time zone id from the IANA Time Zone Database.
      If "null", the timeZone of the account's associated
      CalendarPrincipal will be used.  Clients SHOULD use this as the
      default for new events in this calendar if set.
> 
> The IANA Time Zone Database should be in the references at the end of the document.

Same as with the CSS ref; I've put a link in and will make sure it's a normative reference in the final edit.

> *3.1. Per-user properties***
> 
> We should address read-only accounts here, where users may not be able to store anything on the server.

I've taken out this section because it's covered in more detail in the Calendar/set description (the user must be subscribed to the calendar in order to change any of these properties for themself, and the server may reject them subscribing themself even if they can otherwise see and access it, thus enforcing a read-only mode).

> *4.5.  CalendarShareNotification/set*

   This is a standard "/changes" method as described in [RFC8620],
   Section 5.3.
> 
> This looks like a copy-paste error from above.

Thanks, fixed.

> It looks from the lack of create/update that "undo" will not work when dismissing notifications!

Correct. I considered this when defining it and I think it's OK; I've yet to see a client that has undo for dismissing a notification like this, and it makes server implementation considerably easier (you don't want clients being able to create bogus notifications; if they can create anything it would have to be something identical to the one they dismissed and that gets icky).

> *5. Calendar Events*
> 
> You know my opinion on this!  I think events should be able to be present in mutliple Calendars, so calendarIds becomes a map of { "id" : true, "id2": true } instead of a single value.
> 
> Of course that doesn't map well with copying stuff out of the "defaults" fields of the calendar into the event when it's created

Nothing is copied on create. Inheritance from the calendar is live. e.g. If you set the event to useDefaultAlerts then change the default alerts on the calendar it's in, the new defaults now apply to the event. Inheriting this from multiple calendars would just be a mess (same for time zone for floating events etc.)

> *5.8.  CalendarEvent/set*
> 
>    o  *sendSchedulingMessages*: "Boolean" (default: true) If true then
      any changes to scheduled events will be sent to all the
      participants (if the user is an owner of the event) or back to the
      owners (otherwise).  If false, the changes only affect this
      calendar and no scheduling messages will be sent.
> 
> Speaking of which - I believe the default should be false here.  Clients can easily be built to automatically add it, and the wording needs to say that it's not an error to set this even if none of the events are scheduling events... but things should default to less impactful and the client should ask for impacts - and sending scheduling messages is an impact.  The ICALENDAR default is the wrong one, and we should fix that here.

Sure, fine by me.

> *9. IANA Considerations*
> 
> There are a few fields which have been specified as an enumeration, e.g. Calendar/role, and "Per User Properties" in JSEvent.  Should there be registries created for these?

Yes, I think there should.

Neil.