draft-ietf-quic-load-balancers-00.txt   draft-ietf-quic-load-balancers-01.txt 
QUIC M. Duke QUIC M. Duke
Internet-Draft F5 Networks, Inc. Internet-Draft F5 Networks, Inc.
Intended status: Standards Track N. Banks Intended status: Standards Track N. Banks
Expires: July 31, 2020 Microsoft Expires: August 1, 2020 Microsoft
January 28, 2020 January 29, 2020
QUIC-LB: Generating Routable QUIC Connection IDs QUIC-LB: Generating Routable QUIC Connection IDs
draft-ietf-quic-load-balancers-00 draft-ietf-quic-load-balancers-01
Abstract Abstract
QUIC connection IDs allow continuation of connections across address/ QUIC connection IDs allow continuation of connections across address/
port 4-tuple changes, and can store routing information for stateless port 4-tuple changes, and can store routing information for stateless
or low-state load balancers. They also can prevent linkability of or low-state load balancers. They also can prevent linkability of
connections across deliberate address migration through the use of connections across deliberate address migration through the use of
protected communications between client and server. This creates protected communications between client and server. This creates
issues for load-balancing intermediaries. This specification issues for load-balancing intermediaries. This specification
standardizes methods for encoding routing information and proposes an standardizes methods for encoding routing information given a small
optional protocol called QUIC-LB to exchange the parameters of that set of configuration parameters. This framework also enables offload
encoding. This framework also enables offload of other QUIC of other QUIC functions to trusted intermediaries, given the explicit
functions to trusted intermediaries, given the explicit cooperation cooperation of the QUIC server.
of the QUIC server.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
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 https://datatracker.ietf.org/drafts/current/. Drafts is at https://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 July 31, 2020. This Internet-Draft will expire on August 1, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 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
(https://trustee.ietf.org/license-info) in effect on the date of (https://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 . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
2. Protocol Objectives . . . . . . . . . . . . . . . . . . . . . 5 2. Protocol Objectives . . . . . . . . . . . . . . . . . . . . . 4
2.1. Simplicity . . . . . . . . . . . . . . . . . . . . . . . 5 2.1. Simplicity . . . . . . . . . . . . . . . . . . . . . . . 4
2.2. Security . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2. Security . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3. Robustness to Middleboxes . . . . . . . . . . . . . . . . 6 2.3. Load Balancer Chains . . . . . . . . . . . . . . . . . . 5
2.4. Load Balancer Chains . . . . . . . . . . . . . . . . . . 6 3. First CID octet . . . . . . . . . . . . . . . . . . . . . . . 5
3. First CID octet . . . . . . . . . . . . . . . . . . . . . . . 6
3.1. Config Rotation . . . . . . . . . . . . . . . . . . . . . 6 3.1. Config Rotation . . . . . . . . . . . . . . . . . . . . . 6
3.2. Configuration Failover . . . . . . . . . . . . . . . . . 7 3.2. Configuration Failover . . . . . . . . . . . . . . . . . 6
3.3. Length Self-Description . . . . . . . . . . . . . . . . . 7 3.3. Length Self-Description . . . . . . . . . . . . . . . . . 7
4. Routing Algorithms . . . . . . . . . . . . . . . . . . . . . 8 4. Routing Algorithms . . . . . . . . . . . . . . . . . . . . . 7
4.1. Plaintext CID Algorithm . . . . . . . . . . . . . . . . . 9 4.1. Plaintext CID Algorithm . . . . . . . . . . . . . . . . . 8
4.1.1. Load Balancer Actions . . . . . . . . . . . . . . . . 9 4.1.1. Configuration Agent Actions . . . . . . . . . . . . . 8
4.1.2. Server Actions . . . . . . . . . . . . . . . . . . . 9 4.1.2. Load Balancer Actions . . . . . . . . . . . . . . . . 9
4.2. Obfuscated CID Algorithm . . . . . . . . . . . . . . . . 10 4.1.3. Server Actions . . . . . . . . . . . . . . . . . . . 9
4.2.1. Load Balancer Actions . . . . . . . . . . . . . . . . 10 4.2. Obfuscated CID Algorithm . . . . . . . . . . . . . . . . 9
4.2.2. Server Actions . . . . . . . . . . . . . . . . . . . 11 4.2.1. Configuration Agent Actions . . . . . . . . . . . . . 9
4.3. Stream Cipher CID Algorithm . . . . . . . . . . . . . . . 11 4.2.2. Load Balancer Actions . . . . . . . . . . . . . . . . 10
4.3.1. Load Balancer Actions . . . . . . . . . . . . . . . . 12 4.2.3. Server Actions . . . . . . . . . . . . . . . . . . . 10
4.3.2. Server Actions . . . . . . . . . . . . . . . . . . . 12 4.3. Stream Cipher CID Algorithm . . . . . . . . . . . . . . . 10
4.4. Block Cipher CID Algorithm . . . . . . . . . . . . . . . 13 4.3.1. Configuration Agent Actions . . . . . . . . . . . . . 11
4.4.1. Load Balancer Actions . . . . . . . . . . . . . . . . 13 4.3.2. Load Balancer Actions . . . . . . . . . . . . . . . . 11
4.4.2. Server Actions . . . . . . . . . . . . . . . . . . . 14 4.3.3. Server Actions . . . . . . . . . . . . . . . . . . . 12
5. Retry Service . . . . . . . . . . . . . . . . . . . . . . . . 14 4.4. Block Cipher CID Algorithm . . . . . . . . . . . . . . . 12
5.1. Common Requirements . . . . . . . . . . . . . . . . . . . 15 4.4.1. Configuration Agent Actions . . . . . . . . . . . . . 12
5.2. No-Shared-State Retry Service . . . . . . . . . . . . . . 15 4.4.2. Load Balancer Actions . . . . . . . . . . . . . . . . 13
5.2.1. Service Requirements . . . . . . . . . . . . . . . . 15 4.4.3. Server Actions . . . . . . . . . . . . . . . . . . . 13
5.2.2. Server Requirements . . . . . . . . . . . . . . . . . 17 5. Retry Service . . . . . . . . . . . . . . . . . . . . . . . . 13
5.3. Shared-State Retry Service . . . . . . . . . . . . . . . 17 5.1. Common Requirements . . . . . . . . . . . . . . . . . . . 14
5.3.1. Service Requirements . . . . . . . . . . . . . . . . 19 5.2. No-Shared-State Retry Service . . . . . . . . . . . . . . 14
5.3.2. Server Requirements . . . . . . . . . . . . . . . . . 19 5.2.1. Service Requirements . . . . . . . . . . . . . . . . 14
6. Configuration Requirements . . . . . . . . . . . . . . . . . 19 5.2.2. Server Requirements . . . . . . . . . . . . . . . . . 16
7. Protocol Description . . . . . . . . . . . . . . . . . . . . 22 5.3. Shared-State Retry Service . . . . . . . . . . . . . . . 16
7.1. Out of band sharing . . . . . . . . . . . . . . . . . . . 22 5.3.1. Configuration Agent Actions . . . . . . . . . . . . . 18
7.2. QUIC-LB Message Exchange . . . . . . . . . . . . . . . . 22 5.3.2. Service Requirements . . . . . . . . . . . . . . . . 18
7.3. QUIC-LB Packet . . . . . . . . . . . . . . . . . . . . . 22 5.3.3. Server Requirements . . . . . . . . . . . . . . . . . 18
7.4. Message Types and Formats . . . . . . . . . . . . . . . . 23 6. Configuration Requirements . . . . . . . . . . . . . . . . . 18
7.4.1. ACK_LB Message . . . . . . . . . . . . . . . . . . . 24 7. Security Considerations . . . . . . . . . . . . . . . . . . . 20
7.4.2. FAIL Message . . . . . . . . . . . . . . . . . . . . 24 7.1. Attackers not between the load balancer and server . . . 21
7.4.3. ROUTING_INFO Message . . . . . . . . . . . . . . . . 24 7.2. Attackers between the load balancer and server . . . . . 21
7.4.4. STREAM_CID Message . . . . . . . . . . . . . . . . . 25 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21
7.4.5. BLOCK_CID Message . . . . . . . . . . . . . . . . . . 26 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.4.6. SERVER_ID Message . . . . . . . . . . . . . . . . . . 27 9.1. Normative References . . . . . . . . . . . . . . . . . . 21
7.4.7. MODULUS Message . . . . . . . . . . . . . . . . . . . 27 9.2. Informative References . . . . . . . . . . . . . . . . . 22
7.4.8. PLAINTEXT Message . . . . . . . . . . . . . . . . . . 27 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 22
7.4.9. RETRY_SERVICE_STATELESS message . . . . . . . . . . . 28 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 22
7.4.10. RETRY_SERVICE_STATEFUL message . . . . . . . . . . . 28 B.1. since-draft-ietf-quic-load-balancers-00 . . . . . . . . . 22
8. Security Considerations . . . . . . . . . . . . . . . . . . . 28 B.2. Since draft-duke-quic-load-balancers-06 . . . . . . . . . 22
8.1. Outside attackers . . . . . . . . . . . . . . . . . . . . 29 B.3. Since draft-duke-quic-load-balancers-05 . . . . . . . . . 22
8.2. Inside Attackers . . . . . . . . . . . . . . . . . . . . 29 B.4. Since draft-duke-quic-load-balancers-04 . . . . . . . . . 23
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 B.5. Since draft-duke-quic-load-balancers-03 . . . . . . . . . 23
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 29 B.6. Since draft-duke-quic-load-balancers-02 . . . . . . . . . 23
10.1. Normative References . . . . . . . . . . . . . . . . . . 30 B.7. Since draft-duke-quic-load-balancers-01 . . . . . . . . . 23
10.2. Informative References . . . . . . . . . . . . . . . . . 30 B.8. Since draft-duke-quic-load-balancers-00 . . . . . . . . . 23
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 30 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 23
Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 30
B.1. Since draft-duke-quic-load-balancers-06 . . . . . . . . . 30
B.2. Since draft-duke-quic-load-balancers-05 . . . . . . . . . 30
B.3. Since draft-duke-quic-load-balancers-04 . . . . . . . . . 30
B.4. Since draft-duke-quic-load-balancers-03 . . . . . . . . . 31
B.5. Since draft-duke-quic-load-balancers-02 . . . . . . . . . 31
B.6. Since draft-duke-quic-load-balancers-01 . . . . . . . . . 31
B.7. Since draft-duke-quic-load-balancers-00 . . . . . . . . . 31
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 31
1. Introduction 1. Introduction
QUIC packets usually contain a connection ID to allow endpoints to QUIC packets usually contain a connection ID to allow endpoints to
associate packets with different address/port 4-tuples to the same associate packets with different address/port 4-tuples to the same
connection context. This feature makes connections robust in the connection context. This feature makes connections robust in the
event of NAT rebinding. QUIC endpoints usually designate the event of NAT rebinding. QUIC endpoints usually designate the
connection ID which peers use to address packets. Server-generated connection ID which peers use to address packets. Server-generated
connection IDs create a potential need for out-of-band communication connection IDs create a potential need for out-of-band communication
to support QUIC. to support QUIC.
skipping to change at page 4, line 14 skipping to change at page 4, line 5
connection IDs are in protected packets, they must be generated at connection IDs are in protected packets, they must be generated at
the server if the load balancer does not have access to the the server if the load balancer does not have access to the
connection keys. However, it is the load balancer that has the connection keys. However, it is the load balancer that has the
context necessary to generate a connection ID that encodes useful context necessary to generate a connection ID that encodes useful
routing information. In the absence of any shared state between load routing information. In the absence of any shared state between load
balancer and server, the load balancer must maintain a relatively balancer and server, the load balancer must maintain a relatively
expensive table of server-generated connection IDs, and will not expensive table of server-generated connection IDs, and will not
route packets correctly if they use a connection ID that was route packets correctly if they use a connection ID that was
originally communicated in a protected NEW_CONNECTION_ID frame. originally communicated in a protected NEW_CONNECTION_ID frame.
This specification provides a method of coordination between QUIC This specification provides common algorithms for encoding the server
servers and low-state load balancers to support connection IDs that mapping in a connection ID given some shared parameters. The mapping
encode routing information. It describes desirable properties of a is generally only discoverable by observers that have the parameters,
solution, and then specifies a protocol that provides those preserving unlinkability as much as possible.
properties. This protocol supports multiple encoding schemes that
increase in complexity as they address paths between load balancer
and server with weaker trust dynamics.
Aside from load balancing, a QUIC server may also desire to offload Aside from load balancing, a QUIC server may also desire to offload
other protocol functions to trusted intermediaries. These other protocol functions to trusted intermediaries. These
intermediaries might include hardware assist on the server host intermediaries might include hardware assist on the server host
itself, without access to fully decrypted QUIC packets. For example, itself, without access to fully decrypted QUIC packets. For example,
this document specifies a means of offloading stateless retry to this document specifies a means of offloading stateless retry to
counter Denial of Service attacks. It also proposes a system for counter Denial of Service attacks. It also proposes a system for
self-encoding connection ID length in all packets, so that crypto self-encoding connection ID length in all packets, so that crypto
offload can consistently look up key information. offload can consistently look up key information.
While this document describes a small set of configuration parameters
to make the server mapping intelligible, the means of distributing
these parameters between load balancers, servers, and other trusted
intermediaries is out of its scope. There are numerous well-known
infrastructures for distribution of configuration.
1.1. Terminology 1.1. Terminology
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 RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
In this document, these words will appear with that interpretation In this document, these words will appear with that interpretation
only when in ALL CAPS. Lower case uses of these words are not to be only when in ALL CAPS. Lower case uses of these words are not to be
interpreted as carrying significance described in RFC 2119. interpreted as carrying significance described in RFC 2119.
skipping to change at page 5, line 5 skipping to change at page 4, line 46
QUIC connection unless otherwise indicated. A "load balancer" is an QUIC connection unless otherwise indicated. A "load balancer" is an
intermediary for that connection that does not possess QUIC intermediary for that connection that does not possess QUIC
connection keys, but it may rewrite IP addresses or conduct other IP connection keys, but it may rewrite IP addresses or conduct other IP
or UDP processing. or UDP processing.
Note that stateful load balancers that act as proxies, by terminating Note that stateful load balancers that act as proxies, by terminating
a QUIC connection with the client and then retrieving data from the a QUIC connection with the client and then retrieving data from the
server using QUIC or another protocol, are treated as a server with server using QUIC or another protocol, are treated as a server with
respect to this specification. respect to this specification.
When discussing security threats to QUIC-LB, we distinguish between
"inside observers" and "outside observers." The former lie on the
path between the load balancer and server, which often but not always
lies inside the server's data center or cloud deployment. Outside
observers are on the path between the load balancer and client.
"Off-path" attackers, though not on any data path, may also be
"inside" or "outside" depending on whether not they have network
access to the server without intermediation by the load balancer and/
or other security devices.
2. Protocol Objectives 2. Protocol Objectives
2.1. Simplicity 2.1. Simplicity
QUIC is intended to provide unlinkability across connection QUIC is intended to provide unlinkability across connection
migration, but servers are not required to provide additional migration, but servers are not required to provide additional
connection IDs that effectively prevent linkability. If the connection IDs that effectively prevent linkability. If the
coordination scheme is too difficult to implement, servers behind coordination scheme is too difficult to implement, servers behind
load balancers using connection IDs for routing will use trivially load balancers using connection IDs for routing will use trivially
linkable connection IDs. Clients will therefore be forced choose linkable connection IDs. Clients will therefore be forced choose
skipping to change at page 5, line 46 skipping to change at page 5, line 28
connections that start and end frequently, it will be difficult to connections that start and end frequently, it will be difficult to
associate two connection IDs even if they are known to map to the associate two connection IDs even if they are known to map to the
same server. same server.
QUIC-LB is relevant in the region between these extremes: when the QUIC-LB is relevant in the region between these extremes: when the
information that two connection IDs map to the same server is helpful information that two connection IDs map to the same server is helpful
to linking two connection IDs. Obviously, any scheme that to linking two connection IDs. Obviously, any scheme that
transparently communicates this mapping to outside observers transparently communicates this mapping to outside observers
compromises QUIC's defenses against linkability. compromises QUIC's defenses against linkability.
However, concealing this mapping from inside observers is beyond the
scope of QUIC-LB. By simply observing Link-Layer and/or Network-
Layer addresses of packets containing distinct connection IDs, it is
trivial to determine that they map to the same server, even if
connection IDs are entirely random and do not encode routing
information. Schemes that conceal these addresses (e.g., IPsec) can
also conceal QUIC-LB messages.
Inside observers are generally able to mount Denial of Service (DoS)
attacks on QUIC connections regardless of Connection ID schemes.
However, QUIC-LB should protect against Denial of Service due to
inside off-path attackers in cases where such attackers are possible.
Though not an explicit goal of the QUIC-LB design, concealing the Though not an explicit goal of the QUIC-LB design, concealing the
server mapping also complicates attempts to focus attacks on a server mapping also complicates attempts to focus attacks on a
specific server in the pool. specific server in the pool.
2.3. Robustness to Middleboxes 2.3. Load Balancer Chains
The path between load balancer and server may pass through
middleboxes that could drop the coordination messages in this
protocol. It is therefore advantageous to make messages resemble
QUIC traffic as much as possible, as any viable path must obviously
admit QUIC traffic.
2.4. Load Balancer Chains
While it is possible to construct a scheme that supports multiple While it is possible to construct a scheme that supports multiple
low-state load balancers in the path, by using different parts of the low-state load balancers in the path, by using different parts of the
connection ID to encode routing information for each load balancer, connection ID to encode routing information for each load balancer,
this use case is out of scope for QUIC-LB. this use case is out of scope for QUIC-LB.
3. First CID octet 3. First CID octet
The first octet of a Connection ID is reserved for two special The first octet of a Connection ID is reserved for two special
purposes, one mandatory (config rotation) and one optional (length purposes, one mandatory (config rotation) and one optional (length
skipping to change at page 7, line 24 skipping to change at page 6, line 39
Load balancers SHOULD NOT use a codepoint to represent a new Load balancers SHOULD NOT use a codepoint to represent a new
configuration until it takes precautions to make sure that all configuration until it takes precautions to make sure that all
connections using IDs with an old configuration at that codepoint connections using IDs with an old configuration at that codepoint
have closed or transitioned. They MAY drop connection IDs with the have closed or transitioned. They MAY drop connection IDs with the
old configuration after a reasonable interval to accelerate this old configuration after a reasonable interval to accelerate this
process. process.
3.2. Configuration Failover 3.2. Configuration Failover
If a server is configured to expect QUIC-LB messages, and it has not If a server has not received a valid QUIC-LB configuration, and
received these, it MUST generate connection IDs with the config believes that low-state, Connection-ID aware load balancers are in
rotation bits set to '11' and MUST use the "disable_migration" the path, it SHOULD generate connection IDs with the config rotation
transport parameter in all new QUIC connections. It MUST NOT send bits set to '11' and SHOULD use the "disable_migration" transport
parameter in all new QUIC connections. It SHOULD NOT send
NEW_CONNECTION_ID frames with new values. NEW_CONNECTION_ID frames with new values.
A load balancer that sees a connection ID with config rotation bits A load balancer that sees a connection ID with config rotation bits
set to '11' MUST revert to 5-tuple routing. set to '11' MUST revert to 5-tuple routing.
3.3. Length Self-Description 3.3. Length Self-Description
Local hardware cryptographic offload devices may accelerate QUIC Local hardware cryptographic offload devices may accelerate QUIC
servers by receiving keys from the QUIC implementation indexed to the servers by receiving keys from the QUIC implementation indexed to the
connection ID. However, on physical devices operating multiple QUIC connection ID. However, on physical devices operating multiple QUIC
servers, it is impractical to efficiently lookup these keys if the servers, it is impractical to efficiently lookup these keys if the
connection ID does not self-encode its own length. connection ID does not self-encode its own length.
Note that this is a function of particular server devices and is Note that this is a function of particular server devices and is
irrelevant to load balancers. As such, it is not negotiated between irrelevant to load balancers. As such, load balancers MAY omit this
servers and load balancers. However, the remaining 6 bits in the from their configuration. However, the remaining 6 bits in the first
first octet of the Connection ID are reserved to express the length octet of the Connection ID are reserved to express the length of the
of the following connection ID, not including the first octet. following connection ID, not including the first octet.
A server not using this functionality SHOULD make the six bits appear A server not using this functionality SHOULD make the six bits appear
to be random. to be random.
4. Routing Algorithms 4. Routing Algorithms
In QUIC-LB, load balancers do not generate individual connection IDs In QUIC-LB, load balancers do not generate individual connection IDs
to servers. Instead, they communicate the parameters of an algorithm to servers. Instead, they communicate the parameters of an algorithm
to generate routable connection IDs. to generate routable connection IDs.
skipping to change at page 8, line 46 skipping to change at page 8, line 14
Load balancers SHOULD drop packets with non-compliant DCIDs in a Load balancers SHOULD drop packets with non-compliant DCIDs in a
short header. short header.
Load balancers MUST forward packets with compliant DCIDs to a server Load balancers MUST forward packets with compliant DCIDs to a server
in accordance with the chosen routing algorithm. in accordance with the chosen routing algorithm.
The load balancer MUST NOT make the routing behavior dependent on any The load balancer MUST NOT make the routing behavior dependent on any
bits in the first octet of the QUIC packet header, except the first bits in the first octet of the QUIC packet header, except the first
bit, which indicates a long header. All other bits are QUIC version- bit, which indicates a long header. All other bits are QUIC version-
dependent and intermediaries should not build their design on dependent and intermediaries would cannot build their design on
version-specific templates. version-specific templates.
There are situations where a server pool might be operating two or There are situations where a server pool might be operating two or
more routing algorithms or parameter sets simultaneously. The load more routing algorithms or parameter sets simultaneously. The load
balancer uses the first two bits of the connection ID to multiplex balancer uses the first two bits of the connection ID to multiplex
incoming DCIDs over these schemes. incoming DCIDs over these schemes.
This section describes two participants: the load balancer and the This section describes three participants: the configuration agent,
server. The load balancer, in this description, generates the load balancer, and the server.
configuration parameters. Note that in practice a third party
configuration agent MAY assume this responsibility.
4.1. Plaintext CID Algorithm 4.1. Plaintext CID Algorithm
The Plaintext CID Algorithm makes no attempt to obscure the mapping The Plaintext CID Algorithm makes no attempt to obscure the mapping
of connections to servers, significantly increasing linkability. The of connections to servers, significantly increasing linkability. The
format is depicted in the figure below. format is depicted in the figure below.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| First octet | Server ID (X=8..152) | | First octet | Server ID (X=8..152) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Any (0..152-X) | | Any (0..152-X) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: Plaintext CID Format Figure 1: Plaintext CID Format
4.1.1. Load Balancer Actions 4.1.1. Configuration Agent Actions
The load balancer selects a number of bytes of the server connection The configuration agent selects a number of bytes of the server
ID (SCID) that it will use to route to a given server, called the connection ID (SCID) to encode individual server IDs, called the
"routing bytes". The number of bytes MUST have enough entropy to "routing bytes". The number of bytes MUST have enough entropy to
have a different code point for each server. have a different code point for each server.
The load balancer shares this value with servers, as explained in It also assigns a server ID to each server.
Section 7, along with the value that represents that server.
4.1.2. Load Balancer Actions
On each incoming packet, the load balancer extracts consecutive On each incoming packet, the load balancer extracts consecutive
octets, beginning with the second byte. These bytes represent the octets, beginning with the second octet. These bytes represent the
server ID. server ID.
4.1.2. Server Actions 4.1.3. Server Actions
The server chooses a connection ID length. This MUST be at least one The server chooses a connection ID length. This MUST be at least one
byte longer than the routing bytes. byte longer than the routing bytes.
When a server needs a new connection ID, it encodes its assigned When a server needs a new connection ID, it encodes its assigned
server ID in consecutive octets beginning with the second. All other server ID in consecutive octets beginning with the second. All other
bits in the connection ID, except for the first octet, MAY be set to bits in the connection ID, except for the first octet, MAY be set to
any other value. These other bits SHOULD appear random to observers. any other value. These other bits SHOULD appear random to observers.
4.2. Obfuscated CID Algorithm 4.2. Obfuscated CID Algorithm
skipping to change at page 10, line 20 skipping to change at page 9, line 36
below. below.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| First octet | Mixed routing and non-routing bits (64..152) | | First octet | Mixed routing and non-routing bits (64..152) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 2: Obfuscated CID Format Figure 2: Obfuscated CID Format
4.2.1. Load Balancer Actions 4.2.1. Configuration Agent Actions
The load balancer selects an arbitrary set of bits of the server The configuration agent selects an arbitrary set of bits of the
connection ID (SCID) that it will use to route to a given server, server connection ID (SCID) that it will use to route to a given
called the "routing bits". The number of bits MUST have enough server, called the "routing bits". The number of bits MUST have
entropy to have a different code point for each server, and SHOULD enough entropy to have a different code point for each server, and
have enough entropy so that there are many codepoints for each SHOULD have enough entropy so that there are many codepoints for each
server. server.
The load balancer MUST NOT select a routing mask with more than 136 The configuration agent MUST NOT select a routing mask with more than
routing bits set to 1, which allows for the first octet and up to 2 136 routing bits set to 1, which allows for the first octet and up to
octets for server purposes in a maximum-length connection ID. 2 octets for server purposes in a maximum-length connection ID.
The load balancer selects a divisor that MUST be larger than the The configuration agent selects a divisor that MUST be larger than
number of servers. It SHOULD be large enough to accommodate the number of servers. It SHOULD be large enough to accommodate
reasonable increases in the number of servers. The divisor MUST be reasonable increases in the number of servers. The divisor MUST be
an odd integer so certain addition operations do not always produce an odd integer so certain addition operations do not always produce
an even number. an even number.
The load balancer also assigns each server a "modulus", an integer The configuration agent also assigns each server a "modulus", an
between 0 and the divisor minus 1. These MUST be unique for each integer between 0 and the divisor minus 1. These MUST be unique for
server, and SHOULD be distributed across the entire number space each server, and SHOULD be distributed across the entire number space
between zero and the divisor. between zero and the divisor.
The load balancer shares these three values with servers, as 4.2.2. Load Balancer Actions
explained in Section 7.
Upon receipt of a QUIC packet, the load balancer extracts the Upon receipt of a QUIC packet, the load balancer extracts the
selected bits of the SCID and expresses them as an unsigned integer selected bits of the SCID and expresses them as an unsigned integer
of that length. The load balancer then divides the result by the of that length. The load balancer then divides the result by the
chosen divisor. The modulus of this operation maps to the modulus chosen divisor. The modulus of this operation maps to the modulus
for the destination server. for the destination server.
Note that any SCID that contains a server's modulus, plus an Note that any SCID that contains a server's modulus, plus an
arbitrary integer multiple of the divisor, in the routing bits is arbitrary integer multiple of the divisor, in the routing bits is
routable to that server regardless of the contents of the non-routing routable to that server regardless of the contents of the non-routing
bits. Outside observers that do not know the divisor or the routing bits. Outside observers that do not know the divisor or the routing
bits will therefore have difficulty identifying that two SCIDs route bits will therefore have difficulty identifying that two SCIDs route
to the same server. to the same server.
Note also that not all Connection IDs are necessarily routable, as Note also that not all Connection IDs are necessarily routable, as
the computed modulus may not match one assigned to any server. These the computed modulus may not match one assigned to any server. These
DCIDs are non-compliant as described above. DCIDs are non-compliant as described above.
4.2.2. Server Actions 4.2.3. Server Actions
The server chooses a connection ID length. This MUST contain all of The server chooses a connection ID length. This MUST contain all of
the routing bits and MUST be at least 9 octets to provide adequate the routing bits and MUST be at least 9 octets to provide adequate
entropy. entropy.
When a server needs a new connection ID, it adds an arbitrary When a server needs a new connection ID, it adds an arbitrary
nonnegative integer multiple of the divisor to its modulus, without nonnegative integer multiple of the divisor to its modulus, without
exceeding the maximum integer value implied by the number of routing exceeding the maximum integer value implied by the number of routing
bits. The choice of multiple should appear random within these bits. The choice of multiple should appear random within these
constraints. constraints.
skipping to change at page 12, line 5 skipping to change at page 11, line 19
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| First Octet | Nonce (X=64..144) | | First Octet | Nonce (X=64..144) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Encrypted Server ID (Y=8..152-X) | | Encrypted Server ID (Y=8..152-X) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| For server use (0..152-X-Y) | | For server use (0..152-X-Y) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 3: Stream Cipher CID Format Figure 3: Stream Cipher CID Format
4.3.1. Load Balancer Actions 4.3.1. Configuration Agent Actions
The load balancer assigns a server ID to every server in its pool, The configuration agent assigns a server ID to every server in its
and determines a server ID length (in octets) sufficiently large to pool, and determines a server ID length (in octets) sufficiently
encode all server IDs, including potential future servers. large to encode all server IDs, including potential future servers.
The load balancer also selects a nonce length and an 16-octet AES-ECB The configuration agent also selects a nonce length and an 16-octet
key to use for connection ID decryption. The nonce length MUST be at AES-ECB key to use for connection ID decryption. The nonce length
least 8 octets and no more than 16 octets. The nonce length and MUST be at least 8 octets and no more than 16 octets. The nonce
server ID length MUST sum to 19 or fewer octets. length and server ID length MUST sum to 19 or fewer octets.
The load balancer shares these three values with servers, as 4.3.2. Load Balancer Actions
explained in Section 7.
Upon receipt of a QUIC packet that is not of type Initial or 0-RTT, Upon receipt of a QUIC packet that is not of type Initial or 0-RTT,
the load balancer extracts as many of the earliest octets from the the load balancer extracts as many of the earliest octets from the
destination connection ID as necessary to match the nonce length. destination connection ID as necessary to match the nonce length.
The server ID immediately follows. The server ID immediately follows.
The load balancer decrypts the server ID using 128-bit AES Electronic The load balancer decrypts the server ID using 128-bit AES Electronic
Codebook (ECB) mode, much like QUIC header protection. The nonce Codebook (ECB) mode, much like QUIC header protection. The nonce
octets are zero-padded to 16 octets. AES-ECB encrypts this nonce octets are zero-padded to 16 octets. AES-ECB encrypts this nonce
using its key to generate a mask which it applies to the encrypted using its key to generate a mask which it applies to the encrypted
skipping to change at page 12, line 42 skipping to change at page 12, line 8
For example, if the nonce length is 10 octets and the server ID For example, if the nonce length is 10 octets and the server ID
length is 2 octets, the connection ID can be as small as 13 octets. length is 2 octets, the connection ID can be as small as 13 octets.
The load balancer uses the the second through eleventh of the The load balancer uses the the second through eleventh of the
connection ID for the nonce, zero-pads it to 16 octets using the connection ID for the nonce, zero-pads it to 16 octets using the
first 6 octets of the token, and uses this to decrypt the server ID first 6 octets of the token, and uses this to decrypt the server ID
in the twelfth and thirteenth octet. in the twelfth and thirteenth octet.
The output of the decryption is the server ID that the load balancer The output of the decryption is the server ID that the load balancer
uses for routing. uses for routing.
4.3.2. Server Actions 4.3.3. Server Actions
When generating a routable connection ID, the server writes arbitrary When generating a routable connection ID, the server writes arbitrary
bits into its nonce octets, and its provided server ID into the bits into its nonce octets, and its provided server ID into the
server ID octets. Servers MAY opt to have a longer connection ID server ID octets. Servers MAY opt to have a longer connection ID
beyond the nonce and server ID. The nonce and additional bits MAY beyond the nonce and server ID. The nonce and additional bits MAY
encode additional information, but SHOULD appear essentially random encode additional information, but SHOULD appear essentially random
to observers. to observers.
The server decrypts the server ID using 128-bit AES Electronic The server decrypts the server ID using 128-bit AES Electronic
Codebook (ECB) mode, much like QUIC header protection. The nonce Codebook (ECB) mode, much like QUIC header protection. The nonce
skipping to change at page 13, line 32 skipping to change at page 12, line 47
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Encrypted Zero Padding (Y=0..144-X) | | Encrypted Zero Padding (Y=0..144-X) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Encrypted bits for server use (144-X-Y) | | Encrypted bits for server use (144-X-Y) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Unencrypted bits for server use (0..24) | | Unencrypted bits for server use (0..24) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 4: Block Cipher CID Format Figure 4: Block Cipher CID Format
4.4.1. Load Balancer Actions 4.4.1. Configuration Agent Actions
The load balancer assigns a server ID to every server in its pool, The configuration agent assigns a server ID to every server in its
and determines a server ID length (in octets) sufficiently large to pool, and determines a server ID length (in octets) sufficiently
encode all server IDs, including potential future servers. The large to encode all server IDs, including potential future servers.
server ID will start in the second octet of the decrypted connection
ID and occupy continuous octets beyond that.
The load balancer selects a zero-padding length. This SHOULD be at The server ID will start in the second octet of the decrypted
least four octets to allow detection of non-compliant DCIDs. The connection ID and occupy continuous octets beyond that.
server ID and zero- padding length MUST sum to no more than 16
The configuration agent selects a zero-padding length. This SHOULD
be at least four octets to allow detection of non-compliant DCIDs.
The server ID and zero- padding length MUST sum to no more than 16
octets. They SHOULD sum to no more than 12 octets, to provide octets. They SHOULD sum to no more than 12 octets, to provide
servers adequate space to encode their own opaque data. servers adequate space to encode their own opaque data.
The load balancer also selects an 16-octet AES-ECB key to use for The configuration agent also selects an 16-octet AES-ECB key to use
connection ID decryption. for connection ID decryption.
The load balancer shares these four values with servers, as explained 4.4.2. Load Balancer Actions
in Section 7.
Upon receipt of a QUIC packet that is not of type Initial or 0-RTT, Upon receipt of a QUIC packet, the load balancer reads the first
the load balancer reads the first octet to obtain the config rotation octet to obtain the config rotation bits. It then decrypts the
bits. It then decrypts the subsequent 16 octets using AES-ECB subsequent 16 octets using AES-ECB decryption and the chosen key.
decryption and the chosen key.
The decrypted plaintext contains the server id, zero padding, and The decrypted plaintext contains the server id, zero padding, and
opaque server data in that order. The load balancer uses the server opaque server data in that order. The load balancer uses the server
ID octets for routing. ID octets for routing.
4.4.2. Server Actions 4.4.3. Server Actions
When generating a routable connection ID, the server MUST choose a When generating a routable connection ID, the server MUST choose a
connection ID length between 17 and 20 octets. The server writes its connection ID length between 17 and 20 octets. The server writes its
provided server ID into the server ID octets, zeroes into the zero- provided server ID into the server ID octets, zeroes into the zero-
padding octets, and arbitrary bits into the remaining bits. These padding octets, and arbitrary bits into the remaining bits. These
arbitrary bits MAY encode additional information. Bits in the first, arbitrary bits MAY encode additional information. Bits in the first,
eighteenth, nineteenth, and twentieth octets SHOULD appear eighteenth, nineteenth, and twentieth octets SHOULD appear
essentially random to observers. The first octet is reserved as essentially random to observers. The first octet is reserved as
described in Section 3. described in Section 3.
skipping to change at page 19, line 11 skipping to change at page 18, line 13
the time the token was generated. The format of date-time is the time the token was generated. The format of date-time is
described in Section 5.6 of [RFC3339]. This ASCII field MUST use the described in Section 5.6 of [RFC3339]. This ASCII field MUST use the
"Z" character for time-offset. "Z" character for time-offset.
Opaque Data: The server may use this field to encode additional Opaque Data: The server may use this field to encode additional
information, such as congestion window, RTT, or MTU. Opaque data information, such as congestion window, RTT, or MTU. Opaque data
SHOULD also allow servers to distinguish between retry tokens (which SHOULD also allow servers to distinguish between retry tokens (which
trigger use of the original_connection_id transport parameter) and trigger use of the original_connection_id transport parameter) and
NEW_TOKEN frame tokens. NEW_TOKEN frame tokens.
5.3.1. Service Requirements 5.3.1. Configuration Agent Actions
The service MUST share a "token key" with all supported servers. The configuration agent generates and distributes a "token key."
5.3.2. Service Requirements
When in active mode, the service MUST generate Retry tokens with the When in active mode, the service MUST generate Retry tokens with the
format described above when it receives a client Initial packet with format described above when it receives a client Initial packet with
no token. no token.
In active mode, the service SHOULD decrypt incoming tokens. The In active mode, the service SHOULD decrypt incoming tokens. The
service SHOULD drop packets with an IP address that does not match, service SHOULD drop packets with an IP address that does not match,
and SHOULD forward packets that do, regardless of the other fields. and SHOULD forward packets that do, regardless of the other fields.
In inactive mode, the service SHOULD forward all packets to the In inactive mode, the service SHOULD forward all packets to the
server so that the server can issue an up-to-date token to the server so that the server can issue an up-to-date token to the
client. client.
5.3.2. Server Requirements 5.3.3. Server Requirements
The server MUST validate all tokens that arrive in Initial packets, The server MUST validate all tokens that arrive in Initial packets,
as they may have bypassed the Retry service. It SHOULD use the date- as they may have bypassed the Retry service. It SHOULD use the date-
time field to apply its expiration limits for tokens. This need not time field to apply its expiration limits for tokens. This need not
be synchronized with the retry service. However, servers MAY allow be synchronized with the retry service. However, servers MAY allow
retry tokens marked as being a few seconds in the future, due to retry tokens marked as being a few seconds in the future, due to
possible clock synchronization issues. possible clock synchronization issues.
A server MUST NOT send a Retry packet in response to an Initial A server MUST NOT send a Retry packet in response to an Initial
packet that contains a retry token. packet that contains a retry token.
6. Configuration Requirements 6. Configuration Requirements
QUIC-LB strives to minimize the configuration load to enable, as much QUIC-LB requires common configuration to synchronize understanding of
as possible, a "plug-and-play" model. However, there are some encodings and guarantee explicit consent of the server.
configuration requirements based on algorithm and protocol choices
above.
If there is any in-band communication, servers MUST be explicitly
configured with the token of the load balancer they expect to
interface with.
The load balancer and server MUST agree on a routing algorithm and The load balancer and server MUST agree on a routing algorithm and
the relevant parameters for that algorithm. the relevant parameters for that algorithm.
For Plaintext CID Routing, this consists of the Server ID and the For Plaintext CID Routing, this consists of the Server ID and the
routing bytes. The Server ID is unique to each server, and the routing bytes. The Server ID is unique to each server, and the
routing bytes are global. routing bytes are global.
For Obfuscated CID Routing, this consists of the Routing Bits, For Obfuscated CID Routing, this consists of the Routing Bits,
Divisor, and Modulus. The Modulus is unique to each server, but the Divisor, and Modulus. The Modulus is unique to each server, but the
skipping to change at page 21, line 45 skipping to change at page 20, line 45
uint8 key[16]; uint8 key[16];
} stream_cipher_config; } stream_cipher_config;
case block_cipher: struct { case block_cipher: struct {
uint8 server_id_length; uint8 server_id_length;
uint8 zero_padding_length; /* 0..(16 - server_id_length) */ uint8 zero_padding_length; /* 0..(16 - server_id_length) */
uint8 server_id[server_id_length]; uint8 server_id[server_id_length];
uint8 key[16]; uint8 key[16];
} block_cipher_config; } block_cipher_config;
} routing_algorithm_config; } routing_algorithm_config;
This specification allows for out-of-band dissemination of this 7. Security Considerations
configuration items, but also provides an in-band method for
deployment models that need it.
7. Protocol Description
There are multiple means of configuration that correspond to
differing deployment models and increasing levels of concern about
the security of the load balancer-server path.
7.1. Out of band sharing
When there are concerns about the integrity of the path between load
balancer and server, operators MAY share routing information using an
out-of-band technique, which is out of the scope of this
specification.
To simplify configuration, the global parameters can be shared out-
of-band, while the load balancer sends the unique server IDs via the
truncated message formats presented below.
7.2. QUIC-LB Message Exchange
QUIC-LB load balancers and servers exchange messages via the QUIC-
LBv1 protocol, which uses the QUIC invariants with version number
0xF1000000. The QUIC-LB load balancers send the encoding parameters
to servers and periodically retransmit until that server responds
with an acknowledgement. Specifics of this retransmission are
implementation-dependent.
7.3. QUIC-LB Packet
A QUIC-LB packet uses a long header. It carries configuration
information from the load balancer and acknowledgements from the
servers. They are sent when a load balancer boots up, detects a new
server in the pool or needs to update the server configuration.
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
+-+-+-+-+-+-+-+-+
|1|C R| Reserved|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version (32) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0x00 | 0x00 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ Authentication Token (64) +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message Type |
+-+-+-+-+-+-+-+-+
Figure 7: QUIC-LB Packet Format
The Version field allows QUIC-LB to use the Version Negotiation
mechanism. All messages in this specification are specific to QUIC-
LBv1. It should be set to 0xF1000000.
Load balancers MUST cease sending QUIC-LB packets of this version to
a server when that server sends a Version Negotiation packet that
does not advertise the version.
The length of the DCIL and SCIL fields are 0x00.
CR The 2-bit CR field indicates the Config Rotation described in
Section 3.1.
Authentication Token The Authentication Token is an 8-byte field
that both entities obtain at configuration time. It is used to
verify that the sender is not an inside off-path attacker.
Servers and load balancers SHOULD silently discard QUIC-LB packets
with an incorrect token.
Message Type The Message Type indicates the type of message payload
that follows the QUIC-LB header.
7.4. Message Types and Formats
As described in Section 7.3, QUIC-LB packets contain a single
message. This section describes the format and semantics of the
QUIC-LB message types.
7.4.1. ACK_LB Message
A server uses the ACK_LB message (type=0x00) to acknowledge a QUIC-LB
packet received from the load balancer. The ACK-LB message has no
additional payload beyond the QUIC-LB packet header.
Load balancers SHOULD continue to retransmit a QUIC-LB packet until a
valid ACK_LB message, FAIL message or Version Negotiation Packet is
received from the server.
7.4.2. FAIL Message
A server uses the FAIL message (type=0x01) to indicate the
configuration received from the load balancer is unsupported.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Supp. Type | Supp. Type | ...
+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Servers MUST send a FAIL message upon receipt of a message type which
they do not support, or if they do not possess all of the implied
out-of-band configuration to support a particular message type.
The payload of the FAIL message consists of a list of all the message
types supported by the server.
Upon receipt of a FAIL message, Load Balancers MUST either send a
QUIC-LB message the server supports or remove the server from the
server pool.
7.4.3. ROUTING_INFO Message
A load balancer uses the ROUTING_INFO message (type=0x02) to exchange
all the parameters for the Obfuscated CID algorithm.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| |
+ Routing Bit Mask (152) +
| |
+ +
| |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | Modulus (16) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Divisor (16) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Routing Bit Mask The Routing Bit Mask encodes a '1' at every bit
position in the server connection ID that will encode routing
information.
These bits, along with the Modulus and Divisor, are chosen by the
load balancer as described in Section 4.2.
7.4.4. STREAM_CID Message
A load balancer uses the STREAM_CID message (type=0x03) to exchange
all the parameters for using Stream Cipher CIDs.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Nonce Len (8) | SIDL (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Server ID (variable) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ Key (128) +
| |
+ +
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 8: Stream CID Payload
Nonce Len The Nonce Len field is a one-octet unsigned integer that
describes the nonce length necessary to use this routing
algorithm, in octets.
SIDL The SIDL field is a one-octet unsigned integer that describes
the server ID length necessary to use this routing algorithm, in
octets.
Server ID The Server ID is the unique value assigned to the
receiving server. Its length is determined by the SIDL field.
Key The Key is an 16-octet field that contains the key that the load
balancer will use to decrypt server IDs on QUIC packets. See
Section 8 to understand why sending keys in plaintext may be a
safe strategy.
7.4.5. BLOCK_CID Message
A load balancer uses the BLOCK_CID message (type=0x04) to exchange
all the parameters for using Stream Cipher CIDs.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ZP Len (8) | SIDL (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Server ID (variable) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ Key (128) +
| |
+ +
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 9: Block CID Payload
ZP Len The ZP Len field is a one-octet unsigned integer that
describes the zero-padding length necessary to use this routing
algorithm, in octets.
SIDL The SIDL field is a one-octet unsigned integer that describes
the server ID length necessary to use this routing algorithm, in
octets.
Server ID The Server ID is the unique value assigned to the
receiving server. Its length is determined by the SIDL field.
Key The Key is an 16-octet field that contains the key that the load
balancer will use to decrypt server IDs on QUIC packets. See
Section 8 to understand why sending keys in plaintext may be a
safe strategy.
7.4.6. SERVER_ID Message
A load balancer uses the SERVER_ID message (type=0x05) to exchange
explicit server IDs.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SIDL (8) | Server ID (variable) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Load balancers send the SERVER_ID message when all global values for
Stream or Block CIDs are sent out-of-band, so that only the server-
unique values must be sent in-band. It also provides all necessary
paramters for Plaintext CIDs. The fields are identical to their
counterparts in the Section 7.4.4 payload.
7.4.7. MODULUS Message
A load balancer uses the MODULUS message (type=0x06) to exchange just
the modulus used in the Obfuscated CID algorithm.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Modulus (16) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Load balancers send the MODULUS when all global values for Obfuscated
CIDs are sent out-of-band, so that only the server-unique values must
be sent in-band. The Modulus field is identical to its counterpart
in the ROUTING_INFO message.
7.4.8. PLAINTEXT Message
A load balancer uses the PLAINTEXT message (type=0x07) to exchange
all parameters needed for the Plaintext CID algorithm.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SIDL (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ Server ID (variable) +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The SIDL field indicates the length of the server ID field. The
Server ID field indicates the encoding that represents the
destination server.
7.4.9. RETRY_SERVICE_STATELESS message
A no-shared-state retry service uses this message (type=0x08) to
notify the server of the existence of this service. This message has
no fields.
7.4.10. RETRY_SERVICE_STATEFUL message
A shared-state retry service uses this message (type=0x09) to tell
the server about its existence, and share the key needed to decrypt
server-generated retry tokens.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| |
+ Key (128) +
| |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
8. Security Considerations
QUIC-LB is intended to preserve routability and prevent linkability. QUIC-LB is intended to prevent linkability. Attacks would therefore
Attacks on the protocol would compromise at least one of these attempt to subvert this purpose.
objectives.
Note that the Plaintext CID algorithm makes no attempt to obscure the Note that the Plaintext CID algorithm makes no attempt to obscure the
server mapping, and therefore does not address these concerns. It server mapping, and therefore does not address these concerns. It
exists to allow consistent CID encoding for compatibility across a exists to allow consistent CID encoding for compatibility across a
network infrastructure. Servers that are running the Plaintext CID network infrastructure. Servers that are running the Plaintext CID
algorithm SHOULD only use it to generate new CIDs for the Server algorithm SHOULD only use it to generate new CIDs for the Server
Initial Packet and SHOULD NOT send CIDs in QUIC NEW_CONNECTION_ID Initial Packet and SHOULD NOT send CIDs in QUIC NEW_CONNECTION_ID
frames. Doing so might falsely suggest to the client that said CIDs frames. Doing so might falsely suggest to the client that said CIDs
were generated in a secure fashion. were generated in a secure fashion.
A routability attack would inject QUIC-LB messages so that load
balancers incorrectly route QUIC connections.
A linkability attack would find some means of determining that two A linkability attack would find some means of determining that two
connection IDs route to the same server. As described above, there connection IDs route to the same server. As described above, there
is no scheme that strictly prevents linkability for all traffic is no scheme that strictly prevents linkability for all traffic
patterns, and therefore efforts to frustrate any analysis of server patterns, and therefore efforts to frustrate any analysis of server
ID encoding have diminishing returns. ID encoding have diminishing returns.
8.1. Outside attackers 7.1. Attackers not between the load balancer and server
For an outside attacker to break routability, it must inject packets
that correctly guess the 64-bit token, and servers must be reachable
from these outside hosts. Load balancers SHOULD drop QUIC-LB packets
that arrive on its external interface.
Off-path outside attackers cannot observe connection IDs, and will Any attacker might open a connection to the server infrastructure and
therefore struggle to link them. aggressively retire connection IDs to obtain a large sample of IDs
that map to the same server. It could then apply analytical
techniques to try to obtain the server encoding.
On-path outside attackers might try to link connection IDs to the The Encrypted CID algorithm provides robust entropy to making any
same QUIC connection. The Encrypted CID algorithm provides robust sort of linkage. The Obfuscated CID obscures the mapping and
entropy to making any sort of linkage. The Obfuscated CID obscures prevents trivial brute-force attacks to determine the routing
the mapping and prevents trivial brute-force attacks to determine the parameters, but does not provide robust protection against
routing parameters, but does not provide robust protection against
sophisticated attacks. sophisticated attacks.
8.2. Inside Attackers Were this analysis to obtain the server encoding, then on-path
observers might apply this analysis to correlating different client
IP addresses.
As described above, on-path inside attackers are intrinsically able 7.2. Attackers between the load balancer and server
to map two connection IDs to the same server. The QUIC-LB algorithms
do prevent the linkage of two connection IDs to the same individual Attackers in this privileged position are intrinsically able to map
two connection IDs to the same server. The QUIC-LB algorithms do
prevent the linkage of two connection IDs to the same individual
connection if servers make reasonable selections when generating new connection if servers make reasonable selections when generating new
IDs for that connection. IDs for that connection.
On-path inside attackers can break routability for new and migrating 8. IANA Considerations
connections by copying the token from QUIC-LB messages. From this
privileged position, however, there are many other attacks that can
break QUIC connections to the server during the handshake.
Off-path inside attackers cannot observe connection IDs to link them.
To successfully break routability, they must correctly guess the
token.
9. IANA Considerations
There are no IANA requirements. There are no IANA requirements.
10. References 9. References
10.1. Normative References
9.1. Normative References
[QUIC-TRANSPORT] [QUIC-TRANSPORT]
Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based
Multiplexed and Secure Transport", draft-ietf-quic- Multiplexed and Secure Transport", draft-ietf-quic-
transport (work in progress). transport (work in progress).
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,
<https://www.rfc-editor.org/info/rfc3339>. <https://www.rfc-editor.org/info/rfc3339>.
10.2. Informative References 9.2. Informative 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,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
Appendix A. Acknowledgments Appendix A. Acknowledgments
Appendix B. Change Log Appendix B. Change Log
*RFC Editor's Note:* Please remove this section prior to *RFC Editor's Note:* Please remove this section prior to
publication of a final version of this document. publication of a final version of this document.
B.1. Since draft-duke-quic-load-balancers-06 B.1. since-draft-ietf-quic-load-balancers-00
o Removed in-band protocol from the document
B.2. Since draft-duke-quic-load-balancers-06
o Switch to IETF WG draft. o Switch to IETF WG draft.
B.2. Since draft-duke-quic-load-balancers-05 B.3. Since draft-duke-quic-load-balancers-05
o Editorial changes o Editorial changes
o Made load balancer behavior independent of QUIC version o Made load balancer behavior independent of QUIC version
o Got rid of token in stream cipher encoding, because server might o Got rid of token in stream cipher encoding, because server might
not have it not have it
o Defined "non-compliant DCID" and specified rules for handling o Defined "non-compliant DCID" and specified rules for handling
them. them.
o Added psuedocode for config schema o Added psuedocode for config schema
B.3. Since draft-duke-quic-load-balancers-04 B.4. Since draft-duke-quic-load-balancers-04
o Added standard for retry services o Added standard for retry services
B.4. Since draft-duke-quic-load-balancers-03 B.5. Since draft-duke-quic-load-balancers-03
o Renamed Plaintext CID algorithm as Obfuscated CID o Renamed Plaintext CID algorithm as Obfuscated CID
o Added new Plaintext CID algorithm o Added new Plaintext CID algorithm
o Updated to allow 20B CIDs o Updated to allow 20B CIDs
o Added self-encoding of CID length o Added self-encoding of CID length
B.5. Since draft-duke-quic-load-balancers-02 B.6. Since draft-duke-quic-load-balancers-02
o Added Config Rotation o Added Config Rotation
o Added failover mode o Added failover mode
o Tweaks to existing CID algorithms o Tweaks to existing CID algorithms
o Added Block Cipher CID algorithm o Added Block Cipher CID algorithm
o Reformatted QUIC-LB packets o Reformatted QUIC-LB packets
B.6. Since draft-duke-quic-load-balancers-01 B.7. Since draft-duke-quic-load-balancers-01
o Complete rewrite o Complete rewrite
o Supports multiple security levels o Supports multiple security levels
o Lightweight messages o Lightweight messages
B.7. Since draft-duke-quic-load-balancers-00 B.8. Since draft-duke-quic-load-balancers-00
o Converted to markdown o Converted to markdown
o Added variable length connection IDs o Added variable length connection IDs
Authors' Addresses Authors' Addresses
Martin Duke Martin Duke
F5 Networks, Inc. F5 Networks, Inc.
 End of changes. 63 change blocks. 
519 lines changed or deleted 175 lines changed or added

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