draft-ietf-httpbis-http2-encryption-11.txt   rfc8164.txt 
HTTP Working Group M. Nottingham Internet Engineering Task Force (IETF) M. Nottingham
Internet-Draft Request for Comments: 8164
Intended status: Experimental M. Thomson Category: Experimental M. Thomson
Expires: September 18, 2017 Mozilla ISSN: 2070-1721 Mozilla
March 17, 2017 May 2017
Opportunistic Security for HTTP/2 Opportunistic Security for HTTP/2
draft-ietf-httpbis-http2-encryption-11
Abstract Abstract
This document describes how "http" URIs can be accessed using This document describes how "http" URIs can be accessed using
Transport Layer Security (TLS) and HTTP/2 to mitigate pervasive Transport Layer Security (TLS) and HTTP/2 to mitigate pervasive
monitoring attacks. This mechanism not a replacement for "https" monitoring attacks. This mechanism not a replacement for "https"
URIs; it is vulnerable to active attacks. URIs; it is vulnerable to active attacks.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This document is not an Internet Standards Track specification; it is
provisions of BCP 78 and BCP 79. published for examination, experimental implementation, and
evaluation.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document defines an Experimental Protocol for the Internet
and may be updated, replaced, or obsoleted by other documents at any community. This document is a product of the Internet Engineering
time. It is inappropriate to use Internet-Drafts as reference Task Force (IETF). It represents the consensus of the IETF
material or to cite them other than as "work in progress." community. It has received public review and has been approved for
publication by the Internet Engineering Steering Group (IESG). Not
all documents approved by the IESG are a candidate for any level of
Internet Standard; see Section 2 of RFC 7841.
This Internet-Draft will expire on September 18, 2017. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc8164.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction ....................................................2
1.1. Goals and Non-Goals . . . . . . . . . . . . . . . . . . . 2 1.1. Goals and Non-goals ........................................3
1.2. Notational Conventions . . . . . . . . . . . . . . . . . 3 1.2. Notational Conventions .....................................3
2. Using HTTP URIs over TLS . . . . . . . . . . . . . . . . . . 3 2. Using HTTP URIs over TLS ........................................3
2.1. Alternative Server Opt-In . . . . . . . . . . . . . . . . 4 2.1. Alternative Server Opt-In ..................................4
2.2. Interaction with "https" URIs . . . . . . . . . . . . . . 5 2.2. Interaction with "https" URIs ..............................5
2.3. The "http-opportunistic" well-known URI . . . . . . . . . 5 2.3. The "http-opportunistic" Well-Known URI ....................5
3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 3. IANA Considerations .............................................6
4. Security Considerations . . . . . . . . . . . . . . . . . . . 6 4. Security Considerations .........................................7
4.1. Security Indicators . . . . . . . . . . . . . . . . . . . 6 4.1. Security Indicators ........................................7
4.2. Downgrade Attacks . . . . . . . . . . . . . . . . . . . . 6 4.2. Downgrade Attacks ..........................................7
4.3. Privacy Considerations . . . . . . . . . . . . . . . . . 6 4.3. Privacy Considerations .....................................7
4.4. Confusion Regarding Request Scheme . . . . . . . . . . . 7 4.4. Confusion regarding Request Scheme .........................7
4.5. Server Controls . . . . . . . . . . . . . . . . . . . . . 7 4.5. Server Controls ............................................8
5. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 5. References ......................................................8
5.1. Normative References . . . . . . . . . . . . . . . . . . 7 5.1. Normative References .......................................8
5.2. Informative References . . . . . . . . . . . . . . . . . 8 5.2. Informative References .....................................9
Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 9 Acknowledgements ...................................................9
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 Authors' Addresses ................................................10
1. Introduction 1. Introduction
This document describes a use of HTTP Alternative Services [RFC7838] This document describes a use of HTTP Alternative Services [RFC7838]
to decouple the URI scheme from the use and configuration of to decouple the URI scheme from the use and configuration of
underlying encryption. It allows an "http" URI to be accessed using underlying encryption. It allows an "http" URI [RFC7230] to be
HTTP/2 [RFC7230] and Transport Layer Security (TLS) [RFC5246] with accessed using HTTP/2 and Transport Layer Security (TLS) [RFC5246]
Opportunistic Security [RFC7435]. with Opportunistic Security [RFC7435].
This document describes a usage model whereby sites can serve "http" This document describes a usage model whereby sites can serve "http"
URIs over TLS, thereby avoiding the problem of serving Mixed Content URIs over TLS, thereby avoiding the problem of serving Mixed Content
(described in [W3C.CR-mixed-content-20160802]) while still providing (described in [W3C.CR-mixed-content-20160802]) while still providing
protection against passive attacks. protection against passive attacks.
Opportunistic Security does not provide the same guarantees as using Opportunistic Security does not provide the same guarantees as using
TLS with "https" URIs, because it is vulnerable to active attacks, TLS with "https" URIs, because it is vulnerable to active attacks,
and does not change the security context of the connection. and does not change the security context of the connection.
Normally, users will not be able to tell that it is in use (i.e., Normally, users will not be able to tell that it is in use (i.e.,
there will be no "lock icon"). there will be no "lock icon").
1.1. Goals and Non-Goals 1.1. Goals and Non-goals
The immediate goal is to make the use of HTTP more robust in the face The immediate goal is to make the use of HTTP more robust in the face
of pervasive passive monitoring [RFC7258]. of pervasive passive monitoring [RFC7258].
A secondary (but significant) goal is to provide for ease of A secondary (but significant) goal is to provide for ease of
implementation, deployment and operation. This mechanism is expected implementation, deployment, and operation. This mechanism is
to have a minimal impact upon performance, and require a trivial expected to have a minimal impact upon performance and require
administrative effort to configure. trivial administrative effort to configure.
Preventing active attacks (such as a Man-in-the-Middle) is a non-goal Preventing active attacks (such as man-in-the-middle attacks) is a
for this specification. Furthermore, this specification is not non-goal for this specification. Furthermore, this specification is
intended to replace or offer an alternative to "https", since "https" not intended to replace or offer an alternative to "https", since
both prevents active attacks and invokes a more stringent security "https" both prevents active attacks and invokes a more stringent
model in most clients. security model in most clients.
1.2. Notational Conventions 1.2. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
2. Using HTTP URIs over TLS 2. Using HTTP URIs over TLS
An origin server that supports the resolution of "http" URIs can An origin server that supports the resolution of "http" URIs can
skipping to change at page 3, line 49 skipping to change at page 4, line 13
the cleartext connection. the cleartext connection.
A client can also explicitly probe for an alternative service A client can also explicitly probe for an alternative service
advertisement by sending a request that bears little or no sensitive advertisement by sending a request that bears little or no sensitive
information, such as one with the OPTIONS method. Likewise, clients information, such as one with the OPTIONS method. Likewise, clients
with existing alternative services information could make such a with existing alternative services information could make such a
request before they expire, in order minimize the delays that might request before they expire, in order minimize the delays that might
be incurred. be incurred.
Client certificates are not meaningful for URLs with the "http" Client certificates are not meaningful for URLs with the "http"
scheme, and therefore clients creating new TLS connections to scheme; therefore, clients creating new TLS connections to
alternative services for the purposes of this specification MUST NOT alternative services for the purposes of this specification MUST NOT
present them. A server that also provides "https" resources on the present them. A server that also provides "https" resources on the
same port can request a certificate during the TLS handshake, but it same port can request a certificate during the TLS handshake, but it
MUST NOT abort the handshake if the client does not provide one. MUST NOT abort the handshake if the client does not provide one.
2.1. Alternative Server Opt-In 2.1. Alternative Server Opt-In
It is possible that the server might become confused about whether For various reasons, it is possible that the server might become
requests' URLs have a "http" or "https" scheme, for various reasons; confused about whether requests' URLs have an "http" or "https"
see Section 4.4. To ensure that the alternative service has opted scheme (see Section 4.4). To ensure that the alternative service has
into serving "http" URLs over TLS, clients are required to perform opted into serving "http" URLs over TLS, clients are required to
additional checks before directing "http" requests to it. perform additional checks before directing "http" requests to it.
Clients MUST NOT send "http" requests over a secured connection, Clients MUST NOT send "http" requests over a secured connection,
unless the chosen alternative service presents a certificate that is unless the chosen alternative service presents a certificate that is
valid for the origin as defined in [RFC2818]. Using an authenticated valid for the origin as defined in [RFC2818]. Using an authenticated
alternative service establishes "reasonable assurances" for the alternative service establishes "reasonable assurances" for the
purposes of [RFC7838]. In addition to authenticating the server, the purposes of [RFC7838]. In addition to authenticating the server, the
client MUST have obtained a valid http-opportunistic response for an client MUST have obtained a valid "http-opportunistic" response for
origin (as per Section 2.3) using the authenticated connection. An an origin (as per Section 2.3) using the authenticated connection.
exception to the latter restriction is made for requests for the An exception to the latter restriction is made for requests for the
"http-opportunistic" well-known URI. "http-opportunistic" well-known URI.
For example, assuming the following request is made over a TLS For example, assuming the following request is made over a TLS
connection that is successfully authenticated for those origins, the connection that is successfully authenticated for those origins, the
following request/response pair would allow requests for the origins following request/response pair would allow requests for the origins
"http://www.example.com" or "http://example.com" to be sent using a "http://www.example.com" or "http://example.com" to be sent using a
secured connection: secured connection:
HEADERS HEADERS
+ END_STREAM + END_STREAM
skipping to change at page 4, line 46 skipping to change at page 5, line 20
:authority = example.com :authority = example.com
:path = /.well-known/http-opportunistic :path = /.well-known/http-opportunistic
HEADERS HEADERS
:status = 200 :status = 200
content-type = application/json content-type = application/json
DATA DATA
+ END_STREAM + END_STREAM
[ "http://www.example.com", "http://example.com" ] [ "http://www.example.com", "http://example.com" ]
Though this document describes multiple origins, this is only for This document describes multiple origins, but only for operational
operational convenience. Only a request made to an origin (over an convenience. Only a request made to an origin (over an authenticated
authenticated connection) can be used to acquire this resource for connection) can be used to acquire the "http-opportunistic" resource
that origin. Thus in the example, the request to for that origin. Thus, in the example, the request to
"http://example.com" cannot be assumed to also provide an http- "http://example.com" cannot be assumed to also provide a
opportunistic response for "http://www.example.com". representation of the "http-opportunistic" resource for
"http://www.example.com".
2.2. Interaction with "https" URIs 2.2. Interaction with "https" URIs
Clients MUST NOT send "http" requests and "https" requests on the Clients MUST NOT send "http" and "https" requests on the same
same connection. Similarly, clients MUST NOT send "http" requests connection. Similarly, clients MUST NOT send "http" requests for
for multiple origins on the same connection. multiple origins on the same connection.
2.3. The "http-opportunistic" well-known URI 2.3. The "http-opportunistic" Well-Known URI
This specification defines the "http-opportunistic" well-known URI This specification defines the "http-opportunistic" well-known URI
[RFC5785]. A client is said to have a valid http-opportunistic [RFC5785]. A client is said to have a valid "http-opportunistic"
response for a given origin when: response for a given origin when:
o The client has requested the well-known URI from the origin over o The client has requested the well-known URI from the origin over
an authenticated connection and a 200 (OK) response was provided, an authenticated connection and a 200 (OK) response was provided,
and
o That response is fresh [RFC7234] (potentially through revalidation o That response is fresh [RFC7234] (potentially through revalidation
[RFC7232]), and [RFC7232]),
o That response has the media type "application/json", and o That response has the media type "application/json",
o That response's payload, when parsed as JSON [RFC7159], contains o That response's payload, when parsed as JSON [RFC7159], contains
an array as the root, and an array as the root, and
o The array contains a string that is a case-insensitive character- o The array contains a string that is a case-insensitive, character-
for-character match for the origin in question, serialised into for-character match for the origin in question, serialized into
Unicode as per Section 6.1 of [RFC6454]. Unicode as per Section 6.1 of [RFC6454].
A client MAY treat an "http-opportunistic" resource as invalid if A client MAY treat an "http-opportunistic" resource as invalid if
values it contains are not strings. values it contains are not strings.
This document does not define semantics for "http-opportunistic" This document does not define semantics for "http-opportunistic"
resources on an "https" origin, nor does it define semantics if the resources on an "https" origin, nor does it define semantics if the
resource includes "https" origins. resource includes "https" origins.
Allowing clients to cache the http-opportunistic resource means that Allowing clients to cache the "http-opportunistic" resource means
all alternative services need to be able to respond to requests for that all alternative services need to be able to respond to requests
"http" resources. A client is permitted to use an alternative for "http" resources. A client is permitted to use an alternative
service without acquiring the http-opportunistic resource from that service without acquiring the "http-opportunistic" resource from that
service. service.
A client MUST NOT use any cached copies of an http-opportunistic A client MUST NOT use any cached copies of an "http-opportunistic"
resource that was acquired (or revalidated) over an unauthenticated resource that was acquired (or revalidated) over an unauthenticated
connection. To avoid potential errors, a client can request or connection. To avoid potential errors, a client can request or
revalidate the http-opportunistic resource before using any revalidate the "http-opportunistic" resource before using any
connection to an alternative service. connection to an alternative service.
Clients that use cached http-opportunistic responses MUST ensure that Clients that use cached "http-opportunistic" responses MUST ensure
their cache is cleared of any responses that were acquired over an that their cache is cleared of any responses that were acquired over
unauthenticated connection. Revalidating an unauthenticated response an unauthenticated connection. Revalidating an unauthenticated
using an authenticated connection does not ensure the integrity of response using an authenticated connection does not ensure the
the response. integrity of the response.
3. IANA Considerations 3. IANA Considerations
This specification registers a Well-Known URI [RFC5785]: This specification registers the following well-known URI [RFC5785]:
o URI Suffix: http-opportunistic o URI Suffix: http-opportunistic
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 2.3 of [this specification] o Specification Document(s): Section 2.3 of RFC 8164
o Related Information: o Related Information:
4. Security Considerations 4. Security Considerations
4.1. Security Indicators 4.1. Security Indicators
User Agents MUST NOT provide any special security indicators when an User agents MUST NOT provide any special security indicators when an
"http" resource is acquired using TLS. In particular, indicators "http" resource is acquired using TLS. In particular, indicators
that might suggest the same level of security as "https" MUST NOT be that might suggest the same level of security as "https" MUST NOT be
used (e.g., a "lock device"). used (e.g., a "lock device").
4.2. Downgrade Attacks 4.2. Downgrade Attacks
A downgrade attack against the negotiation for TLS is possible. A downgrade attack against the negotiation for TLS is possible.
For example, because the "Alt-Svc" header field [RFC7838] likely For example, because the "Alt-Svc" header field [RFC7838] likely
appears in an unauthenticated and unencrypted channel, it is subject appears in an unauthenticated and unencrypted channel, it is subject
to downgrade by network attackers. In its simplest form, an attacker to downgrade by network attackers. In its simplest form, an attacker
that wants the connection to remain in the clear need only strip the that wants the connection to remain in the clear need only strip the
"Alt-Svc" header field from responses. "Alt-Svc" header field from responses.
4.3. Privacy Considerations 4.3. Privacy Considerations
Cached alternative services can be used to track clients over time; Cached alternative services can be used to track clients over time,
e.g., using a user-specific hostname. Clearing the cache reduces the e.g., using a user-specific hostname. Clearing the cache reduces the
ability of servers to track clients; therefore clients MUST clear ability of servers to track clients; therefore, clients MUST clear
cached alternative service information when clearing other origin- cached alternative service information when clearing other origin-
based state (i.e., cookies). based state (i.e., cookies).
4.4. Confusion Regarding Request Scheme 4.4. Confusion regarding Request Scheme
HTTP implementations and applications sometimes use ambient signals HTTP implementations and applications sometimes use ambient signals
to determine if a request is for an "https" resource; for example, to determine if a request is for an "https" resource; for example,
they might look for TLS on the stack, or a server port number of 443. they might look for TLS on the stack or a server port number of 443.
This might be due to expected limitations in the protocol (the most This might be due to expected limitations in the protocol (the most
common HTTP/1.1 request form does not carry an explicit indication of common HTTP/1.1 request form does not carry an explicit indication of
the URI scheme and the resource might have been developed assuming the URI scheme, and the resource might have been developed assuming
HTTP/1.1), or it may be because how the server and application are HTTP/1.1), or it may be because of how the server and application are
implemented (often, they are two separate entities, with a variety of implemented (often, they are two separate entities, with a variety of
possible interfaces between them). possible interfaces between them).
Any security decisions based upon this information could be misled by Any security decisions based upon this information could be misled by
the deployment of this specification, because it violates the the deployment of this specification, because it violates the
assumption that the use of TLS (or port 443) means that the client is assumption that the use of TLS (or port 443) means that the client is
accessing a HTTPS URI, and operating in the security context implied accessing an HTTPS URI and operating in the security context implied
by HTTPS. by HTTPS.
Therefore, server implementers and administrators need to carefully Therefore, server implementers and administrators need to carefully
examine the use of such signals before deploying this specification. examine the use of such signals before deploying this specification.
4.5. Server Controls 4.5. Server Controls
This specification requires that a server send both an Alternative This specification requires that a server send both an alternative
Service advertisement and host content in a well-known location to service advertisement and host content in a well-known location to
send HTTP requests over TLS. Servers SHOULD take suitable measures send HTTP requests over TLS. Servers SHOULD take suitable measures
to ensure that the content of the well-known resource remains under to ensure that the content of the well-known resource remains under
their control. Likewise, because the Alt-Svc header field is used to their control. Likewise, because the "Alt-Svc" header field is used
describe policies across an entire origin, servers SHOULD NOT permit to describe policies across an entire origin, servers SHOULD NOT
user content to set or modify the value of this header. permit user content to set or modify the value of this header.
5. References 5. References
5.1. Normative References 5.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>. <http://www.rfc-editor.org/info/rfc2119>.
skipping to change at page 9, line 9 skipping to change at page 9, line 34
5.2. Informative References 5.2. Informative References
[RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an
Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May
2014, <http://www.rfc-editor.org/info/rfc7258>. 2014, <http://www.rfc-editor.org/info/rfc7258>.
[RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection
Most of the Time", RFC 7435, DOI 10.17487/RFC7435, Most of the Time", RFC 7435, DOI 10.17487/RFC7435,
December 2014, <http://www.rfc-editor.org/info/rfc7435>. December 2014, <http://www.rfc-editor.org/info/rfc7435>.
[RFC7469] Evans, C., Palmer, C., and R. Sleevi, "Public Key Pinning
Extension for HTTP", RFC 7469, DOI 10.17487/RFC7469, April
2015, <http://www.rfc-editor.org/info/rfc7469>.
[W3C.CR-mixed-content-20160802] [W3C.CR-mixed-content-20160802]
West, M., "Mixed Content", World Wide Web Consortium CR West, M., "Mixed Content", World Wide Web Consortium CR
CR-mixed-content-20160802, August 2016, CR-mixed-content-20160802, August 2016,
<https://www.w3.org/TR/2016/CR-mixed-content-20160802>. <https://www.w3.org/TR/2016/CR-mixed-content-20160802>.
Appendix A. Acknowledgements Acknowledgements
Mike Bishop contributed significant text to this document. Mike Bishop contributed significant text to this document.
Thanks to Patrick McManus, Stefan Eissing, Eliot Lear, Stephen Thanks to Patrick McManus, Stefan Eissing, Eliot Lear, Stephen
Farrell, Guy Podjarny, Stephen Ludin, Erik Nygren, Paul Hoffman, Adam Farrell, Guy Podjarny, Stephen Ludin, Erik Nygren, Paul Hoffman, Adam
Langley, Eric Rescorla, Julian Reschke, Kari Hurtta, and Richard Langley, Eric Rescorla, Julian Reschke, Kari Hurtta, and Richard
Barnes for their feedback and suggestions. Barnes for their feedback and suggestions.
Authors' Addresses Authors' Addresses
 End of changes. 38 change blocks. 
105 lines changed or deleted 101 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/