[httpapi] ratelimit headers with Structured fields syntax

Roberto Polli <robipolli@gmail.com> Tue, 03 August 2021 09:47 UTC

Return-Path: <robipolli@gmail.com>
X-Original-To: httpapi@ietfa.amsl.com
Delivered-To: httpapi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 784DB3A1C02 for <httpapi@ietfa.amsl.com>; Tue, 3 Aug 2021 02:47:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 ks0m60bj6nHH for <httpapi@ietfa.amsl.com>; Tue, 3 Aug 2021 02:47:29 -0700 (PDT)
Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) (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 72C713A1BFF for <httpapi@ietf.org>; Tue, 3 Aug 2021 02:47:29 -0700 (PDT)
Received: by mail-io1-xd33.google.com with SMTP id a1so8921792ioa.12 for <httpapi@ietf.org>; Tue, 03 Aug 2021 02:47:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Q0PgqQw+dI0q3zTuUKLb2DFHzCqr+UqVf1eDcTGKCuU=; b=l9dErLoeMxVpD6wnmAjKotjQJ/qujcMKbp9U3BovWA+0ABUnSO7rCxZxS8dVNsUgyC 3dZUqWoUCLDj2shF9knFgk+aABYOAoDcZ08ygJ2jqWiwCvEGqMyIacsQHwvU+dS5rnxt IAKSXJc93eIQOM0zVty43GGt2ni4r20wEOqZUt1oOM+d/53tMvMwa4qEzU1avHtZjTiy mO6JRBbJORO0NRoQbU1SquFgqLZXAviyyZ8odU5YL8wKfJY47Ho98bDP/+fT6cOYGanQ ICn8IAcCHfxZwlEP5EkaPhN7Pj1jCx5EzYMlZplm35QpH8WGHvb8ZUR+uJWIbkrWa0gl kG0Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Q0PgqQw+dI0q3zTuUKLb2DFHzCqr+UqVf1eDcTGKCuU=; b=e9scJ523vSjSl3J/xkPJO06Hq3a9wUQvzgnNSD0vYblWeynaFInY3UAIELqydsnGtJ KOJV+GiarNePlIiONBEj5Y5nF6Bol84Ng24VrIm9SMvclL8nk1NDTKl1xAqcewbgn4sG DrKM2vftKNq24zar3wU1lbgPWHJkhGBsF7j6LqLyjhbgFELj7YdvN6+lMKXGCZyulSB2 0/HNuKMmaHDQL7sywljiQdigR3ylDO1gVDHhA8OqqGjpoItC1gtQyjG24RCbsYS2FcbG Vnn5d4kGaSjqWtW5sNiptR2L0uZ6S4HgSAsh10EZQvglreWuNgvsr17pfkblfjGhaxSB ConQ==
X-Gm-Message-State: AOAM530IpY05EbueE4trT/RjiU/V41dvpbJSbTG2d+Wtvf4FJxgd1Uaa otpXfbpqGZKFYOlYtTwWlHWhlKSOOYMup1Pe70YGJB6MYpoP8g==
X-Google-Smtp-Source: ABdhPJwP/W7/Dind5QCcMd56rIi9dsrXJ2X069wvNUMwa2Jn7Up6OJmZRg9UlXq6Npv/fqhHvZPV25TFJtCAAbuTdhc=
X-Received: by 2002:a05:6638:3796:: with SMTP id w22mr18377398jal.34.1627984047380; Tue, 03 Aug 2021 02:47:27 -0700 (PDT)
MIME-Version: 1.0
From: Roberto Polli <robipolli@gmail.com>
Date: Tue, 03 Aug 2021 11:47:16 +0200
Message-ID: <CAP9qbHV=XX1OpVS77mZUpVqhDQm8BXhUP7H=sSJ_8aL0fOT9ew@mail.gmail.com>
To: "httpapi@ietf.org" <httpapi@ietf.org>, Alex Martinez <amr@redhat.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/httpapi/L0SPzDx4D5fD6IpTM91VKLEikLA>
Subject: [httpapi] ratelimit headers with Structured fields syntax
X-BeenThere: httpapi@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Building Blocks for HTTP APIs <httpapi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/httpapi>, <mailto:httpapi-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/httpapi/>
List-Post: <mailto:httpapi@ietf.org>
List-Help: <mailto:httpapi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/httpapi>, <mailto:httpapi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Aug 2021 09:47:35 -0000

Hi folks,

I took some time to refine a sf- proposal for RateLimit Headers.
This is the last open PR so I think that once we address this issue
the spec just needs an editorial review and is then ready for a last call.

To ease readability, I stubbed it on google docs, and you can comment it here.
If there aren't great concerns I'll create a PR:

https://docs.google.com/document/d/1rJJb7-NRk1WxAgtel02KiVd2UwvUdQPUN5XS57hPnw4/edit#

Please note that:

1. I still retain time-window, quota-units, service-limit referencing
sf-integer to be able to reference the underlying concepts
2. following rfc8941, sf-item has parameters whereas sf-integer does
not (see https://datatracker.ietf.org/doc/html/rfc8941#section-3.3
    where
    sf-item = bare-item parameters
    bare-item = sf-integer / ...
    sf-integer = ["-"]  1*15DIGIT

Thanks for your time,
R.