draft-ietf-httpbis-alt-svc-03.txt   draft-ietf-httpbis-alt-svc-04.txt 
HTTPbis Working Group M. Nottingham HTTPbis Working Group M. Nottingham
Internet-Draft Akamai Internet-Draft Akamai
Intended status: Standards Track P. McManus Intended status: Standards Track P. McManus
Expires: April 3, 2015 Mozilla Expires: April 30, 2015 Mozilla
J. Reschke J. Reschke
greenbytes greenbytes
September 30, 2014 October 27, 2014
HTTP Alternative Services HTTP Alternative Services
draft-ietf-httpbis-alt-svc-03 draft-ietf-httpbis-alt-svc-04
Abstract Abstract
This document specifies "alternative services" for HTTP, which allow This document specifies "alternative services" for HTTP, which allow
an origin's resources to be authoritatively available at a separate an origin's resources to be authoritatively available at a separate
network location, possibly accessed with a different protocol network location, possibly accessed with a different protocol
configuration. configuration.
Editorial Note (To be removed by RFC Editor) Editorial Note (To be removed by RFC Editor)
skipping to change at page 1, line 49 skipping to change at page 1, line 49
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 3, 2015. This Internet-Draft will expire on April 30, 2015.
Copyright Notice Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the Copyright (c) 2014 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 . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Notational Conventions . . . . . . . . . . . . . . . . . . 3 1.1. Notational Conventions . . . . . . . . . . . . . . . . . . 4
2. Alternative Services Concepts . . . . . . . . . . . . . . . . 4 2. Alternative Services Concepts . . . . . . . . . . . . . . . . 5
2.1. Host Authentication . . . . . . . . . . . . . . . . . . . 5 2.1. Host Authentication . . . . . . . . . . . . . . . . . . . 6
2.2. Alternative Service Caching . . . . . . . . . . . . . . . 6 2.2. Alternative Service Caching . . . . . . . . . . . . . . . 7
2.3. Requiring Server Name Indication . . . . . . . . . . . . . 6 2.3. Requiring Server Name Indication . . . . . . . . . . . . . 7
2.4. Using Alternative Services . . . . . . . . . . . . . . . . 6 2.4. Using Alternative Services . . . . . . . . . . . . . . . . 7
3. The Alt-Svc HTTP Header Field . . . . . . . . . . . . . . . . 7 3. The Alt-Svc HTTP Header Field . . . . . . . . . . . . . . . . 8
3.1. Caching Alt-Svc Header Field Values . . . . . . . . . . . 9 3.1. Caching Alt-Svc Header Field Values . . . . . . . . . . . 10
4. The ALTSVC HTTP/2 Frame . . . . . . . . . . . . . . . . . . . 9 4. The ALTSVC HTTP/2 Frame . . . . . . . . . . . . . . . . . . . 10
5. The Alt-Svc-Used HTTP Header Field . . . . . . . . . . . . . . 11 5. The Alt-Used HTTP Header Field . . . . . . . . . . . . . . . . 12
6. The 421 Not Authoritative HTTP Status Code . . . . . . . . . . 12 6. The 421 Not Authoritative HTTP Status Code . . . . . . . . . . 13
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13
7.1. Header Field Registrations . . . . . . . . . . . . . . . . 12 7.1. Header Field Registrations . . . . . . . . . . . . . . . . 13
7.2. The ALTSVC HTTP/2 Frame Type . . . . . . . . . . . . . . . 13 7.2. The ALTSVC HTTP/2 Frame Type . . . . . . . . . . . . . . . 14
8. Internationalization Considerations . . . . . . . . . . . . . 13 8. Internationalization Considerations . . . . . . . . . . . . . 14
9. Security Considerations . . . . . . . . . . . . . . . . . . . 13 9. Security Considerations . . . . . . . . . . . . . . . . . . . 14
9.1. Changing Ports . . . . . . . . . . . . . . . . . . . . . . 13 9.1. Changing Ports . . . . . . . . . . . . . . . . . . . . . . 14
9.2. Changing Hosts . . . . . . . . . . . . . . . . . . . . . . 13 9.2. Changing Hosts . . . . . . . . . . . . . . . . . . . . . . 14
9.3. Changing Protocols . . . . . . . . . . . . . . . . . . . . 14 9.3. Changing Protocols . . . . . . . . . . . . . . . . . . . . 15
9.4. Tracking Clients Using Alternative Services . . . . . . . 14 9.4. Tracking Clients Using Alternative Services . . . . . . . 15
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 15 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 16
11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 15 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 16
11.1. Normative References . . . . . . . . . . . . . . . . . . . 15 11.1. Normative References . . . . . . . . . . . . . . . . . . . 16
11.2. Informative References . . . . . . . . . . . . . . . . . . 16 11.2. Informative References . . . . . . . . . . . . . . . . . . 17
Appendix A. Change Log (to be removed by RFC Editor before Appendix A. Change Log (to be removed by RFC Editor before
publication) . . . . . . . . . . . . . . . . . . . . 16 publication) . . . . . . . . . . . . . . . . . . . . 17
A.1. Since draft-nottingham-httpbis-alt-svc-05 . . . . . . . . 16 A.1. Since draft-nottingham-httpbis-alt-svc-05 . . . . . . . . 17
A.2. Since draft-ietf-httpbis-alt-svc-00 . . . . . . . . . . . 16 A.2. Since draft-ietf-httpbis-alt-svc-00 . . . . . . . . . . . 17
A.3. Since draft-ietf-httpbis-alt-svc-01 . . . . . . . . . . . 16 A.3. Since draft-ietf-httpbis-alt-svc-01 . . . . . . . . . . . 17
A.4. Since draft-ietf-httpbis-alt-svc-02 . . . . . . . . . . . 16 A.4. Since draft-ietf-httpbis-alt-svc-02 . . . . . . . . . . . 17
A.5. Since draft-ietf-httpbis-alt-svc-03 . . . . . . . . . . . 18
1. Introduction 1. Introduction
HTTP [RFC7230] conflates the identification of resources with their HTTP [RFC7230] conflates the identification of resources with their
location. In other words, "http://" (and "https://") URLs are used location. In other words, "http://" (and "https://") URLs are used
to both name and find things to interact with. to both name and find things to interact with.
In some cases, it is desirable to separate these aspects; to be able In some cases, it is desirable to separate identification and
to keep the same identifier for a resource, but interact with it location in HTTP; keeping the same identifier for a resource, but
using a different location on the network. interacting with it at a different location on the network.
For example: For example:
o An origin server might wish to redirect a client to an alternative o An origin server might wish to redirect a client to a different
when it needs to go down for maintenance, or it has found an server when it needs to go down for maintenance, or it has found a
alternative in a location that is more local to the client. server in a location that is more local to the client.
o An origin server might wish to offer access to its resources using o An origin server might wish to offer access to its resources using
a new protocol (such as HTTP/2, see [HTTP2]) or one using improved a new protocol (such as HTTP/2, see [HTTP2]) or one using improved
security (such as Transport Layer Security (TLS), see [RFC5246]). security (such as Transport Layer Security (TLS), see [RFC5246]).
o An origin server might wish to segment its clients into groups of o An origin server might wish to segment its clients into groups of
capabilities, such as those supporting Server Name Indication capabilities, such as those supporting Server Name Indication
(SNI, see Section 3 of [RFC6066]) and those not supporting it, for (SNI, see Section 3 of [RFC6066]) and those not supporting it, for
operational purposes. operational purposes.
This specification defines a new concept in HTTP, "Alternative This specification defines a new concept in HTTP, "Alternative
Services", that allows a resource to nominate additional means of Services", that allows an origin server to nominate additional means
interacting with it on the network. It defines a general framework of interacting with it on the network. It defines a general
for this in Section 2, along with specific mechanisms for advertising framework for this in Section 2, along with specific mechanisms for
their existence using HTTP header fields (Section 3) or an HTTP/2 advertising their existence using HTTP header fields (Section 3) or
frame type (Section 4). an HTTP/2 frame type (Section 4).
It also introduces a new status code in Section 6, so that origin It also introduces a new status code in Section 6, so that origin
servers (or their nominated alternatives) can indicate that they are servers (or their nominated alternatives) can indicate that they are
not authoritative for a given origin, in cases where the wrong not authoritative for a given origin, in cases where the wrong
location is used. location is used.
1.1. Notational Conventions 1.1. 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
skipping to change at page 4, line 10 skipping to change at page 5, line 10
This document uses the Augmented BNF defined in [RFC5234] along with This document uses the Augmented BNF defined in [RFC5234] along with
the "OWS", "delta-seconds", "parameter", "port", "quoted-string", the "OWS", "delta-seconds", "parameter", "port", "quoted-string",
"token", and "uri-host" rules from [RFC7230], and uses the "#rule" "token", and "uri-host" rules from [RFC7230], and uses the "#rule"
extension defined in Section 7 of that document. extension defined in Section 7 of that document.
2. Alternative Services Concepts 2. Alternative Services Concepts
This specification defines a new concept in HTTP, the "alternative This specification defines a new concept in HTTP, the "alternative
service". When an origin (see [RFC6454]) has resources that are service". When an origin (see [RFC6454]) has resources that are
accessible through a different protocol / host / port combination, it accessible through a different protocol / host / port combination, it
is said to have an alternative service. is said to have an alternative service available.
An alternative service can be used to interact with the resources on An alternative service can be used to interact with the resources on
an origin server at a separate location on the network, possibly an origin server at a separate location on the network, possibly
using a different protocol configuration. Alternative services are using a different protocol configuration. Alternative services are
considered authoritative for an origin's resources, in the sense of considered authoritative for an origin's resources, in the sense of
[RFC7230], Section 9.1. [RFC7230], Section 9.1.
For example, an origin: For example, an origin:
("http", "www.example.com", "80") ("http", "www.example.com", "80")
skipping to change at page 4, line 47 skipping to change at page 5, line 47
of these routes -- the default route is derived from origin itself of these routes -- the default route is derived from origin itself
and the other routes are introduced based on alternative-protocol and the other routes are introduced based on alternative-protocol
information. information.
Furthermore, it is important to note that the first member of an Furthermore, it is important to note that the first member of an
alternative service tuple is different from the "scheme" component of alternative service tuple is different from the "scheme" component of
an origin; it is more specific, identifying not only the major an origin; it is more specific, identifying not only the major
version of the protocol being used, but potentially communication version of the protocol being used, but potentially communication
options for that protocol. options for that protocol.
This means that clients using an alternative service will change the This means that clients using an alternative service can change the
host, port and protocol that they are using to fetch resources, but host, port and protocol that they are using to fetch resources, but
these changes MUST NOT be propagated to the application that is using these changes MUST NOT be propagated to the application that is using
HTTP; from that standpoint, the URI being accessed and all HTTP; from that standpoint, the URI being accessed and all
information derived from it (scheme, host, port) are the same as information derived from it (scheme, host, port) are the same as
before. before.
Importantly, this includes its security context; in particular, when Importantly, this includes its security context; in particular, when
TLS [RFC5246] is in use, the alternative server will need to present TLS [RFC5246] is in use, the alternative service will need to present
a certificate for the origin's host name, not that of the a certificate for the origin's host name, not that of the
alternative. Likewise, the Host header field ([RFC7230], Section alternative. Likewise, the Host header field ([RFC7230], Section
5.4) is still derived from the origin, not the alternative service 5.4) is still derived from the origin, not the alternative service
(just as it would if a CNAME were being used). (just as it would if a CNAME were being used).
The changes MAY, however, be made visible in debugging tools, The changes MAY, however, be made visible in debugging tools,
consoles, etc. consoles, etc.
Formally, an alternative service is identified by the combination of: Formally, an alternative service is identified by the combination of:
skipping to change at page 5, line 33 skipping to change at page 6, line 33
Additionally, each alternative service MUST have: Additionally, each alternative service MUST have:
o A freshness lifetime, expressed in seconds; see Section 2.2 o A freshness lifetime, expressed in seconds; see Section 2.2
There are many ways that a client could discover the alternative There are many ways that a client could discover the alternative
service(s) associated with an origin. This document describes two service(s) associated with an origin. This document describes two
such mechanisms: an HTTP header field (Section 3) and an HTTP/2 frame such mechanisms: an HTTP header field (Section 3) and an HTTP/2 frame
type (Section 4). type (Section 4).
The remainder of this section describes requirements that are common
to alternative services, regardless of how they are discovered.
2.1. Host Authentication 2.1. Host Authentication
Clients MUST NOT use alternative services with a host other than the Clients MUST NOT use alternative services with a host that is
origin's without strong server authentication; this mitigates the different than the origin's without strong server authentication;
attack described in Section 9.2. One way to achieve this is for the this mitigates the attack described in Section 9.2. One way to
alternative to use TLS with a certificate that is valid for that achieve this is for the alternative to use TLS with a certificate
origin. that is valid for that origin.
For example, if the origin's host is "www.example.com" and an For example, if the origin's host is "www.example.com" and an
alternative is offered on "other.example.com" with the "h2" protocol, alternative is offered on "other.example.com" with the "h2" protocol,
and the certificate offered is valid for "www.example.com", the and the certificate offered is valid for "www.example.com", the
client can use the alternative. However, if "other.example.com" is client can use the alternative. However, if "other.example.com" is
offered with the "h2c" protocol, the client cannot use it, because offered with the "h2c" protocol, the client cannot use it, because
there is no mechanism in that protocol to establish strong server there is no mechanism in that protocol to establish strong server
authentication. authentication.
Furthermore, this means that the HTTP Host header field and the SNI
information provided in TLS by the client will be that of the origin,
not the alternative.
2.2. Alternative Service Caching 2.2. Alternative Service Caching
Mechanisms for discovering alternative services can associate a Mechanisms for discovering alternative services also associate a
freshness lifetime with them; for example, the Alt-Svc header field freshness lifetime with them; for example, the Alt-Svc header field
uses the "ma" parameter. uses the "ma" parameter.
Clients MAY choose to use an alternative service instead of the Clients MAY choose to use an alternative service instead of the
origin at any time when it is considered fresh; see Section 2.4 for origin at any time when it is considered fresh; see Section 2.4 for
specific recommendations. specific recommendations.
Clients with existing connections to alternative services are not Clients with existing connections to an alternative service do not
needed to fall back to the origin when its freshness lifetime ends; need to stop using it when its freshness lifetime ends; i.e., the
i.e., the caching mechanism is intended for limiting how long an caching mechanism is intended for limiting how long an alternative
alternative service can be used for establishing new requests, not service can be used for establishing new requests, not limiting the
limiting the use of existing ones. use of existing ones.
Clients ought to consider that changes in network configurations can Clients ought to consider that changes in network configurations can
result in suboptimal or compromised cached alternative services. result in suboptimal or compromised cached alternative services.
2.3. Requiring Server Name Indication 2.3. Requiring Server Name Indication
A client MUST only use a TLS-based alternative service if the client A client MUST only use a TLS-based alternative service if the client
also supports TLS Server Name Indication (SNI). This supports the also supports TLS Server Name Indication (SNI). This supports the
conservation of IP addresses on the alternative service host. conservation of IP addresses on the alternative service host.
Note that the SNI information provided in TLS by the client will be
that of the origin, not the alternative (as will the Host HTTP header
field-value).
2.4. Using Alternative Services 2.4. Using Alternative Services
By their nature, alternative services are OPTIONAL: clients do not By their nature, alternative services are OPTIONAL: clients do not
need to use them. However, it is advantageous for clients to behave need to use them. However, it is advantageous for clients to behave
in a predictable way when they are used by servers (e.g., for load in a predictable way when they are used by servers (e.g., for load
balancing). balancing).
Therefore, if a client becomes aware of an alternative service, the Therefore, if a client becomes aware of an alternative service, the
client SHOULD use that alternative service for all requests to the client SHOULD use that alternative service for all requests to the
associated origin as soon as it is available, provided that the associated origin as soon as it is available, provided that the
security properties of the alternative service protocol are security properties of the alternative service protocol are
desirable, as compared to the existing connection. desirable, as compared to the existing connection.
If a client becomes aware of multiple alternative services, it MAY If a client becomes aware of multiple alternative services, it MAY
choose the most suitable according to its own criteria (again, choose the most suitable according to its own criteria (again,
keeping security properties in mind). For example, an origin might keeping security properties in mind). For example, an origin might
advertise multiple alternative services to notify clients of support advertise multiple alternative services to notify clients of support
for multiple versions of HTTP; or, an alternative service might for multiple versions of HTTP; or, an alternative service might
itself advertise an alternative. itself advertise an alternative.
When a client uses an alternate service, it MUST emit the Alt-Svc- When a client uses an alternate service, it MUST emit the Alt-Used
Used header field (Section 5) on every request using that alternate header field (Section 5) on every request using that alternate
service. service.
The client does not need to block requests; the origin's connection The client does not need to block requests on any existing
can be used until the alternative connection is established. connection; it can be used until the alternative connection is
However, if the security properties of the existing connection are established. However, if the security properties of the existing
weak (e.g. cleartext HTTP/1.1) then it might make sense to block connection are weak (e.g. cleartext HTTP/1.1) then it might make
until the new connection is fully available in order to avoid sense to block until the new connection is fully available in order
information leakage. to avoid information leakage.
Furthermore, if the connection to the alternative service fails or is Furthermore, if the connection to the alternative service fails or is
unresponsive, the client MAY fall back to using the origin. Note, unresponsive, the client MAY fall back to using the origin or another
however, that this could be the basis of a downgrade attack, thus alternative service. Note, however, that this could be the basis of
losing any enhanced security properties of the alternative service. a downgrade attack, thus losing any enhanced security properties of
the alternative service.
3. The Alt-Svc HTTP Header Field 3. The Alt-Svc HTTP Header Field
An HTTP(S) origin server can advertise the availability of An HTTP(S) origin server can advertise the availability of
alternative services to clients by adding an Alt-Svc header field to alternative services to clients by adding an Alt-Svc header field to
responses. responses.
Alt-Svc = 1#( alternative *( OWS ";" OWS parameter ) ) Alt-Svc = 1#( alternative *( OWS ";" OWS parameter ) )
alternative = protocol-id "=" alt-authority alternative = protocol-id "=" alt-authority
protocol-id = token ; percent-encoded ALPN protocol identifier protocol-id = token ; percent-encoded ALPN protocol identifier
skipping to change at page 8, line 35 skipping to change at page 9, line 35
| h2 | h2 | No escaping needed | | h2 | h2 | No escaping needed |
+--------------------+-------------+---------------------+ +--------------------+-------------+---------------------+
| w=x:y#z | w%3Dx%3Ay#z | "=" and ":" escaped | | w=x:y#z | w%3Dx%3Ay#z | "=" and ":" escaped |
+--------------------+-------------+---------------------+ +--------------------+-------------+---------------------+
| x%y | x%25y | "%" needs escaping | | x%y | x%25y | "%" needs escaping |
+--------------------+-------------+---------------------+ +--------------------+-------------+---------------------+
Alt-Svc MAY occur in any HTTP response message, regardless of the Alt-Svc MAY occur in any HTTP response message, regardless of the
status code. status code.
It can, however, have multiple values: The Alt-Svc field value can have multiple values:
Alt-Svc: h2c=":8000", h2=":443" Alt-Svc: h2c=":8000", h2=":443"
The value(s) advertised by Alt-Svc can be used by clients to open a The value(s) advertised by Alt-Svc can be used by clients to open a
new connection to one or more alternative services immediately, or new connection to one or more alternative services immediately, or
simultaneously with subsequent requests on the same connection. simultaneously with subsequent requests on the same connection.
To reduce the ability of servers to track individual clients over
time (see Section 9.4), an alternative service indication sent by a
client SHOULD NOT include any alternative service information other
than the protocol, host and port.
When using HTTP/2 ([HTTP2]), servers SHOULD instead send an ALTSVC When using HTTP/2 ([HTTP2]), servers SHOULD instead send an ALTSVC
frame (Section 4). A single ALTSVC frame can be sent for a frame (Section 4). A single ALTSVC frame can be sent for a
connection; a new frame is not needed for every request. connection; a new frame is not needed for every request.
Note that all field elements that allow "quoted-string" syntax MUST Note that all field elements that allow "quoted-string" syntax MUST
be processed as per Section 3.2.6 of [RFC7230]. be processed as per Section 3.2.6 of [RFC7230].
3.1. Caching Alt-Svc Header Field Values 3.1. Caching Alt-Svc Header Field Values
When an alternative service is advertised using Alt-Svc, it is When an alternative service is advertised using Alt-Svc, it is
skipping to change at page 9, line 36 skipping to change at page 10, line 35
Cache-Control: 600 Cache-Control: 600
Age: 30 Age: 30
Alt-Svc: h2c=":8000"; ma=60 Alt-Svc: h2c=":8000"; ma=60
indicates that an alternative service is available and usable for the indicates that an alternative service is available and usable for the
next 60 seconds. However, the response has already been cached for next 60 seconds. However, the response has already been cached for
30 seconds (as per the Age header field value), so therefore the 30 seconds (as per the Age header field value), so therefore the
alternative service is only fresh for the 30 seconds from when this alternative service is only fresh for the 30 seconds from when this
response was received, minus estimated transit time. response was received, minus estimated transit time.
Note that the freshness lifetime for HTTP caching (here, 600 seconds)
does not affect caching of Alt-Svc values.
When an Alt-Svc response header field is received from an origin, its When an Alt-Svc response header field is received from an origin, its
value invalidates and replaces all cached alternative services for value invalidates and replaces all cached alternative services for
that origin. that origin.
See Section 2.2 for general requirements on caching alternative See Section 2.2 for general requirements on caching alternative
services. services.
Note that the freshness lifetime for HTTP caching (here, 600 seconds)
does not affect caching of Alt-Svc values.
4. The ALTSVC HTTP/2 Frame 4. The ALTSVC HTTP/2 Frame
The ALTSVC HTTP/2 frame ([HTTP2], Section 4) advertises the The ALTSVC HTTP/2 frame ([HTTP2], Section 4) advertises the
availability of an alternative service to an HTTP/2 client. availability of an alternative service to an HTTP/2 client.
The ALTSVC frame is a non-critical extension to HTTP/2. Endpoints The ALTSVC frame is a non-critical extension to HTTP/2. Endpoints
that do not support this frame can safely ignore it. that do not support this frame can safely ignore it.
An ALTSVC frame on a client-initiated stream indicates that the An ALTSVC frame from a server to a client on a client-initiated
conveyed alternative service is associated with the origin of that stream indicates that the conveyed alternative service is associated
stream. with the origin of that stream.
An ALTSVC frame on stream 0 indicates that the conveyed alternative An ALTSVC frame from a server to a client on stream 0 indicates that
service is associated with the origin contained in the Origin field the conveyed alternative service is associated with the origin
of the frame. An association with an origin that the client does not contained in the Origin field of the frame. An association with an
consider authoritative for the current connection MUST be ignored. origin that the client does not consider authoritative for the
current connection MUST be ignored.
The ALTSVC frame type is 0xa (decimal 10). The ALTSVC frame type is 0xa (decimal 10).
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Max-Age (32) | | Max-Age (32) |
+-------------------------------+---------------+---------------+ +-------------------------------+---------------+---------------+
| Port (16) | Proto-Len (8) | | Port (16) | Proto-Len (8) |
+-------------------------------+---------------+---------------+ +-------------------------------+---------------+---------------+
skipping to change at page 11, line 24 skipping to change at page 12, line 21
length) containing the ASCII serialization of an origin length) containing the ASCII serialization of an origin
([RFC6454], Section 6.2) that the alternate service is applicable ([RFC6454], Section 6.2) that the alternate service is applicable
to. to.
The ALTSVC frame does not define any flags. The ALTSVC frame does not define any flags.
The ALTSVC frame is intended for receipt by clients; a server that The ALTSVC frame is intended for receipt by clients; a server that
receives an ALTSVC frame MUST treat it as a connection error of type receives an ALTSVC frame MUST treat it as a connection error of type
PROTOCOL_ERROR. PROTOCOL_ERROR.
An ALTSVC frame on a client-initiated stream containing non-empty
"Origin" information is invalid and MUST be ignored. Likewise, an
ALTSVC frame on stream 0 with empty (length 0) "Origin" information
is invalid and MUST be ignored.
The ALTSVC frame is processed hop-by-hop. An intermediary MUST NOT The ALTSVC frame is processed hop-by-hop. An intermediary MUST NOT
forward ALTSVC frames, though it can use the information contained in forward ALTSVC frames, though it can use the information contained in
ALTSVC frames in forming new ALTSVC frames to send to its own ALTSVC frames in forming new ALTSVC frames to send to its own
clients. clients.
5. The Alt-Svc-Used HTTP Header Field 5. The Alt-Used HTTP Header Field
The Alt-Svc-Used HTTP header field is used in requests to indicate The Alt-Used header field is used in requests to indicate that an
that an alternate service is in use. alternate service is in use.
Alt-Svc-Used = use-flag *( OWS ";" OWS ext-param ) Alt-Used = use-flag *( OWS ";" OWS ext-param )
use-flag = "1" / "0" use-flag = "1" / "0"
ext-param = token "=" ( token / quoted-string ) ext-param = token "=" ( token / quoted-string )
Alt-Svc-Used is intended to allow alternate services to avoid sending Alt-Used is intended to allow alternate services to avoid sending
alternative service indications where there is a risk of generating a alternative service indications where there is a risk of generating a
loops. It also allows a service to identify requests for accounting loops. It also allows a service to identify requests for accounting
and load balancing purposes. and load balancing purposes.
When using an alternative service, clients MUST include a Alt-Svc- When using an alternative service, clients MUST include a Alt-Used
Used header field in all requests. header field in all requests.
A flag value of "1" indicates that an alternate service was used, A flag value of "1" indicates that an alternate service was used,
while "0" means it was not. while "0" means it was not.
For example: For example:
GET /thing HTTP/1.1 GET /thing HTTP/1.1
Host: origin.example.com Host: origin.example.com
Alt-Svc-Used: 1 Alt-Used: 1
The extension parameters (ext-param) are reserved for future use; The extension parameters (ext-param) are reserved for future use;
specifications that want to define an extension will need to update specifications that want to define an extension will need to update
this document (and ought to introduce an extension registry). this document (and ought to introduce an extension registry).
6. The 421 Not Authoritative HTTP Status Code 6. The 421 Not Authoritative HTTP Status Code
The 421 (Not Authoritative) status code is defined in [HTTP2], The 421 (Not Authoritative) status code is defined in [HTTP2],
Section 9.1.2 to indicate that the current server instance is not Section 9.1.2 to indicate that the current server instance is not
authoritative for the requested resource. This can be used to authoritative for the requested resource. This can be used to
skipping to change at page 12, line 47 skipping to change at page 13, line 47
<https://www.iana.org/assignments/message-headers/>. <https://www.iana.org/assignments/message-headers/>.
This document defines the following HTTP header fields, so their This document defines the following HTTP header fields, so their
associated registry entries shall be added according to the permanent associated registry entries shall be added according to the permanent
registrations below (see [BCP90]): registrations below (see [BCP90]):
+-------------------+----------+----------+-----------+ +-------------------+----------+----------+-----------+
| Header Field Name | Protocol | Status | Reference | | Header Field Name | Protocol | Status | Reference |
+-------------------+----------+----------+-----------+ +-------------------+----------+----------+-----------+
| Alt-Svc | http | standard | Section 3 | | Alt-Svc | http | standard | Section 3 |
| Alt-Svc-Used | http | standard | Section 5 | | Alt-Used | http | standard | Section 5 |
+-------------------+----------+----------+-----------+ +-------------------+----------+----------+-----------+
The change controller is: "IETF (iesg@ietf.org) - Internet The change controller is: "IETF (iesg@ietf.org) - Internet
Engineering Task Force". Engineering Task Force".
7.2. The ALTSVC HTTP/2 Frame Type 7.2. The ALTSVC HTTP/2 Frame Type
This document registers the ALTSVC frame type in the HTTP/2 Frame This document registers the ALTSVC frame type in the HTTP/2 Frame
Types registry ([HTTP2], Section 11.2). Types registry ([HTTP2], Section 11.2).
skipping to change at page 13, line 50 skipping to change at page 14, line 50
9.2. Changing Hosts 9.2. Changing Hosts
When the host is changed due to the use of an alternative service, it When the host is changed due to the use of an alternative service, it
presents an opportunity for attackers to hijack communication to an presents an opportunity for attackers to hijack communication to an
origin. origin.
For example, if an attacker can convince a user agent to send all For example, if an attacker can convince a user agent to send all
traffic for "innocent.example.org" to "evil.example.com" by traffic for "innocent.example.org" to "evil.example.com" by
successfully associating it as an alternative service, they can successfully associating it as an alternative service, they can
masquerade as that origin. This can be done locally (see mitigations masquerade as that origin. This can be done locally (see mitigations
above) or remotely (e.g., by an intermediary as a man-in-the-middle in Section 9.1) or remotely (e.g., by an intermediary as a man-in-
attack). the-middle attack).
This is the reason for the requirement in Section 2.1 that any This is the reason for the requirement in Section 2.1 that any
alternative service with a host different to the origin's be strongly alternative service with a host different to the origin's be strongly
authenticated with the origin's identity; i.e., presenting a authenticated with the origin's identity; i.e., presenting a
certificate for the origin proves that the alternative service is certificate for the origin proves that the alternative service is
authorized to serve traffic for the origin. authorized to serve traffic for the origin.
However, this authorization is only as strong as the method used to However, this authorization is only as strong as the method used to
authenticate the alternative service. In particular, there are well- authenticate the alternative service. In particular, there are well-
known exploits to make an attacker's certificate appear as known exploits to make an attacker's certificate appear as
skipping to change at page 14, line 41 skipping to change at page 15, line 41
not use some form of end-to-end encryption (most likely, TLS), it not use some form of end-to-end encryption (most likely, TLS), it
violates the expectations for security that the URI scheme implies. violates the expectations for security that the URI scheme implies.
Therefore, clients cannot blindly use alternative services, but Therefore, clients cannot blindly use alternative services, but
instead evaluate the option(s) presented to assure that security instead evaluate the option(s) presented to assure that security
requirements and expectations (of specifications, implementations and requirements and expectations (of specifications, implementations and
end users) are met. end users) are met.
9.4. Tracking Clients Using Alternative Services 9.4. Tracking Clients Using Alternative Services
The alternative service indicator (Section 5) provided by clients The Alt-Used header field (Section 5) provides a server with one
provides a server the means of correlating requests. If the additional bit of information that can be used to correlate requests.
alternative service indicator includes a sufficiently unique
identifier, requests made to an alternative service can be correlated
with the original alternative service advertisement.
Clients that do not wish to be tracked MAY choose to ignore Clients concerned by the additional fingerprinting can choose to
alternative service advertisements. ignore alternative service advertisements.
In a browser, any alternative service information MUST be removed In a browser, any alternative service information MUST be removed
when origin-specific data is cleared (for instance, when cookies are when origin-specific data is cleared (for instance, when cookies are
cleared). cleared).
10. Acknowledgements 10. Acknowledgements
Thanks to Adam Langley, Eliot Lear, Erik Nygren, Guy Podjarny, Paul Thanks to Adam Langley, Eliot Lear, Erik Nygren, Guy Podjarny, Paul
Hoffman, Richard Barnes, Stephen Farrell, Stephen Ludin, and Will Hoffman, Richard Barnes, Stephen Farrell, Stephen Ludin, and Will
Chan for their feedback and suggestions. Chan for their feedback and suggestions.
skipping to change at page 17, line 5 skipping to change at page 18, line 5
Moved definition of status code 421 to HTTP/2. Moved definition of status code 421 to HTTP/2.
Partly resolved <https://github.com/httpwg/http-extensions/issues/5>. Partly resolved <https://github.com/httpwg/http-extensions/issues/5>.
A.4. Since draft-ietf-httpbis-alt-svc-02 A.4. Since draft-ietf-httpbis-alt-svc-02
Updated ALPN reference. Updated ALPN reference.
Resolved <https://github.com/httpwg/http-extensions/issues/2>. Resolved <https://github.com/httpwg/http-extensions/issues/2>.
A.5. Since draft-ietf-httpbis-alt-svc-03
Renamed "Alt-Svc-Used" to "Alt-Used"
(<https://github.com/httpwg/http-extensions/issues/17>).
Clarify ALTSVC Origin information requirements
(<https://github.com/httpwg/http-extensions/issues/19>).
Remove/tune language with respect to tracking risks (see
<https://github.com/httpwg/http-extensions/issues/34>).
Authors' Addresses Authors' Addresses
Mark Nottingham Mark Nottingham
Akamai Akamai
EMail: mnot@mnot.net EMail: mnot@mnot.net
URI: https://www.mnot.net/ URI: https://www.mnot.net/
Patrick McManus Patrick McManus
Mozilla Mozilla
 End of changes. 39 change blocks. 
110 lines changed or deleted 124 lines changed or added

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