<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.3.3 -->

<!DOCTYPE rfc SYSTEM "../Tools/rfcbootstrap/rfc2629.dtd" [
]>

<?rfc toc="yes"?>
<?rfc tocindent="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>

<rfc ipr="trust200902" docName="draft-nottingham-http-grease-01" category="bcp">

  <front>
    <title>Greasing HTTP</title>

    <author initials="M." surname="Nottingham" fullname="Mark Nottingham">
      <organization></organization>
      <address>
        <postal>
          <street>made in</street>
          <city>Prahran</city>
          <region>VIC</region>
          <country>Australia</country>
        </postal>
        <email>mnot@mnot.net</email>
        <uri>https://www.mnot.net/</uri>
      </address>
    </author>

    <date year="2020"/>

    <area>General</area>
    
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>Like many network protocols, HTTP is vulnerable to ossification of its extensibility points. This draft explains why HTTP ossification is a problem and establishes guidelines for exercising those extensions by ‘greasing’ the protocol to combat it.</t>



    </abstract>


    <note title="Note to Readers">


<t><spanx style="emph">RFC EDITOR: please remove this section before publication</spanx></t>

<t>The issues list for this draft can be found at <eref target="https://github.com/mnot/I-D/labels/http-grease">https://github.com/mnot/I-D/labels/http-grease</eref>.</t>

<t>The most recent (often, unpublished) draft is at <eref target="https://mnot.github.io/I-D/http-grease/">https://mnot.github.io/I-D/http-grease/</eref>.</t>

<t>Recent changes are listed at <eref target="https://github.com/mnot/I-D/commits/gh-pages/http-grease">https://github.com/mnot/I-D/commits/gh-pages/http-grease</eref>.</t>

<t>See also the draft’s current status in the IETF datatracker, at
<eref target="https://datatracker.ietf.org/doc/draft-nottingham-http-grease/">https://datatracker.ietf.org/doc/draft-nottingham-http-grease/</eref>.</t>


    </note>


  </front>

  <middle>


<section anchor="introduction" title="Introduction">

<t>Like many network protocols, HTTP is vulnerable to ossification of its extensibility points. Ossification happens when a significant number of the systems that generate, transmit, handle, or consume the protocol don’t accept a new extension, thereby making it more difficult to deploy extensions.</t>

<t>For example, TCP has effectively been ossified by middleboxes that assume that new TCP options will not be deployed; likewise, the Protocol field in IP has been effectively ossified as well, since so many networks will only accept TCP or UDP traffic.</t>

<t>Addressing this issue is important; protocol extensibility allows adaptation to new circumstances as well as application to new use cases. Inability to deploy new extensions creates pressure to misuse the protocol – often leading to undesirable side effects – or to use other protocols, reducing the value that the community gets from a shared, standard protocol.</t>

<t>While there are a few ways that protocol designers can mitigate ossification, this document focuses on a technique that’s well suited to many of the ossification risks in HTTP: ‘greasing’ extensibility points by exercising them, so that they don’t become ‘rusted shut.’</t>

<t><xref target="RFC8701"/>) pioneered greasing techniques in IETF protocols; this document explains how they apply to HTTP. It focuses on generic HTTP features; other documents cover versioned extensibility points (e.g., see <xref target="I-D.bishop-httpbis-grease"/>).</t>

<section anchor="notational-conventions" title="Notational Conventions">

<t>The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” 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>

</section>
</section>
<section anchor="ossification-and-http" title="Ossification and HTTP">

<t>As an application protocol, HTTP has several extensibility points. For example, methods, status codes, header and trailer fields, cache directives, range units and content codings are all HTTP extension points.</t>

<t>Each extension point defines how unrecognised values should be handled; in most cases, they should be ignored (e.g. header fields, cache directives and range units), while in a few cases they have other handling (e.g., unrecognised methods result in a 405 status code; unrecognised status codes devolve to a more generic x00 status code).</t>

<t>Implementations and other components that diverge from these defined behaviours risk ossifying that extensibility point.</t>

<t>For example, it is increasingly common for Web Application Firewalls (WAFs), bot detection services and similar components to reject HTTP requests that contain header fields with certain characters or strings, even though syntactically valid, and even though the header fields are not necessarily recognised by the recipient.</t>

