<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.8 (Ruby 3.2.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-wood-privacypass-auth-scheme-extensions-02" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.20.1 -->
  <front>
    <title abbrev="PrivateToken Authentication Extensions">The PrivateToken HTTP Authentication Scheme Extensions Parameter</title>
    <seriesInfo name="Internet-Draft" value="draft-wood-privacypass-auth-scheme-extensions-02"/>
    <author fullname="Scott Hendrickson">
      <organization>Google</organization>
      <address>
        <email>scott@shendrickson.com</email>
      </address>
    </author>
    <author fullname="Christopher A. Wood">
      <organization>Cloudflare, Inc.</organization>
      <address>
        <email>caw@heapingbits.net</email>
      </address>
    </author>
    <date year="2024" month="March" day="29"/>
    <area>Security</area>
    <workgroup>Privacy Pass</workgroup>
    <keyword>token</keyword>
    <abstract>
      <?line 38?>

<t>This document specifies a new parameter for the "PrivateToken" HTTP authentication
scheme. This purpose of this parameter is to carry extensions for Privacy Pass
protocols that support public metadata.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://chris-wood.github.io/draft-wood-privacypass-extensible-token/draft-wood-privacypass-extensible-token.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-wood-privacypass-auth-scheme-extensions/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Privacy Pass Working Group mailing list (<eref target="mailto:privacy-pass@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/privacy-pass/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/privacy-pass/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/chris-wood/draft-wood-privacypass-extensible-token"/>.</t>
    </note>
  </front>
  <middle>
    <?line 44?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>The primary Token structure in the "PrivateToken" HTTP authentication scheme
<xref target="AUTHSCHEME"/> is composed as follows:</t>
      <artwork><![CDATA[
struct {
    uint16_t token_type;
    uint8_t nonce[32];
    uint8_t challenge_digest[32];
    uint8_t token_key_id[Nid];
    uint8_t authenticator[Nk];
} Token;
]]></artwork>
      <t>Functionally, this structure conveys a single bit of information from the
issuance protocol: whether or not the token is valid (as indicated by a valid
authenticator value). This structure does not admit any additional information
to flow from the issuance protocol, including, for example, public metadata
that is incorporated into the issuance protocol.</t>
      <t>This document specifies a new parameter for the "PrivateToken" HTTP authentication
scheme for carrying extensions. This extensions parameter, otherwise referred to as
public metadata, is cryptographically bound to the Token structure via the Privacy
Pass issuance protocol.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="privatetoken-extensions-parameter">
      <name>PrivateToken Extensions Parameter</name>
      <t>As defined in <xref section="2.2" sectionFormat="of" target="AUTHSCHEME"/>, the "PrivateToken" authentication
scheme defines one parameter, "token", which contains the base64url-encoded
Token struct. This document defines a new parameter, "extensions," which contains
the base64url-encoded representation of the following Extensions structure.
This document follows the default padding behavior described in
<xref section="3.2" sectionFormat="of" target="RFC4648"/>, so the base64url value <bcp14>MUST</bcp14> include padding.</t>
      <artwork><![CDATA[
struct {
    ExtensionType extension_type;
    opaque extension_data<0..2^16-1>;
} Extension;

enum {
    reserved(0),
    (65535)
} ExtensionType;

struct {
    Extension extensions<0..2^16-1>;
} Extensions;
]]></artwork>
      <t>The contents of Extensions are a list of Extension values, each of which is a type-length-value
structure whose semantics are determined by the type. The type and length of each
extension are 2-octet integers, in network byte order. The length of the extensions
list is also a 2-octet integer, in network byte order.</t>
      <t>Clients, Issuers, and Origins all agree on the content and encoding of this Extensions
structure, i.e., they agree on the same type-length-value list. The list <bcp14>MUST</bcp14> be ordered
by ExtensionType value, from 0 to 65535. Extension types <bcp14>MAY</bcp14> be repeated. The value of the
Extensions structure is used as-is when verifying the value of the corresponding "token" parameter
in the "PrivateToken" authentication header. As an example, Clients presenting this extension
parameter to origins would use an Authorization header field like the following:</t>
      <artwork><![CDATA[
Authorization: PrivateToken token="abc...", extensions="def..."
]]></artwork>
      <t>Future documents may specify extensions to be included in this structure.
Registration details for these extensions are in <xref target="iana"/>.</t>
      <t>Each Privacy Pass issuance protocol, identified by a token type, specifies the structure
of the PrivateToken value to be used. Extensions are bound to the resulting tokens via the
issuance protocol. In particular, the value of an Extensions structure is provided as
metadata for the issuance protocol. Candidate issuance protocols are specified in
<xref target="PUBLIC-ISSUANCE"/>.</t>
    </section>
    <section anchor="negotiation">
      <name>Extensions Negotiation</name>
      <t>The mechanism Clients and Origins use to determine which set of extensions to provide
for redemption is out of scope for this document.</t>
      <t>In some Privacy Pass deployments, the set
of extensions may be well known to Clients and Origins and thus do not require negotiation.
In other settings, negotiation may be required. However, negotiation can raise privacy
risks, especially if negotiation can be abused by Origins for partitioning Clients and
risking Origin-Client unlinkability. Some of these risks may be mitigated if all Clients
in a given redemption context respond to negotiation in the same manner. However, if
Clients have different observable behavior, e.g., if certain extension use is determined
by user choice, Origins can observe this differential behavior and therefore partition
Clients in a redemption context.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>Privacy considerations for tokens that include additional information are discussed
in <xref section="6.1" sectionFormat="of" target="ARCHITECTURE"/>. Additional
considerations for use of extensions, including those that arise when deciding which
extensions to use, are described in <xref target="negotiation"/>.</t>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>IANA is requested to create a new "Privacy Pass PrivateToken Extensions" registry
in the "Privacy Pass Parameters" page to list possible extension values and their meaning.
Each extension has a two-byte type, so the maximum possible value is 0xFFFF = 65535.</t>
      <t>Template:</t>
      <ul spacing="normal">
        <li>
          <t>Type: The two-byte extension type</t>
        </li>
        <li>
          <t>Name: Name of the extension</t>
        </li>
        <li>
          <t>Value: Syntax and semantics of the extension</t>
        </li>
        <li>
          <t>Reference: Where this extension and its value are defined</t>
        </li>
        <li>
          <t>Notes: Any notes associated with the entry</t>
        </li>
      </ul>
      <t>New entries in this registry are subject to the Specification Required
registration policy (<xref section="4.6" sectionFormat="comma" target="RFC8126"/>). Designated experts need to
ensure that the extension is sufficiently clearly defined and, importantly,
has a clear description of the privacy implications of using the extension,
framed in the context of partitioning the client anonymity set as described
in <xref section="6.1" sectionFormat="of" target="ARCHITECTURE"/>.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="AUTHSCHEME">
          <front>
            <title>The Privacy Pass HTTP Authentication Scheme</title>
            <author fullname="Tommy Pauly" initials="T." surname="Pauly">
              <organization>Apple Inc.</organization>
            </author>
            <author fullname="Steven Valdez" initials="S." surname="Valdez">
              <organization>Google LLC</organization>
            </author>
            <author fullname="Christopher A. Wood" initials="C. A." surname="Wood">
              <organization>Cloudflare</organization>
            </author>
            <date day="23" month="October" year="2023"/>
            <abstract>
              <t>   This document defines an HTTP authentication scheme for Privacy Pass,
   a privacy-preserving authentication mechanism used for authorization.
   The authentication scheme in this document can be used by clients to
   redeem Privacy Pass tokens with an origin.  It can also be used by
   origins to challenge clients to present Privacy Pass tokens.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-privacypass-auth-scheme-15"/>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC4648">
          <front>
            <title>The Base16, Base32, and Base64 Data Encodings</title>
            <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
            <date month="October" year="2006"/>
            <abstract>
              <t>This document describes the commonly used base 64, base 32, and base 16 encoding schemes. It also discusses the use of line-feeds in encoded data, use of padding in encoded data, use of non-alphabet characters in encoded data, use of different encoding alphabets, and canonical encodings. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4648"/>
          <seriesInfo name="DOI" value="10.17487/RFC4648"/>
        </reference>
        <reference anchor="RFC8126">
          <front>
            <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
            <author fullname="M. Cotton" initials="M." surname="Cotton"/>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <author fullname="T. Narten" initials="T." surname="Narten"/>
            <date month="June" year="2017"/>
            <abstract>
              <t>Many protocols make use of points of extensibility that use constants to identify various protocol parameters. To ensure that the values in these fields do not have conflicting uses and to promote interoperability, their allocations are often coordinated by a central record keeper. For IETF protocols, that role is filled by the Internet Assigned Numbers Authority (IANA).</t>
              <t>To make assignments in a given registry prudently, guidance describing the conditions under which new values should be assigned, as well as when and how modifications to existing values can be made, is needed. This document defines a framework for the documentation of these guidelines by specification authors, in order to assure that the provided guidance for the IANA Considerations is clear and addresses the various issues that are likely in the operation of a registry.</t>
              <t>This is the third edition of this document; it obsoletes RFC 5226.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="26"/>
          <seriesInfo name="RFC" value="8126"/>
          <seriesInfo name="DOI" value="10.17487/RFC8126"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="PUBLIC-ISSUANCE">
          <front>
            <title>Public Metadata Issuance</title>
            <author fullname="Scott Hendrickson" initials="S." surname="Hendrickson">
              <organization>Google</organization>
            </author>
            <author fullname="Christopher A. Wood" initials="C. A." surname="Wood">
              <organization>Cloudflare, Inc.</organization>
            </author>
            <date day="25" month="November" year="2023"/>
            <abstract>
              <t>   This document specifies Privacy Pass issuance protocols that encode
   public information visible to the Client, Attester, Issuer, and
   Origin into each token.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-hendrickson-privacypass-public-metadata-03"/>
        </reference>
        <reference anchor="ARCHITECTURE">
          <front>
            <title>The Privacy Pass Architecture</title>
            <author fullname="Alex Davidson" initials="A." surname="Davidson">
              <organization>LIP</organization>
            </author>
            <author fullname="Jana Iyengar" initials="J." surname="Iyengar">
              <organization>Fastly</organization>
            </author>
            <author fullname="Christopher A. Wood" initials="C. A." surname="Wood">
              <organization>Cloudflare</organization>
            </author>
            <date day="25" month="September" year="2023"/>
            <abstract>
              <t>   This document specifies the Privacy Pass architecture and
   requirements for its constituent protocols used for authorization
   based on privacy-preserving authentication mechanisms.  It describes
   the conceptual model of Privacy Pass and its protocols, its security
   and privacy goals, practical deployment models, and recommendations
   for each deployment model that helps ensure the desired security and
   privacy goals are fulfilled.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-privacypass-architecture-16"/>
        </reference>
      </references>
    </references>
    <?line 187?>



  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA7VZUXPbuBF+x69AlZekI/Jix3FTXXI5neKcPZM4qS335iZz
zUAkJKGmCB5AWlY9zm/pb+kv67cLUiRleXovzUMigsDu4tvdb3eZKIpEacpM
j+RgutTyszM3qtRTe61zeTqdfpbjqlzqvDSJKo3N5WWy1CstT25LnXssePlZ
ObXSpXYDoWYzp28gqidmR0J7dCCwpBfWbUbSl6kQqU1yyBrJ1Kl5Ga2tTaOC
RCWbQnkfKUiKPFsQ6a2Y6Pmh8NVsZTw9lpsCAs5Opu9FXq1m2o1ECi0jkWAr
TlR+JEtXaQE7XwjltIK9lzqpnCk3A7G27nrhbFU0t0g2uKGHrdd6g5fpSMhI
lnQxcaPzCoKl3H9AymDL4BfINPlC/kzbaH2lTIb1+moR3e1Ho8t5bN2C3i9M
uaxm2JEsnfGMw3ePQFLDMMt0xEbR8Qz39SWOL8uy8KPvvmvFxEF0bOwfFfhH
98XLcpUNhCAfWUcowRIp51WWBZ9eJrYs5anOU2eSa29zfo8bq9z8i0NjJH+2
dpFpfqFrkDwd+9Ev23NxYleDh/IndMnSFkvt5DiWv8DgPRomma3SeQa/D+VZ
nsRdXYla/7jUqoCvZqb0ca5LIXLrVjh7A0cLk887TyKKIqlmvnQqwcbp0niJ
CK5WCHbpC52YudFeKpnrtSyaLJEQIZEQ/SQZhGRTvVQRIdRjyaKLyhXWa2nn
OE7PW4l4KC2sd24j27RgRd2IFIWzpU1shu1LBROrorCuhOBZZhIJWQqZouJ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