Re: [Uta] smtp-sts-04 JSON

Viktor Dukhovni <ietf-dane@dukhovni.org> Tue, 25 April 2017 14:20 UTC

Return-Path: <ietf-dane@dukhovni.org>
X-Original-To: uta@ietfa.amsl.com
Delivered-To: uta@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0E7AF131462 for <uta@ietfa.amsl.com>; Tue, 25 Apr 2017 07:20:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 1gzyHpvZam_t for <uta@ietfa.amsl.com>; Tue, 25 Apr 2017 07:20:37 -0700 (PDT)
Received: from mournblade.imrryr.org (mournblade.imrryr.org [108.5.242.66]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5BED2131453 for <uta@ietf.org>; Tue, 25 Apr 2017 07:20:37 -0700 (PDT)
Received: from vpro.lan (cpe-74-71-8-253.nyc.res.rr.com [74.71.8.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mournblade.imrryr.org (Postfix) with ESMTPSA id A389D7A32F1 for <uta@ietf.org>; Tue, 25 Apr 2017 14:20:36 +0000 (UTC) (envelope-from ietf-dane@dukhovni.org)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
From: Viktor Dukhovni <ietf-dane@dukhovni.org>
In-Reply-To: <13bc4a95d8a44bb8a40a0fbb75eb6221@usma1ex-dag1mb1.msg.corp.akamai.com>
Date: Tue, 25 Apr 2017 10:20:35 -0400
Content-Transfer-Encoding: quoted-printable
Reply-To: uta@ietf.org
Message-Id: <50C47476-2C98-4C65-B6AC-43C166771369@dukhovni.org>
References: <52dde16a-a3bb-5844-7daa-a349def85049@wizmail.org> <80676A32-78CB-4FFA-AEE4-94DA95102B98@dukhovni.org> <a2a6e5f5-ff3b-272b-abda-b49fe23a485d@wizmail.org> <605FE793-3D82-4C4F-9F93-D50DF4320DF5@dukhovni.org> <9402ac0a4990432f994656ddaf94b9e2@COPDCEX19.cable.comcast.com> <CE55E42E-9845-46A6-B0AA-F56CE56F2936@dukhovni.org> <CANtKdUevHbQaUga2=X0tFy4K=po=DL=pKUn-2KZQgRUPTtYAig@mail.gmail.com> <DE3A2AC6-63C0-4C17-9D9E-BF9CB2B3A289@dukhovni.org> <CANtKdUer3CSruZRf-mXp+yvMKY_kCTaQ1vyZGVenNgVf5a9T2g@mail.gmail.com> <907547420.8067868.1493073246224@mail.yahoo.com> <271D533C-7C48-438C-8BBE-0EEC0DFB92DF@dukhovni.org> <1706958889.8319848.1493094113668@mail.yahoo.com> <3BFAA188-A456-4159-B529-1CB1EFA4AAA5@dukhovni.org> <13bc4a95d8a44bb8a40a0fbb75eb6221@usma1ex-dag1mb1.msg.corp.akamai.com>
To: uta@ietf.org
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/uta/3edDEYrw42l1rRs4ETXiEHIcl6U>
Subject: Re: [Uta] smtp-sts-04 JSON
X-BeenThere: uta@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: UTA working group mailing list <uta.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/uta>, <mailto:uta-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/uta/>
List-Post: <mailto:uta@ietf.org>
List-Help: <mailto:uta-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/uta>, <mailto:uta-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Apr 2017 14:20:39 -0000

> On Apr 25, 2017, at 8:31 AM, Salz, Rich <rsalz@akamai.com> wrote:
> 
>> 
>> There's no reason for an RFC to describe trivial lists of pairs.
> 
> Sure there is, because folks will want whitespace, want to linearize it, support Unicode, etc.

As soon as you ask for a generally applicable syntax you end with
ASN.1, JSON, XML, ...  There's no shortage of power tools, but our
needs here are trivial, and the sensible thing to do is to specify
the simplest grammar that meets all the needs.

   * No nested lists
   * No multiple objects
   * No DTDs
   * No separate string, array, integer types
   * No complex libraries with CVEs (https://www.suse.com/security/cve/CVE-2015-8863/)

Parsing a line that contains a key and a value is trivial.  There's a bit
of mostly irrelevant bike-shedding over whether that syntax should be:

	<KEY> 1*<WSP> VALUE 0*<WSP> <CRLF>
or
	<KEY> 0*<WSP> = 0*<WSP> <VALUE> 0*<WSP> <CRLF>

where <CRLF> is either of <CR><LF> or just <LF>, and
each character of KEY and VALUE is ASCII alphanumeric
or one of ".", "-", "+".  The value encoding is "xtext"
from https://tools.ietf.org/html/rfc3461#section-4, but
none of the STSv1 keys require or shall permit hex-encoded
xtext characters.  Thus "+" may appear only in presently
ignored keys from some future update of the protocol in
which some additional policy element requires extended
characters.

Therefore parsers don't need, and will likely never need
to actually implement xtext, that's just there to avoid
objections that we may need (however unlikely) something
more general some day.

Speaking of extensibility, I don't see any reasonable
migration path from STSv1 to STSv2, except by changing
the .well-known URI, in which case putting the version
in the policy, rather than the URL is of little value.

I doubt any site will want to shut out all the deployed
STSv1 clients by switching to a hypothetical STSv2.

Therefore, we can either put a list of supported STS
versions in the DNS TXT record or live with STSv1 for
ever (likely the simplest approach, just add more
key/value pairs as needed and maintain a backwards
compatible interface).

A needlessly complex alternative is either multiple
blocks of key/value pairs separated by a blank line
with block specific to its own STS version, which
must come first, or, worse still, a list of JSON
objects.

-- 
	Viktor.