<t>This behaviour has become prevalent enough to make it difficult for Web browsers and other clients to introduce new request header fields. That difficulty is aggravated by two factors:</t>

<t><list style="numbers">
  <t>A relatively large number of vendors create these components, but have little coordination between them, leading to wide variances in behaviour, and</t>
  <t>Many of these components’ deployments are not updated regularly and reliably, leading to difficulty in addressing ossification issues even when they are identified.</t>
</list></t>

<t>To avoid ossification of request header fields, it is Best Current Practice to grease them, as explained below. Other HTTP extensibility points might be added in the future, and it is not to be inferred that greasing other HTTP extensibility points is not good practice.</t>

<section anchor="greasing-http-request-header-fields" title="Greasing HTTP Request Header Fields">

<t>HTTP clients SHOULD grease request header fields. There are two aims in doing so:</t>

<t><list style="numbers">
  <t>Preserving the ability to add new request header fields over time</t>
  <t>Preserving the ability to add new request header fields with values containing common syntax</t>
</list></t>

<t>Clients can grease a given request at their discretion. For example, a client implementation might add one or more grease request header fields to every request it makes, or it might add one to every third or tenth request.</t>

<t>Depending on the deployment model of the client, it might do this in production releases automatically (especially if there are ways that it can modify how grease values are sent with a high degree of control, in case too many errors are encountered), or it might do so only in pre-releases.</t>

<t>Grease field names SHOULD be hard to predict; e.g., they SHOULD NOT have any identifying prefix, suffix, or pattern. However, they MUST NOT be likely to conflict with unregistered or future field names, and the grease coordinator MUST avoid potentially offensive or confusing terms. They also MUST conform to the syntactic requirements for field names in HTTP (<xref target="I-D.ietf-httpbis-semantics"/>, Section 4.3).</t>

<t>This can be achieved in different ways (which SHOULD vary from time to time), for example:</t>

<t><list style="symbols">
  <t>Combine two or three dictionary words or proper nouns with a hyphen (e.g., ‘Skateboard-Clancy’, ‘Murray-Fortnight-Scout’)</t>
  <t>Append digits to a dictionary word (e.g., ‘Turnstile23’)</t>
  <t>Generate a string using a hash or similar function (e.g., ‘dd722785c01b’)</t>
</list></t>

<t>Grease field names are not required to be registered in the IANA HTTP Field Name Registry, unless they are intended to be used over an extended period of time (e.g., more than one year). However, they MAY be registered as Provisional with a reference to this RFC or another explanatory resource, to help interested parties to find out what they are used for. Such registered values SHOULD be removed after the client stops using that field.</t>

<t>Greasing clients SHOULD not reuse other clients’ grease fields names, unless they coordinate.</t>

<t>Grease field values can be fixed strings, or dynamically generated at runtime. It is RECOMMENDED that greasing clients exercise the various types in <xref target="I-D.ietf-httpbis-header-structure"/>.</t>

<t>If an error is encountered by a greasing client, it SHOULD NOT re-issue the request without the grease value, since hiding the consequences of the failure doesn’t serve the purpose of greasing.</t>

<t>Greasing clients SHOULD announce new field names they intend to grease on the http-grease@ietf.org mailing list.</t>

</section>
</section>
<section anchor="security-considerations" title="Security Considerations">

<t>Some HTTP extensibility points are becoming (or have become) ossified because of security considerations; receiving implementations believe that it is more secure to reject unknown values, or that they can identify undesirable peers through their use of extensions.</t>

<t>This document does not directly address these concerns, nor does it directly disallow such behaviour. Instead, it aims to encourage the ability to accommodate new extensions more quickly than is now possible.</t>

</section>


  </middle>

  <back>

    <references title='Normative References'>





<reference  anchor="RFC2119" target='https://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='S. Bradner'><organization /></author>
<date year='1997' month='March' />
<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" target='https://www.rfc-editor.org/info/rfc8174'>
<front>
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
<author initials='B.' surname='Leiba' fullname='B. Leiba'><organization /></author>
<date year='2017' month='May' />
<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="I-D.ietf-httpbis-semantics">
<front>
<title>HTTP Semantics</title>

<author initials='R' surname='Fielding' fullname='Roy Fielding'>
    <organization />
</author>

