Re: [Last-Call] Secdir last call review of draft-ietf-httpbis-digest-headers-11

Lucas Pardue <lucaspardue.24.7@gmail.com> Tue, 28 March 2023 03:38 UTC

Return-Path: <lucaspardue.24.7@gmail.com>
X-Original-To: last-call@ietfa.amsl.com
Delivered-To: last-call@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4DB63C15152E; Mon, 27 Mar 2023 20:38:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.846
X-Spam-Level:
X-Spam-Status: No, score=-1.846 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eYne8X8jpkJ7; Mon, 27 Mar 2023 20:38:05 -0700 (PDT)
Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 47771C14CEFE; Mon, 27 Mar 2023 20:38:05 -0700 (PDT)
Received: by mail-ot1-x32a.google.com with SMTP id ca2-20020a056830610200b006a11ab58c3fso5017740otb.4; Mon, 27 Mar 2023 20:38:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679974684; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5FFM7ThC9wPun/uWh4ailnBUwjT4B+AQ7gFCmCn9s60=; b=AmIvoGTcWgKfzw5YJK1iw82sYnIWcw81j0DE32DLx/FD1PbSPB+dwuYX8mPoVGfT4D 9QcUpHeIkWHSIvigOOFOaKF+ELnYe0g10MzRegxJ12YSX9YHlst9uBI2mQxzLkcOj9Uh p7B93toJ2GbqT9bL5VeoeALvJm6of7e58isCT2qtnAkkfgJKZLe3GeyjAcxN32HPUR0b ihQKlgvkF37AFCXDW0LbxBQpYvzeP1zwlFYDP7yC+4CLf6+vKWHQBTnfv5LslWZ9v9b+ vGy/SQVHeTsqiv4ezFq8v/G1b0e8RA3Zj9IXBM/xG+xzwrinhhsa6EXt6nx8CYr/Vt30 5Uwg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679974684; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5FFM7ThC9wPun/uWh4ailnBUwjT4B+AQ7gFCmCn9s60=; b=dd5Hz46ntvGb3D/HZaUzdLvvFX6/tmoIQEZOjc9phGcz8u2RTim2BzTWyihUghB/4P A+Ev2htx3T6hTfawFsVyZKIz2pZ096Q7JJmpwsehlpNaeT+95G+4WLcV/dltVlki6h0H gbUque3ex8mH94vL+/GUVGZBcH4dxeyolAd1eUkP0GKesCqPK7mfRl51DTk2b5qOQX1s WCLZeAs6vCVnb/5zoftnTyR7/Z+aXkxKJ5d4fk8lRxQ91joSYXdSuxoFL8XrExJVo4tu 8QklLJ7syAeRlxDjy3TklCSAFK7GL+yS2yXja2w8+jDf3mp2vPg7xSRV9vdY9Dtn4pUE 54Ig==
X-Gm-Message-State: AO0yUKV2CeLBpX0SScrthnvjJvw4uShAlof7M0/25lGqHKC4eI8XYHce +Lb4ay82GwASrCKzYDWDGSeev/jH4slk9jluI0c=
X-Google-Smtp-Source: AK7set+J/dkvBja5fWJJcCZQBSpiymV+xgCYAH2JS0y6p6wKsFkQer+uQ13dY8xtH2LuW/nwG2G1acNDjbf9QhNZ0x0=
X-Received: by 2002:a05:6830:146:b0:69f:1679:2faa with SMTP id j6-20020a056830014600b0069f16792faamr4645947otp.5.1679974683894; Mon, 27 Mar 2023 20:38:03 -0700 (PDT)
MIME-Version: 1.0
References: <167961638270.55374.4085269810019326477@ietfa.amsl.com>
In-Reply-To: <167961638270.55374.4085269810019326477@ietfa.amsl.com>
From: Lucas Pardue <lucaspardue.24.7@gmail.com>
Date: Tue, 28 Mar 2023 04:37:52 +0100
Message-ID: <CALGR9oYkTFNBM2kaUXn0Yh229UCihn2w09GawYYvs4qLx8YXRw@mail.gmail.com>
To: Peter Yee <peter@akayla.com>
Cc: secdir@ietf.org, draft-ietf-httpbis-digest-headers.all@ietf.org, ietf-http-wg@w3.org, last-call@ietf.org
Content-Type: multipart/alternative; boundary="00000000000043e78a05f7ed9623"
Archived-At: <https://mailarchive.ietf.org/arch/msg/last-call/xvbA-AfaoUt4KSdLYQJwSLGqyYg>
Subject: Re: [Last-Call] Secdir last call review of draft-ietf-httpbis-digest-headers-11
X-BeenThere: last-call@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: IETF Last Calls <last-call.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/last-call>, <mailto:last-call-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/last-call/>
List-Post: <mailto:last-call@ietf.org>
List-Help: <mailto:last-call-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/last-call>, <mailto:last-call-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Mar 2023 03:38:06 -0000

Hi Peter,

Thank you for the review. Responses in line

On Fri, Mar 24, 2023 at 12:06 AM Peter Yee via Datatracker <noreply@ietf.org>
wrote:

