Re: HTTP Signing

Roberto Polli <robipolli@gmail.com> Fri, 22 November 2019 12:45 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4D3971200A1 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 22 Nov 2019 04:45:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.751
X-Spam-Level:
X-Spam-Status: No, score=-2.751 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, 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 wY4TK3l1RTIo for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 22 Nov 2019 04:45:50 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [IPv6:2603:400a:ffff:804:801e:34:0:38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 632F2120088 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 22 Nov 2019 04:45:50 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1iY8IC-0005fL-Jx for ietf-http-wg-dist@listhub.w3.org; Fri, 22 Nov 2019 12:44:08 +0000
Resent-Date: Fri, 22 Nov 2019 12:44:08 +0000
Resent-Message-Id: <E1iY8IC-0005fL-Jx@frink.w3.org>
Received: from mimas.w3.org ([2603:400a:ffff:804:801e:34:0:4f]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <robipolli@gmail.com>) id 1iY8IA-0005ei-9d for ietf-http-wg@listhub.w3.org; Fri, 22 Nov 2019 12:44:06 +0000
Received: from mail-ua1-x942.google.com ([2607:f8b0:4864:20::942]) by mimas.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <robipolli@gmail.com>) id 1iY8I8-00041Y-Mb for ietf-http-wg@w3.org; Fri, 22 Nov 2019 12:44:06 +0000
Received: by mail-ua1-x942.google.com with SMTP id s25so2115741uap.1 for <ietf-http-wg@w3.org>; Fri, 22 Nov 2019 04:44:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2798pp6Bj8oEs0i6QBPcGFbKMlAHJ0jTPo87yhDYN6E=; b=FsMf4+/T/5w/Ru3tUTdItRB7eQLub1w9/uUtVXXxy0WBHSk2ySF3Bu4Uadq1l7W6gG Szd0lvBARx67zSbPDJLaXIwBm8zuueB5BhKYpC6lsmFPePC736ctTCXNgKlj6Icf63QZ BQT7NuzQ42egN7xYZB7c+f4hmGT2eJs5f1OS1DckP11sFijVFuFRw5Otn2d/k2oCSujO 8ufkTQqWRwr05GZG7nVZhGr8RBzFRunxXZO0/Z0SlYLepIh35zYSkZfJep1Rn5bUWbpV sPrMCj3dG0v/ZoqnxTi1BVO8HlZkM5Sl7Azq88QVY2dlzj2S45IiBn3HblcemVxi84di /yhg==
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:content-transfer-encoding; bh=2798pp6Bj8oEs0i6QBPcGFbKMlAHJ0jTPo87yhDYN6E=; b=Ap3Y8p3kxHR7DwIm2Yq/9KWNiwISixac17weZYa/+7mB0fW44ZE6HPfwQKI5/+x/cG AwXmdNgcXVlIlHIM+3ZTySrIPOUO5vlp1wWZZsy2nDqxZCbES6FMrKXTSgc2uwhbiFat K5EGtHksn/BAkZXtjEsFuWSE7bT00OJfk3Bk3SFzqSnAW+DJNfvx0Oc4vc+dSBOPVUz6 aRLn3EFXyxH5EuWgXXazxq/+6Xr/3xl8YdsqxfyRZ3gZ6Jg5ODPe5yZITYR5UBvLW355 3BypGnQSdnkCJTuohfLQJ60mwjKHektsTVRZ7nRpiabvmmQRArbrdHGQvhU2yR5ID+eW 9vsQ==
X-Gm-Message-State: APjAAAX9936d1c/FaQ2uccYbAt9VvOgc5SwkMIFppXJrc1Ost8Mjm8f/ YSYVMXbcqi2XCfQc5cxEseOtZVnhHf8zyhLImGw=
X-Google-Smtp-Source: APXvYqwBYa0G/y/NkvGHofdC2/m7Mi/a9PbEtI9SCQABp5jEiO48/UtnfT8Moyliu4aNtcZCgAbFEdbka6foQgaD8r4=
X-Received: by 2002:ab0:396:: with SMTP id 22mr10011817uau.72.1574426643389; Fri, 22 Nov 2019 04:44:03 -0800 (PST)
MIME-Version: 1.0
References: <CAChr6SwoGTULzG5jKsEbPRbzb1qK6F-sKT8ArEyQ3BA6T78YAQ@mail.gmail.com> <CAP9qbHXSAam1i=6B7mnEpPh3d-yzVOLQk2Vj25f9QNsoe0uaaw@mail.gmail.com> <3827BF1B-C7D7-45F5-833A-07CA72B64A12@amazon.com>
In-Reply-To: <3827BF1B-C7D7-45F5-833A-07CA72B64A12@amazon.com>
From: Roberto Polli <robipolli@gmail.com>
Date: Fri, 22 Nov 2019 13:43:51 +0100
Message-ID: <CAP9qbHU8wxrobYsV1sUsF9vdRAdetQ3Z8fcY-Y=sNdkLhHkYLw@mail.gmail.com>
To: "Richard Backman, Annabelle" <richanna@amazon.com>
Cc: Rob Sayre <sayrer@gmail.com>, Liam Dennehy <liam@wiemax.net>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2607:f8b0:4864:20::942; envelope-from=robipolli@gmail.com; helo=mail-ua1-x942.google.com
X-W3C-Hub-Spam-Status: No, score=-5.1
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1iY8I8-00041Y-Mb 488d81a6b7af540dc5f68969e57576c0
X-Original-To: ietf-http-wg@w3.org
Subject: Re: HTTP Signing
Archived-At: <https://www.w3.org/mid/CAP9qbHU8wxrobYsV1sUsF9vdRAdetQ3Z8fcY-Y=sNdkLhHkYLw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37175
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Hi A.

