<?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.13 -->
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-pauly-httpbis-geohash-hint-00" category="exp" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.2.1 -->
  <front>
    <title abbrev="Geohash CH">The Geohash HTTP Client Hint</title>
    <seriesInfo name="Internet-Draft" value="draft-pauly-httpbis-geohash-hint-00"/>
    <author initials="T." surname="Pauly" fullname="Tommy Pauly">
      <organization>Apple Inc.</organization>
      <address>
        <postal>
          <street>One Apple Park Way</street>
          <city>Cupertino, California 95014</city>
          <country>United States of America</country>
        </postal>
        <email>tpauly@apple.com</email>
      </address>
    </author>
    <author initials="D." surname="Schinazi" fullname="David Schinazi">
      <organization>Google LLC</organization>
      <address>
        <email>dschinazi.ietf@gmail.com</email>
      </address>
    </author>
    <date year="2021" month="September" day="30"/>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>This documents defines an HTTP Client Hint for sharing a client's rough location
using the Geohash format.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Venues</name>
      <t>Source for this draft and an issue tracker can be found at
  <eref target="https://github.com/tfpauly/privacy-proxy"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <t>HTTP Client Hints <xref target="RFC8942" format="default"/> defines a convention for HTTP headers
to communicate optional information from clients to servers as hints. This can be done
conditionally based on if a server claims supports for a particular hint.</t>
      <t>This document defines a client hint that can be used to send a location that the client
wants to use for influencing server behavior. It uses the Geohash algorithm <xref target="GEOHASH" format="default"/>
to encode latitude and longitude coordinates into an alphanumeric token that can be truncated
to provide a less specific location.</t>
      <t>This header is intended to be used to provide rough geolocation hints to servers in situations
where the server cannot directly ascertain the location of the client. For example, a client
that is accessing a server through a proxy or a VPN might provide a rough hint to a server
when looking up information that may vary depending on location.</t>
      <t>This document also defines a how forward proxies can use proxy status fields to inform clients
about the result of their Geohash hints.</t>
      <section anchor="requirements" numbered="true" toc="default">
        <name>Requirements</name>
        <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&nbsp;14 <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/> when, and only when, they
appear in all capitals, as shown here.</t>
      </section>
    </section>
    <section anchor="geohash-header" numbered="true" toc="default">
      <name>Geohash Header</name>
      <t>The "Sec-CH-Geohash" is an Item Structured Header <xref target="RFC8941" format="default"/>.
Its value MUST be a String, and MUST have at least 1 character and no more than 12 characters.
The ABNF is:</t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
   Sec-CH-Geohash = sf-string
]]></artwork>
      <t>The string itself is an encoded Geohash, which uses the 32 different characters
from the "Geohash alphabet" <xref target="GEOHASH" format="default"/>.</t>
      <t>The following example shows an encoding of the coordinates 57.64911,10.40744:</t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
    Sec-CH-Geohash: "u4pruydqqvj"
]]></artwork>
      <t>Servers that can provide different content based on Geohash hints SHOULD include
the headers in their "Accept-CH" list.</t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
    Accept-CH: Sec-CH-Geohash
]]></artwork>
      <t>Servers also SHOULD indicate for any cacheable content if the Geohash hint will influence
the cached content, using the "Vary" header.</t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
    Vary: Sec-CH-Geohash
]]></artwork>
    </section>
    <section anchor="server-behavior" numbered="true" toc="default">
      <name>Server Behavior</name>
      <t>Upon receiving a Geohash Client Hint, a server can use the information to influence its behavior
in various ways.</t>
      <t>The server can use the Geohash to determine the content of HTTP responses, as a
replacement for inferring location from client IP addresses.</t>
      <t>If the server is acting as a forward proxy, such as a CONNECT proxy, it can use the Geohash
to determine an appropriate geo-mapped IP address to use for outbound connections, or a
client subnet to present in the EDNS0 Client Subnet extension for DNS queries <xref target="RFC6891" format="default"/>
        <xref target="RFC7871" format="default"/>.</t>
      <section anchor="proxy-behavior" numbered="true" toc="default">
        <name>Proxy Behavior</name>
        <t>If a proxy receiving the Geohash hint cannot respect the location indicated by the hint,
it SHOULD include a Proxy-Status header <xref target="I-D.ietf-httpbis-proxy-status" format="default"/> in its response,
with the "details" parameter containing the string "invalid geohash".</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
Proxy-Status: ExampleProxy; details="invalid geohash"
]]></artwork>
      </section>
    </section>
    <section anchor="security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>The use of the Geohash Client Hint MUST use the Sec- header prefix as recommended
in <xref target="RFC8942" format="default"/>.</t>
      <t>Client location can be used to fingerprint and tracker users, so clients MUST have a
default policy around when to allow use of the Geohash Client Hint, as well as a default
length of Geohash. Shorter, truncated Geohashes provide less specific locality.</t>
      <t>Servers MUST NOT use Geohash Client Hints for making security or access-control decisions,
as the value can be spoofed by a client. The hint is intended only for use in optimizing behavior.</t>
    </section>
    <section anchor="iana" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section anchor="iana-header" numbered="true" toc="default">
        <name>HTTP Headers</name>
        <t>This document registers the "Sec-CH-Geohash" header in the
