Re: [Webpush] Opsdir last call review of draft-ietf-webpush-vapid-03

Martin Thomson <martin.thomson@gmail.com> Tue, 04 July 2017 00:14 UTC

Return-Path: <martin.thomson@gmail.com>
X-Original-To: webpush@ietfa.amsl.com
Delivered-To: webpush@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 398221317FF; Mon, 3 Jul 2017 17:14:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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=gmail.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 h1MA8cOlZKDS; Mon, 3 Jul 2017 17:14:07 -0700 (PDT)
Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com [IPv6:2a00:1450:4010:c07::22a]) (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 4EECE1317AE; Mon, 3 Jul 2017 17:14:07 -0700 (PDT)
Received: by mail-lf0-x22a.google.com with SMTP id t72so528247lff.1; Mon, 03 Jul 2017 17:14:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LURtEY7WlNeKhgLd435kgVoHEAVVrCBiG6fcdmvoCAI=; b=Dz1CCSZIMV2y4PnfvhA0v4jP/OUR3UFOXjXI5h4eXgvTsjw+LdWPTjQp3VlVlUxbOE yskpmHvvm94hgRnOksPPrMg9OQ2FNX3fbIB0b3to+2rmL+AUJwuzEUS3jsHktFK3zRHA Q0wgic5ndt2BZzcNsmZW47n4JV2lczzVQDIxU8DmZ1NLIftNfiERBsjCf5qO3oPilxdA i1Ei5Kk2gK8V5yevKz3ylrRrRYcgGtvqUh/YwHaiOyXOukkUu66rVhHIhjlrkzeRnywa 4PvWB48/Y+QF4sGolpDQrgMBXTxMRttNAsZ+lzyrXcXnhNCQlqX+hII24HtY042oR+XX qfsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LURtEY7WlNeKhgLd435kgVoHEAVVrCBiG6fcdmvoCAI=; b=GuOAh0hO/+67+5UcDSDO47pSgxu4xLfdK2eSUprx9Ko0aGeUkoSrrcZoYvMepsFtdj wE3t2uJIH7Xz+xZ4i79RkPmhslM0isYfAWvsWF8Mc1SKi8R7wTedJ0t3IVPONIJlDkmz Yhu/MuVa2l+JqA7MKbj/Nrf2czqiFmL+QF97hrITsUXgPDXbg2pFUAWg/Ez+yD+S0BIB /6nKiurhRBXbe5jSCMDruGxE854RwaVLi1xBuboHLz3E0gT//0QDk8nn5PXeVHuWB2e2 /oGArRWZtSuETPlC2T7K7u/hcGOM9X5QS8GOrQOQvLAMlOcon5gl8oY1bsw+KY4pUw9K LMxQ==
X-Gm-Message-State: AIVw1130br6GVDRHirDbonhHxp/zWxYfv41OaAbPiUxfWF+fljNQriTG ssIB/f/ANXQmUZzeJQVvWRA8Dcxw1rev9sE=
X-Received: by 10.46.83.7 with SMTP id h7mr1877217ljb.22.1499127245540; Mon, 03 Jul 2017 17:14:05 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.46.69.84 with HTTP; Mon, 3 Jul 2017 17:14:04 -0700 (PDT)
In-Reply-To: <bb3631d2-f5b5-d6b0-958f-ac9c10aaddec@nostrum.com>
References: <149909744835.22804.5791695515985213782@ietfa.amsl.com> <bb3631d2-f5b5-d6b0-958f-ac9c10aaddec@nostrum.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Tue, 4 Jul 2017 10:14:04 +1000
Message-ID: <CABkgnnUXMiMYYvmT2tV3=V_J3JGc2Cqvyo0R30nY27vL52t7eA@mail.gmail.com>
To: Adam Roach <adam@nostrum.com>
Cc: Stefan Winter <stefan.winter@restena.lu>, "ops-dir@ietf.org" <ops-dir@ietf.org>, "webpush@ietf.org" <webpush@ietf.org>, "ietf@ietf.org" <ietf@ietf.org>, draft-ietf-webpush-vapid.all@ietf.org
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/webpush/_fJrPZginvQAhUZ4-ZcHw9LUFUA>
Subject: Re: [Webpush] Opsdir last call review of draft-ietf-webpush-vapid-03
X-BeenThere: webpush@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Discussion of potential IETF work on a web push protocol <webpush.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/webpush>, <mailto:webpush-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/webpush/>
List-Post: <mailto:webpush@ietf.org>
List-Help: <mailto:webpush-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/webpush>, <mailto:webpush-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 04 Jul 2017 00:14:09 -0000

On 4 July 2017 at 03:31, Adam Roach <adam@nostrum.com>; wrote:
> # echo
> eyJhdWQiOiJodHRwczovL3B1c2guZXhhbXBsZS5uZXQiLCJleHAiOjE0NTM1MjM3NjgsInN1YiI6Im1haWx0bzpwdXNoQGV4YW1wbGUuY29tIn0
> | base64 --decode
>
> {"aud":"https://push.example.net","exp":1453523768,"sub":"mailto:push@example.com

I get this:

$ echo eyJhdWQiOiJodHRwczovL3B1c2guZXhhbXBsZS5uZXQiLCJleHAiOjE0NTM1MjM3NjgsInN1YiI6Im1haWx0bzpwdXNoQGV4YW1wbGUuY29tIn0
| base64 --decode
{"aud":"https://push.example.net","exp":1453523768,"sub":"mailto:push@example.com"}base64:
invalid input

Which fills me with confidence in the base64 tool.  You'll note that
the trailing quote and curly brace are present here, but there is an
inexplicable error that adding the -i option doesn't remove.

I built this using my own implementation and verified it, but you will
see that this works too:

$ npm install base64url;node -e
'console.log(require("base64url").decode("eyJhdWQiOiJodHRwczovL3B1c2guZXhhbXBsZS5uZXQiLCJleHAiOjE0NTM1MjM3NjgsInN1YiI6Im1haWx0bzpwdXNoQGV4YW1wbGUuY29tIn0"))'
{"aud":"https://push.example.net","exp":1453523768,"sub":"mailto:push@example.com"}

(note that running this leaves a node_modules lying around).

https://www.base64decode.org/ also agrees.