Il giorno ven 22 nov 2019 alle ore 12:10 Richard Backman, Annabelle
<richanna@amazon.com> ha scritto:
> [..] flexibility regarding what protocol elements are covered by the signature,
> [..and ..] rigorous canonicalization language.
> [..] these two concepts are the key to success here.

Agree, though AWS4 serialization could avoid specifying payload serialization
and delegate it to Digest (see https://github.com/martinthomson/http-mice and
the resulting revision of
https://httpwg.org/http-extensions/draft-ietf-httpbis-digest-headers.html).
Serializing the payload body brings the same problems that affected Content-MD5
 https://github.com/httpwg/http-core/issues/93

> [..] produce a core signing specification that defines signature generation and validation
> without getting prescriptive about what elements get signed.
> That can then be profiled (here in http, in oauth, in OpenID FAPI, ...) as needed.

My experience with pre-11 draft-cavage resulted in insecure
implementations due to under-specification
about which fields to sign. Please see
https://github.com/w3c-dvcg/http-signatures/issues/35 between the
others.
While we can define the general procedures, we should provide a table
or something of required fields
thus avoiding to address issues in future docs (eg. see JWT and
https://datatracker.ietf.org/doc/draft-ietf-oauth-jwt-bcp/).

> That core spec is what I am currently working on, starting from cavage.
> I hope to have an I-D ready to present to the working group for adoption before the end of this year.

It would be great to see your ongoing work!
I'm following the draft-cavage implementation
from some time now, and we should try to make some merge work.
I think we should take into consideration all the work done by
https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html.

Thanks for sharing
and have a nice day,
R.

> Here are a couple links, in case anyone is interested in learning more about SigV4:
>  - Public documentation: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
>  - Informational presentation I gave at IETF 105: https://www.youtube.com/watch?v=tUmT5qqlKik&feature=youtu.be&t=6400
>
> –
> Annabelle Richard Backman
> AWS Identity
>
>
> On 11/22/19, 4:52 PM, "Roberto Polli" <robipolli@gmail.com> wrote:
>
>     Hi Rob & co,
>
>     Il giorno ven 22 nov 2019 alle ore 07:05 Rob Sayre <sayrer@gmail.com>
>     ha scritto:
>     > I saw the "HTTP Signing" presentation in the SECDISPATCH meeting on YouTube[1], and it seems like it's going to end up in this WG.
>     Interesting thread: the video is at
>     https://www.youtube.com/watch?v=CYBhLQ0-fwE&t=3000
>
>     >  I'd like to suggest adopting something very similar to AWSv4.
>     iiuc the approach of draft-cavage and signed-exchange is very similar
>     and the signed-exchange workgroup made a lot of progresses.
>     AWSv4 seems to me quite limited and IMHO if you expand it you'll
>     eventually end with
>     draft-cavage or http-signatures.
>
>     > I've implemented the server side of AWSv4 [...]
>     > it's possible to use off-the-shelf AWSv4 client SDKs, make up your own "service" name, and implement the server side of the protocol
>     Understand, though AWS can change that sdk in the future as that's
>     tied to their infrastructure.
>
>     > [1] https://www.youtube.com/watch?v=CYBhLQ0-fwE
>     > [2] https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html
>
>     Regards,
>     R.
>
>
>