Re: Secdir last call review of draft-ietf-httpbis-compression-dictionary-09

Patrick Meenan <pmeenan@google.com> Wed, 07 August 2024 23:48 UTC

Received: by ietfa.amsl.com (Postfix) id 968E0C18DB85; Wed, 7 Aug 2024 16:48:58 -0700 (PDT)
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 94A1AC1840FD for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 7 Aug 2024 16:48:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.361
X-Spam-Level:
X-Spam-Status: No, score=-10.361 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, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=w3.org header.b="hEtPTluZ"; dkim=pass (2048-bit key) header.d=w3.org header.b="iiRwrV2H"; dkim=pass (2048-bit key) header.d=google.com header.b="rhL9ZQni"
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 f3kORUg-KS9a for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 7 Aug 2024 16:48:58 -0700 (PDT)
Received: from mab.w3.org (mab.w3.org [IPv6:2600:1f18:7d7a:2700:d091:4b25:8566:8113]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D988DC19ECB9 for <httpbisa-archive-bis2Juki@ietf.org>; Wed, 7 Aug 2024 16:48:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Subject:Content-Type:Cc:To:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To; bh=JiPH1PRo5avLF8s6OXEH+hzYjxSQTzqoKtjcQJRbVzw=; b=hEtPTluZoLDbK4skahmtj/wO4N utSmmRBrleW+AqBRjgTDRT29hxUHw9Ny3Yb5HQLYDUBWeQ2du0X25a1LwOpEQU6Nd+88Av4+HzlWQ sz/ijH24TSjwlrilntyAaY5n1GKfTM5ENx/o+NaAwux7Fze7xoHDZBT39eV5eQyzYuoBrvPGrWH83 WA0GX9RcAA0KDHmJcCCcqp9vwjDORzXJrZ0uzhfO1nMbRMEvh6Dq7R7+isr7yd7pEuh4eu7+U3jEg 0Yx4eDsLwoV8PTCqvc52y1SUoWPRKFZXngQHOQO5W34xu+HheRP8YUMl8+Uz0+t0lxN3bTKNgqUv5 pXOnrZhA==;
Received: from lists by mab.w3.org with local (Exim 4.96) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1sbqOG-007kOw-3A for ietf-http-wg-dist@listhub.w3.org; Wed, 07 Aug 2024 23:48:24 +0000
Resent-Date: Wed, 07 Aug 2024 23:48:24 +0000
Resent-Message-Id: <E1sbqOG-007kOw-3A@mab.w3.org>
Received: from ip-10-0-0-144.ec2.internal ([10.0.0.144] helo=pan.w3.org) by mab.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <pmeenan@google.com>) id 1sbqOF-007kO8-0A for ietf-http-wg@listhub.w3.internal; Wed, 07 Aug 2024 23:48:23 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To; bh=JiPH1PRo5avLF8s6OXEH+hzYjxSQTzqoKtjcQJRbVzw=; t=1723074503; x=1723938503; b=iiRwrV2Hp/SeEcdkq9l6GdckVEn+afwZdN907I+n0FPPfrF3QIHgxqPGH1YM88IXDmUKlDV43hq 4+9Ap1q59pm2t9ODd8eJJ00+PJ8+9aQwUXeW3gRgZkijt64uSYD+qEgr0Lt4HGTHUTrN6cEjYsEFh 2YWqU6i4Q//ZHTUEOgKLEk4ZDYeX3qH4B5EQdVy74pLtHFOdSLd5/wN8B4ocB0CEL+nmaZ1RP2T/4 nR4ZFjkYRfp/XgFDCFtBLtItZdgfE8qw0lesEfC7b73CdHGVRI2FVBrwBSlXl5j9Pi1vke6p0e8AF mrwP/TFUlSDHyW9ENCOvGcbIGNpVw62p5Oug==;
Received-SPF: pass (pan.w3.org: domain of google.com designates 2607:f8b0:4864:20::b30 as permitted sender) client-ip=2607:f8b0:4864:20::b30; envelope-from=pmeenan@google.com; helo=mail-yb1-xb30.google.com;
Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]) by pan.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from <pmeenan@google.com>) id 1sbqOE-000Sk0-1d for ietf-http-wg@w3.org; Wed, 07 Aug 2024 23:48:22 +0000
Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-e05ef3aefcfso338714276.2 for <ietf-http-wg@w3.org>; Wed, 07 Aug 2024 16:48:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1723074499; x=1723679299; darn=w3.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JiPH1PRo5avLF8s6OXEH+hzYjxSQTzqoKtjcQJRbVzw=; b=rhL9ZQnib7Z1/aV5FHO+bf0NP7b+2kwHM48dOVRmBwcxSYslviXovVkaUb86fpcqur 3wy27pFjGGQOUv52Sx5WfXaH6VWmMGv3xO+1Y2WZW//LsgkxqpUccf2BVoAXP9WALnFj yv2fMNnniYSvUYgcyC3p89fTTuBeb3M62Eq41/CjW38HC5O6QQF94asbmRx+fjSu7VDe WLwTK6Q07NYkHjec2zW31Ue5sGXKedS6LlG1yIxOqRcx4c/6eV0yUnNZwwUvQfGh1JgE PcjcoIJ9N0VXnWgcmGA0Yd7QtdSX0rO4FpekMiY598g9xeDCMISU53Ap4O2kb9Hj/Ne/ 83tw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723074499; x=1723679299; 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=JiPH1PRo5avLF8s6OXEH+hzYjxSQTzqoKtjcQJRbVzw=; b=W9zHiaHmH4sNtpMN/kKBvKTmCdxVkcVckn+eKfEIICLe9M7NEJmkKO3SCeVfaJqc32 IYH1GC8L+FUjjQPKZfgk5ZgApv8b+baFXeOlUqojaABfSNEL+u6+5RfA5JEEVehNujQ4 3cSC4pqDNWinh7CijrVEDKrwwLv9goeZhbU6gitrTQU5z/XQ6huRk+/YMI3TDdxF2rYO 6Q8Wt8x9mO0TOReKwIKUQNvgrsQQ9rznEbWiJnVG1udGtzkzEjKKWhYhpgFt2CvR0N9N 1xE0h17QAQOYOeluOcu3GuL20BXLpXZ+41BH3/dXoZ5nVyhT+U+ouPI2cKxA+2DixhgH 0LxQ==
X-Forwarded-Encrypted: i=1; AJvYcCVrRK6V/PmPr+U22tj/GtHq5IDTP7Ucy3JtDoU74uLdSX+fAtzm/5zRIggtQxHLDjHqkXTtLGoDm12bQ0wb4UWw7cZE
X-Gm-Message-State: AOJu0YyYHWK8/eaMzk3O/yrXXi9pGPoasa2QR/spyoXoKmEc5BI+q5x0 7MjOOfa1xPeK9YAHpMdzH3dACm3M9ftf4Sal79kwsLj/adKV4o1BJsdq2RVBuwc2Dnpg4MkY7GF D38ZagjXwJfcgpW720Z1RhVN5cAr2w/LoP/eU
X-Google-Smtp-Source: AGHT+IE8tWYcc8ET8FflrJWbfQr463uNUQpRrPcoZxwgrEUfbpCFXbHkqOMClKSYGuM/n6FaoD1TIcqXuVlGIihsM38=
X-Received: by 2002:a05:6902:13ce:b0:e0b:43f4:b541 with SMTP id 3f1490d57ef6-e0e9da7f6b7mr247393276.12.1723074498606; Wed, 07 Aug 2024 16:48:18 -0700 (PDT)
MIME-Version: 1.0
References: <172307181050.195.15472875602261483639@dt-datatracker-6df4c9dcf5-t2x2k> <CACPgMqWT_jaqM2U94oV9=GX-iQL_3WwCAxrazQgZinODWoP2Ew@mail.gmail.com>
In-Reply-To: <CACPgMqWT_jaqM2U94oV9=GX-iQL_3WwCAxrazQgZinODWoP2Ew@mail.gmail.com>
From: Patrick Meenan <pmeenan@google.com>
Date: Wed, 07 Aug 2024 19:48:07 -0400
Message-ID: <CACPgMqWURj5ib98w=BV3NjCg=o632erMfWOPA0fFvJDAH4Kn2w@mail.gmail.com>
To: Nancy Cam-Winget <ncamwing@cisco.com>
Cc: secdir@ietf.org, draft-ietf-httpbis-compression-dictionary.all@ietf.org, ietf-http-wg@w3.org, last-call@ietf.org
Content-Type: multipart/alternative; boundary="0000000000006a545d061f208bd8"
X-W3C-Hub-DKIM-Status: validation passed: (address=pmeenan@google.com domain=google.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-21.6
X-W3C-Hub-Spam-Report: 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, DMARC_PASS=-0.001, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: pan.w3.org 1sbqOE-000Sk0-1d f3ac73550f559c36fc3ab7e8f6d5fe46
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Secdir last call review of draft-ietf-httpbis-compression-dictionary-09
Archived-At: <https://www.w3.org/mid/CACPgMqWURj5ib98w=BV3NjCg=o632erMfWOPA0fFvJDAH4Kn2w@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/52195
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/email/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Quick follow-up...

As an example of where it makes deployment a little easier, for the case of
static resources (like a Javascript bundle) where the deltas are generated
at build time and stored as something like "example.js.<hash>.brd", The
serving path for the resource doesn't need to calculate the hash of
example.js when it is served and doesn't need to make sure the ID matches
the specific payload. It can be configured to serve a static
"Use-As-Dictionary: " response header with just a match path and the same
header can work as new versions of the resource roll out.

At serving time, if there is an "Available-Dictionary" request header, the
server can first check to see if "example.js.<hash>.brd" exists with a
matching hash and serve it if there is one (and fall back to the full
example.js if there isn't). By varying on the encoding and
available-dictionary, any CDN's can cache the dictionary-specific response
which minimizes the amount of dynamic logic that needs to run to serve
dictionary-compressed deltas.

On Wed, Aug 7, 2024 at 7:40 PM Patrick Meenan <pmeenan@google.com> wrote:

> Thank you for the review.
>
> The intent of providing the hash of the "Available-Dictionary" is to be
> sure that the contents of the dictionary on the client are the same as what
> the server is using for the compression (more for integrity than anything
> else). It also acts as a default identifier in the negotiation if an
> explicit ID isn't provided. Both ZStandard and Brotli also use hashes to
> verify the dictionary before decompression to prevent corruption but
> providing it in the request header allows for the server to not send an
> invalid response in the first place in case the payloads got modified
> somewhere in the path previously or something else got out of sync.
>
> It is allowed (and expected) that there may be multiple dictionaries for
> the same resource (i.e. version 1.1 of example.js and version 1.2 of
> example.js both used as dictionaries for version 1.3 for different delta
> updates) and the hash makes differentiating them automatic (and standard).
>
> It's not meant as a protection against explicit attack - that is expected
> to be handled by the transport itself (encryption, cert verification, etc).
> An attack on the dictionary or payload would have the same risks and
> vulnerabilities as an attack on the uncompressed response itself (that part
> is where the same-origin dictionary/payload requirement comes from).
>
> Thanks,
>
> -Pat
>
> On Wed, Aug 7, 2024 at 7:03 PM Nancy Cam-Winget via Datatracker <
> noreply@ietf.org> wrote:
>
>> Reviewer: Nancy Cam-Winget
>> Review result: Ready
>>
>> SECDIR review of draft-ietf-httpbis-compression-dictionary-09
>>
>> Reviewer: Nancy Cam-Winget
>>
>>
>> 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.
>>
>>
>> This document defines HTTP headers that can be used for negotiating
>> for enabling compression by using dictionaries.  The negotiation
>> defines an external dictionary that provides the mapping or patterns
>> to decode when compression is enabled.  The document leverages the use
>> of Brotli (RFC7932) and Standard (RFC8878) as the compression schemes.
>>
>>
>> The document reads well and I have found no issues but have
>> One minor question:
>>
>> Section 2.2
>> * Is the intent of providing the hash of the "Available-Dictionary"
>> meant to be for protection or for compression?
>>
>> Section 9.1
>> * To my point in Section 2.2, we presume that all headers are
>> encrypted and protected, so I think it would depend on what protection
>> is being achieved. That is, I think it should be stated that if the
>> header protection is found to be weak, this can be made vulnerable too
>> (I think this is somewhat covered in 9.2 maybe?)
>>
>>
>>
>>