> Reviewer: Peter Yee
> Review result: Has Issues
>
> Reviewer: Peter Yee
> Review result: Has Issues
>
> I have reviewed this document as part of the security directorate's ongoing
> effort to review all IETF documents being processed by the IESG.  These
> comments were written primarily for the benefit of the security area
> directors.
> Document editors and WG chairs should treat these comments just like any
> other
> last call comments.
>
> The document specifies an HTTP integrity mechanism that replaces a prior
> one
> specified in RFC 3230. This is done with 4 new HTTP header fields and a new
> digest algorithm registry to be used with those header fields.
>
> The reason that the review result is "Has Issues" is that I disagree with
> the
> algorithm statuses assigned in Table 2 that are used to populate the Hash
> Algorithms for HTTP Digest Fields Registry. It's possible I'm way off base
> here. In the face of a malicious actor who is able to change the header
> fields
> as an HTTP message is transferred along the way to an endpoint, none of
> these
> algorithms is strong. That's fine. As noted in sections 1.2 and section
> 6.1, a
> secondary mechanism such as HTTP Message Signatures
> (draft-ietf-httpbis-message-signatures) would be needed to protect the
> field
> values in an end-to-end manner. If such a mechanism is employed, then the
> strength of the hash algorithm used in this specification is largely
> irrelevant, as the output of the hash algorithm here is not the direct
> input to
> the digital signature algorithm. Perhaps I do not understand how
> draft-ietf-httpbis-message-signatures is used to protect the header fields
> specified in this document, but I have to think the field values generated
> through this specification are merely data to be input to the combined
> digital
> signature and hash algorithms specified in
> draft-ietf-httpbis-message-signatures. To reiterate, I think the statuses
> specified for the registry are not terribly useful: in the case of a
> malicious
> actor, any of the hash values can be recalculated and substituted easily.
> In
> the case of non-malicious value mismatches, any of the hash algorithms is
> likely good enough, particularly if the underlying transport attempts to
> ensure
> that it correctly delivers data.
>

You're correct that digest on its own provides weak protection from
purposeful or malicious intent to manipulate it. You're also correct that
signatures can help protect against that and the digest fields are just
another piece of input to the signature (rather than having any special
role or distinct meaning).

I disagree that the algorithm status is not useful. Common HTTP deployment
models involve many interactions where there is no decent secondary
integration mechanism. For example, a cache that persists to disk, or "just
in time" processing at the edge. The choice of algorithm is dependent on
the needs of the application using HTTP, which includes the data in content
and the context of its use. Sometimes a weak algorithm might be sufficient
to cover those needs. Other times, the risk of something like a hash
collision could make an algorithm a severely bad choice. We can't hope to
explain all of these in the draft itself, so have chosen to highlight the
considerations and provide a clear status to implementations that need to
pick an algorithm for their needs. We also need to accept that most
implementers will lack the domain knowledge to make the correct selection.
It seems remiss to present a set of algorithms in a way that appears to
give them a level playing field, when the community does not think that. In
this light, hoping that a selection was "likely good enough" makes me
uncomfortable. Nudging people towards stronger algorithms seems to have
little downside.

To put things in a different context, some other integrity mechanisms used
regularly on the Internet, such as Subresource Integrity [1], provide
stronger normative language on the choice of algorithm. Given the legacy of
this draft, the WG consensus is that this document strikes the correct
balance between highlighting security considerations and allowing
applications to make their own decisions specific to their needs.



> I did not thoroughly read through the appendices nor attempt to validate
> the
> examples they contain. I do appreciate the inclusion of Python code to
> make it
> easier to calculate the hash values needed to validate the examples.
>

Thanks!


>
> The rest of this review is minor comments and nits.
>
> General: change all "use-cases" to "use cases" for consistent with other
> usage
> in the document.
>
> General: append a comma after all occurrences of "e.g.".
>
> Page 4, 1st partial paragraph, 1st whole sentence: change the comma after
> "connection" to a period. Capitalize the following "in".
>
> Page 5, section 1.2, 1st paragraph, 2nd sentence: change the comma after
> "message" to a period. Capitalize the following "the".
>
> Page 5, section 1,.2, 1st paragraph, last sentence: append "registry"
> after the
> quoted registry name. Also consider changing the pointer from section 5 to
> section 7.2, where the registry really gets defined.
>
> Page 5, section 1.2, 2nd paragraph, 1st sentence: insert "the" before
> "HTTP".
>
> Page 6, 1st paragraph, 1st sentence: change "Authorization" to lowercase
> "authorization" and append a comma after it.
>
> Page 6, section 1.3, 1st paragraph, 2nd sentence: delete the comma after
> "defined".
>
> Page 6, last paragraph: append a comma after the quoted "user agent".
>
> Page 12, 3rd to last paragraph, 3rd sentence: append a comma after
> "broken".
> Yeah, I like Oxford/Harvard commas.
>
> Page 13, section 6.2, 1st paragraph, 2nd sentence: insert "an" before
> "HTML".
> Append a comma after "player".
>
> Page 13, section 6.3, 2nd paragraph, 1st sentence: change "digitial" to
> "digital".
>
> Page 14, section 6.4, 3rd paragraph: change to the comma after "Section"
> to a
> period. Make "Section" lowercase. Capitalize the following "some". Change
> "pre-processing" to "preprocessing".
>
> Page 14, section 6.5, 1st paragraph, 2nd sentence: change "mulitple" to
> "multiple".
>
> Page 14, section 6.5, 1st paragraph, 3rd sentence: change the comma after
> "metadata" to a period. Capitalize the following "for". Append a comma
> after
> "instance".
>
> Page 21, Appendix A, 1st paragraph, 1st sentence: append a comma after
> "Transformations". I'm not sure that word needs to be capitalized, but HTTP
> terms is not an area with which I'm overly familiar.
>
> Page 23, Appendix B, 2nd paragraph, 3rd sentence: change "spaced" to
> "spaces".
>
> Page 36, Acknowledgements: append a comma after "Yaskin".
>
>
Thank you for these. I've applied almost all of them to the editor's copy
and they improve the readability of the document.

Cheers,
Lucas

[1] - https://www.w3.org/TR/SRI/#cryptographic-hash-functions