<?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.2 (Ruby 3.2.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-wood-privacypass-auth-scheme-extensions-01" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.18.2 -->
  <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-01"/>
    <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="2023" month="November" day="23"/>
    <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.</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 is 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 1 to 65535. 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, specifices 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 by which Clients and Origins determine which set of extensions to provide
for redemption is out of scope for this document. In some Privacy Pass deployments, the set
of extensions may be well known Clients and Origins and therefore 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 about 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="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="30" month="June" 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-02"/>
        </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 183?>



  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA7VZ3XLbuBW+x1Ogyk3SEbmxk7ipkmxWqzhrzyROasvN7GS2
GYiEJNQkwQVAy6rHeZY+S5+s3wH4K8vTvakvbBI/5/985xw6iiLmlMvkhI/m
a8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