<author initials='M' surname='Nottingham' fullname='Mark Nottingham'>
    <organization />
</author>

<author initials='J' surname='Reschke' fullname='Julian Reschke'>
    <organization />
</author>

<date month='October' day='2' year='2020' />

<abstract><t>The Hypertext Transfer Protocol (HTTP) is a stateless application- level protocol for distributed, collaborative, hypertext information systems.  This document defines the semantics of HTTP: its architecture, terminology, the "http" and "https" Uniform Resource Identifier (URI) schemes, core request methods, request header fields, response status codes, response header fields, and content negotiation.  This document obsoletes RFC 2818, RFC 7231, RFC 7232, RFC 7233, RFC 7235, RFC 7538, RFC 7615, RFC 7694, and portions of RFC 7230.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-httpbis-semantics-12' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-httpbis-semantics-12.txt' />
</reference>




    </references>

    <references title='Informative References'>





<reference  anchor="RFC8701" target='https://www.rfc-editor.org/info/rfc8701'>
<front>
<title>Applying Generate Random Extensions And Sustain Extensibility (GREASE) to TLS Extensibility</title>
<author initials='D.' surname='Benjamin' fullname='D. Benjamin'><organization /></author>
<date year='2020' month='January' />
<abstract><t>This document describes GREASE (Generate Random Extensions And Sustain Extensibility), a mechanism to prevent extensibility failures in the TLS ecosystem. It reserves a set of TLS protocol values that may be advertised to ensure peers correctly handle unknown values.</t></abstract>
</front>
<seriesInfo name='RFC' value='8701'/>
<seriesInfo name='DOI' value='10.17487/RFC8701'/>
</reference>



<reference anchor="I-D.bishop-httpbis-grease">
<front>
<title>GREASE for HTTP/2</title>

<author initials='M' surname='Bishop' fullname='Mike Bishop'>
    <organization />
</author>

<date month='June' day='24' year='2020' />

<abstract><t>Reserves several values in the HTTP/2 registries to exercise the requirement that clients and servers ignore unknown values.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-bishop-httpbis-grease-01' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-bishop-httpbis-grease-01.txt' />
</reference>



<reference anchor="I-D.ietf-httpbis-header-structure">
<front>
<title>Structured Field Values for HTTP</title>

<author initials='M' surname='Nottingham' fullname='Mark Nottingham'>
    <organization />
</author>

<author initials='P' surname='Kamp' fullname='Poul-Henning Kamp'>
    <organization />
</author>

<date month='June' day='3' year='2020' />

<abstract><t>This document describes a set of data types and associated algorithms that are intended to make it easier and safer to define and handle HTTP header and trailer fields, known as "Structured Fields", "Structured Headers", or "Structured Trailers".  It is intended for use by specifications of new HTTP fields that wish to use a common syntax that is more restrictive than traditional HTTP field values.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-httpbis-header-structure-19' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-httpbis-header-structure-19.txt' />
</reference>




    </references>




  </back>

<!-- ##markdown-source:
H4sIAC+Pfl8AA7VZa2/bRhb9zl8xm35wXFjyoynSKovdunYeBuLEGztbFItF
MSJH0qxJDneGlKIt/N/3nDtDiXSTFlhgA8SiyOHc97nnjiaTSdbatjQz9dob
HWy9VG/u7m4yPZ97s55lhctrXeFx4fWindSubbFmpavJqm2byZIvmcnJaVbo
FqvOTs5OshyXS+e3MzXPmyyzjZ+p1nehPTs5+f7kLNN4CfJMbbwus43z90vv
umaW3ZstvhUzdVW3xtemnVxSapaFVtfFL7p0NWRsTcgaO1P/aF1+pPDH1oWp
2yMVnG+9WQRcbat00Xqb41HuqkaniwqL8cjWpa3NP7NMd+3K+VmmJpnCP1uH
mbqeqnc7U+V29MK19vePnzi/1LX9j26tq2dyB1KNaWeq0oXBfnIvty0ccuP1
yut4x5sl31B/v7qIK1xXt/TaOVwFz1gtt02lbYm94Pof+GcKv8iDzsMJjEKY
HR9vNptp//Q4y2rnKyi0NlTow6uLs9PT72cIRb3YP8iyyWSi9JzCcjj5rb03
ULneKuzB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