Re: [DNSOP] [Ext] I-D Action: draft-ietf-dnsop-svcb-https-05.txt

Ben Schwartz <bemasc@google.com> Mon, 10 May 2021 22:38 UTC

Return-Path: <bemasc@google.com>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C78EC3A2DA3 for <dnsop@ietfa.amsl.com>; Mon, 10 May 2021 15:38:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.598
X-Spam-Level:
X-Spam-Status: No, score=-17.598 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
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 i_lbSMbJg1YZ for <dnsop@ietfa.amsl.com>; Mon, 10 May 2021 15:38:26 -0700 (PDT)
Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 51E6B3A2DA2 for <dnsop@ietf.org>; Mon, 10 May 2021 15:38:26 -0700 (PDT)
Received: by mail-wm1-x334.google.com with SMTP id s5-20020a7bc0c50000b0290147d0c21c51so184398wmh.4 for <dnsop@ietf.org>; Mon, 10 May 2021 15:38:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FTZknGInxaZsQgFHq3aki8pfy5WRsEDG/VERLSc4ktU=; b=Iw8H2cjFtf6NXPTZ3MKv2i9BP8blGX6VJY7nAxPea+Ny7/zi3cOZPO+qqkR8BLFd0S pnS8h4q+06w8HlSDew/Wp33ApVkFxF8WYV/EaBKwSU/qUCiWpHlYPKNA3iII79Ydt/0R HltRgxOJ18xYJLV0PABw9+5QZjf4Raka3v/yh5pcNoxxiCIaP5Tzj0lSHU+i/YETQJ58 ghtMMyHosbrXkuoweFcM2dxyrWCCtFE8NVjT6TTCrX0aeCz1ve5zPp7q4CylDeanTicc 4AkeVnLl3x75Y20QLSJDa756QvKFqjQcgVz4gIWhULWC4/SjtCmfxmS9YxbFpt79Na59 8WPg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FTZknGInxaZsQgFHq3aki8pfy5WRsEDG/VERLSc4ktU=; b=aQysQgmVjP5a9TbyC3wGdisFDF7irVYmWezYO0t3GJRVmm7zWu9cLZMe/rIco5sCNN 1qzjfqL+p/X4y8w/ogW/WLF9Jw5AE0M39ThoPA1E/vttoyclc9ljDg8dW9J6HRoSm/lA KWzWSXCtq8/exeppmss2ovlSnfyussAi8juFK8mNCWlJ1abVzOnRnnN/0+aGxWDD1sZx cfl8++bMPc97LvImW9GMTyDu+eKYLW8nQS0e8McQLlwf7Iji1J7xIwlhbUJENl6ytdVm dZLO6Qo/SLRjp9vw0kzPayViAj+pUWbmAjBEWFuTXwJt+aVil6z54iGqgfgUU4cBNqMI wOug==
X-Gm-Message-State: AOAM5338d2QLEjyMrCEDybz1QcDPouXdQYnynItGN+cozJs9Q9Vvjf9O PT8D3dJvgA6oyxODjwHN73ufkwXmG82SrzewILN1eg==
X-Google-Smtp-Source: ABdhPJy4oJyzy7FxkDCdRRXMMcj30C+G7A0HUT8Z8cBva2vHVkk3ESroN70XsMKQjJZj6TzSUAyGZOLP3aHtKfwx/B4=
X-Received: by 2002:a05:600c:3388:: with SMTP id o8mr1514841wmp.101.1620686303040; Mon, 10 May 2021 15:38:23 -0700 (PDT)
MIME-Version: 1.0
References: <F4CE48A1-7AB0-45D0-97FF-158CE3A04EE1@icann.org> <3EE971EE-0777-44D6-9CD2-771B92FFE938@hopcount.ca> <1d822219-8ab9-2cb7-d0a4-9b8afc39058d@powerdns.com> <2952D408-117B-40D0-B859-7A8E4111629E@hopcount.ca> <CAHbrMsD+uiaYQ8i58VRjF=3AtW9uAoAtgbKzNzrPZC3QCmD2pQ@mail.gmail.com> <32EAB331-DC25-42AC-A5CD-C4FD0EBCAF94@isc.org>
In-Reply-To: <32EAB331-DC25-42AC-A5CD-C4FD0EBCAF94@isc.org>
From: Ben Schwartz <bemasc@google.com>
Date: Mon, 10 May 2021 15:38:11 -0700
Message-ID: <CAHbrMsAWsFugetHJ+sZApag+020KziQxeajaXtLVOJi8VGKL6A@mail.gmail.com>
To: Mark Andrews <marka@isc.org>
Cc: Joe Abley <jabley@hopcount.ca>, dnsop <dnsop@ietf.org>, Pieter Lexis <pieter.lexis@powerdns.com>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="00000000000068a2a105c2016f05"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/Po12aysQ4_zEUPwCha7E7trTHD8>
Subject: Re: [DNSOP] [Ext] I-D Action: draft-ietf-dnsop-svcb-https-05.txt
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 10 May 2021 22:38:31 -0000

On Mon, May 10, 2021 at 3:14 PM Mark Andrews <marka@isc.org> wrote:

>
>
> > On 11 May 2021, at 02:56, Ben Schwartz <bemasc=
> 40google.com@dmarc.ietf.org> wrote:
>
...

> > To see why I favor two-pass, consider a SvcParam whose wire format value
> is defined to be CBOR, represented as JSON in the zone file.  JSON is
> defined as UTF-16, and allows strings containing any character from the
> Basic Multilingual Plane.  It also allows various kinds of backslash
> escaping including " \" " for quotes within strings, and "\uD834\uDD1E" for
> extended unicode codepoints.  A one-pass parser must somehow integrate this
> into the flow of zone file parsing.  The easiest way is to simply disable
> all RFC1035-style escapes and line-breaks for the duration of the
> SvcParamValue, but this is a major breach of standard zone file practice,
> and raises questions about how to store UTF-16 characters in a zone file.
> Alternatively, we could somehow combine both RFC1035 and JSON escaping, but
> if this is even possible, it would seem to require writing a new
> RFC1035+JSON hybrid parser.  I also think these behaviors would be
> confusing to users, who would have to try to understand how this new
> integrated escaping works in order to author zone files containing either
> kind of escape.
>
> Yet you fail to mention that the following
>
> 3. Encoding
>
>    JSON text SHALL be encoded in Unicode.  The default encoding is
>    UTF-8.
>
> The UTF-16 JSON strings values are encoded as UTF-8.  UTF-8 in zone files
> usually ends up being \DDD for non-ASCII and ASCII control octets once it
> has gone from text -> wire -> text to put everything into ASCII printable.
> Zone files are ASCII documents.  If you are using the values in other
> contexts you may convert the
> wire forms differently.
>

It sounds like you're saying that \DDD escape processing would happen
entirely before JSON parsing.  That would be a two-pass design, just like
what the current draft says.  Consider a json value of {"a":"\\123"} (two
'\' due to escaping within a JSON string).  It sounds like, in your plan,
this would be escaped to something like jsonKey={"a":"\092\092123"}, or
perhaps jsonKey={"a":"\\\\123"}.  Those are both valid in the current SVCB
draft.

I think your solution here is exactly what is proposed in the current SVCB
draft, so I fully support it.  However, it necessarily results in
double-escaping, which is the initial concern raised in this thread.