From 243afd362c2cc42af3d1018b0bb2b1a21eeedcce Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 21 Jul 2017 09:24:59 -0700 Subject: [PATCH 01/13] scope Accept-CH opt-in to same-origin Discussion: https://github.com/httpwg/http-extensions/issues/372 --- draft-ietf-httpbis-client-hints.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index 519dca578..ff01536e0 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -127,14 +127,14 @@ For example: Accept-CH: DPR, Width, Viewport-Width ~~~ -When a client receives Accept-CH, or if it is capable of processing the HTML response and finds an equivalent HTML meta element, it can treat it as a signal that the application is interested in receiving specified request header fields that match the advertised field-values; subresource requests initiated as a result of processing the response from the server that includes the Accept-CH opt-in can include the request header fields that match the advertised field-values. +When a client receives Accept-CH, or if it is capable of processing the HTML response and finds an equivalent HTML meta element, it can treat it as a signal that the origin ({{RFC6454}}) is interested in receiving specified request header fields that match the advertised field-values; same-origin resource requests initiated as a result of processing the response from the server that includes the Accept-CH opt-in can include the request header fields that match the advertised field-values. -For example, based on Accept-CH example above, a user agent could append DPR, Width, and Viewport-Width header fields to all subresource requests initiated by the page constructed from the response. +For example, based on Accept-CH example above, a user agent could append DPR, Width, and Viewport-Width header fields to all same-origin resource requests initiated by the page constructed from the response. ### The Accept-CH-Lifetime Header Field {#accept-ch-lifetime} -Servers can ask the client to remember an origin-wide Accept-CH preference for a specified period of time to enable delivery of Client Hints on all subsequent requests to the origin ({{RFC6454}}), and on any requests initiated as a result of processing a response from the origin. +Servers can ask the client to remember an origin-wide Accept-CH preference for a specified period of time to enable delivery of Client Hints on subsequent requests to the origin ({{RFC6454}}). ~~~ abnf7230 Accept-CH-Lifetime = #delta-seconds @@ -148,7 +148,7 @@ The field-value indicates that the Accept-CH preference SHOULD be considered sta Accept-CH-Lifetime: 86400 ~~~ -For example, based on the Accept-CH and Accept-CH-Lifetime example above, a user agent could persist an origin-wide Accept-CH preference for up to 86400 seconds (1 day). Then, if a request is initiated to the same origin before the preference is stale (e.g. as a result of a navigation to the origin, or fetching a subresource from the origin) the client could append the requested header fields (DPR, Width, and Viewport-Width in this example) to the request and any subresource requests initiated as a result of processing a response from same origin. +For example, based on the Accept-CH and Accept-CH-Lifetime example above, a user agent could persist an origin-wide Accept-CH preference for up to 86400 seconds (1 day). Then, if a request is initiated to the same origin before the preference is stale (e.g. as a result of a navigation to the origin, or fetching a resource from the origin) the client could append the requested header fields (DPR, Width, and Viewport-Width in this example) to all requests matching that origin. If Accept-CH-Lifetime occurs in a message more than once, the last value overrides all previous occurrences. From 9c6718a23a128cc2c3f89eb8f36d965dbc530b4f Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 21 Jul 2017 09:28:13 -0700 Subject: [PATCH 02/13] rework security considerations - defined hint list can be extended - should not expose data not available through other means - simplify to account for same-origin opt-in restriction --- draft-ietf-httpbis-client-hints.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index ff01536e0..e5154f730 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -257,11 +257,13 @@ The Content-DPR response header field indicates to the client that the server ha # Security Considerations -The request header fields defined in this specification expose information that is already available to Web applications in the browser runtime itself (e.g., using JavaScript and CSS). For example, the application can obtain viewport width, image display width, and device pixel ratio via JavaScript, or through the use of CSS media queries and unique resource URLs even if JavaScript is disabled. However, servers that gather this information through such mechanisms are typically observable (e.g., you can see that they're using JavaScript to gather it), whereas servers' use of the header fields introduced by this specification is not observable. Section 2.1 discusses potential mitigations. +The request header fields defined in this specification, and those that extend it, expose information about the user's environment to enable proactive content negotiation. Such information may reveal new information about the user and implementers ought to provide policies and mechanisms to control how and when such hints are advertised. -For example, sending Client Hints on all requests can make information about the user's environment available to origins that otherwise did not have access to this data, which may or may not be the desired outcome - e.g. this may enable an image optimization service to deliver a tailored asset, and it may reveal same information about the user to other origins that may not have had access to it before. Similarly, sending highly granular data, such as image and viewport width may help identify users across multiple requests. Restricting such field values to an enumerated range, where the user agent advertises a threshold value that is close but is not an exact representation of the current value, can help mitigate the risk of such fingerprinting. +The hint request headers ought not to provide new information that is otherwise not available to the application via HTML, CSS, or JavaScript. For example, this specification defines Viewport-Width, Width, and DPR header fields, all of which can be obtained via JavaScript, or through the use of CSS media queries and unique resource URLs even if JavaScript is disabled. -Implementers ought to provide mechanisms and policies to control how and when such hints are advertised. For example, they could require origin opt-in via Accept-CH; clear remembered opt-in, as set by Accept-CH-Lifetime, when site data, browsing history, browsing cache, or similar, are cleared; restrict delivery to same origin subrequests; limit delivery to requests that already carry identifying information (e.g. cookies); modify delivery policy when in an "incognito" or a similar privacy mode; enable user configuration and opt in, and so on. +Similarly, sending highly granular data, such as image and viewport width may help identify users across multiple requests. Restricting such field values to an enumerated range, where the user agent advertises a threshold value that is close but is not an exact representation of the current value, can help mitigate the risk of such fingerprinting. + +Implementers ought to provide mechanisms and policies to control how and when client hints are advertised - refer to Section 2.1. For example, they ought to enforce origin opt-in via Accept-CH and Accept-CH-Lifetime, and clear remembered opt-in, as set by Accept-CH-Lifetime, when site data, browsing history, browsing cache, or similar, are cleared. Similarly, they may wish to limit delivery to requests that already carry identifying information (e.g. cookies or referer data), enable user configuration and opt-in, and so on. # IANA Considerations From f7f70dc98797670d63c075aee9cd6a0936093edd Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 28 Jul 2017 11:31:08 -0700 Subject: [PATCH 03/13] extensible list of hints Flag that this document does not exhaust all hints, and instead establishes the general mechanism, alongside a few example hints. --- draft-ietf-httpbis-client-hints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index e5154f730..4570b4454 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -57,7 +57,7 @@ informative: An increasing diversity of Web-connected devices and software capabilities has created a need to deliver optimized content for each device. -This specification defines a set of HTTP request header fields, colloquially known as Client Hints, to address this. They are intended to be used as input to proactive content negotiation; just as the Accept header field allows user agents to indicate what formats they prefer, Client Hints allow user agents to indicate device and agent specific preferences. +This specification defines an extensible and configurable set of HTTP request header fields, colloquially known as Client Hints, to address this. They are intended to be used as input to proactive content negotiation; just as the Accept header field allows user agents to indicate what formats they prefer, Client Hints allow user agents to indicate device and agent specific preferences. --- note_Note_to_Readers From 58cff8c0b159eb8c3bc92cb7e97693b4edfc4100 Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 28 Jul 2017 11:32:21 -0700 Subject: [PATCH 04/13] double-keying and secure contexts This introduces two new requirements - Accept-CH and Accept-CH-Lifetime should be processed for responses originating from potentially trustworthy origins (i.e. HTTPS-only) - Accept-CH-Lifetime preference should be double-keyed, per discussion in #372. --- draft-ietf-httpbis-client-hints.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index 4570b4454..02641d5f6 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -32,6 +32,7 @@ normative: RFC7234: RFC6454: HTML5: W3C.REC-html5-20141028 + SECURE-CONTEXTS: W3C.CR-secure-contexts-20160915 CSSVAL: W3C.CR-css-values-3-20160929 CSS2: target: http://www.w3.org/TR/2011/REC-CSS2-20110607 @@ -101,9 +102,9 @@ A Client Hint request header field is a HTTP header field that is used by HTTP c ## Sending Client Hints -Clients control which Client Hints are sent in requests, based on their default settings, user configuration and/or preferences. Implementers might provide user choice mechanisms so that users may balance privacy concerns with bandwidth limitations. Implementations specific to certain use cases or threat models might avoid transmitting these header fields altogether, or limit them to secure contexts or authenticated sessions. Implementers should be aware that explaining the privacy implications of passive fingerprinting or network information disclosure may be challenging. +Clients control which Client Hints are sent in requests, based on their default settings, user configuration and/or preferences. The client and server, or an intermediate proxy, can use an opt-in mechanism outlined below to negotiate which fields should be sent to allow for efficient content adaption. -The client and server, or an intermediate proxy, can use an opt-in mechanism to negotiate which fields should be reported to allow for efficient content adaption. +Implementers should be be aware of the passive fingerprinting and network information disclosure implications when implementing support for Client Hints, and follow the considerations outlined in "Security Considerations" section of this document. ## Server Processing of Client Hints @@ -127,20 +128,20 @@ For example: Accept-CH: DPR, Width, Viewport-Width ~~~ -When a client receives Accept-CH, or if it is capable of processing the HTML response and finds an equivalent HTML meta element, it can treat it as a signal that the origin ({{RFC6454}}) is interested in receiving specified request header fields that match the advertised field-values; same-origin resource requests initiated as a result of processing the response from the server that includes the Accept-CH opt-in can include the request header fields that match the advertised field-values. +When a client receives Accept-CH from a potentially trustworthy origin ({{SECURE-CONTEXTS}}), or if it is capable of processing the HTML response and finds an equivalent HTML meta element, it can treat it as a signal that the origin ({{RFC6454}}) is interested in receiving specified request header fields that match the advertised field-values; same-origin resource requests initiated as a result of processing the response from the server that includes the Accept-CH opt-in can include the request header fields that match the advertised field-values. For example, based on Accept-CH example above, a user agent could append DPR, Width, and Viewport-Width header fields to all same-origin resource requests initiated by the page constructed from the response. ### The Accept-CH-Lifetime Header Field {#accept-ch-lifetime} -Servers can ask the client to remember an origin-wide Accept-CH preference for a specified period of time to enable delivery of Client Hints on subsequent requests to the origin ({{RFC6454}}). +Servers can ask the client to remember sent Accept-CH preference for a specified period of time, to enable delivery of Client Hints on subsequent requests to the server's origin ({{RFC6454}}). ~~~ abnf7230 Accept-CH-Lifetime = #delta-seconds ~~~ -The field-value indicates that the Accept-CH preference SHOULD be considered stale after its age is greater than the specified number of seconds. +When a client receives Accept-CH-Lifetime from a potentially trustworthy origin ("opt-in origin"), the field-value indicates that the Accept-CH preference SHOULD be considered stale after its age is greater than the specified number of seconds, and if applicable, persisted as a double-keyed preference that combines the values of the opt-in origin and the potentially trustworthy origin of the resource that initiated the request that received the opt-in preference. ~~~ example Accept-CH: DPR, Width @@ -148,7 +149,7 @@ The field-value indicates that the Accept-CH preference SHOULD be considered sta Accept-CH-Lifetime: 86400 ~~~ -For example, based on the Accept-CH and Accept-CH-Lifetime example above, a user agent could persist an origin-wide Accept-CH preference for up to 86400 seconds (1 day). Then, if a request is initiated to the same origin before the preference is stale (e.g. as a result of a navigation to the origin, or fetching a resource from the origin) the client could append the requested header fields (DPR, Width, and Viewport-Width in this example) to all requests matching that origin. +For example, based on the Accept-CH and Accept-CH-Lifetime example above, which is received from bar.com in response to a resource request initiated by foo.com, both of which are potentially trustworthy origins: a user agent could persist a double-keyed Accept-CH preference, for requests initiated to bar.com from foo.com, for up to 86400 seconds (1 day). Then, if a request is initiated to bar.com from foo.com before the preference is stale the client could append the requested header fields (DPR, Width, and Viewport-Width in this example) to all requests matching that origin. Alternatively, if the same Accept-CH-Lifetime preference was advertised by bar.com, then same Client Hints header fields can be advertised on a navigation to the origin, and any requests to same origin initiated as a result of processing a response from bar.com. If Accept-CH-Lifetime occurs in a message more than once, the last value overrides all previous occurrences. @@ -257,13 +258,17 @@ The Content-DPR response header field indicates to the client that the server ha # Security Considerations -The request header fields defined in this specification, and those that extend it, expose information about the user's environment to enable proactive content negotiation. Such information may reveal new information about the user and implementers ought to provide policies and mechanisms to control how and when such hints are advertised. +The request header fields defined in this specification, and those that extend it, expose information about the user's environment to enable proactive content negotiation. Such information may reveal new information about the user and implementers ought to consider the following considerations, recommendations, and best practices. -The hint request headers ought not to provide new information that is otherwise not available to the application via HTML, CSS, or JavaScript. For example, this specification defines Viewport-Width, Width, and DPR header fields, all of which can be obtained via JavaScript, or through the use of CSS media queries and unique resource URLs even if JavaScript is disabled. +Transmitted Client Hints header fields should not provide new information that is otherwise not available to the application via HTML, CSS, or JavaScript. Further, sending highly granular data, such as image and viewport width may help identify users across multiple requests. Restricting such field values to an enumerated range, where the advertised value is close but is not an exact representation of the current value, can help mitigate the risk of such fingerprinting as well as reduce possibility of unnecessary cache fragmentation. -Similarly, sending highly granular data, such as image and viewport width may help identify users across multiple requests. Restricting such field values to an enumerated range, where the user agent advertises a threshold value that is close but is not an exact representation of the current value, can help mitigate the risk of such fingerprinting. +Implementers should consider both user and server controlled mechanisms and policies to control which Client Hints header fields are advertised: -Implementers ought to provide mechanisms and policies to control how and when client hints are advertised - refer to Section 2.1. For example, they ought to enforce origin opt-in via Accept-CH and Accept-CH-Lifetime, and clear remembered opt-in, as set by Accept-CH-Lifetime, when site data, browsing history, browsing cache, or similar, are cleared. Similarly, they may wish to limit delivery to requests that already carry identifying information (e.g. cookies or referer data), enable user configuration and opt-in, and so on. + - Implementers may provide user choice mechanisms so that users may balance privacy concerns with bandwidth limitations. However, implementers should also be aware that explaining the privacy implications of passive fingerprinting or network information disclosure to users may be challenging. + - Implementers should support double-keyed Client Hints opt-in requested by potentially trustworthy origins via Accept-CH and Accept-CH-Lifetime header fields, and clear remembered opt-in when site data, browsing history, browsing cache, or similar, are cleared. + - Implementations specific to certain use cases or threat models may avoid transmitting Client Hints header fields altogether or limit them to authenticated sessions only that already carry identifying information, such as cookies or referer data. + +Following the above recommendations should significantly reduce the risks of linkability and passive fingerprinting. # IANA Considerations From f5f1d316818001cbbb2a05415c8c2073bd4828d0 Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 6 Oct 2017 10:39:27 -0700 Subject: [PATCH 05/13] drop "intermediate proxy" https://github.com/httpwg/http-extensions/pull/373/files#r131055193 --- draft-ietf-httpbis-client-hints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index 02641d5f6..bca0299fc 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -102,7 +102,7 @@ A Client Hint request header field is a HTTP header field that is used by HTTP c ## Sending Client Hints -Clients control which Client Hints are sent in requests, based on their default settings, user configuration and/or preferences. The client and server, or an intermediate proxy, can use an opt-in mechanism outlined below to negotiate which fields should be sent to allow for efficient content adaption. +Clients control which Client Hints are sent in requests, based on their default settings, user configuration and/or preferences. The client and server can use an opt-in mechanism outlined below to negotiate which fields should be sent to allow for efficient content adaption. Implementers should be be aware of the passive fingerprinting and network information disclosure implications when implementing support for Client Hints, and follow the considerations outlined in "Security Considerations" section of this document. From 9004850b6861351fe99285ad22671f03f82ec6b4 Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 6 Oct 2017 10:50:53 -0700 Subject: [PATCH 06/13] require secure transport, rework double keyed https://github.com/httpwg/http-extensions/pull/373/files#r131066992 https://github.com/httpwg/http-extensions/pull/373/files#r131055440 --- draft-ietf-httpbis-client-hints.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index bca0299fc..00a07d836 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -32,7 +32,6 @@ normative: RFC7234: RFC6454: HTML5: W3C.REC-html5-20141028 - SECURE-CONTEXTS: W3C.CR-secure-contexts-20160915 CSSVAL: W3C.CR-css-values-3-20160929 CSS2: target: http://www.w3.org/TR/2011/REC-CSS2-20110607 @@ -128,7 +127,7 @@ For example: Accept-CH: DPR, Width, Viewport-Width ~~~ -When a client receives Accept-CH from a potentially trustworthy origin ({{SECURE-CONTEXTS}}), or if it is capable of processing the HTML response and finds an equivalent HTML meta element, it can treat it as a signal that the origin ({{RFC6454}}) is interested in receiving specified request header fields that match the advertised field-values; same-origin resource requests initiated as a result of processing the response from the server that includes the Accept-CH opt-in can include the request header fields that match the advertised field-values. +When a client receives an HTTP response, over a secure transport, that contains Accept-CH header field, or if it is capable of processing the HTML response and finds an equivalent HTML meta element, it can treat it as a signal that the origin ({{RFC6454}}) is interested in receiving specified request header fields that match the advertised field-values; same-origin resource requests initiated as a result of processing the response from the server that includes the Accept-CH opt-in can include the request header fields that match the advertised field-values. For example, based on Accept-CH example above, a user agent could append DPR, Width, and Viewport-Width header fields to all same-origin resource requests initiated by the page constructed from the response. @@ -141,7 +140,7 @@ Servers can ask the client to remember sent Accept-CH preference for a specified Accept-CH-Lifetime = #delta-seconds ~~~ -When a client receives Accept-CH-Lifetime from a potentially trustworthy origin ("opt-in origin"), the field-value indicates that the Accept-CH preference SHOULD be considered stale after its age is greater than the specified number of seconds, and if applicable, persisted as a double-keyed preference that combines the values of the opt-in origin and the potentially trustworthy origin of the resource that initiated the request that received the opt-in preference. +When a client receives an HTTP response, over a secure transport, that contains Accept-CH-Lifetime header field, the field-value indicates that the Accept-CH preference SHOULD be persisted and bound to the origin, and be considered stale after response's age ({{RFC7234}}, section 4.2) is greater than the specified number of seconds. ~~~ example Accept-CH: DPR, Width @@ -149,7 +148,7 @@ When a client receives Accept-CH-Lifetime from a potentially trustworthy origin Accept-CH-Lifetime: 86400 ~~~ -For example, based on the Accept-CH and Accept-CH-Lifetime example above, which is received from bar.com in response to a resource request initiated by foo.com, both of which are potentially trustworthy origins: a user agent could persist a double-keyed Accept-CH preference, for requests initiated to bar.com from foo.com, for up to 86400 seconds (1 day). Then, if a request is initiated to bar.com from foo.com before the preference is stale the client could append the requested header fields (DPR, Width, and Viewport-Width in this example) to all requests matching that origin. Alternatively, if the same Accept-CH-Lifetime preference was advertised by bar.com, then same Client Hints header fields can be advertised on a navigation to the origin, and any requests to same origin initiated as a result of processing a response from bar.com. +For example, based on the Accept-CH and Accept-CH-Lifetime example above, which is received from bar.com in response to a resource request initiated by foo.com, both delivered over a secure transport: a user agent SHOULD persist an Accept-CH preference bound to foo.com, for requests initiated to bar.com from foo.com, for up to 86400 seconds (1 day); this preference SHOULD NOT extend to requests initiated to bar.com from other origins. If Accept-CH-Lifetime occurs in a message more than once, the last value overrides all previous occurrences. @@ -265,7 +264,7 @@ Transmitted Client Hints header fields should not provide new information that i Implementers should consider both user and server controlled mechanisms and policies to control which Client Hints header fields are advertised: - Implementers may provide user choice mechanisms so that users may balance privacy concerns with bandwidth limitations. However, implementers should also be aware that explaining the privacy implications of passive fingerprinting or network information disclosure to users may be challenging. - - Implementers should support double-keyed Client Hints opt-in requested by potentially trustworthy origins via Accept-CH and Accept-CH-Lifetime header fields, and clear remembered opt-in when site data, browsing history, browsing cache, or similar, are cleared. + - Implementers should support Client Hints opt-in, delivered over secure transport, as advertised by Accept-CH and Accept-CH-Lifetime header fields, and clear remembered opt-in when site data, browsing history, browsing cache, or similar, are cleared. - Implementations specific to certain use cases or threat models may avoid transmitting Client Hints header fields altogether or limit them to authenticated sessions only that already carry identifying information, such as cookies or referer data. Following the above recommendations should significantly reduce the risks of linkability and passive fingerprinting. From 78fd04af2dfcfe06c2354d2e557ab52b672aa0b6 Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 6 Oct 2017 11:25:52 -0700 Subject: [PATCH 07/13] s/fingerprinting/linkability https://github.com/httpwg/http-extensions/pull/373/files#r131068649 --- draft-ietf-httpbis-client-hints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index 00a07d836..ed1b8e837 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -259,7 +259,7 @@ The Content-DPR response header field indicates to the client that the server ha The request header fields defined in this specification, and those that extend it, expose information about the user's environment to enable proactive content negotiation. Such information may reveal new information about the user and implementers ought to consider the following considerations, recommendations, and best practices. -Transmitted Client Hints header fields should not provide new information that is otherwise not available to the application via HTML, CSS, or JavaScript. Further, sending highly granular data, such as image and viewport width may help identify users across multiple requests. Restricting such field values to an enumerated range, where the advertised value is close but is not an exact representation of the current value, can help mitigate the risk of such fingerprinting as well as reduce possibility of unnecessary cache fragmentation. +Transmitted Client Hints header fields should not provide new information that is otherwise not available to the application via HTML, CSS, or JavaScript. Further, sending highly granular data, such as image and viewport width may help identify users across multiple requests. Restricting such field values to an enumerated range, where the advertised value is close but is not an exact representation of the current value, can help reduce the risk of such linkability as well as reduce possibility of unnecessary cache fragmentation. Implementers should consider both user and server controlled mechanisms and policies to control which Client Hints header fields are advertised: From 4f046666a573a6fa7cf4d663f0ad07543afd19c3 Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 6 Oct 2017 11:38:28 -0700 Subject: [PATCH 08/13] rework security guidance --- draft-ietf-httpbis-client-hints.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index ed1b8e837..048868b9c 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -264,10 +264,8 @@ Transmitted Client Hints header fields should not provide new information that i Implementers should consider both user and server controlled mechanisms and policies to control which Client Hints header fields are advertised: - Implementers may provide user choice mechanisms so that users may balance privacy concerns with bandwidth limitations. However, implementers should also be aware that explaining the privacy implications of passive fingerprinting or network information disclosure to users may be challenging. - - Implementers should support Client Hints opt-in, delivered over secure transport, as advertised by Accept-CH and Accept-CH-Lifetime header fields, and clear remembered opt-in when site data, browsing history, browsing cache, or similar, are cleared. - - Implementations specific to certain use cases or threat models may avoid transmitting Client Hints header fields altogether or limit them to authenticated sessions only that already carry identifying information, such as cookies or referer data. - -Following the above recommendations should significantly reduce the risks of linkability and passive fingerprinting. + - Implementers should support Client Hints opt-in, delivered over secure transport, as advertised by Accept-CH and Accept-CH-Lifetime header fields, and must clear remembered opt-in when site data, browsing history, browsing cache, or similar, are cleared. + - Implementations specific to certain use cases or threat models may avoid transmitting some or all of Client Hints header fields. For example, by limiting them to authenticated sessions only that already carry identifying information, such as cookies or referer data, and/or avoid transmission of header fields that carry higher risks of linkability. # IANA Considerations From 7d738c9044bce7bdee548209eac47436c469b71d Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 13 Oct 2017 13:43:04 -0700 Subject: [PATCH 09/13] rework accept-ch / accept-ch-lifetime text --- draft-ietf-httpbis-client-hints.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index 048868b9c..a9d5d7f9c 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -127,20 +127,21 @@ For example: Accept-CH: DPR, Width, Viewport-Width ~~~ -When a client receives an HTTP response, over a secure transport, that contains Accept-CH header field, or if it is capable of processing the HTML response and finds an equivalent HTML meta element, it can treat it as a signal that the origin ({{RFC6454}}) is interested in receiving specified request header fields that match the advertised field-values; same-origin resource requests initiated as a result of processing the response from the server that includes the Accept-CH opt-in can include the request header fields that match the advertised field-values. +When a client receives an HTTP response advertising support for Client Hints, it should process it as origin ({{RFC6454}}) opt-in to receive Client Hint header fields advertised in the field-value. The opt-in MUST be delivered over a secure transport. For example, based on Accept-CH example above, a user agent could append DPR, Width, and Viewport-Width header fields to all same-origin resource requests initiated by the page constructed from the response. ### The Accept-CH-Lifetime Header Field {#accept-ch-lifetime} -Servers can ask the client to remember sent Accept-CH preference for a specified period of time, to enable delivery of Client Hints on subsequent requests to the server's origin ({{RFC6454}}). +Servers can ask the client to remember the set of Client Hints that the server supports for a specified period of time, to enable delivery of Client Hints on subsequent requests to the server's origin ({{RFC6454}}). ~~~ abnf7230 Accept-CH-Lifetime = #delta-seconds ~~~ -When a client receives an HTTP response, over a secure transport, that contains Accept-CH-Lifetime header field, the field-value indicates that the Accept-CH preference SHOULD be persisted and bound to the origin, and be considered stale after response's age ({{RFC7234}}, section 4.2) is greater than the specified number of seconds. +When a client receives an HTTP response that contains Accept-CH-Lifetime header field, the field-value indicates that the Accept-CH preference SHOULD be persisted and bound to the origin, and be considered stale after response's age ({{RFC7234}}, section 4.2) is greater than the specified number of seconds. +The preference MUST be delivered over a secure transport, and MUST NOT be persisted for an origin that isn't HTTPS. ~~~ example Accept-CH: DPR, Width From 29065ebf0864474dd48bcd1e55504bb96606f7ed Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 13 Oct 2017 14:26:39 -0700 Subject: [PATCH 10/13] use origins in example --- draft-ietf-httpbis-client-hints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index a9d5d7f9c..f57517ca1 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -149,7 +149,7 @@ The preference MUST be delivered over a secure transport, and MUST NOT be persis Accept-CH-Lifetime: 86400 ~~~ -For example, based on the Accept-CH and Accept-CH-Lifetime example above, which is received from bar.com in response to a resource request initiated by foo.com, both delivered over a secure transport: a user agent SHOULD persist an Accept-CH preference bound to foo.com, for requests initiated to bar.com from foo.com, for up to 86400 seconds (1 day); this preference SHOULD NOT extend to requests initiated to bar.com from other origins. +For example, based on the Accept-CH and Accept-CH-Lifetime example above, which is received from "https://bar.example.com" in response to a resource request initiated by "https://foo.example.com", both delivered over a secure transport: a user agent SHOULD persist an Accept-CH preference bound to "https://foo.example.com", for requests initiated to "https://bar.example.com" from "https://foo.example.com", for up to 86400 seconds (1 day). This preference SHOULD NOT extend to requests initiated to "https://bar.example.com" from other origins. If Accept-CH-Lifetime occurs in a message more than once, the last value overrides all previous occurrences. From b4ef4d00fe450fc09332332f25fb014bfa1fda7f Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 13 Oct 2017 14:26:56 -0700 Subject: [PATCH 11/13] integrate Martin's feedback for security section --- draft-ietf-httpbis-client-hints.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index f57517ca1..093019ac6 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -260,13 +260,14 @@ The Content-DPR response header field indicates to the client that the server ha The request header fields defined in this specification, and those that extend it, expose information about the user's environment to enable proactive content negotiation. Such information may reveal new information about the user and implementers ought to consider the following considerations, recommendations, and best practices. -Transmitted Client Hints header fields should not provide new information that is otherwise not available to the application via HTML, CSS, or JavaScript. Further, sending highly granular data, such as image and viewport width may help identify users across multiple requests. Restricting such field values to an enumerated range, where the advertised value is close but is not an exact representation of the current value, can help reduce the risk of such linkability as well as reduce possibility of unnecessary cache fragmentation. +Transmitted Client Hints header fields SHOULD NOT provide new information that is otherwise not available to the application via other means, such as using HTML, CSS, or JavaScript. Further, sending highly granular data, such as image and viewport width may help identify users across multiple requests. Reducing the set of field values that can be expressed, or restricting them to an enumerated range where the advertised value is close but is not an exact representation of the current value, can improve privacy and reduce risk of linkability by ensuring that the same value is sent by multiple users. However, such precautions can still be insufficient for some types of data, especially data that can change over time. -Implementers should consider both user and server controlled mechanisms and policies to control which Client Hints header fields are advertised: +Implementers ought to consider both user and server controlled mechanisms and policies to control which Client Hints header fields are advertised: - - Implementers may provide user choice mechanisms so that users may balance privacy concerns with bandwidth limitations. However, implementers should also be aware that explaining the privacy implications of passive fingerprinting or network information disclosure to users may be challenging. - - Implementers should support Client Hints opt-in, delivered over secure transport, as advertised by Accept-CH and Accept-CH-Lifetime header fields, and must clear remembered opt-in when site data, browsing history, browsing cache, or similar, are cleared. - - Implementations specific to certain use cases or threat models may avoid transmitting some or all of Client Hints header fields. For example, by limiting them to authenticated sessions only that already carry identifying information, such as cookies or referer data, and/or avoid transmission of header fields that carry higher risks of linkability. + - Implementers MAY provide user choice mechanisms so that users may balance privacy concerns with bandwidth limitations. However, implementers should also be aware that explaining the privacy implications of passive fingerprinting or network information disclosure to users may be challenging. + - Implementations specific to certain use cases or threat models MAY avoid transmitting some or all of Client Hints header fields. For example, avoid transmission of header fields that can carry higher risks of linkability. + +Implementers SHOULD support Client Hints opt-in mechanisms and MUST clear persisted opt-in preferences when site data, browsing history, browsing cache, or similar, are cleared. # IANA Considerations From 79e372cdde49f724f22091f08d7a7100c4b838dd Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 27 Oct 2017 11:24:58 -0700 Subject: [PATCH 12/13] fix typo --- draft-ietf-httpbis-client-hints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index 093019ac6..0b7613338 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -103,7 +103,7 @@ A Client Hint request header field is a HTTP header field that is used by HTTP c Clients control which Client Hints are sent in requests, based on their default settings, user configuration and/or preferences. The client and server can use an opt-in mechanism outlined below to negotiate which fields should be sent to allow for efficient content adaption. -Implementers should be be aware of the passive fingerprinting and network information disclosure implications when implementing support for Client Hints, and follow the considerations outlined in "Security Considerations" section of this document. +Implementers should be aware of the passive fingerprinting and network information disclosure implications when implementing support for Client Hints, and follow the considerations outlined in "Security Considerations" section of this document. ## Server Processing of Client Hints From 0caa65480bc3011b5c44f46ebd0b60223d72f22a Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Fri, 27 Oct 2017 11:30:59 -0700 Subject: [PATCH 13/13] update 05 changelog --- draft-ietf-httpbis-client-hints.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/draft-ietf-httpbis-client-hints.md b/draft-ietf-httpbis-client-hints.md index 0b7613338..f006deb0b 100644 --- a/draft-ietf-httpbis-client-hints.md +++ b/draft-ietf-httpbis-client-hints.md @@ -357,34 +357,34 @@ Above example indicates that the cache key needs to include the value of the Wid # Changes ## Since -00 - * Issue 168 (make Save-Data extensible) updated ABNF. * Issue 163 (CH review feedback) editorial feedback from httpwg list. * Issue 153 (NetInfo API citation) added normative reference. - ## Since -01 - * Issue 200: Moved Key reference to informative. * Issue 215: Extended passive fingerprinting and mitigation considerations. * Changed document status to experimental. ## Since -02 - * Issue 239: Updated reference to CR-css-values-3 * Issue 240: Updated reference for Network Information API * Issue 241: Consistency in IANA considerations * Issue 250: Clarified Accept-CH ## Since -03 - * Issue 284: Extended guidance for Accept-CH * Issue 308: Editorial cleanup * Issue 306: Define Accept-CH-Lifetime ## Since -04 * Issue 361: Removed Downlink -* Issue 361: Moved Key to appendix, plus other editorial feedback. +* Issue 361: Moved Key to appendix, plus other editorial feedback ## Since -05 +* Issue 372: Scoped CH opt-in and delivery to secure transports +* Issue 373: Bind CH opt-in to origin + +## Since -06 * None +