"Permanent Message Header Field Names" registry
&lt;<eref target="https://www.iana.org/assignments/message-headers"/>&gt;.</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
  +----------------------+----------+--------+---------------+
  | Header Field Name    | Protocol | Status |   Reference   |
  +----------------------+----------+--------+---------------+
  | Sec-CH-Geohash       |   http   |  exp   | This document |
  +----------------------+----------+--------+---------------+
]]></artwork>
      </section>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC8942" target="https://www.rfc-editor.org/info/rfc8942">
          <front>
            <title>HTTP Client Hints</title>
            <author initials="I." surname="Grigorik" fullname="I. Grigorik">
              <organization/>
            </author>
            <author initials="Y." surname="Weiss" fullname="Y. Weiss">
              <organization/>
            </author>
            <date year="2021" month="February"/>
            <abstract>
              <t>HTTP defines proactive content negotiation to allow servers to select the appropriate response for a given request, based upon the user agent's characteristics, as expressed in request headers. In practice, user agents are often unwilling to send those request headers, because it is not clear whether they will be used, and sending them impacts both performance and privacy.</t>
              <t>This document defines an Accept-CH response header that servers can use to advertise their use of request headers for proactive content negotiation, along with a set of guidelines for the creation of such headers, colloquially known as "Client Hints."</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8942"/>
          <seriesInfo name="DOI" value="10.17487/RFC8942"/>
        </reference>
        <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="RFC8941" target="https://www.rfc-editor.org/info/rfc8941">
          <front>
            <title>Structured Field Values for HTTP</title>
            <author initials="M." surname="Nottingham" fullname="M. Nottingham">
              <organization/>
            </author>
            <author initials="P-H." surname="Kamp" fullname="P-H. Kamp">
              <organization/>
            </author>
            <date year="2021" month="February"/>
            <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="RFC" value="8941"/>
          <seriesInfo name="DOI" value="10.17487/RFC8941"/>
        </reference>
        <reference anchor="I-D.ietf-httpbis-proxy-status" target="https://www.ietf.org/archive/id/draft-ietf-httpbis-proxy-status-06.txt">
          <front>
            <title>The Proxy-Status HTTP Response Header Field</title>
            <author fullname="Mark Nottingham">
              <organization>Fastly</organization>
            </author>
            <author fullname="Piotr Sikora">
              <organization>Google</organization>
            </author>
            <date month="August" day="16" year="2021"/>
            <abstract>
              <t>   This document defines the Proxy-Status HTTP field to convey the
   details of intermediary response handling, including generated
   errors.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-proxy-status-06"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="GEOHASH" target="https://en.wikipedia.org/wiki/Geohash">
          <front>
            <title>Geohash</title>
            <author>
              <organization/>
            </author>
            <date year="2020"/>
          </front>
        </reference>
        <reference anchor="RFC6891" target="https://www.rfc-editor.org/info/rfc6891">
          <front>
            <title>Extension Mechanisms for DNS (EDNS(0))</title>
            <author initials="J." surname="Damas" fullname="J. Damas">
              <organization/>
            </author>
            <author initials="M." surname="Graff" fullname="M. Graff">
              <organization/>
            </author>
            <author initials="P." surname="Vixie" fullname="P. Vixie">
              <organization/>
            </author>
            <date year="2013" month="April"/>
            <abstract>
              <t>The Domain Name System's wire protocol includes a number of fixed fields whose range has been or soon will be exhausted and does not allow requestors to advertise their capabilities to responders.  This document describes backward-compatible mechanisms for allowing the protocol to grow.</t>
              <t>This document updates the Extension Mechanisms for DNS (EDNS(0)) specification (and obsoletes RFC 2671) based on feedback from deployment experience in several implementations.  It also obsoletes RFC 2673 ("Binary Labels in the Domain Name System") and adds considerations on the use of extended labels in the DNS.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="75"/>
          <seriesInfo name="RFC" value="6891"/>
          <seriesInfo name="DOI" value="10.17487/RFC6891"/>
        </reference>
        <reference anchor="RFC7871" target="https://www.rfc-editor.org/info/rfc7871">
          <front>
            <title>Client Subnet in DNS Queries</title>
            <author initials="C." surname="Contavalli" fullname="C. Contavalli">
              <organization/>
            </author>
            <author initials="W." surname="van der Gaast" fullname="W. van der Gaast">
              <organization/>
            </author>
            <author initials="D." surname="Lawrence" fullname="D. Lawrence">
              <organization/>
            </author>
            <author initials="W." surname="Kumari" fullname="W. Kumari">
              <organization/>
            </author>
            <date year="2016" month="May"/>
            <abstract>
              <t>This document describes an Extension Mechanisms for DNS (EDNS0) option that is in active use to carry information about the network that originated a DNS query and the network for which the subsequent response can be cached.  Since it has some known operational and privacy shortcomings, a revision will be worked through the IETF for improvement.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7871"/>
          <seriesInfo name="DOI" value="10.17487/RFC7871"/>
        </reference>
      </references>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAHnyVWEAA61X23LjuBF9x1cgmockNaIsOd71WMkm65E9a1f5FsveVGpr
KwWRkISYBDgAaFkz1nxLviVfltMASVG2q/KQ6EUkgUbfTp9uJEnCvPK5HPO7
peQ/SbMUbsnP7u5u+CRXUnt+prRnYjaz8nHcbpicscykWhQQzKyY+6QUVb5O
lt6XM+WSRdyXLCGcDIcsFV4ujF2PuXwqGVOlHXNvK+f3h8Oj4T57kOuVs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