diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..52f32f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +lib +venv +.refcache diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..2f7efbe --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-minimal \ No newline at end of file diff --git a/archive.json b/archive.json new file mode 100644 index 0000000..41d76c0 --- /dev/null +++ b/archive.json @@ -0,0 +1,6414 @@ +{ + "magic": "E!vIA5L86J2I", + "timestamp": "2021-05-14T20:38:05.236788+00:00", + "repo": "quicwg/load-balancers", + "labels": [ + { + "name": "bug", + "description": "Something isn't working", + "color": "d73a4a" + }, + { + "name": "documentation", + "description": "Improvements or additions to documentation", + "color": "0075ca" + }, + { + "name": "duplicate", + "description": "This issue or pull request already exists", + "color": "cfd3d7" + }, + { + "name": "enhancement", + "description": "New feature or request", + "color": "a2eeef" + }, + { + "name": "good first issue", + "description": "Good for newcomers", + "color": "7057ff" + }, + { + "name": "help wanted", + "description": "Extra attention is needed", + "color": "008672" + }, + { + "name": "invalid", + "description": "This doesn't seem right", + "color": "e4e669" + }, + { + "name": "question", + "description": "Further information is requested", + "color": "d876e3" + }, + { + "name": "wontfix", + "description": "This will not be worked on", + "color": "ffffff" + }, + { + "name": "editorial", + "description": "", + "color": "fc94f8" + }, + { + "name": "needs-discussion", + "description": "", + "color": "32d5db" + } + ], + "issues": [ + { + "number": 6, + "id": "MDU6SXNzdWU1NzM2MjA2NDE=", + "title": "Setup CI", + "url": "https://github.com/quicwg/load-balancers/issues/6", + "state": "CLOSED", + "author": "martinthomson", + "authorAssociation": "MEMBER", + "assignees": [], + "labels": [], + "body": "The editor's draft and the `gh-pages` branch are currently empty.", + "createdAt": "2020-03-01T21:40:15Z", + "updatedAt": "2020-03-06T18:58:20Z", + "closedAt": "2020-03-06T18:58:20Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I believe this is resolved.", + "createdAt": "2020-03-06T18:58:16Z", + "updatedAt": "2020-03-06T18:58:16Z" + } + ] + }, + { + "number": 7, + "id": "MDU6SXNzdWU1NzM2MjEwNzk=", + "title": "SCID acronym", + "url": "https://github.com/quicwg/load-balancers/issues/7", + "state": "CLOSED", + "author": "martinthomson", + "authorAssociation": "MEMBER", + "assignees": [], + "labels": [], + "body": "This is often used to mean Source Connection ID in other contexts. A collision here is likely to cause confusion.", + "createdAt": "2020-03-01T21:43:26Z", + "updatedAt": "2020-06-16T22:00:22Z", + "closedAt": "2020-06-16T22:00:22Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Recommended name? SCCID?", + "createdAt": "2020-03-06T20:57:02Z", + "updatedAt": "2020-03-06T20:57:02Z" + }, + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "I think it might just be best to call it the \"Server CID\" any other abbreviated term will get confused IMO.", + "createdAt": "2020-03-06T23:12:10Z", + "updatedAt": "2020-03-06T23:12:10Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "\"Server CID\" doesn't seem to fit well with \"Stream Cipher Connection ID\"", + "createdAt": "2020-03-09T15:21:30Z", + "updatedAt": "2020-03-09T15:21:40Z" + }, + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "So SCID didn't mean \"Server Connection ID\"? There is definitely confusion here. I'd just recommend not abbreviating anything more than CID.", + "createdAt": "2020-03-09T15:33:47Z", + "updatedAt": "2020-03-09T15:33:47Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I guess this proves MT's point. \"STream Cipher Connection ID\" (just like PCID, OCID, BCID)", + "createdAt": "2020-03-09T15:54:35Z", + "updatedAt": "2020-03-09T15:54:35Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Looking again, the document never uses any acronym for 'stream cipher connection ID', so there's no issue there. This is just about 'S' meaning \"source\" or \"server\".", + "createdAt": "2020-05-26T18:04:23Z", + "updatedAt": "2020-05-26T18:04:23Z" + } + ] + }, + { + "number": 8, + "id": "MDU6SXNzdWU1NzM2MjQzMDg=", + "title": "Unguessable connection IDs", + "url": "https://github.com/quicwg/load-balancers/issues/8", + "state": "CLOSED", + "author": "martinthomson", + "authorAssociation": "MEMBER", + "assignees": [], + "labels": [ + "needs-discussion" + ], + "body": "There is a requirement that it be difficult for a party other than the server and load balancer to guess a CID that will be accepted as valid for a target connection.\r\n\r\nThis requirement needs to be validated for the schemes described in the draft. This might impose some constraints on the designs chosen.\r\n\r\nFor instance, I don't believe that the plaintext algorithm meets this goal. The server ID can take all the available space, which is probably wrong. Clearly it is impossible to create sufficient connection IDs for even a single connection if there is only one valid identifier per server. However, it might be argued that even an 18 byte server ID makes it too easy to guess a valid connection ID for a connection (just 16 guesses would be enough to get a 50% chance at that). So it seems to me that a shorter connection ID is necessary.\r\n\r\nThe same applies to any attempt at obfuscation.\r\n\r\nThe encrypted versions might be similarly challenging to get right. The For Server Use field in the stream cipher variant needs to be sufficiently long as to avoid engineered collisions. The value used for the stream cipher is malleable, which means that an attacker isn't prevented from guessing. In many ways, this is more challenging than the plaintext variant because the nonce consumes space.\r\n\r\nThe zero-padding in the block cipher mode might be the best way of preventing guessing, if it were sufficiently long. Similarly, if \"Encrypted bits for server use\" were sufficiently sparsely populated, then guessing can be hard enough.", + "createdAt": "2020-03-01T22:06:18Z", + "updatedAt": "2020-12-11T23:35:02Z", + "closedAt": "2020-12-11T23:35:02Z", + "comments": [ + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "> There is a requirement that it be difficult for a party other than the server and load balancer to guess a CID that will be accepted as valid for a target connection.\r\n\r\n- What exactly does \"a CID that will be accepted as valid for a target connection\" mean?\r\n- What is exactly making this requirement?", + "createdAt": "2020-03-02T04:37:05Z", + "updatedAt": "2020-03-02T04:37:05Z" + }, + { + "author": "martinthomson", + "authorAssociation": "MEMBER", + "body": "A connection ID that is accepted as valid for a target connection is any value that will cause packets to be routed to the node that serves that connection.\r\n\r\nThe transport draft [says](https://quicwg.org/base-drafts/draft-ietf-quic-transport.html#section-5.1-3):\r\n\r\n> Connection IDs MUST NOT contain any information that can be used by an external observer (that is, one that does not cooperate with the issuer) to correlate them with other connection IDs for the same connection. ", + "createdAt": "2020-03-02T23:30:13Z", + "updatedAt": "2020-03-02T23:30:13Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I think this issue is conflating two different things:\r\n1) Is it easy to generate a CID that has a high probability of being considered valid by the LB? For all but BCID with zero-padding, the answer is clearly \"yes\" unless the SID space is sparsely populated. But that doesn't make them valid at the server. Moreover, if I am just trying to get random packets past the LB, it's far more productive to just generate a bunch of Initials.\r\n\r\nIn the absence of an LB, all CIDs get through to the server, so I don't understand why this is a problem.\r\n\r\n2) The transport draft language (it seems to me) exists mostly to prevent linkability in migration events. Although I've mentioned several times that linkability is a continuum, it is pretty clear that PCID fails at this and OCID makes it harder but no one would bet the house on it being truly secure -- hence the name.\r\n\r\nI think we're due for an actual WG discussion on OCID, but for PCID would it be sufficient for you, MT, if we said that servers using PCID MUST use disable_migration? To be honest, I thought I had already done this but it's not there.", + "createdAt": "2020-03-06T21:24:55Z", + "updatedAt": "2020-03-06T21:24:55Z" + }, + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "I really want to push back hard on any restrictions around migration for the Plaintext CID algorithm. It is by far the simplest and cheapest algorithm to support in the LB, and IMO must remain a valid option for QUIC load balancing.\r\n\r\nAs far as giving any information to an external observer, it's possible an external observer can work out the Server ID for each CID. Whether this is practically useful information depends on the number of connections being managed by the individual servers.\r\n\r\nIMO, we cannot restrict the full set of QUIC features to only work on the most complex and costly algorithms. Some solutions may never implement them.", + "createdAt": "2020-03-06T23:46:08Z", + "updatedAt": "2020-03-06T23:46:08Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Ah wait, I found the text in security considerations:\r\n\r\n> Servers that are running the Plaintext CID algorithm SHOULD only use it to generate new CIDs for the Server Initial Packet and SHOULD NOT send CIDs in QUIC NEW_CONNECTION_ID frames. Doing so might falsely suggest to the client that said CIDs were generated in a secure fashion.\r\n\r\nSo it's a SHOULD right now.", + "createdAt": "2020-03-09T16:52:00Z", + "updatedAt": "2020-03-09T16:52:00Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "To summarize the issue with Plaintext CID. This is the easiest to implement, so is mostly likely to be adopted.\r\n\r\nHowever:\r\n1) This makes DoS attacks on a single server quite straightforward. There is no consensus as to whether single-server DoS is a threat to mitigate or not.\r\n2) Makes connection IDs more linkable.\r\n3) Unless we add a server transport parameter for it, the client has no idea they're more linkable.\r\n4) We could prohibit migration to fix the linkability problem.\r\n5) If we prohibit migration, than the only reason to do plaintext CIDs, instead of just 5-tuple routing, is to support NAT rebinding.\r\n\r\nTo some extent, Obfuscated CID might have similar issues.", + "createdAt": "2020-07-03T18:15:43Z", + "updatedAt": "2020-07-03T18:15:43Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "The discussion at IETF 109 suggested that the level of linkability associated with the PCID algorithm did not violate the spirit of quic-transport (see @martinthomson and @ianswett in the QUIC-LB segment here: https://datatracker.ietf.org/meeting/109/materials/minutes-109-quic-00)", + "createdAt": "2020-12-11T23:35:02Z", + "updatedAt": "2020-12-11T23:35:02Z" + } + ] + }, + { + "number": 9, + "id": "MDU6SXNzdWU1NzM2Mjc1OTE=", + "title": "Effect on stateless resets", + "url": "https://github.com/quicwg/load-balancers/issues/9", + "state": "CLOSED", + "author": "martinthomson", + "authorAssociation": "MEMBER", + "assignees": [], + "labels": [], + "body": "The draft doesn't address the impact of each method of connection ID generation on how servers can use stateless resets.\r\n\r\nMost of this is likely bound up in decisions stemming from #8. If you can guess a valid but unused connection ID, then you might be able to induce a stateless reset that could be used to kill an open connection.\r\n\r\nAs the draft only includes methods that include an explicit server identifier, it is possible that as long as valid values cannot be guessed, the effect is minimal and each server instance can have its own configured stateless reset key (or a shared key from which a per-server key is derived using a KDF).", + "createdAt": "2020-03-01T22:30:24Z", + "updatedAt": "2020-07-06T19:17:21Z", + "closedAt": "2020-07-06T19:17:21Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I don't understand the attack here. A given CID will deterministically map to a specific server instance. So there is no way for another server to receive a packet with that CID and generate a stateless reset. What am I missing?\r\n\r\nThere might be something here with the differing treatment of long-header vs. short-header packets, (and the option for servers to send resets on long headers), but I'll have to think about it more.", + "createdAt": "2020-03-06T21:02:55Z", + "updatedAt": "2020-03-06T21:07:24Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "As to the last point, nope: even a long header with a DCID that conforms to the server's expectations (i.e. maps to a real server) will get delivered to that server, so I don't think that's an attack.", + "createdAt": "2020-03-06T21:06:56Z", + "updatedAt": "2020-03-06T21:06:56Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "@martinthomson Should we talk about this issue more, or are you satisfied enough that I can close it?", + "createdAt": "2020-05-26T18:12:10Z", + "updatedAt": "2020-05-26T18:12:10Z" + }, + { + "author": "martinthomson", + "authorAssociation": "MEMBER", + "body": "I don't see any mention of stateless reset in the draft at all. That's probably something worth addressing, even if it is to say what you have already.", + "createdAt": "2020-05-27T01:39:55Z", + "updatedAt": "2020-05-27T01:39:55Z" + } + ] + }, + { + "number": 10, + "id": "MDU6SXNzdWU1NzM2Mjc5NTI=", + "title": "Moving connections between server instances", + "url": "https://github.com/quicwg/load-balancers/issues/10", + "state": "CLOSED", + "author": "martinthomson", + "authorAssociation": "MEMBER", + "assignees": [], + "labels": [ + "editorial" + ], + "body": "Some text on how a server cluster might support moving of connections from one server instance to another would be useful. The current design might permit portability under certain conditions, but there are things that might need to be considered, such as the way in stateless resets are generated.", + "createdAt": "2020-03-01T22:33:06Z", + "updatedAt": "2020-03-09T15:18:44Z", + "closedAt": "2020-03-09T15:18:44Z", + "comments": [ + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "Are you referring to load balancing already existing connections to a new server? Are you envisioning the first server issuing new CIDs (that point to the new server) and setting Retire Prior To to retire the old CIDs so that future traffic redirect to the new server? How do you imagine the rest of the connection state would get moved?", + "createdAt": "2020-03-02T04:32:17Z", + "updatedAt": "2020-03-02T04:32:17Z" + }, + { + "author": "martinthomson", + "authorAssociation": "MEMBER", + "body": "This applies to cases where clusters are rebalanced, where instances go down and others are expected to pick up the slack, and all similar cases. In some cases this requires an unspecified mechanism for transferring state between instances. In others, the instance might remain constant but the identifiers used might need to rotate.\r\n\r\nThis is likely addressed by using Retire Prior To as you say. Text on that would help.", + "createdAt": "2020-03-02T23:24:25Z", + "updatedAt": "2020-03-02T23:24:25Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Good idea, it wouldn't hurt to have a short non-normative section on this.", + "createdAt": "2020-03-06T20:56:34Z", + "updatedAt": "2020-03-06T20:56:34Z" + } + ] + }, + { + "number": 12, + "id": "MDU6SXNzdWU1NzQzMTUyMzE=", + "title": "Configuration ID might be too small", + "url": "https://github.com/quicwg/load-balancers/issues/12", + "state": "CLOSED", + "author": "martinthomson", + "authorAssociation": "MEMBER", + "assignees": [], + "labels": [ + "needs-discussion" + ], + "body": "As server clusters increase in size, the need to reallocate server identifiers becomes more acute. \r\n\r\nIn one model, the configuration ID is used to indicate a stable routing configuration. Server identifiers for a given configuration ID are routed to the same server, no matter how many other instances are added or removed. In order to allow for changes in the cluster, the configuration ID is used so that old servers can be removed from consideration and new ones added.\r\n\r\nIf these changes happen frequently enough, the number of bits allocated to identifying a configuration might be insufficient. Why not make the length of the identifier flexible? That might mean that you need to make the length of the length similarly configurable.", + "createdAt": "2020-03-02T23:28:35Z", + "updatedAt": "2020-12-11T23:36:47Z", + "closedAt": "2020-12-11T23:36:47Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "It was not the intent of these bits to support long-lived configurations, instead supporting key rotation, upgrades, and the like. I would much rather people overprovisioned the server ID space than using this tool, TBH.\r\n\r\nHowever, the only cost is limiting the theoretical size of CIDs. At the moment, we can support up to 64B, future-proofing the encodings against future versions of QUIC. I'm open to another bit for this, but how would a configurable number of CR bits work with multiple configurations? How does a config that needs 5 bits and one that needs 2 coexist, especially if the latter needs length self-encoding?", + "createdAt": "2020-03-06T20:39:11Z", + "updatedAt": "2020-03-06T20:39:11Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "As we talk through the implications of mutually mistrustful servers in #29, I think the case for adding another bit is compelling. I'm going to remove the needs-discussion label and come up with a PR that takes another bit.", + "createdAt": "2020-07-02T22:29:59Z", + "updatedAt": "2020-07-02T22:29:59Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I'm returning this to needs-discussion, as @huitema points out there is a privacy tradeoff here.\r\n\r\nIf the config codespace is large, it's straightforward to have each mistrustful server have its own totally unique config. On the other hand, keeping this long-lived config difference leaks the type of flow. Assuming it's routed based on SNI, it leaks the SNI of each CID, and in that sense also increases linkability.", + "createdAt": "2020-07-06T19:10:03Z", + "updatedAt": "2020-07-06T19:10:03Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Alright, I've reflected on this a bit more.\r\n\r\nIn general, different server entities will have different external IP addresses and/or ports, so the load balancer can distinguish the correct QUIC-LB config without resorting to the CR bits. As IP and port are visible to everyone, there is no privacy leakage.\r\n\r\nThe problem occurs when mutually mistrustful servers share the same IP/port and are switched on something else. That \"something\" may be something present only in the client hello, with the classical load balancer simply using the 4tuple after that. The only thing I am aware of in practice is the SNI. If there are others, please say so in this thread.\r\n\r\nIf the SNI is encrypted, the unprivileged LB envisioned in QUIC-LB does not have access to it. So we can assume this use case only applies to unencrypted SNI.\r\n\r\nOption 1: mistrustful servers share the same config. a third party will be able to extract your server mapping, but in practice it will be hard for an attacker to obtain this position on purpose. If this is the best outcome, we can stick with 2 config rotation bits.\r\n\r\nOption 2: Issue them different config rotation codepoints. So an observer can see the SNI and associate it with certain CR bits; if the client later migrates, it will still be able to associate that connection with that SNI. If this is better than Option 1, we should probably add a third config rotation bit.\r\n\r\nOther (minor) costs of having 3 config rotation bits:\r\n- length self-encoding can only support 31 byte connection IDs, instead of 63 (obviously this is only relevant for hypothetical future versions of QUIC)\r\n- each config can have its own set of server IDs. So there is considerably more config state at the LB. As SIDs can be up to 18B, it's 18B x (# of servers) x (# of config rotation codepoints). This memory footprint will roughly double by going from 3 to 7 codepoints.\r\n\r\nI've talked myself into Option 1 as being a mildly better situation, thus sticking with 2 CR bits.\r\n\r\n\r\n\r\n", + "createdAt": "2020-10-28T21:36:02Z", + "updatedAt": "2020-10-28T21:36:02Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Update: the ECHO design might allow the LB privileged access to the SNI, so it might be encrypted. However, an attacker could connect to the domains at that IP and obtain the config rotation bits. So option 2 actually circumvents ESNI entirely!", + "createdAt": "2020-11-18T00:34:07Z", + "updatedAt": "2020-11-18T00:34:07Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Closing -- I have received no pushback on doing nothing (leaving it at 2 bits), so I'm going to do nothing.", + "createdAt": "2020-12-11T23:36:47Z", + "updatedAt": "2020-12-11T23:36:47Z" + } + ] + }, + { + "number": 16, + "id": "MDU6SXNzdWU1ODc5NDQ5Njc=", + "title": "Giving the client more information", + "url": "https://github.com/quicwg/load-balancers/issues/16", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [ + "needs-discussion" + ], + "body": "QUIC-LB has a bit of an incentive mismatch. The server infrastructure decides how linkable the CID algorithm is, but the client bears most of the cost of the CIDs being linkable. Worse yet, the client has no idea, without a lot of effort, what the servers are doing. Even worse, the servers have some incentives to pick something that's easily linkable.\r\n\r\nIn Section 8, it says:\r\n\r\n> Servers that are running the Plaintext CID algorithm SHOULD only use it to generate new CIDs for the Server Initial Packet and SHOULD NOT send CIDs in QUIC NEW_CONNECTION_ID frames\r\n\r\nThis is a concise way of not giving the client tools to link itself by trying an unsafe migration.\r\n\r\nWe could just stick with that. A richer way to go would be to create a new transport parameter (e.g. cid_is_linkable, cid_not_encrypted) that would explicitly communicate the risks to the client. We could have a different value for OCID or batch PCID and OCID together.\r\n", + "createdAt": "2020-03-25T19:41:47Z", + "updatedAt": "2020-12-11T23:32:07Z", + "closedAt": "2020-12-11T23:32:07Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Due to lack of enthusiasm at IETF 109, closing this issue.", + "createdAt": "2020-12-11T23:32:07Z", + "updatedAt": "2020-12-11T23:32:07Z" + } + ] + }, + { + "number": 20, + "id": "MDU6SXNzdWU2MTQyMDc4NTA=", + "title": "Load Balancing Invariant Longer Header Packets", + "url": "https://github.com/quicwg/load-balancers/issues/20", + "state": "CLOSED", + "author": "nibanks", + "authorAssociation": "MEMBER", + "assignees": [], + "labels": [], + "body": "We've had some discussion in this area in the past, and we decided that the best way to statelessly (and consistently) load balance long header packets would be to use a hash of the UDP 4-tuple and the client's source CID; since these are the only constants for all incoming (to the server) long header packets. I have come up with a couple of problems with this approach:\r\n\r\n1. As far as I know, there is no statement in the Invariants that says these must all stay constant for all future versions of QUIC.\r\n\r\n2. Using the hash approach can only function statelessly if there is not change in the DIP configuration. If the set of servers being load balanced changes (which we must assume to be common), then whatever stateless logic you have that maps hash to DIP would also change, resulting in long header packets getting routed incorrectly most likely.\r\n\r\n3. A follow up to (2), if you assume that the long header packets cannot therefore be routed statelessly based on the hash, and state must be tracked to continue to consistently route all long header packets until they are no longer used, at what point can the LB discard this state. By design, there is no on-path signal to indicate \"long header packets are no longer used\". Any heuristic that might be added here would be affected by (1) too.\r\n\r\nBecause of these issues, I'm left scratching my head on the best way to recommend to LBs on how to load balance invariant long header packets. The best thing I can think of is:\r\n\r\n- Use the hash mentioned above, but maintain state for each flow (tuple+client_cid).\r\n- Reset a timer (5 sec? 10 sec? 30 sec?) after each new packet is received for the flow. Discard the state when the timer fires.\r\n\r\nBecause the client's CID is included in the flow calculation, it allows an attacker to create nearly unlimited number of flow states on the LB. You might argue that Retry could be first used by a (cooperating) DoS appliance to first validate source address, but after that is done, this attack can still be executed. It would then require some heuristics on the LB to protect against.\r\n\r\n@martinduke @martinthomson any ideas here? ", + "createdAt": "2020-05-07T17:00:47Z", + "updatedAt": "2020-05-22T15:47:43Z", + "closedAt": "2020-05-22T15:47:43Z", + "comments": [ + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "Another, simpler option is just to say live with the disruption of doing things statelessly. Only connections in the second round trip of the handshake would be affected (depending on loss). It's a fairly small window of time, compared to the lifetime of connections. But the clients that do get dropped have a really bad experience, because there will be no stateless reset to immediately kill their connection. They'd have to wait for a timeout.", + "createdAt": "2020-05-07T17:05:05Z", + "updatedAt": "2020-05-07T17:05:05Z" + }, + { + "author": "udippant", + "authorAssociation": "NONE", + "body": "Re (2) - that problem exists for TCP as well. I.e. if you route an incoming TCP connection from a stateless L4LB to backend servers based on 4-tuple hash, any change in number of backend servers can result in the routing of subsequent packets for the same flow to a different backend server.\r\n\r\nUsing LRU cache for such connection table in L4LB has been a convenient way to address this issue for us ( for >99% of the flows). You may need to tune parameters such as size and TTL for items in the table to your needs. \r\nAlso, a pre-configured upper bound to limit the size of the connection table should address the concern you mentioned regarding exposure to attack vector of unlimited states in L4LB. \r\n\r\nFinally, even for LongHeader packets, packets of type 'Handshake' echo back the \"destination connection id' chosen by the server. So you can use similar logic to route these LongHeader sub-types as you use to route ShortHeader packets if the servers and L4Lb cooperatively choose the 'destination connection Id' [for e.g. as @martinduke proposed].", + "createdAt": "2020-05-07T18:39:41Z", + "updatedAt": "2020-05-07T18:39:41Z" + }, + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "Yeah, a LRU cache is a good solution. The difference between TCP and QUIC here is that TCP provides on path signals the LB can use to clean up state, but QUIC doesn't provide any. So, it' is purely a LRU + some timer.\r\n\r\nAlso, I'm looking for an invariant solution to routing packets. The fact that Handshake packets are similar to Short header packets assumes too much about the per-version semantics.", + "createdAt": "2020-05-07T18:55:28Z", + "updatedAt": "2020-05-07T18:55:28Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "The draft already addresses this issue in Section 4.\r\n\r\nExcept for some Initial and 0RTT packets, all DCIDs are server generated and so there is no routing problem.\r\n\r\nFor Initial/0RTT, the DCID might turn out to be routable (e.g. it came from a Retry). If not, it is a \"non-compliant DCID\" which is dropped if it's in a short header. If it's a long header:\r\n\r\n> Load balancers MUST forward packets with long headers with non-compliant DCIDs to an active server using an algorithm of its own choosing. It need not coordinate this algorithm with the servers. The algorithm SHOULD be deterministic over short time scales so that related packets go to the same server.\r\n\r\nThis approach is designed to be version-invariant. I suppose a later version could drastically lengthen the time that non-server-generated CIDs were used, but I don't see why they would. The time scale till we get a server-generated CID is quite small, and if somehow the hash still messes up, the only affect is that 0RTT packets get sprayed where they aren't useful. I'm not too worried about that. Ultimately, if neither CID nor UDP tuple is stable, I don't know how you even map the packet to a connection independently of the load balancer problem.", + "createdAt": "2020-05-07T19:42:02Z", + "updatedAt": "2020-05-07T19:42:02Z" + }, + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "If we want a version-invariant solution (which is my immediate goal), we can't special case any of the long header packets based on type (Initial, Handshake, 0-RTT).\r\n\r\nBut, either way, @martinduke it sounds like you're in the boat of \"do it stateless and live with the (hopefully small) consequences\"?", + "createdAt": "2020-05-07T19:50:52Z", + "updatedAt": "2020-05-07T19:50:52Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Yes, I am on team stateless.\r\n\r\nWe don't need to process the packet subtype (Initial, Handshake, 0RTT). The QUIC-LB language just talks about long headers. There are some embedded assumptions: specifically, that client-generated DCIDs aren't around for a long time, and are only in long headers.\r\n\r\nI do think you're raised a point that we should explicity express our assumptions about version invariance. There are a few pathological things future versions could to to make the CID encoding fail: extremely small max CID lengths, client-generated CIDs in short headers, very long intervals before switching to server-generated CIDs, etc.\r\n\r\nMoreover, the LB requirement to use some algorithm that is invariant over small time scales raises some questions. How is the implementer to know if QUICv2 will allow the client first flight to have a consistent DCID but wildly varying SCIDs or UDP src ports? Or consistent SCID but randomized DCID?\r\n\r\nI'll write up a section to discuss these concerns, but I think we should just write them down and shrug.", + "createdAt": "2020-05-07T20:04:56Z", + "updatedAt": "2020-05-07T20:04:56Z" + }, + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "Does the invariants ever state that the tuple can't change during the handshake? If that's allowed in the future, the first packet could be from one tuple with the client chosen CID, then the next could be from a new tuple, with the server chosen CID...", + "createdAt": "2020-05-07T20:13:00Z", + "updatedAt": "2020-05-07T20:13:00Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "It does not. If we feel strongly that something is likely to not remain constant in some future version of QUIC, we can recommend it that LBs not use it in their algorithm. If not, we should just note the assumption and move on.", + "createdAt": "2020-05-07T20:17:45Z", + "updatedAt": "2020-05-07T20:17:45Z" + }, + { + "author": "martinthomson", + "authorAssociation": "MEMBER", + "body": "There is a question here as to whether this is invariant, but here we go...\r\n\r\nThe goal is to route on the basis of connection ID as much as possible. But you don't always have an existing mapping. That might be because you don't know if the connection ID was generated locally, or because you know for certain that it wasn't. In those cases, the only thing you have to fall back on is the addressing information. So as Udip says, keeping a cache of flows for those packets you can't recognize is sensible.\r\n\r\nIn reading this, I was thinking \"what can the invariants draft say about this?\" And it seems like there is something we could say here.\r\n\r\nRight now, when you get a packet, there is some uncertainty about whether the destination connection ID is one of yours. That is pretty much unavoidable for the long header, unless we create a new invariant way of signaling this (which I don't think we will do). However, for the short header, I think we could say, definitively, that the connection ID is one that the destination server has selected. That might help load balancers in this situation. From my reading of this thread, it seems like this property was assumed throughout, but I realize that we never wrote that down.\r\n\r\n(You can avoid relying on this property by making your connection IDs self-authenticating, but you always have to suffer some false-positive chance, as the amount of data is pretty low.)\r\n\r\n", + "createdAt": "2020-05-07T23:23:54Z", + "updatedAt": "2020-05-07T23:24:58Z" + }, + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "Ideally, we'd want the following promises from the Invariants:\r\n\r\n- Short header packets always use your chosen CID\r\n- Long header packets never change UDP 4-tuple\r\n- Long header packets from the client have a constant source CID", + "createdAt": "2020-05-07T23:44:44Z", + "updatedAt": "2020-05-07T23:44:44Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Only 1 client-chosen server CID per connection would be sufficient as well,\nI think.\n\nFor packets that contain a client-chosen server CID, we need the LBs to\nhave something consistent to grab on to: this could be any combination of\nUDP address/port\nsource CID\ndestination CID.\n\nif any of these become invariant, we can tell LBs to use it exclusively\nwhen handling non-compliant DCIDs.\n\nOn Thu, May 7, 2020 at 4:44 PM Nick Banks wrote:\n\n> Ideally, we'd want the following promises from the Invariants:\n>\n> - Short header packets always use your chosen CID\n> - Long header packets never change UDP 4-tuple\n> - Long header packets from the client have a constant source CID\n>\n> \u2014\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> ,\n> or unsubscribe\n> \n> .\n>\n", + "createdAt": "2020-05-07T23:49:22Z", + "updatedAt": "2020-05-07T23:49:22Z" + }, + { + "author": "martinthomson", + "authorAssociation": "MEMBER", + "body": "> Only 1 client-chosen server CID per connection would be sufficient as well, I think.\r\n\r\nThis is on the basis that the load balancer can route based on the destination connection ID always. I think that is right. And it might be my preferred option. The list of asks increases if you don't have that, as Nick points out.", + "createdAt": "2020-05-07T23:55:11Z", + "updatedAt": "2020-05-07T23:55:11Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Martin, the PR has a pretty good list of relevant things that are not quite\nguaranteed by the invariants draft. We don\u2019t have to have them all but if\nany are oversights please put them in.\n\nOn Thu, May 7, 2020 at 4:55 PM Martin Thomson \nwrote:\n\n> Only 1 client-chosen server CID per connection would be sufficient as\n> well, I think.\n>\n> This is on the basis that the load balancer can route based on the\n> destination connection ID always. I think that is right. And it might be my\n> preferred option. The list of asks increases if you don't have that, as\n> Nick points out.\n>\n> \u2014\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> ,\n> or unsubscribe\n> \n> .\n>\n", + "createdAt": "2020-05-08T01:20:13Z", + "updatedAt": "2020-05-08T01:20:13Z" + }, + { + "author": "huitema", + "authorAssociation": "NONE", + "body": "In V1, we do assume that the addresses and ports will remain constant during the handshake. That means we can hash or route long header messages with the \"non-compliant DCID\" based on the combination of addresses, ports, SCID and DCID. This has an interesting robustness property: Initial packets sent by different parties will be routed to different contexts, even if the SCID and DCIDs collide -- either by mistake or intentionally. We may think of relaxing the rule in a future version and allow addresses to change during handshake, but I would not like losing the current robustness.", + "createdAt": "2020-05-08T01:38:58Z", + "updatedAt": "2020-05-08T01:39:43Z" + } + ] + }, + { + "number": 22, + "id": "MDU6SXNzdWU2MjMzMDQxNDM=", + "title": "Tweak non-compliant DCID recommendation", + "url": "https://github.com/quicwg/load-balancers/issues/22", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "@martinthomson sayeth on the list:\r\n\r\n> That routing will rely on the stability of a subset of fields. I would select from (source IP, source port, destination IP, destination port, DCID) and no others.\r\n\r\nIt would be useful to include something like this in Section 4 as a non-normative hint on what fields to use, since our hint currently consists of an example that just uses the DCID.\r\n\r\nSimilarly, make that assumption clearer in Section 8.\r\n", + "createdAt": "2020-05-22T15:50:03Z", + "updatedAt": "2020-07-01T00:47:53Z", + "closedAt": "2020-07-01T00:47:53Z", + "comments": [ + { + "author": "DavidSchinazi", + "authorAssociation": "NONE", + "body": "For what it's worth, Google's load balancer only uses destination CIDs for routing. We always pick 64bit CIDs during the handshake so we can assume that short headers always carry 64bit CIDs.", + "createdAt": "2020-05-22T17:48:35Z", + "updatedAt": "2020-05-22T17:48:35Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Do all CIDs resolve to a valid server ID?", + "createdAt": "2020-05-22T18:15:45Z", + "updatedAt": "2020-05-22T18:15:45Z" + }, + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "@DavidSchinazi do you not care about an attacker specifically crafting destination CIDs to attack a particular server?", + "createdAt": "2020-05-22T18:39:21Z", + "updatedAt": "2020-05-22T18:39:21Z" + }, + { + "author": "DavidSchinazi", + "authorAssociation": "NONE", + "body": "@martinduke \r\n> Do all CIDs resolve to a valid server ID?\r\n\r\nWe do not have a concept of server ID, but yes every CID routes to a server.\r\n\r\n@nibanks\r\n> @DavidSchinazi do you not care about an attacker specifically crafting destination CIDs to attack a particular server?\r\n\r\nWe do not care about that attack. I haven't seen any indication that it can actually cause harm in real life.", + "createdAt": "2020-05-22T19:41:49Z", + "updatedAt": "2020-05-22T19:41:49Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "@DavidSchinazi very well, then you have no non-compliant DCIDs. You would only need to upgrade your LBs for new versions if they allowed client-chosen DCIDs < 8 bytes.", + "createdAt": "2020-05-22T22:08:33Z", + "updatedAt": "2020-05-22T22:08:33Z" + } + ] + }, + { + "number": 23, + "id": "MDU6SXNzdWU2MjMzMzQxOTI=", + "title": "Fix Figures 3 and 4", + "url": "https://github.com/quicwg/load-balancers/issues/23", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "The bit variable length bit fields are wrong, and don't match the text. Fix them.", + "createdAt": "2020-05-22T16:32:44Z", + "updatedAt": "2020-05-26T18:14:13Z", + "closedAt": "2020-05-26T18:14:13Z", + "comments": [] + }, + { + "number": 27, + "id": "MDU6SXNzdWU2Mzc4NTQxNTY=", + "title": "Discuss uniqueness of config across load balancers", + "url": "https://github.com/quicwg/load-balancers/issues/27", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Add a security consideration to avoid the following scenario:\r\n\r\nMyCloudProvider has a single QUIC-LB config for all its load balancers. It rotates keys periodically, etc, but everyone gets the same config. Obviously, all the attacker has to do is open an account with MyCloudProvider and it is able to recover all the server IDs.\r\n\r\nConfigs ought to be restricted to load balancers serving a finite set of servers. It is possible another MyCloudProvider customer is in the pool behind that load balancer, but that's already a privileged position as already described in the draft.\r\n\r\nObviously, this will require some wordsmithing, as the statement above isn't very precise.", + "createdAt": "2020-06-12T16:00:00Z", + "updatedAt": "2020-07-06T19:17:38Z", + "closedAt": "2020-07-06T19:17:38Z", + "comments": [] + }, + { + "number": 28, + "id": "MDU6SXNzdWU2NDAwMDg4NDM=", + "title": "Routing of ICMP Packet too big messages", + "url": "https://github.com/quicwg/load-balancers/issues/28", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "QUIC-LB LBs will not have the ability to properly route ICMP PTB messages without some additional work.\r\n\r\n1) Servers SHOULD prepend a garbage Handshake packet to their MSS Probes, so that the SCID is there.\r\n2) LBs SHOULD learn to parse these to extract the SCID and route them as they would a packet with that DCID.\r\n\r\nAlternatively, it could keep track of client IPs/ports and their mapping to servers.", + "createdAt": "2020-06-16T22:20:28Z", + "updatedAt": "2020-06-19T19:07:01Z", + "closedAt": "2020-06-19T19:07:01Z", + "comments": [] + }, + { + "number": 31, + "id": "MDU6SXNzdWU2NDIxNTk3NDk=", + "title": "Add retry_source_connection_id to Retry Service Token Format", + "url": "https://github.com/quicwg/load-balancers/issues/31", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "The server now needs to include this field.\r\n\r\nFor the no-shared state service, we just need language that the Retry service needs to encode enough information validate the packet DCID as well and drop if it fails validation. If it does, the server MUST use the packet DCID in the retry_source_connection_id TP.\r\n\r\nFor the shared state service, the retry source connection ID is going to have to be in the token. We might be able to compress this by xoring some fields; I'll think about it.", + "createdAt": "2020-06-19T18:45:31Z", + "updatedAt": "2020-06-29T19:11:43Z", + "closedAt": "2020-06-29T19:11:43Z", + "comments": [] + }, + { + "number": 34, + "id": "MDU6SXNzdWU2NDkzNTQzMjk=", + "title": "Support of server generated HCID with retry tokens", + "url": "https://github.com/quicwg/load-balancers/issues/34", + "state": "CLOSED", + "author": "huitema", + "authorAssociation": "NONE", + "assignees": [], + "labels": [], + "body": "Since draft 28, the retry mechanism includes a requirement that the client DCID in the retried connection matches the server SCID in the retry packet. I do not see a discussion of mechanisms to verify the retried DCID in section 5 of the draft.", + "createdAt": "2020-07-01T22:08:32Z", + "updatedAt": "2020-07-03T01:09:27Z", + "closedAt": "2020-07-03T01:09:27Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I suggest you have a look at Sec 6 of the editor's draft:\r\nhttps://quicwg.org/load-balancers/draft-ietf-quic-load-balancers.html#name-retry-service", + "createdAt": "2020-07-02T22:27:49Z", + "updatedAt": "2020-07-02T22:27:49Z" + }, + { + "author": "huitema", + "authorAssociation": "NONE", + "body": "Yes of course, this is addressed in the editor's draft. Let's close this issue.", + "createdAt": "2020-07-03T01:09:27Z", + "updatedAt": "2020-07-03T01:09:27Z" + } + ] + }, + { + "number": 35, + "id": "MDU6SXNzdWU2NDkzODQyODg=", + "title": "Using ECB for retry tokens seems sub optimal", + "url": "https://github.com/quicwg/load-balancers/issues/35", + "state": "CLOSED", + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Section 5.3 specifies a Shared-State Retry Service describes a token format in which the token include the ODCID, a client IP encoded on 128 bits, and a 20 octets data-time, plus additional data. The token is encrypted using AES ECB. This seems sub-optimal:\r\n\r\n1) Using AES GCM or another AEAD format seems more natural. AEAD checks will immediately detect an invalid token, while using ECB forces reliance on invalidity heuristics.\r\n\r\n2) If using AEAD, there is no need to encode the IP address in the token. It can be derived from the IP header and placed in a pseudo header. The pseudo header can then be authenticated as part of AEAD decryption.\r\n\r\n3) The pseudo header approach can be used to authenticate other fields, e.g. verify that the DCID matches the SCID sent in the Retry packet.\r\n\r\n4) Encoding the time as 64 bits time64_t seems more natural than ASCII encoding, and also shorter.\r\n", + "createdAt": "2020-07-01T23:03:07Z", + "updatedAt": "2020-12-18T16:38:02Z", + "closedAt": "2020-12-18T16:38:02Z", + "comments": [ + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "The editor draft also encodes the server's SCID in the token. That too could be moved to a pseudo-header, since the field is assume present in the DCID of the post retry Initial.", + "createdAt": "2020-07-03T01:11:09Z", + "updatedAt": "2020-07-03T01:11:09Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Closed by #33 ", + "createdAt": "2020-07-09T01:16:44Z", + "updatedAt": "2020-07-09T01:16:44Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "This was closed in error, as #33 deals with the Stream Cipher.", + "createdAt": "2020-11-03T18:51:20Z", + "updatedAt": "2020-11-03T18:51:20Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I filed a very similar issue and then closed it when I realized the duplication. The text of that issue:\r\n\r\nI'm not an encryption expert, but if IIUC it's insufficiently hard to forge a shared-state retry token.\r\n\r\nBy inducing a Retry, an attacker can obtain the Retry SCID Length, and then focus entirely on an ODCIDs that allow the CID + CID Length part of the token to be a multiple of 16 B. For example, if RSCIDL= 10 B, then make ODCIDL = 20 B -> 32 Bytes for the block.\r\n\r\nThis then breaks Retry forgery into three separate problems:\r\n(1) Obtaining the mapping of IP Address to the first 16 Bytes of the token. A well-positioned observer could build a database of these in the time scale between token key rotations.\r\n(2) Generate lots of Retry tokens with an ODCID of the correct length, so there is a range of valid CID blocks.\r\n(3) Obtain a valid Retry every few seconds, using the right ODCID length, so that we have a valid timestamp.\r\n\r\nThus, the attacker has a database of\r\n\r\nvalid encrypted IP addresses\r\nvalid encrypted CIDs (really, it's the CID length that would cause validation to fail)\r\nvalid timestamps\r\nAs the spec uses AES-ECB, these blocks can be mixed and matched to create valid Retry tokens.\r\n\r\nThis is not exactly trivially open to attack [1], but it does feel like we're conceding a lot of entropy here. I would like someone to propose an alternate design that restores some of that entropy.\r\n\r\n[1] Step (1) seems to require a fairly privileged position in the network.", + "createdAt": "2020-11-03T19:06:18Z", + "updatedAt": "2020-11-03T19:06:18Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "@huitema Could I trouble you for a PR on this?", + "createdAt": "2020-11-03T19:43:57Z", + "updatedAt": "2020-11-03T19:43:57Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "Sure. I can basically propose what I am doing in picoquic.\r\nAnd yes, the repetitive nature of ECB enables attacks.", + "createdAt": "2020-11-04T00:43:36Z", + "updatedAt": "2020-11-04T00:43:36Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "@martinduke please review PR #59", + "createdAt": "2020-11-04T02:31:20Z", + "updatedAt": "2020-11-04T02:31:20Z" + } + ] + }, + { + "number": 38, + "id": "MDU6SXNzdWU2NTA3MTI2ODA=", + "title": "Make it clear the server might do length encoding on its own", + "url": "https://github.com/quicwg/load-balancers/issues/38", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [ + "editorial" + ], + "body": "The length encoding is mainly there for crypto offload, and the server MAY use this option even if the load balancer and config agent don't need it.", + "createdAt": "2020-07-03T17:49:04Z", + "updatedAt": "2020-07-06T19:18:09Z", + "closedAt": "2020-07-06T19:18:09Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Closing; this text already exists in Sec 3.3.", + "createdAt": "2020-07-06T19:18:09Z", + "updatedAt": "2020-07-06T19:18:09Z" + } + ] + }, + { + "number": 41, + "id": "MDU6SXNzdWU2NTUwMjU5NjQ=", + "title": "Simplify the configuration by merging server-id and zero-pad", + "url": "https://github.com/quicwg/load-balancers/issues/41", + "state": "CLOSED", + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "The encrypted CID format includes a zero-pad field that is used to detect whether the decryption succeeded or not. I suggest merging this field with the server ID field, and test whether the decryption succeed by checking whether the server ID is valid or not. This assumes that the server ID field is sparsely populated. For example, if there are just 256 servers, in theory a 1-octed field would be sufficient; instead, we could use a 4 or 5 octet server ID field that would be sparsely populated, allowing for error detection.\r\n\r\nThis would allow for unified validity detection across all supported methods:\r\n* clear text: verify that the server ID is valid;\r\n* obfuscated: the divider need to have the same size as the full length server ID; the modulo is the server ID; validity can be verified there.\r\n* stream: decrypt and verify that the server-id is valid\r\n* encrypt: decrypt and verify that the server-id is valid\r\n\r\nIt would also allows for simplification of the configuration for the encrypted method, by specifying just one field instead of two.", + "createdAt": "2020-07-10T20:43:31Z", + "updatedAt": "2020-07-20T18:39:51Z", + "closedAt": "2020-07-20T18:39:51Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Yes, I agree this is simpler with no cost at all. Care to do a PR?", + "createdAt": "2020-07-17T17:56:06Z", + "updatedAt": "2020-07-17T17:56:06Z" + } + ] + }, + { + "number": 42, + "id": "MDU6SXNzdWU2NTk0ODEwNzk=", + "title": "Fix terminology of Config Rotation", + "url": "https://github.com/quicwg/load-balancers/issues/42", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [ + "editorial" + ], + "body": "Erik Fuller points out via email:\r\n\r\n> This term \u201cconfiguration phase\u201d had me confused. These two sentences are the only place we reference it. It\u2019s basically a configuration ID so we can distinguish between settings across connections during a deployment, right? Once a new config is deployed, what happens to all the connections in the old format?\r\n> \r\n> After reading through I\u2019m still not certain what \u201cphase of the algorithm\u201d means\r\n\r\nHe's right. We should just call it a configuration ID and be clearer on what's what.", + "createdAt": "2020-07-17T17:57:49Z", + "updatedAt": "2020-07-17T22:15:08Z", + "closedAt": "2020-07-17T22:15:08Z", + "comments": [] + }, + { + "number": 46, + "id": "MDU6SXNzdWU2NjI1NTc4Njg=", + "title": "A little confused about configuration agent", + "url": "https://github.com/quicwg/load-balancers/issues/46", + "state": "CLOSED", + "author": "william-zk", + "authorAssociation": "NONE", + "assignees": [], + "labels": [ + "editorial" + ], + "body": "Hi Author:\r\n I have a little confused about 'configuration agent', from the description of draft, I think it should be a centralized control plane of 'load balancer' and 'server', but from the name 'agent', it seems like it should be a agent component which was used to receive message from control plane. So, what is the most correct definition of 'configuration agent'?", + "createdAt": "2020-07-21T04:11:13Z", + "updatedAt": "2020-08-14T02:10:45Z", + "closedAt": "2020-08-14T02:10:45Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "In the definitions section, it says: \"A \"configuration agent\" is\r\nthe entity that determines the QUIC-LB configuration parameters for the network\r\nand leverages some system to distribute that configuration.\"\r\n\r\nThe draft isn't really trying to define the architecture of the control plane. I'm not sure what the distinction is, for this spec, between being \"the control plane\" or something that \"receives messages from the control plane\". It is whatever is assigning server IDs.\r\n\r\nIs there other language that would make this clearer?\r\n", + "createdAt": "2020-07-29T20:14:56Z", + "updatedAt": "2020-07-29T20:14:56Z" + }, + { + "author": "william-zk", + "authorAssociation": "NONE", + "body": "Um...I got it. My question comes from that we want to do an implementation about quic-lb, and contribute it to the nginx community, but for nginx, there are not any uniform centralized component to generate and distribute server ID, so we are confused with that if we should do a 'configuration agent' implementation. From your answer, we think that we can just open source quic-lb route ability, and provide a uniform server id usage api. ", + "createdAt": "2020-07-30T02:54:04Z", + "updatedAt": "2020-07-30T02:54:04Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Ah. So the draft originally had an in-band config channel but the group pulled it out for several reasons. I am personally not sure how people will deploy configurations for QUIC-LB in the real world, but for now you probably can't go wrong with adding the parameters to a configuration interface and just having a human being start the process.\r\n\r\nI would suspect that open source QUIC servers would have a check box that says \"accept QUIC-LB configuration\" or something and then it would open a REST interface or whatever to accept it. I would love to hear from cloud providers to understand what config frameworks there are, but I suspect we're going to write something down in a draft somewhere.", + "createdAt": "2020-07-30T03:14:53Z", + "updatedAt": "2020-07-30T03:14:53Z" + }, + { + "author": "william-zk", + "authorAssociation": "NONE", + "body": "> I would suspect that open source QUIC servers would have a check box that says \"accept QUIC-LB configuration\" or something and then it would open a REST interface or whatever to accept it. I would love to hear from cloud providers to understand what config frameworks there are, but I suspect we're going to write something down in a draft somewhere.\r\n\r\nAh, maybe a brief introduction can be write into `1.1. Terminology`\r\n\r\n\r\n", + "createdAt": "2020-07-30T03:29:05Z", + "updatedAt": "2020-07-30T03:29:05Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "so this is already there:\r\nSec 1: \r\nWhile this document describes a small set of configuration parameters to make\r\nthe server mapping intelligible, the means of distributing these parameters\r\nbetween load balancers, servers, and other trusted intermediaries is out of its\r\nscope. There are numerous well-known infrastructures for distribution of\r\nconfiguration.\r\n\r\nSec 1.1\r\nA \"configuration agent\" is\r\nthe entity that determines the QUIC-LB configuration parameters for the network\r\nand leverages some system to distribute that configuration.\r\n\r\nIs this what you're looking for?", + "createdAt": "2020-08-13T19:48:52Z", + "updatedAt": "2020-08-13T19:48:52Z" + }, + { + "author": "william-zk", + "authorAssociation": "NONE", + "body": "> so this is already there:\r\n> Sec 1:\r\n> While this document describes a small set of configuration parameters to make\r\n> the server mapping intelligible, the means of distributing these parameters\r\n> between load balancers, servers, and other trusted intermediaries is out of its\r\n> scope. There are numerous well-known infrastructures for distribution of\r\n> configuration.\r\n> \r\n> Sec 1.1\r\n> A \"configuration agent\" is\r\n> the entity that determines the QUIC-LB configuration parameters for the network\r\n> and leverages some system to distribute that configuration.\r\n> \r\n> Is this what you're looking for?\r\n\r\nOK, thanks for answering, I'd close this issue soon", + "createdAt": "2020-08-14T02:10:00Z", + "updatedAt": "2020-08-14T02:10:00Z" + } + ] + }, + { + "number": 47, + "id": "MDU6SXNzdWU2Njc3OTMyOTk=", + "title": "Cut obfuscated server ID algorithm", + "url": "https://github.com/quicwg/load-balancers/issues/47", + "state": "CLOSED", + "author": "martinthomson", + "authorAssociation": "MEMBER", + "assignees": [], + "labels": [], + "body": "As discussed at IETF 108. Split from #8.", + "createdAt": "2020-07-29T12:07:37Z", + "updatedAt": "2020-08-13T19:34:58Z", + "closedAt": "2020-08-13T19:34:58Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Thanks for filing this. I agree that this was the feedback, but I'll take it from the list to be sure.", + "createdAt": "2020-07-29T18:57:32Z", + "updatedAt": "2020-07-29T18:57:32Z" + }, + { + "author": "ianswett", + "authorAssociation": "NONE", + "body": "Removing this seems fine to me.", + "createdAt": "2020-07-29T19:16:23Z", + "updatedAt": "2020-07-29T19:16:23Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "Yes, do it.", + "createdAt": "2020-07-29T19:24:46Z", + "updatedAt": "2020-07-29T19:24:46Z" + }, + { + "author": "pravb", + "authorAssociation": "NONE", + "body": "Seems fine.", + "createdAt": "2020-07-29T19:24:52Z", + "updatedAt": "2020-07-29T19:24:52Z" + }, + { + "author": "janaiyengar", + "authorAssociation": "NONE", + "body": "Do it.", + "createdAt": "2020-07-29T19:28:51Z", + "updatedAt": "2020-07-29T19:28:51Z" + }, + { + "author": "DavidSchinazi", + "authorAssociation": "NONE", + "body": "Do it.", + "createdAt": "2020-07-29T19:34:21Z", + "updatedAt": "2020-07-29T19:34:21Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Nick Harper concurred on the list", + "createdAt": "2020-07-29T19:59:45Z", + "updatedAt": "2020-07-29T19:59:45Z" + } + ] + }, + { + "number": 50, + "id": "MDU6SXNzdWU2ODcyMzU0MzE=", + "title": " A bit maybe used in cid to mark whether the server info encoded in the long header or not?", + "url": "https://github.com/quicwg/load-balancers/issues/50", + "state": "CLOSED", + "author": "Lingtaonju", + "authorAssociation": "NONE", + "assignees": [], + "labels": [], + "body": "Dear sir,\r\nAs you know, there is no bit in the cid to mark whether the cid encoded the server info or not. In this case, no matter the server info encoded or not, the load balancer needs to decrypt or decode the cid. Do you think this is a useless try when the packet is the first initial packet? Do you think this is a useful idea to expand the cid format to use the first bit to mark the cid encoded or not? However, in this case, the client need to obey the rule.", + "createdAt": "2020-08-27T13:17:16Z", + "updatedAt": "2020-10-10T02:21:56Z", + "closedAt": "2020-10-10T02:21:56Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "In fact, there is a bit. If the first two bits are '11' that means that the server didn't encode its ID and the load balancer should use 4-tuple routing:\r\n\r\nhttps://quicwg.org/load-balancers/draft-ietf-quic-load-balancers.html#name-configuration-failover\r\n\r\nThe very first packet usually has a CID chosen by the client, which knows nothing about QUIC-LB. The beginning of Section 4 is mostly about how load balancers should handle these.", + "createdAt": "2020-08-28T17:53:01Z", + "updatedAt": "2020-08-28T17:53:01Z" + }, + { + "author": "Lingtaonju", + "authorAssociation": "NONE", + "body": "OK, I almost have forgot the first two Config Rotation bits can be used to mark the cid server info's validity.\r\n\r\nHowever, in this case, I want to know , for the very first packet, will the draft suggest the clients to generate the dcid with the first two bits \"11\" , if they know the QUIC-LB used.\r\n \r\nAs, if so, the QUIC-LB know all packets' cid information to prevent useless decode/decrypt try for the very first packet.", + "createdAt": "2020-08-31T06:23:21Z", + "updatedAt": "2020-08-31T06:26:28Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "No, this draft does not assume client cooperation at all. The very beginning of Section 4 explains how to handle client-generated CIDs.", + "createdAt": "2020-08-31T15:59:29Z", + "updatedAt": "2020-08-31T15:59:29Z" + }, + { + "author": "Lingtaonju", + "authorAssociation": "NONE", + "body": "> No, this draft does not assume client cooperation at all. The very beginning of Section 4 explains how to handle client-generated CIDs.\r\n\r\nThanks for your reply. Actually, I understand your works and Section 4.\r\nHowever, my point is that , even this draft does not assume client cooperation at all, this draft can suggest the client to generate a cid with 11 for the very first initial packet.\r\n\r\nThis is useful for QUIC-LB if client obeys the rule, if not , the Section 4 also works well. \r\n", + "createdAt": "2020-09-01T12:27:05Z", + "updatedAt": "2020-09-01T12:27:46Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "In #52 I'm adding CR bits as a reason for noncompliance.\r\n\r\nIt's fine if the client wants to set '11' , but I don't think it's important to do that. At most all we're saving the LB is a very small decrypt operation.", + "createdAt": "2020-09-01T15:51:43Z", + "updatedAt": "2020-09-01T15:51:43Z" + }, + { + "author": "Lingtaonju", + "authorAssociation": "NONE", + "body": "Even thought the decryption has a low consumption, I insist that the cost can be avoided.\r\n\r\nI admit that the lb can't assume client cooperation at all, however, the draft can suggest the client to obey the rule: \r\n_\" As, it is impossible for the client to know the server information at the beginning of the QUIC conn, so the DCID in the initial can't encode the server info, in this case, the Client should make the first two bits with \"11\". \"_\r\n", + "createdAt": "2020-09-14T02:18:57Z", + "updatedAt": "2020-09-14T02:18:57Z" + } + ] + }, + { + "number": 51, + "id": "MDU6SXNzdWU2ODcyNDY5MDk=", + "title": "Any suggestion about transmit client ip from quic-lb to quic-server?", + "url": "https://github.com/quicwg/load-balancers/issues/51", + "state": "CLOSED", + "author": "william-zk", + "authorAssociation": "NONE", + "assignees": [], + "labels": [], + "body": "Dear author:\r\n As you know, in many production scenarios, quic-server need to know the real ip/port of client. But when there is a quic-lb in the middle(a fullnat quic-lb), there are not any standard way to implement this function. Actually this function is not difficult to implement, will quic-lb-draft suggest or define a standard way for this function later?", + "createdAt": "2020-08-27T13:33:15Z", + "updatedAt": "2020-10-30T15:07:53Z", + "closedAt": "2020-10-30T15:07:53Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "That is not currently an objective for this document. I would probably start with taking the PROXY protocol and adapting it for UDP. Perhaps that would be a good draft!", + "createdAt": "2020-08-28T17:59:35Z", + "updatedAt": "2020-08-28T17:59:35Z" + }, + { + "author": "william-zk", + "authorAssociation": "NONE", + "body": "Ah, I got it", + "createdAt": "2020-08-31T11:38:02Z", + "updatedAt": "2020-08-31T11:38:02Z" + }, + { + "author": "william-zk", + "authorAssociation": "NONE", + "body": "Um...I reconsider the situation, can UDP-PROXY-protocol cover all UDP-based transport protocol? Consider this, for QUIC, we may send client ip to quic-server when receive initial packet. For RTP, we may send client ip to real-server when receive first packet...\r\nThere are so much UDP-based protocol, can all situation be covered in one draft?", + "createdAt": "2020-09-02T14:41:20Z", + "updatedAt": "2020-09-02T14:41:20Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Yes\n\nOn Wed, Sep 2, 2020 at 7:41 AM ZengKe wrote:\n\n>\n>\n> Um...I reconsider the situation, can UDP-PROXY-protocol cover all\n> UDP-based transport protocol? Consider this, for QUIC, we may send client\n> ip to quic-server when receive initial packet. For RTP, we may send client\n> ip to real-server when receive first packet...\n>\n>\n> There are so much UDP-based protocol, can all situation be covered in one\n> draft?\n>\n>\n>\n>\n> \u2014\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> ,\n> or unsubscribe\n> \n> .\n>\n>\n>\n", + "createdAt": "2020-09-02T16:08:24Z", + "updatedAt": "2020-09-02T16:08:24Z" + }, + { + "author": "william-zk", + "authorAssociation": "NONE", + "body": "\ud83d\udc4c Looking forward to your draft, by the way, could you please tell me when will you start writing this draft?", + "createdAt": "2020-09-04T02:35:00Z", + "updatedAt": "2020-09-04T02:35:00Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I'm not sure I volunteered to write it!\n\nOn Thu, Sep 3, 2020 at 7:35 PM ZengKe wrote:\n\n> \ud83d\udc4c Looking forward to your draft, by the way, could you please tell me\n> when will you start writing this draft?\n>\n> \u2014\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> ,\n> or unsubscribe\n> \n> .\n>\n", + "createdAt": "2020-09-04T03:16:02Z", + "updatedAt": "2020-09-04T03:16:02Z" + }, + { + "author": "william-zk", + "authorAssociation": "NONE", + "body": "> I'm not sure I volunteered to write it!\r\n\r\nAh, if you have any interests to do this, I would like to do some contribution about it", + "createdAt": "2020-09-04T03:21:02Z", + "updatedAt": "2020-09-04T03:21:02Z" + }, + { + "author": "william-zk", + "authorAssociation": "NONE", + "body": "Furthermore, I think it's a very important function for production environment", + "createdAt": "2020-09-04T03:22:44Z", + "updatedAt": "2020-09-04T03:22:44Z" + }, + { + "author": "Lingtaonju", + "authorAssociation": "NONE", + "body": "Is it possible that in quic lb, only a special proxy protocol is designed for quic, such as carrying pp packet only for initial packet, so as to avoid per-packet carrying to reduce overhead ?", + "createdAt": "2020-09-14T01:53:57Z", + "updatedAt": "2020-09-14T01:53:57Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "IMO Proxy Protocol is a NAT function, not a load balancing function. I don't think it belongs in this draft. I do have an individual draft (quic-natsupp) that touches on some issues with QUIC NATs, and this could house this work, but I think it'd be better just to write a draft that describes this.\r\n\r\nI'll also note that the latest proxy protocol spec seems to offer UDP support, if I'm reading it correctly: https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/#:~:text=When%20using%20UDP%20(currently%20an,Proxy%20Protocol%20to%20'on'.\r\n\r\nThere are some complexities in doing this well for QUIC. It ought to be version-independent (so no using specific long header packet types) and has to handle address migration properly.", + "createdAt": "2020-09-24T16:10:30Z", + "updatedAt": "2020-09-24T16:10:30Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "closing this as out of scope for quic-lb.", + "createdAt": "2020-10-30T15:07:53Z", + "updatedAt": "2020-10-30T15:07:53Z" + } + ] + }, + { + "number": 53, + "id": "MDU6SXNzdWU3MDA5MTMxOTU=", + "title": "Keepalive design discussion", + "url": "https://github.com/quicwg/load-balancers/issues/53", + "state": "CLOSED", + "author": "william-zk", + "authorAssociation": "NONE", + "assignees": [], + "labels": [], + "body": "Hi author:\r\n Will quic-lb design Keepalive mechanism next? Surely it's a very important mechanism in load balancer.", + "createdAt": "2020-09-14T09:00:56Z", + "updatedAt": "2020-11-04T02:16:47Z", + "closedAt": "2020-11-04T02:16:47Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I'm not sure what you mean by a keepalive mechanism. Layer 4 load balancers can't inject messages into the connection. What are you trying to achieve?", + "createdAt": "2020-09-24T17:29:18Z", + "updatedAt": "2020-09-24T17:29:18Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Any further response to this?", + "createdAt": "2020-11-03T19:15:49Z", + "updatedAt": "2020-11-03T19:15:49Z" + }, + { + "author": "william-zk", + "authorAssociation": "NONE", + "body": "Thanks for answering", + "createdAt": "2020-11-04T02:16:47Z", + "updatedAt": "2020-11-04T02:16:47Z" + } + ] + }, + { + "number": 54, + "id": "MDU6SXNzdWU3MTg1MTQ3Nzk=", + "title": "A question about retry token format", + "url": "https://github.com/quicwg/load-balancers/issues/54", + "state": "CLOSED", + "author": "Lingtaonju", + "authorAssociation": "NONE", + "assignees": [], + "labels": [], + "body": "In following `Figure 6: Cleartext format of shared-state retry tokens` , the token format only encode original dcid and retry scid, but not initial scid.\r\n\r\n![image](https://user-images.githubusercontent.com/19946268/95644074-5e8d3380-0ae6-11eb-8296-3b4c3c92b9ed.png)\r\n\r\n\r\nAs in the transport draft, it describes that all these three cids are carried in the transport parameters for Authenticating:\r\n![image](https://user-images.githubusercontent.com/19946268/95644109-b330ae80-0ae6-11eb-83e6-c260c4924cf2.png)\r\n\r\n", + "createdAt": "2020-10-10T02:55:18Z", + "updatedAt": "2020-10-28T22:55:49Z", + "closedAt": "2020-10-28T22:55:49Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "If you read it carefully, I think you'll see that this information isn't necessary in the token. The server needs S1, S2, and S3. S1 is the ODCID field. S2 is the RSCID field. S3 is the source connection ID it uses in the Initial it sends in response to the token! It is not even generated until the Retry token has been processed.", + "createdAt": "2020-10-28T22:55:49Z", + "updatedAt": "2020-10-28T22:55:49Z" + } + ] + }, + { + "number": 55, + "id": "MDU6SXNzdWU3MTg3NDU2OTY=", + "title": "question about timestamp in token", + "url": "https://github.com/quicwg/load-balancers/issues/55", + "state": "CLOSED", + "author": "Lingtaonju", + "authorAssociation": "NONE", + "assignees": [], + "labels": [], + "body": "As the draft describes:\r\n\r\n'The date-time string is a total of 20 octets and encodes\r\n the time the token was generated. The format of date-time is\r\n described in Section 5.6 of [RFC3339].'\r\n\r\nthis needs 20 octets in ascii,\r\nmay be the unix time which is the the number of seconds since the Unix epoch in 8 octets\r\nis a better choice in transmission and computing ?", + "createdAt": "2020-10-11T02:59:43Z", + "updatedAt": "2020-10-30T13:56:11Z", + "closedAt": "2020-10-30T13:56:11Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "@Lingtaonju have a look at the PR, please", + "createdAt": "2020-10-29T21:46:22Z", + "updatedAt": "2020-10-29T21:46:22Z" + } + ] + }, + { + "number": 57, + "id": "MDU6SXNzdWU3MzU1NTQ2ODQ=", + "title": "Rework Shared-State Token Security", + "url": "https://github.com/quicwg/load-balancers/issues/57", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "I'm not an encryption expert, but if IIUC it's insufficiently hard to forge a shared-state retry token.\r\n\r\nBy inducing a Retry, an attacker can obtain the Retry SCID Length, and then focus entirely on an ODCIDs that allow the CID + CID Length part of the token to be a multiple of 16 B. For example, if RSCIDL= 10 B, then make ODCIDL = 20 B -> 32 Bytes for the block.\r\n\r\nThis then breaks Retry forgery into three separate problems:\r\n(1) Obtaining the mapping of IP Address to the first 16 Bytes of the token. A well-positioned observer could build a database of these in the time scale between token key rotations.\r\n(2) Generate lots of Retry tokens with an ODCID of the correct length, so there is a range of valid CID blocks.\r\n(3) Obtain a valid Retry every few seconds, using the right ODCID length, so that we have a valid timestamp.\r\n\r\nThus, the attacker has a database of \r\n- valid encrypted IP addresses\r\n- valid encrypted CIDs (really, it's the CID length that would cause validation to fail)\r\n- valid timestamps\r\n\r\nAs the spec uses AES-ECB, these blocks can be mixed and matched to create valid Retry tokens.\r\n\r\nThis is not exactly trivially open to attack [1], but it *does* feel like we're conceding a lot of entropy here. I would like someone to propose an alternate design that restores some of that entropy.\r\n\r\n[1] Step (1) seems to require a fairly privileged position in the network.\r\n", + "createdAt": "2020-11-03T18:44:47Z", + "updatedAt": "2020-11-03T19:05:45Z", + "closedAt": "2020-11-03T19:05:45Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "This is a duplicate of #35, which I reopened. Closing.", + "createdAt": "2020-11-03T19:05:45Z", + "updatedAt": "2020-11-03T19:05:45Z" + } + ] + }, + { + "number": 60, + "id": "MDU6SXNzdWU3NDUxOTc1OTg=", + "title": "SNI switching", + "url": "https://github.com/quicwg/load-balancers/issues/60", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [ + "editorial" + ], + "body": "Some load balancers today switch based on the SNI. Obviously, this is not version-invariant. We should add some language about this.\r\n\r\nWhat should such an LB when it encounters an unknown version? It probably has no choice but to forward it based on CID and hope for the best.", + "createdAt": "2020-11-18T00:45:39Z", + "updatedAt": "2020-12-16T00:02:35Z", + "closedAt": "2020-12-16T00:02:35Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "If the differing domains trust each other, the servers could helpfully generate Retry packets to redirect the client to the right place. This assumes a bunch of shared state, and that those servers support the same version while the LB does not.\r\n\r\nOf course, if version support differs, the VN process has serious problems.", + "createdAt": "2020-11-18T00:53:09Z", + "updatedAt": "2020-11-18T00:53:09Z" + }, + { + "author": "william-zk", + "authorAssociation": "NONE", + "body": "Maybe encrypt sni will be the real standard later(see https://tools.ietf.org/html/draft-ietf-tls-esni-08), I just think that there is no need for quic lb considering sni", + "createdAt": "2020-12-11T03:08:42Z", + "updatedAt": "2020-12-11T03:09:30Z" + } + ] + }, + { + "number": 62, + "id": "MDU6SXNzdWU3NjE1NTYzMDk=", + "title": "Add Acknowledgments", + "url": "https://github.com/quicwg/load-balancers/issues/62", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Martin Thomson\r\nChristian Huitema\r\n\r\nothers I'm missing?", + "createdAt": "2020-12-10T19:43:45Z", + "updatedAt": "2020-12-12T00:11:13Z", + "closedAt": "2020-12-12T00:11:13Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Closed by https://github.com/quicwg/load-balancers/commit/a564b0c3cca21a0dea6a41488924dfdc49ce3b3a", + "createdAt": "2020-12-12T00:11:13Z", + "updatedAt": "2020-12-12T00:11:13Z" + } + ] + }, + { + "number": 64, + "id": "MDU6SXNzdWU3NjMxNDQ0MTM=", + "title": "PCID without SID configuration?", + "url": "https://github.com/quicwg/load-balancers/issues/64", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [ + "martinduke" + ], + "labels": [ + "needs-discussion" + ], + "body": "@ianswett proposed a PCID design that assigns SIDs on the fly instead of having to pre-configure them. There are drawbacks but it has some nice properties.", + "createdAt": "2020-12-12T01:21:15Z", + "updatedAt": "2021-03-15T23:32:05Z", + "closedAt": "2021-03-15T23:32:05Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "This is merged, but I'm going to take the question of what we can do with these dueling plaintext designs to the list.", + "createdAt": "2021-01-11T21:37:48Z", + "updatedAt": "2021-01-11T21:37:48Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "List discussion was not helpful; closing this with the dynamic method still in the draft.", + "createdAt": "2021-03-15T23:32:05Z", + "updatedAt": "2021-03-15T23:32:05Z" + } + ] + }, + { + "number": 65, + "id": "MDU6SXNzdWU3Njk1OTY2NDg=", + "title": "Cryptographic agility", + "url": "https://github.com/quicwg/load-balancers/issues/65", + "state": "CLOSED", + "author": "martinthomson", + "authorAssociation": "MEMBER", + "assignees": [], + "labels": [], + "body": "The stream and block cipher configuration are locked to AES-ECB. AES-128-ECB too (this needs to be clear).\r\n\r\nThis is a fine design. If a better design is required, that can be achieved by adding a new arm to `routing_algorithm`. It might pay to say that and cite https://tools.ietf.org/html/rfc7696 at the same time.", + "createdAt": "2020-12-17T06:46:03Z", + "updatedAt": "2020-12-23T02:44:53Z", + "closedAt": "2020-12-23T02:44:53Z", + "comments": [] + }, + { + "number": 66, + "id": "MDU6SXNzdWU3NzExMTYwMzc=", + "title": "Security Considerations for Shared-State Retry Keys", + "url": "https://github.com/quicwg/load-balancers/issues/66", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [ + "huitema" + ], + "labels": [], + "body": "@huitema has done some nice analysis on the constraints of using a 96-bit random nonce to encrypt the Shared-state retry keys. This analysis should be in security considerations.", + "createdAt": "2020-12-18T19:20:34Z", + "updatedAt": "2021-01-11T15:11:33Z", + "closedAt": "2021-01-11T15:11:33Z", + "comments": [ + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "I did a nice analysis? I am collecting here the relevant comments on PR #59:\r\n\r\n1- (by @huitema ) Birthday paradox says with a 64 bit random field you will expect collisions after 2^32 tokens -- and that you have to change the key sooner than that if you want to minimize the risk. If you want the risk of collision below 10E-5 (five nines...) then you should not use the key more than 19 million times. It should be technically possible to make the identifier 12 bytes long -- that's the normal size of the IV for AES GCM. The same reasoning says that the key should not be use more that 4.0 E+14 times -- 400 trillion times. That may be the way to go. Better than trying to squeeze an 18 bytes ID there. Or we would have to use something a bit more exotic than AES GCM, but I would rather not go there.\r\n\r\n2- (by @martinduke ) I think we have five options: (1) A 96-bit random number for the sequence number, and just assume there are no collisions (you've computed the very low probability) -- this is wire inefficient but very easy (2) For the shared-state case, the service simply forwards packets with server-generated tokens rather than trying to validate them. Therefore this format is only generated by the retry service and it can use all the sequence numbers without fear of collision. -- this is very easy and wire-efficient, but slightly reduces the usefulness of the Retry Service.\r\n\r\n3- (by @huitema) we only have the following 2 options: (1) A 96-bit random number for the sequence number, and just assume there are no collisions (you've computed the very low probability) -- this is wire inefficient but very easy. (3c) Assign each server a shorter ID for Retry purposes, and put in the token: medium token size, but involves the most configuration. For AEAD, compose the 96 bit sequence as \"(up to) 32 bit server ID\" + \"(up to) 64 bit server-chosen token ID\". The advantage of (3c) over (1) it potentially reduced transmission overhead. For example, the server ID might well be just 16 bits, the token ID might be just 32 bits. If we have a server ID, the LB can use it to direct the incoming Initial to the server that allocated the token, which may or may not be useful. The drawback of (3c) is more configuration, and also exposing the server ID in cleartext. If server ID privacy is an issue, we need something like header protection as part of the token protection.\r\n\r\nAfter discussion, we realized that the \"96 random bits\" option was preferable overall, because:\r\n\r\n1) It does not require managing short \"configuration identifiers\" in complement to server ID;\r\n2) It does create some configuration overhead, but that's limited to at most 4 bytes per token, thus manageable;\r\n3) Birthday paradox tells us that the first collision has a 50% chance of happening after 2^48 tokens have been allocated, which is a fairly large number in practice. We will want to rotate the token encryption key sooner than that.\r\n", + "createdAt": "2020-12-18T20:02:35Z", + "updatedAt": "2020-12-18T20:02:35Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "Or do you want to compare AES-GCM to other solutions, such as AES-ECB? ECB encryption has a predictability issue, which is demonstrated for example by the penguin picture in [this Wikipedia page](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation). That weakness can expose repetitive patterns in 16-bytes chunks of the token, server-id for example.", + "createdAt": "2020-12-18T20:07:24Z", + "updatedAt": "2020-12-18T20:07:24Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "AEAD encryption also has the advantage of immediate detection of forged tokens.", + "createdAt": "2020-12-18T20:08:09Z", + "updatedAt": "2020-12-18T20:08:09Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "But there is one weakness in the \"96 bit random\" proposal. It requires that the generators actually use a crypto grade random number generator.", + "createdAt": "2020-12-18T20:09:58Z", + "updatedAt": "2020-12-18T20:09:58Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I was referring to the specific bit about how long it is safe to use a given key because we have 96 bits of entropy. Not the rest.", + "createdAt": "2020-12-18T22:39:42Z", + "updatedAt": "2020-12-18T22:39:42Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "Oh, that. We should ask CFRG, but the conservative behavior would be to follow the guidelines in QUIC-TLS section 6.6: \"For AEAD_AES_128_GCM and AEAD_AES_256_GCM, the confidentiality limit is 2^23 encrypted packets; see Appendix B.1. For AEAD_CHACHA20_POLY1305, the confidentiality limit is greater than the number of possible packets (2^62) and so can be disregarded. For AEAD_AES_128_CCM, the confidentiality limit is 2^21.5 encrypted packets; see Appendix B.2. Applying a limit reduces the probability that an attacker can distinguish the AEAD in use from a random permutation; see [AEBounds], [ROBUST], and [GCM-MU].\" So, basically, 8 million tickets.", + "createdAt": "2020-12-18T23:52:28Z", + "updatedAt": "2020-12-18T23:52:28Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "But the CFRG computations assume messages that are 10K long. Tickets would typically be 1/100th of that, that may well make a difference. Or maybe it doesn't. Got to ask.", + "createdAt": "2020-12-18T23:55:07Z", + "updatedAt": "2020-12-18T23:55:07Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "The 96 bits make a difference with 64 bits in the risk of collisions. If there are 2^32 tickets issued with the same key, the chances of at least one collision with 64 bit unique number is 50%; with 96 bits, it is about 1.1E-10. Even if there are only 2^26 tickets issued with that key, the chances of at least one collision with 64 bit unique number is still 0.016%, which many will find too high for comfort.", + "createdAt": "2020-12-19T00:06:55Z", + "updatedAt": "2020-12-19T00:06:55Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Do you feel comfortable writing a paragraph about this in the Security Considerations?", + "createdAt": "2020-12-21T17:15:49Z", + "updatedAt": "2020-12-21T17:15:49Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Closed via #78 ", + "createdAt": "2021-01-11T15:11:33Z", + "updatedAt": "2021-01-11T15:11:33Z" + } + ] + }, + { + "number": 67, + "id": "MDU6SXNzdWU3NzExMTc2NTA=", + "title": "Packet Number in Retry Token", + "url": "https://github.com/quicwg/load-balancers/issues/67", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [ + "martinduke" + ], + "labels": [], + "body": "Currently the Initial Packet number MAY be encoded in the Retry Token. We must either:\r\n\r\n- Include language that a server MUST NOT reject a token because this information is not present; OR\r\n- Just make it part of the format. (IMO this would be bad, because then the Retry service would have to decrypt the packet number)", + "createdAt": "2020-12-18T19:23:04Z", + "updatedAt": "2021-01-07T17:41:22Z", + "closedAt": "2021-01-07T17:41:22Z", + "comments": [] + }, + { + "number": 68, + "id": "MDU6SXNzdWU3NzExMjAwNDg=", + "title": "Rules for Resumption Tokens", + "url": "https://github.com/quicwg/load-balancers/issues/68", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [ + "martinduke" + ], + "labels": [], + "body": "We should tighten up the rules for Resumption Token processing by the Retry Service.\r\n\r\nWhen active, it should reject the packet, but it should send Retry. I believe we can distinguish resumption from Retry because the CID length fields are zero; as any Retry token must have a ODCIDL of at least 8, this would appear to be robust.\r\n\r\nOn a related note, the requirement on servers to encode a way to distinguish the two token types is silly, because of this propery.", + "createdAt": "2020-12-18T19:27:44Z", + "updatedAt": "2021-01-07T17:45:09Z", + "closedAt": "2021-01-07T17:45:09Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Fixed by #71 ", + "createdAt": "2021-01-07T17:45:09Z", + "updatedAt": "2021-01-07T17:45:09Z" + } + ] + }, + { + "number": 72, + "id": "MDU6SXNzdWU3NzMyODEzMTI=", + "title": "Retry service NATs and ports", + "url": "https://github.com/quicwg/load-balancers/issues/72", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [ + "martinduke" + ], + "labels": [], + "body": "A few more issues with Retry tokens:\r\n\r\nFor Retry, we're supposed to check the client port. Because this isn't true for NEW_TOKEN, we probably can't put it in the shared-state pseudoheader.\r\n\r\nRelatedly, we currently just say that the shared-state Retry Service has to be behind any NAT. This isn't enough.\r\n\r\nFor non-shared-state, we're probably fine. For a Retry, the NAT will keep the 4-tuple binding so that on either side there is something to validate.\r\n\r\nFor shared-state:\r\n* if the service is in front of the NAT, the server can't validate the address.\r\n* if the service is behind the NAT, it'll \"work\" but to add any value at all there really has to be a port in there somewhere.\r\n\r\nWe can probably assume that the alternate path that creates the need for shared state won't cause a service-generated token to suddenly appear on the unprotected path.", + "createdAt": "2020-12-22T22:06:34Z", + "updatedAt": "2021-01-07T17:44:52Z", + "closedAt": "2021-01-07T17:44:52Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Fixed by #71 ", + "createdAt": "2021-01-07T17:44:52Z", + "updatedAt": "2021-01-07T17:44:52Z" + } + ] + }, + { + "number": 73, + "id": "MDU6SXNzdWU3ODA5MjY0MDk=", + "title": "Switch to QUIC notation", + "url": "https://github.com/quicwg/load-balancers/issues/73", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [ + "martinduke" + ], + "labels": [ + "editorial" + ], + "body": "There are so many variable length fields that the ASCII art doesn't serve much of a purpose. Just switch to the notation used in quic-transport for the various CID and token formats.", + "createdAt": "2021-01-07T00:10:48Z", + "updatedAt": "2021-01-07T18:32:54Z", + "closedAt": "2021-01-07T18:32:54Z", + "comments": [] + }, + { + "number": 74, + "id": "MDU6SXNzdWU3ODA5NDAxNjE=", + "title": "ODCID is at least 64 bits", + "url": "https://github.com/quicwg/load-balancers/issues/74", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [ + "martinduke" + ], + "labels": [], + "body": "The diagrams indicate they are in the range 0..160. This is incorrect.", + "createdAt": "2021-01-07T00:33:51Z", + "updatedAt": "2021-01-07T17:44:26Z", + "closedAt": "2021-01-07T17:44:26Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "SS Tokens can have this, because they could be NEW_TOKEN tokens. But the shared state format is limited to 64.", + "createdAt": "2021-01-07T01:43:31Z", + "updatedAt": "2021-01-07T01:43:31Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Fixed by #71", + "createdAt": "2021-01-07T17:44:26Z", + "updatedAt": "2021-01-07T17:44:26Z" + } + ] + }, + { + "number": 80, + "id": "MDU6SXNzdWU3ODM3MjMxNjY=", + "title": "Server ID: bits instead of octets?", + "url": "https://github.com/quicwg/load-balancers/issues/80", + "state": "OPEN", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [ + "martinduke" + ], + "labels": [ + "needs-discussion" + ], + "body": "@ianswett asks if there is added value in expressing server ID lengths in bits instead octets.\r\n\r\nThis is a bit of implementation complexity and a lot of churn in the spec and the handful of implementations that exist, but it does give the configuration agent a little more granularity.\r\n\r\nDoes anyone find the value of this granularity to be compelling?", + "createdAt": "2021-01-11T21:36:45Z", + "updatedAt": "2021-01-12T21:15:56Z", + "closedAt": null, + "comments": [ + { + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "body": "My thinking is that increasing/decreasing the server ID space by 256 is quite a large jump and could make config rotation a bit more complex.\r\n\r\nAdding an extra bit to the server ID doubles the number of IDs, which is a fairly widely used increase in data structures and algorithms.", + "createdAt": "2021-01-11T22:04:25Z", + "updatedAt": "2021-01-11T22:04:25Z" + } + ] + }, + { + "number": 81, + "id": "MDU6SXNzdWU3ODM3NDM0MTU=", + "title": "Low-config PCID: why stop using some server IDs?", + "url": "https://github.com/quicwg/load-balancers/issues/81", + "state": "CLOSED", + "author": "dtikhonov", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "This part is unclear to me:\r\n\r\n> A server SHOULD have a mechanism to stop using some server IDs if the list gets large relative to its share of the codepoint space, so that these allocations time out and are freed for reuse by servers that have recently joined the pool.\r\n\r\nIt is not obvious why these server IDs would be used by new server instances.", + "createdAt": "2021-01-11T22:13:11Z", + "updatedAt": "2021-01-13T14:27:45Z", + "closedAt": "2021-01-13T14:27:44Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Imagine a case where the entire server ID space has been allocated and these allocations never expire. Then there is no way for new pool members to receive assignments unless the config agent issues a whole new configuration! SIDs have to forward to their original assignments, or connections will break.", + "createdAt": "2021-01-12T20:43:38Z", + "updatedAt": "2021-01-12T20:43:38Z" + }, + { + "author": "dtikhonov", + "authorAssociation": "CONTRIBUTOR", + "body": "I see! Thank you for the explanation.", + "createdAt": "2021-01-13T14:27:44Z", + "updatedAt": "2021-01-13T14:27:44Z" + } + ] + }, + { + "number": 82, + "id": "MDU6SXNzdWU3ODQ1ODE1NDA=", + "title": "Allow-list and deny-list for QUIC versions", + "url": "https://github.com/quicwg/load-balancers/issues/82", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "It would help the anti-DDoS properties if the Retry Service could receive explicit instructions about which QUIC versions the server might support. This provides a way to deploy new versions without having to upgrade the retry service software or hardware.", + "createdAt": "2021-01-12T20:45:39Z", + "updatedAt": "2021-01-25T17:21:42Z", + "closedAt": "2021-01-25T17:21:42Z", + "comments": [] + }, + { + "number": 84, + "id": "MDU6SXNzdWU3ODczMTA5MDA=", + "title": "Low-Config CID creating huge problems with coexistence of configurations", + "url": "https://github.com/quicwg/load-balancers/issues/84", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [ + "martinduke" + ], + "labels": [], + "body": "For low-config CID (LCID), which dynamically allocates server IDs, the current editor's draft has a heuristic to extract a server ID from a client-generated non-compliant CID. The fundamental issue is that the server *has* to get an SID from an incoming Initial, even if the SR bits of the Connection ID imply that it doesn't map to the LCID config.\r\n\r\n> \r\n> If the DCID references the 4-tuple routing bits or an undefined configuration, use the following procedure to establish a predictable template for server ID extraction:\r\n> * Identify the instance of Low-Config CID configuration with the largest config rotation codepoint. For example, if configurations 0b10, 0b01, and 0b00 all use the low-config CID algorithm and have server ID lengths of 3, 5, and 7 octets, respectively, and a packet comes in with codepoint 0b11, the load balancer would extract 3 octets for the server ID.\r\n> * Extract the appropriate number of octets.\r\n> * If the server ID matches one already in the table, forward the packet to that server.\r\n> * If not, the load balancer runs the algorithm of its choosing and adds the extracted server ID to the table corresponding to the highest-value Low-Config CID Configuration codepoint.\r\n\r\nThis doesn't work with config rotation. The main principle in CR is that the load balancer needs to get the configuration first -- otherwise the server might generate CIDs that the LB can't route, and we break ongoing connections. Given that, we have a problem. Consider:\r\n\r\n1. LB and server both have LCID configuration 0b00 with SIDL of 1.\r\n2. LB gets LCID configuration 0b01 with an SIDL of 2.\r\n3. LB gets a packet with CR bits 0b01 and octets 2-3 0xfa13, and randomly forwards it to the server\r\n4. The LB will add an SID entry for 0xfa13, but the server will add an SID entry for 0xfa.\r\n5. The server will generate CIDs with CR 0xb00 and SID 0xfa, and the LB will not route them correctly.\r\n\r\nStated more generally: in the current design, the LB can never be sure if the server has a given configuration and that makes it very hard for the LB to infer what the server is going to do with a given CID to get an SID for its table. We don't even know if it's non-compliant at the server or not!\r\n\r\nThere are some potential fixes here:\r\n1) Give up on dynamic server ID allocation\r\n2) Have the LB keep track of config rotation bits it's observed in short header packets to each server -- this is an indication the server has the CR bits. This is also seems vulnerable to attack with injection of random short-header packets.\r\n3) Reserve the SID corresponding to *all* configurations when routing a packet. In effect, this makes it impossible to adapt the crypto algorithms to use dynamically allocated server ID and have them coexist with plaintext ones: the crypto algorithms will essentially have randomly distributed plaintext fields, so the table will fill up fast.\r\n4) Remove config rotation from dynamic allocation; this makes changes to config a site maintenance event. This also effectively prevents using crypto with dynamic allocation, because you can't rotate keys.\r\n5) Change the behavior of a server when it gets CR bits it doesn't understand. Don't extract a server ID. If the server has no IDs because it just booted, simply echo the client-generated CID. When the server gets a config that lets it extract an SID from this, or gets a CID on another connection that it can decode, then it can update the CID on this connection. This implies that we could have valid short header packets with non-compliant DCIDs, so we'd have to have the LB admit these instead of dropping them like it does currently.\r\n6) Same as #5, but instead of echoing the client-generated CID, it uses the 4-tuple routing bits for a new CID. This will make the\r\nCID compliant, but abandon the whole purpose of QUIC-LB until an Initial with the right CR bits arrives (1 in 4 chance per connection).\r\n\r\n***\r\n\r\nUnfortunately, this breaks even more badly it coexists with a configuration with static SIDs. Another example:\r\n1. LB and server have LCID config 0b00 with an SIDL of 1. Server A has SID 0x01 and Server B has SID 0x02.\r\n2. LB gets stream CID config 0b01 (encrypted, static SIDs)\r\n3. An Initial packet has CR bits 0b01. The second octet is 0x02 but the proper SCID decoding maps to Server A. So, it routes to Server A.\r\n4. Server A doesn't have config 0b01 yet, so it extracts an SID from the CID and adds 0x02 to its list of SIDs. It generates an Low-config CID that the LB will route to Server B!\r\n\r\nFrom this, I conclude that dynamically and statically configured SIDs can't safely coexist in the same config space.\r\n\r\n***\r\n\r\nThis is all very hard to reason about. All the options are ugly but my instinct is to retreat to the first option and just abandon this dynamic design.\r\n\r\n\r\n", + "createdAt": "2021-01-16T01:05:23Z", + "updatedAt": "2021-02-02T23:35:01Z", + "closedAt": "2021-02-02T23:35:01Z", + "comments": [ + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "For the stateless algorithm, can we assume that servers are configured with a \"current epoch\" in a way that's properly synchronized with the LB, and that the epoch is encoded in the first byte of the \"compliant\" CID? Then the LB can do the following:\r\n\r\n1) For Initial packets, assume non compliance. Treat CID as if they were part of the current epoch. Derive mapping from CID to server ID according to current epoch' key. \r\n\r\n2) For all other packets, assume compliance. If epoch is \"too old\", drop the packet (server should have sent new CID to client.) Otherwise, derive mapping from CID to server ID according to specified epoch' key. (Or if CID in cache, use cache.)\r\n", + "createdAt": "2021-01-16T03:18:45Z", + "updatedAt": "2021-01-16T03:18:45Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Thanks Christian!\r\n\r\nI am not sure I fully understand your proposal, but I will make some points:\r\n\r\n1) quic-lb tries to distinguish only short-header and long-header packets to remain version invariant. There is no notion of Initials.\r\n\r\n2) the second Initial carries a server generated CID, and 0RTT does not. so it is not so simple as sniffing the Initial codepoint.\r\n\r\n3) IIUC the CR codepoint is much like your \"epoch.\" I think the problem is when you are switching epochs; the LB must understand both and can't be sure which epoch any given server is on. Indeed, this is the heart of the issue.\r\n\r\nOr perhaps I've wildly misunderstood your proposal.", + "createdAt": "2021-01-16T05:51:00Z", + "updatedAt": "2021-01-16T05:51:00Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "So it boils down to a synchronization problem. The LB knows that a server is in epoch N+1 if it sees a CID from that server with the new epoch. So the transition will work like this:\r\n\r\n1) Before transition, server use epoch N. LB sees from that server CID with epoch N.\r\n2) At some point, LBtransitions to N+1.\r\n3) If the server notices the LB's transition, it also moves to epoch N+1\r\n4) Some time after that, the LB sees clients sending packets to that server with DCID marked for epoch N+1, at which points it knows server and LB are synchronized.\r\n\r\nThe main problem is that there is no synchronization signal from LB to server. The server cannot look at the ID and infer that the LB has moved to a new epoch.\r\n\r\nIt might be possible to use the retry frames to solve that. When it receives a new initial that would map to server X before confirmation that server X is on epoch N+1, the LB might send a retry to the client, suggesting a conforming DCID marked with epoch N+1. The server will receive the retried Initial, and learn that the new epoch has started. The idea probably needs some exploring, but that seems plausible.", + "createdAt": "2021-01-16T06:28:44Z", + "updatedAt": "2021-01-16T06:29:37Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Assuming handshakes are going on, yes, LBs can see what configs are operating. This is my option 2 but using egress SCID instead of ingress DCID, definitely an improvement.\r\n\r\nSeveral drafts ago we moved away from explicit in-band signaling. Now we're headed back.", + "createdAt": "2021-01-16T07:00:41Z", + "updatedAt": "2021-01-16T07:00:41Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "@ianswett and I had a long discussion about this problem. We reached a consensus that solution #6 was the least bad one. To summarize:\r\n1. If a client-generated CID comes in that does not match a known config, do not add an SID entry at the LB or server.\r\n2. If it does match a config codepoint, extract the SID accordingly and add it to the table.\r\n3. There will be cases where the LB has a config codepoint, but the server does not. If so, the LB has \"wasted\" an entry but this is not a big problem. The reverse would be a problem, but it is already a requirement for the LB to have the superset of server configs.\r\n4. When it first loads a config, the server will not have any SIDs. This should correct itself after a handful of connections, but until it does the CIDs it generates use the 4-tuple routing codepoint. When it does get an SID, it can retire the old ones across all connections. Thus, there are transitory states where a server can't support rebinding and migration.\r\n\r\nThis is still open for discussion, but I am working on a large PR to reorganize the whole routing section around dynamic SID allocation.", + "createdAt": "2021-01-28T22:24:04Z", + "updatedAt": "2021-01-28T22:24:04Z" + }, + { + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "body": "One Note: I believe it can support NAT rebinding, just not migration or changing CIDs. If a client unknowingly changes its address due to a NAT rebind, it does not change its CID.", + "createdAt": "2021-01-28T23:25:06Z", + "updatedAt": "2021-01-28T23:25:06Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "No, because if it's the 4-tuple routing codepoint the LB ignores the rest of the CID. So it will route based on the (changed) 4tuple", + "createdAt": "2021-01-28T23:26:53Z", + "updatedAt": "2021-01-28T23:26:53Z" + }, + { + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "body": "Of course, I was thinking of something else.", + "createdAt": "2021-01-28T23:36:16Z", + "updatedAt": "2021-01-28T23:36:16Z" + } + ] + }, + { + "number": 85, + "id": "MDU6SXNzdWU3ODczMjA2MjY=", + "title": "Bytes for server use", + "url": "https://github.com/quicwg/load-balancers/issues/85", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Make sure each algorithm always provides 2-3 octets for server use. The current SID limits don't do that.", + "createdAt": "2021-01-16T01:48:21Z", + "updatedAt": "2021-02-02T23:23:07Z", + "closedAt": "2021-02-02T23:23:07Z", + "comments": [] + }, + { + "number": 88, + "id": "MDU6SXNzdWU3OTY0OTE1MTA=", + "title": "Extend low-config concept to all algorithms", + "url": "https://github.com/quicwg/load-balancers/issues/88", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "In principle, the low-config algorithm's method of extracting a server ID can be extended to all the algorithms. Thus the \"server ID allocation method\" would be an independent variable, with value 'dynamic' and 'static', and the algorithms could operate with either method.\r\n\r\nThis is a significant refactor of the routing section, but will make future decisions about static/dynamic much cleaner to discuss.", + "createdAt": "2021-01-29T01:02:05Z", + "updatedAt": "2021-02-02T23:38:20Z", + "closedAt": "2021-02-02T23:38:19Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Closed by #89 ", + "createdAt": "2021-02-02T23:38:19Z", + "updatedAt": "2021-02-02T23:38:19Z" + } + ] + }, + { + "number": 91, + "id": "MDU6SXNzdWU3OTk1NjE5MzQ=", + "title": "Replace configuration pseudocode with YANG", + "url": "https://github.com/quicwg/load-balancers/issues/91", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "As the config gets more complicated, the C-ish pseudocode is getting more unwieldy. YANG is the standard for configuration models, so I should bite the bullet and just figure out YANG.", + "createdAt": "2021-02-02T18:36:47Z", + "updatedAt": "2021-02-04T20:37:14Z", + "closedAt": "2021-02-04T20:37:14Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Closed by #90 ", + "createdAt": "2021-02-04T20:37:05Z", + "updatedAt": "2021-02-04T20:37:05Z" + } + ] + }, + { + "number": 96, + "id": "MDU6SXNzdWU4MjI1OTMyNjI=", + "title": "Retry service handling of non-Initial", + "url": "https://github.com/quicwg/load-balancers/issues/96", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "In Section 7:\r\n\"Retry services MUST forward all QUIC packets that are not of type Initial or 0-RTT. Other packet types might involve changed IP addresses or connection IDs, so it is not practical for Retry Services to identify such packets as valid or invalid.\"\r\n\r\nMUST is too strong. If it keeps any state (i.e. tracking 4-tuples) it can drop non-initial packets. (However, this would make migration not work).\r\n\r\nIf the Retry Service is in front of a QUIC-LB load balancer, the LB will drop random 1-RTT packets but not Handshake and 0-RTT unless it is version-aware, so passing 1-RTT is \"safe.\"\r\n\r\nIf the Retry Service is behind the load balancer, which is probably better because LBs are often NATs, then random 1-RTT is already dropped and it is safe to forward 1-RTT to preserve migration.\r\n\r\nIf there's a non QUIC-LB load balancers, migration doesn't work anyway; might as well drop it.\r\n\r\nIf it's a single server and the CIDs are random, admitting 1-RTT is weakening the DoS defense.\r\n\r\nAnd then there is the issue with QUIC versions and admitting/dropping them, which is hard to adjudicate with short headers.\r\n\r\n", + "createdAt": "2021-03-04T23:27:29Z", + "updatedAt": "2021-03-12T22:32:28Z", + "closedAt": "2021-03-12T22:32:28Z", + "comments": [ + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "I don't know. Do you have a case where Retry services should not forward those packets? I don't want this to be a source of ossification because of a possibly incorrect assumption about placement of the retry service in the pipeline.", + "createdAt": "2021-03-05T00:32:50Z", + "updatedAt": "2021-03-05T00:32:50Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Well, the reason to not forward them is to block DDoS vectors. A garbage Handshake or 1-RTT packets is at least easily discarded by the server without much in the way of processing. I would actually appreciate some input from your Azure contacts about this; is filtering non-SYN packets important today?", + "createdAt": "2021-03-05T16:59:17Z", + "updatedAt": "2021-03-05T16:59:17Z" + }, + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "Here's the data I can provide: As I understand it, the DDoS would be in front of the LB. It's all in hardware so it's update cycle could be very long, so any logic added there could effectively be written in stone for many years. So, I really want to be careful about any assumptions here. If we get it wrong for a future version, either all of Azure might end up breaking/preventing future versions/features or we'd have to completely disable and lose the protection.\r\n\r\nOn the topic of dropping garbage/invalid packets, I'd be Ok with that. Perhaps we could change the text to the following?\r\n\r\n> Retry services MUST forward all **valid** QUIC packets that are not of type Initial or 0-RTT. Other packet types might involve changed IP addresses or connection IDs, so it is not practical for Retry Services to identify such packets as valid or invalid.\r\n\r\nThis adds some wiggle room for what is considered \"valid\" or not. Obviously if the header is garbage it can be tossed. If a device **knows** a particular CID is invalid, then it could drop it. I'd just strongly caution any \"smarts\" here because of the possibility of changes in the future.", + "createdAt": "2021-03-05T17:05:57Z", + "updatedAt": "2021-03-05T17:05:57Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "If \"in front of the LB\" is cancnical use case, I can shade the language towards that.\r\n\r\nHowever, this makes me wonder about the shared-state case. My perception is that combining a NAT with an LB is quite common; will shared token verification work if the server and retry service are seeing different client IP addresses? This calls into question the entire shared-state concept.", + "createdAt": "2021-03-05T17:08:32Z", + "updatedAt": "2021-03-05T17:08:32Z" + } + ] + }, + { + "number": 98, + "id": "MDU6SXNzdWU4MjgwMDg0MDU=", + "title": "Consider an alternative name to 'non-compliant'", + "url": "https://github.com/quicwg/load-balancers/issues/98", + "state": "CLOSED", + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "In PR #95 I suggested non-routable, though I realize non-conformant may also be an option.\r\n\r\nThe sentence which caused me to suggest non-routable is: https://github.com/quicwg/load-balancers/blob/master/draft-ietf-quic-load-balancers.md#non-compliant-connection-ids-non-compliant\r\n\r\n> These client-generated CIDs might not conform to the expectations of the routing algorithm and therefore not be routable by the load balancer. Those that are not routable are \"non-compliant DCIDs\" and receive similar treatment regardless of why they're non-compliant:\r\n\r\nI'm happy to write a PR if others find non-compliant potentially confusing as well.", + "createdAt": "2021-03-10T16:33:04Z", + "updatedAt": "2021-04-03T18:34:45Z", + "closedAt": "2021-04-03T18:34:45Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I like it. Let's go with it.", + "createdAt": "2021-03-12T22:31:52Z", + "updatedAt": "2021-03-12T22:31:52Z" + } + ] + }, + { + "number": 99, + "id": "MDU6SXNzdWU4MjgwMzc4MTQ=", + "title": "Consider an alternative name to 'arbitrary' algorithm", + "url": "https://github.com/quicwg/load-balancers/issues/99", + "state": "CLOSED", + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "I'd suggest 'Fallback' or another word than arbitrary.\r\n\r\nA definition of Arbitrary is: \"Based on random choice or personal whim, rather than any reason or system.\"\r\n\r\nIn fact, there are sensible constraints on this algorithm to ensure routing works correctly for non-compliant CIDs and connections don't fail.", + "createdAt": "2021-03-10T16:54:03Z", + "updatedAt": "2021-04-03T18:35:11Z", + "closedAt": "2021-04-03T18:35:10Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Agreed.", + "createdAt": "2021-03-12T22:31:22Z", + "updatedAt": "2021-03-12T22:31:22Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Closed by #109 ", + "createdAt": "2021-04-03T18:35:10Z", + "updatedAt": "2021-04-03T18:35:10Z" + } + ] + }, + { + "number": 101, + "id": "MDU6SXNzdWU4MzA3NjMxODU=", + "title": "Reduce load of Dynamic SID allocation", + "url": "https://github.com/quicwg/load-balancers/issues/101", + "state": "OPEN", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Today, an \"lb_timeout\" parameter tells LBs how long they need to save an SID allocation after it's last observed on an incoming packet. Servers may have to retire CIDs when they're approaching this limit. It's the only current method of getting rid of these, as we lack any sort of in-band mechanism for the two entities to communicate.\r\n\r\nAdvantages:\r\n- servers have more SIDs to choose from, which dramatically improves the entropy of PCID (where, admittedly, the operator has chosen not to care about concealing the mapping)\r\n- the server is seldom compelled to retire active CIDs, so the overhead of NEW/RETIRE_CONNECTION_ID frames is low\r\n\r\nDisadvantages:\r\n- If the server ID space >> the number of servers, over time the LB's table gets very large, to the extent it could challenge the RAM of the device. Careful selection of a server ID length can help, but that's putting a lot on the operator.\r\n- The lb_timeout mechanism is annoying because LBs that store a little bit of state have to inspect every packet to make a note of the last time it observed an SID. Servers have to do the same to check when things expire. This seems easy to mess up.\r\n- Servers also have to decode every incoming Initial CID to extract the SID.\r\n\r\nAn alternative would configure servers to keep a small number of SIDs. This could be as low as 1 but might be 8 or 16. If an allocatable SID arrives at the server, if it does not *instantly* use that SID in the CID it sends with the server hello, it forfeits the allocation.\r\n\r\nExample of acceptance:\r\n- SID 0x14 arrives in a Client Initial. LB hashes it to a server and adds it to a hash table of provisional allocations\r\n- Server generates CID using 0x14 and sends it the Server Initial, adding it to its list of server IDs\r\n- LB notes that the first inbound short header encoded 0x14 and makes it a permanent allocation\r\n\r\nExample of rejection\r\n- SID 0x15 arrives in a Client Initial. LB hashes it to a server and adds it to a hash table of provisional allocations\r\n- Other long headers with 0x15, with any 4-tuple, also go to the server thanks to the provisional list (you can't be provisional to two servers!)\r\n- Server generates a CID that encodes 0x14.\r\n- LB notes that the first inbound short header did not encode 0x15 and decrements the ref count for the provisional allocation, deleting it if the ref count is zero.\r\n\r\nWe could even make it so the server MUST accept the first n that it can; then, the LB need not even do a provisional allocation after that peer has reached the threshold.\r\n\r\nAdvantages:\r\n- much fewer resources for SID tables\r\n- no timers, less CID parsing & inspection\r\n- the architecture doesn't mandate more CID retiring due to changing SIDs\r\n\r\nDisadvantages:\r\n- ?", + "createdAt": "2021-03-13T01:04:38Z", + "updatedAt": "2021-03-18T21:37:25Z", + "closedAt": null, + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Can't make it a MUST for the server to take the first N SIDs; if it has its own load balancer (eg routing to multiple cores) it will have to wait until each of them has gotten an SID, which might take a while.", + "createdAt": "2021-03-13T01:38:56Z", + "updatedAt": "2021-03-13T01:38:56Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "This has a trivial attack: If I send a storm of initial packets with random CIDs, followed by 1RTT packets with the same CID, I force the LB to add it to its table, rapidly filling it up. We could fix this by forcing the LB to sniff SCIDs from the server instead of 1-RTT packets, which seems a little gross.\r\n\r\nFor not-PCID, it would be sufficient to simply check that there's a new CID, even if it encodes the same SID.", + "createdAt": "2021-03-18T20:20:57Z", + "updatedAt": "2021-03-18T21:37:25Z" + } + ] + }, + { + "number": 102, + "id": "MDU6SXNzdWU4MzIwMjY4NjM=", + "title": "Is the non-shared-state use case realistic?", + "url": "https://github.com/quicwg/load-balancers/issues/102", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [ + "needs-discussion" + ], + "body": "Buried deep in Sec 7.2.2:\r\n\r\nIn **inactive mode**, the service MUST forward all packets that have no token or a token with the first bit set to '1'. It MUST validate all tokens with the first bit set to '0'. If successful, the service MUST forward the packet with the token intact. If unsuccessful, **it MUST either drop the packet or forward it with the token removed**. The latter requires decryption and re-encryption of the entire Initial packet to avoid authentication failure. Forwarding the packet causes the server to respond without the original_destination_connection_id transport parameter, which preserves the normal QUIC signal to the client that there is an on-path attacker.\r\n\r\nMy understanding of these services is that they will be injected in the path only when under DoS attack. According to this, something has to hang around to validate Retry tokens. Is this feasible?", + "createdAt": "2021-03-15T17:20:47Z", + "updatedAt": "2021-05-05T19:03:33Z", + "closedAt": "2021-05-05T19:03:33Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Hardware is probably the use case here.", + "createdAt": "2021-05-05T19:03:33Z", + "updatedAt": "2021-05-05T19:03:33Z" + } + ] + }, + { + "number": 103, + "id": "MDU6SXNzdWU4MzIyNzk4MzQ=", + "title": "Dynamic SIDs and High Availability", + "url": "https://github.com/quicwg/load-balancers/issues/103", + "state": "OPEN", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [ + "ianswett" + ], + "labels": [], + "body": "How does a dynamic framework survive an HA handover? It would seem to lose all the SID allocations and break all connections.", + "createdAt": "2021-03-15T23:30:48Z", + "updatedAt": "2021-03-23T20:21:06Z", + "closedAt": null, + "comments": [] + }, + { + "number": 105, + "id": "MDU6SXNzdWU4MzkwNzgzMzg=", + "title": "Applicability to DTLS 1.3", + "url": "https://github.com/quicwg/load-balancers/issues/105", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Almost by accident, QUIC-LB can also route DTLS 1.3 associations over UDP, as long as the client agrees to support connection IDs.\r\n\r\nThe Ciphertext packets match the short header in the relevant ways, and so can be routed without any issues.\r\n\r\nThe plaintext packets appear to be QUIC short headers, but as the second byte happens to always be 0xfe, QUIC-LB will 4-tuple route it.\r\n\r\nIIUC, this doesn't apply to earlier versions of DTLS. So, one can deploy DTLS behind a QUIC-LB infrastructure as long as\r\n1) Servers reject DTLS < 1.3\r\n2) Servers reject ClientHellos that do not have the connection_id extension.\r\n\r\nOne could also write a slightly different version of QUIC-LB that supported DTLS without reservations, but you'd have to be aware that the packet was DTLS and leverage information about the format of the first byte.", + "createdAt": "2021-03-23T20:06:29Z", + "updatedAt": "2021-05-05T18:52:15Z", + "closedAt": "2021-05-05T18:52:15Z", + "comments": [] + }, + { + "number": 107, + "id": "MDU6SXNzdWU4NDM1MTM2ODQ=", + "title": "More text on configuration sharing", + "url": "https://github.com/quicwg/load-balancers/issues/107", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Sec 11.4 recommends either separating mistrustful servers by IP, or assigning them different config rotation bits. The text is not adequate.\r\n\r\n- Separating by IP address undermines the privacy value of ECHO & DoH (see the MAPRG IETF 110 talk)\r\n- Any sub-IP routing has to be SNI-switched; if ECHO is operating, the load balancer must be a \"client-facing server\" in the ECHO architecture (draft-ietf-tls-esni Sec 3.1).\r\n- Doing SNI switching as an ECHO server and then just encoding the result in the config rotation bits leaks the information they're trying to conceal.\r\n- It might be worth it to fix up the \"arbitrary algorithm\" text to consider possible SNI switching.\r\n\r\nAs we migrate towards ECHO and DoH, maybe the best we can do is give all tenants on an IP the same config and try to obscure their co-tenancy as much as possible.", + "createdAt": "2021-03-29T15:57:49Z", + "updatedAt": "2021-04-21T21:03:40Z", + "closedAt": "2021-04-21T21:03:40Z", + "comments": [] + }, + { + "number": 108, + "id": "MDU6SXNzdWU4NDYzMjEyNTU=", + "title": "Confused about `AEAD Checksum` in retry token", + "url": "https://github.com/quicwg/load-balancers/issues/108", + "state": "CLOSED", + "author": "william-zk", + "authorAssociation": "NONE", + "assignees": [], + "labels": [ + "editorial" + ], + "body": "Hi martin:\r\n\r\n1. It seems that draft limits the encryption algorithm of retry token must be `AES-128-GCM`, but the description of AEAD CheckSum is `AEAD Checksum (length depends on encryption algorithm)`.\r\n\r\n2. Further more, what is `AEAD Checksum` and why we need it? AEAD encryption algorithm just need `key, association data , iv` to do encryption/decryption and authentication. ", + "createdAt": "2021-03-31T09:53:25Z", + "updatedAt": "2021-04-06T03:41:23Z", + "closedAt": "2021-04-02T21:58:03Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Hi William\r\n\r\n1) The checksum thing is a good point. I'll fix it.\r\n\r\n2) Like for QUIC packets themselves, there is an authentication tag that AES-GCM generates and we append it to the token. I am not a crypto expert, but I believe this is how the decoder detects if the AAD was changed or there's a problem with the ciphertext.", + "createdAt": "2021-04-02T21:55:41Z", + "updatedAt": "2021-04-02T21:55:41Z" + }, + { + "author": "william-zk", + "authorAssociation": "NONE", + "body": "> 2\\. Like for QUIC packets themselves, there is an authentication tag that AES-GCM generates and we append it to the token. I am not a crypto expert, but I believe this is how the decoder detects if the AAD was changed or there's a problem with the ciphertext.\r\n\r\nYou means that `checksum ` is something just like `Retry Integrity Tag` in `Retry packet`? If so, I think it's a redundant design, the design of `Retry packet` can ensure that the data can not be tampered with. Moreover, if we must need this, maybe we should have an alternative name of `checksum`, and give a more detail description of it ", + "createdAt": "2021-04-06T03:41:23Z", + "updatedAt": "2021-04-06T03:41:23Z" + } + ] + }, + { + "number": 111, + "id": "MDU6SXNzdWU4NTIwNjg5NTY=", + "title": "Consider an alternative name of `AEAD checksum`", + "url": "https://github.com/quicwg/load-balancers/issues/111", + "state": "CLOSED", + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Hi martin:\r\n`AEAD checksum` is not a standard name of AEAD verification message, which should be `AEAD Integrity Check Value`, see section 6 of rfc4106", + "createdAt": "2021-04-07T06:45:00Z", + "updatedAt": "2021-04-21T23:16:38Z", + "closedAt": "2021-04-21T23:16:38Z", + "comments": [] + }, + { + "number": 113, + "id": "MDU6SXNzdWU4NTIwNzgxNzM=", + "title": "Consider giving more information about `AEAD IV`", + "url": "https://github.com/quicwg/load-balancers/issues/113", + "state": "OPEN", + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [ + "editorial" + ], + "body": "Hi martin:\r\n \r\nThe defination of `AEAD IV` and `AEAD nonce` brought me a great confusion when I implement the share-state retry service. Though finally I got what the draft want to express, I still suggest we should give more information about them\r\n\r\nAccording to section 1.5 of rfc5084:\r\n```\r\nAES-GCM has four inputs: an AES key, an initialization vector (IV), a plaintext content, and optional additional authenticated data (AAD).\r\n```\r\n\r\nAccording to section 3.4 of rfc5116\r\n```\r\nFor example, AES-GCM ESP [RFC4106] can be expressed as follows. The\r\n AEAD inputs are\r\n\r\n P = RestOfPayloadData || TFCpadding || Padding || PadLength ||\r\n NextHeader\r\n\r\n N = Salt || IV\r\n\r\n A = SPI || SequenceNumber\r\n\r\n where the symbol \"||\" denotes the concatenation operation, and the\r\n fields RestOfPayloadData, TFCpadding, Padding, PadLength, NextHeader,\r\n SPI, and SequenceNumber are as defined in [RFC4303], and the fields\r\n Salt and IV are as defined in [RFC4106]. \r\n```\r\n\r\nI guess that `AEAD nonce` in current draft is the `nonce` define in rfc5116, `AEAD IV` is just a random value(or a incrementing number) to generate `AEAD nonce`. If I were true, please consider my PR for my suggestion.", + "createdAt": "2021-04-07T06:57:35Z", + "updatedAt": "2021-04-21T23:17:09Z", + "closedAt": null, + "comments": [ + { + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "body": "Additional, it's no need to make the length of `AEAD IV`(current draft define) variable, just 96 bit is sufficient. Current aes-128-gcm related cipher suites all use this value", + "createdAt": "2021-04-16T08:02:26Z", + "updatedAt": "2021-04-16T08:02:26Z" + }, + { + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "body": "We can also add some illustration of `Key Sequence`, draft use `identifier` in other place", + "createdAt": "2021-04-16T09:36:22Z", + "updatedAt": "2021-04-16T09:36:22Z" + } + ] + }, + { + "number": 114, + "id": "MDU6SXNzdWU4NTIwODQ4MTg=", + "title": "Consider giving a test vector of shared-state-retry-token?", + "url": "https://github.com/quicwg/load-balancers/issues/114", + "state": "CLOSED", + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Hi martin:\r\n\r\nMaybe we can give a test vector of shared-state-retry-token in appendix, in fact, I encountered a lot of confusions in the implementation of it, a test vector may make the whole process easier to understand;-)\r\n\r\nIf you think it's necessary, I'd like to make a pr for it. ", + "createdAt": "2021-04-07T07:06:11Z", + "updatedAt": "2021-05-14T20:37:48Z", + "closedAt": "2021-05-14T20:37:48Z", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Fixed by #117 ", + "createdAt": "2021-05-14T20:37:48Z", + "updatedAt": "2021-05-14T20:37:48Z" + } + ] + }, + { + "number": 118, + "id": "MDU6SXNzdWU4NzY3NTg5NTQ=", + "title": "Crypto Agility in Shared State Retry", + "url": "https://github.com/quicwg/load-balancers/issues/118", + "state": "OPEN", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Secure ciphers are much more important for Shared State Retry than for the load balancer stuff and Initial Encryption. Therefore, some crypto agility to allow this mechanism to adapt as ciphers deprecate would be good.\r\n\r\nThe key sequence can also imply a cipher, so we'll add that to the data model. Some fields will vary length based on the cipher.\r\n\r\nWe should also make it so everyone MUST support AES128-GCM.", + "createdAt": "2021-05-05T19:16:19Z", + "updatedAt": "2021-05-05T19:16:19Z", + "closedAt": null, + "comments": [] + }, + { + "number": 119, + "id": "MDU6SXNzdWU4ODM2MTc5OTA=", + "title": "Introduce some practical experience in ant group.", + "url": "https://github.com/quicwg/load-balancers/issues/119", + "state": "OPEN", + "author": "Lingtaonju", + "authorAssociation": "NONE", + "assignees": [], + "labels": [], + "body": "Dear Duke and Banks,\r\nas you know , in ant group, the biggest fintech company in the world, we have designed and run the quic lb to support quic migration and other characteristic for many years. We are glad to see that you are trying to make quic lb standard. \r\nIn addition to the content of this onging quic lb draft, I want to provide some more practical experience in ant group which maybe make it more substantial.\r\n\r\nIn this issue, I will firstly show you the stateless reset in quic lb, details here: \r\n\r\n```\r\nAs the transport-draft described, stateless reset provided as an option of last resort for an\r\nendpoint that does not have access to the state of a connection. To realize this, endpoint(e.g: server) \r\nsends stateless reset packet to the sender(such as client). The stateless reset packet is stateless, \r\nso, in the cluster, if all the servers use the same static key, it will work.\r\nMore details about how is omitted here. \r\n\r\n```\r\n\r\nAs reset is stateless, we make it work in quic lb. \r\n```\r\n1. quic lb use the same encryption algorithm (HKDF, HMACK) and static key with quic server.\r\n2. for valid quic short header packet with server info encoded, but corresponding ups is down \r\n or removed from the cluster, quic lb will generate the valid reset packet to make client terminate \r\n the connection.\r\n3. other details I wii show you in the PR\r\n```\r\n\r\nAbout the stateless, we can discuss here. Looking forward to your feedback\r\n\r\n\r\n\r\n\r\n\r\n", + "createdAt": "2021-05-10T07:43:28Z", + "updatedAt": "2021-05-10T14:26:10Z", + "closedAt": null, + "comments": [] + } + ], + "pulls": [ + { + "number": 1, + "id": "MDExOlB1bGxSZXF1ZXN0MzgwNTMzMjM2", + "title": "Deleted leftover reference to config method", + "url": "https://github.com/quicwg/load-balancers/pull/1", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "This fixes an issue from the private repo:\r\nhttps://github.com/martinduke/draft-duke-quic-load-balancers/issues/63\r\n", + "createdAt": "2020-02-26T22:11:23Z", + "updatedAt": "2020-02-28T20:30:42Z", + "closedAt": "2020-02-28T20:30:41Z", + "mergedAt": "2020-02-28T20:30:41Z", + "mergedBy": "martinduke", + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MzY1Mzg0NzA3", + "commit": { + "abbreviatedOid": "c4292b9" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-02-27T02:52:35Z", + "updatedAt": "2020-02-27T02:52:35Z", + "comments": [] + } + ], + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "568bfa12852a731f9c757ec6878f52e2c8319774", + "headRepository": "quicwg/load-balancers", + "headRefName": "mduke-cleanup-config-method", + "headRefOid": "c4292b9a5a13b4474678860eb24c30bc7c6b0bea", + "mergeCommit": { + "oid": "ee1de5bcac2628e6bef279e0cfff5475f6d6a39f" + } + }, + { + "number": 2, + "id": "MDExOlB1bGxSZXF1ZXN0MzgwNTk0ODc0", + "title": "Light edit of Retry Services section", + "url": "https://github.com/quicwg/load-balancers/pull/2", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fixes https://github.com/martinduke/draft-duke-quic-load-balancers/issues/60", + "createdAt": "2020-02-27T01:49:16Z", + "updatedAt": "2020-03-02T16:01:06Z", + "closedAt": "2020-03-02T16:01:05Z", + "mergedAt": "2020-03-02T16:01:04Z", + "mergedBy": "martinduke", + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MzY1Mzg1MjU2", + "commit": { + "abbreviatedOid": "a46ef71" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-02-27T02:54:35Z", + "updatedAt": "2020-02-27T02:56:33Z", + "comments": [ + { + "originalPosition": 23, + "body": "Maybe something more like \"may lead to increased load on the server\".", + "createdAt": "2020-02-27T02:54:36Z", + "updatedAt": "2020-02-28T23:11:39Z" + }, + { + "originalPosition": 4, + "body": "Why was this removed?", + "createdAt": "2020-02-27T02:56:26Z", + "updatedAt": "2020-02-28T23:11:39Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MzY2NzM1NzY2", + "commit": { + "abbreviatedOid": "a46ef71" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-02-28T23:05:26Z", + "updatedAt": "2020-02-28T23:05:26Z", + "comments": [ + { + "originalPosition": 23, + "body": "I prefer the more concise sentence.", + "createdAt": "2020-02-28T23:05:26Z", + "updatedAt": "2020-02-28T23:11:39Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MzY2NzM2OTgw", + "commit": { + "abbreviatedOid": "a46ef71" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-02-28T23:09:20Z", + "updatedAt": "2020-02-28T23:09:21Z", + "comments": [ + { + "originalPosition": 4, + "body": "I was going to rewrite this to allow Retry services to drop 0RTT too, and then realized that this line allows unlimited packets from attackers if they are non-initial, non-0RTT.\r\n\r\nThis seemed bad, but now I see that because short packets could very easily involve a CID or IP address change, there is no way for the service to filter them effectively. I'll restore it.", + "createdAt": "2020-02-28T23:09:20Z", + "updatedAt": "2020-02-28T23:11:39Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MzY2OTQ3MjQz", + "commit": { + "abbreviatedOid": "7a5babf" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-03-02T04:39:49Z", + "updatedAt": "2020-03-02T04:39:49Z", + "comments": [] + } + ], + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "568bfa12852a731f9c757ec6878f52e2c8319774", + "headRepository": "quicwg/load-balancers", + "headRefName": "mduke-new-retry-format", + "headRefOid": "7a5babfd370bba3bb55be009e9a1384cd4293ea6", + "mergeCommit": { + "oid": "589d0a45e47f1bc49a67742e6ead64f3fd58d2bf" + } + }, + { + "number": 3, + "id": "MDExOlB1bGxSZXF1ZXN0MzgwNjAyNTM3", + "title": "Explain how load balancer chains might work", + "url": "https://github.com/quicwg/load-balancers/pull/3", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "resolves https://github.com/martinduke/draft-duke-quic-load-balancers/issues/61\r\n\r\n(also added the changelog for this draft version)", + "createdAt": "2020-02-27T02:22:25Z", + "updatedAt": "2020-02-28T23:03:13Z", + "closedAt": "2020-02-28T23:03:12Z", + "mergedAt": "2020-02-28T23:03:12Z", + "mergedBy": "martinduke", + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MzY1Mzg1OTM0", + "commit": { + "abbreviatedOid": "ff56b1c" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-02-27T02:57:14Z", + "updatedAt": "2020-02-27T02:57:14Z", + "comments": [] + } + ], + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "568bfa12852a731f9c757ec6878f52e2c8319774", + "headRepository": "quicwg/load-balancers", + "headRefName": "mduke-multi-tier", + "headRefOid": "ff56b1cc73c8db1cb98d4007e0adf6bf75e20a52", + "mergeCommit": { + "oid": "bc77d7d6891cc91c53a76b102dab739cf62cd5f1" + } + }, + { + "number": 4, + "id": "MDExOlB1bGxSZXF1ZXN0MzgwNjEwODM3", + "title": "Update readme title", + "url": "https://github.com/quicwg/load-balancers/pull/4", + "state": "CLOSED", + "author": "nibanks", + "authorAssociation": "MEMBER", + "assignees": [], + "labels": [], + "body": "", + "createdAt": "2020-02-27T02:59:28Z", + "updatedAt": "2020-03-02T04:40:06Z", + "closedAt": "2020-03-01T16:49:00Z", + "mergedAt": null, + "mergedBy": null, + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "#5 is a broader fix to conform to the new format.", + "createdAt": "2020-02-28T23:46:08Z", + "updatedAt": "2020-02-28T23:46:08Z" + } + ], + "reviews": [], + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "568bfa12852a731f9c757ec6878f52e2c8319774", + "headRepository": "quicwg/load-balancers", + "headRefName": "nibanks/update-readme", + "headRefOid": "1ebc02923d300893d672b4bed87835f2fd37ea53", + "mergeCommit": null + }, + { + "number": 5, + "id": "MDExOlB1bGxSZXF1ZXN0MzgxNjQ4ODM0", + "title": "Conform README and CONTRIBUTING to WG standard", + "url": "https://github.com/quicwg/load-balancers/pull/5", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "", + "createdAt": "2020-02-28T23:43:59Z", + "updatedAt": "2020-03-01T16:48:35Z", + "closedAt": "2020-03-01T16:48:34Z", + "mergedAt": "2020-03-01T16:48:34Z", + "mergedBy": "martinduke", + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MzY2NzU0NzAx", + "commit": { + "abbreviatedOid": "1a3b462" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-02-29T00:20:33Z", + "updatedAt": "2020-02-29T00:20:33Z", + "comments": [] + } + ], + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "bc77d7d6891cc91c53a76b102dab739cf62cd5f1", + "headRepository": "quicwg/load-balancers", + "headRefName": "mduke-fix-readme", + "headRefOid": "1a3b46205dc5bb05d9d9a3deb71cbb758b51e295", + "mergeCommit": { + "oid": "37d829da4b7f99bfabe89c75432016065af9abda" + } + }, + { + "number": 11, + "id": "MDExOlB1bGxSZXF1ZXN0MzgyNTk2ODE3", + "title": "Import circle config from base-drafts", + "url": "https://github.com/quicwg/load-balancers/pull/11", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "I copied over the circle .yaml file from base-drafts, then commented out the \"push to datatracker\" bit because I'm afraid I'll do it by accident, and am happy to do that part manually.", + "createdAt": "2020-03-02T20:40:11Z", + "updatedAt": "2020-03-03T00:46:48Z", + "closedAt": "2020-03-03T00:46:47Z", + "mergedAt": "2020-03-03T00:46:47Z", + "mergedBy": "martinduke", + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MzY3NjIzNjI3", + "commit": { + "abbreviatedOid": "0edcc9d" + }, + "author": "martinthomson", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "This is fine, but you should just copy directly from the template with no changes.", + "createdAt": "2020-03-03T00:18:04Z", + "updatedAt": "2020-03-03T00:18:32Z", + "comments": [ + { + "originalPosition": 55, + "body": "Why comment this out?", + "createdAt": "2020-03-03T00:18:04Z", + "updatedAt": "2020-03-03T00:45:55Z" + } + ] + } + ], + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "589d0a45e47f1bc49a67742e6ead64f3fd58d2bf", + "headRepository": "quicwg/load-balancers", + "headRefName": "fix-circle-config", + "headRefOid": "51766b0ac942c74206310bebbc57d67ad6f93a41", + "mergeCommit": { + "oid": "20f2e030b00b6be05b416135e52e38afe18fae36" + } + }, + { + "number": 13, + "id": "MDExOlB1bGxSZXF1ZXN0Mzg0NjU2MzI0", + "title": "Test vectors", + "url": "https://github.com/quicwg/load-balancers/pull/13", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "I wrote some code to generate these CIDs and then extract the SID back. It's self-consistent, at least.", + "createdAt": "2020-03-06T06:28:38Z", + "updatedAt": "2020-03-09T14:58:49Z", + "closedAt": "2020-03-09T14:58:48Z", + "mergedAt": "2020-03-09T14:58:48Z", + "mergedBy": "martinduke", + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Resolves https://github.com/martinduke/draft-duke-quic-load-balancers/issues/62\r\n", + "createdAt": "2020-03-06T06:29:22Z", + "updatedAt": "2020-03-06T06:29:22Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I goofed with git, which created the \"revert.\" But I assure you the changes are still in there.", + "createdAt": "2020-03-06T06:31:08Z", + "updatedAt": "2020-03-06T06:31:08Z" + } + ], + "reviews": [], + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "42ad253c3f510a555b1c8d9b71342748c78dee8b", + "headRepository": "quicwg/load-balancers", + "headRefName": "test-vectors", + "headRefOid": "302b1ae86f97faa3227832676ac524ebf243fe34", + "mergeCommit": { + "oid": "359dcc9d819c90277123262b33a9ab2a117829c9" + } + }, + { + "number": 14, + "id": "MDExOlB1bGxSZXF1ZXN0Mzg1MDQ4MzIz", + "title": "added language about server connection migration", + "url": "https://github.com/quicwg/load-balancers/pull/14", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Intended to resolve #10.", + "createdAt": "2020-03-06T22:25:03Z", + "updatedAt": "2020-03-09T15:18:45Z", + "closedAt": "2020-03-09T15:18:44Z", + "mergedAt": "2020-03-09T15:18:44Z", + "mergedBy": "martinduke", + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MzcwNjgwMzAy", + "commit": { + "abbreviatedOid": "3e3bf5c" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-03-06T23:09:50Z", + "updatedAt": "2020-03-06T23:10:35Z", + "comments": [ + { + "originalPosition": 25, + "body": "Mention that the Retire Prior To field would be set to retire the previous CIDs.", + "createdAt": "2020-03-06T23:09:51Z", + "updatedAt": "2020-03-09T15:16:30Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MzcwOTI1NDcy", + "commit": { + "abbreviatedOid": "3e3bf5c" + }, + "author": "martinthomson", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "Seems fine.", + "createdAt": "2020-03-09T05:36:32Z", + "updatedAt": "2020-03-09T05:36:32Z", + "comments": [] + } + ], + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "42ad253c3f510a555b1c8d9b71342748c78dee8b", + "headRepository": "quicwg/load-balancers", + "headRefName": "edge-cases", + "headRefOid": "532dd1adfd11dde3fc4749aca9f2ce3d9ade9ad7", + "mergeCommit": { + "oid": "a03dbcc7f0040b32bfbe0a757400fdf88fd37a45" + } + }, + { + "number": 15, + "id": "MDExOlB1bGxSZXF1ZXN0Mzg1NzA3ODI2", + "title": "Fix obsolete references/terminology", + "url": "https://github.com/quicwg/load-balancers/pull/15", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "I found some text that still references the in-band protocol mechanisms.\r\n\r\nI tried to update terminology here (and in Security Considerations) without changing any design decisions, so that we can bracket those discussions.\r\n\r\nIn particular, #12 would change the intent of the config-rotation bits that we are trying to enforce here. This also touches the normative text about PCID that is the subject of #8, though I believe this PR doesn't apply any change to the status quo.", + "createdAt": "2020-03-09T17:06:02Z", + "updatedAt": "2020-03-12T14:20:10Z", + "closedAt": "2020-03-12T14:20:09Z", + "mergedAt": "2020-03-12T14:20:09Z", + "mergedBy": "martinduke", + "comments": [], + "reviews": [], + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "a03dbcc7f0040b32bfbe0a757400fdf88fd37a45", + "headRepository": "quicwg/load-balancers", + "headRefName": "mduke-nits", + "headRefOid": "bb9956293162aa250a8d872e43acacf70d20ecfa", + "mergeCommit": { + "oid": "4a6936b1faf9de4af6a6fc62257d64ce92a13c12" + } + }, + { + "number": 17, + "id": "MDExOlB1bGxSZXF1ZXN0NDExNzMyODU5", + "title": "Fixed text vector line breaks", + "url": "https://github.com/quicwg/load-balancers/pull/17", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "", + "createdAt": "2020-04-30T17:29:45Z", + "updatedAt": "2020-04-30T18:47:27Z", + "closedAt": "2020-04-30T18:47:25Z", + "mergedAt": "2020-04-30T18:47:25Z", + "mergedBy": "martinduke", + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDAzNzQ0NTk5", + "commit": { + "abbreviatedOid": "d528354" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "LGTM \ud83d\udc4d", + "createdAt": "2020-04-30T17:48:08Z", + "updatedAt": "2020-04-30T17:48:08Z", + "comments": [] + } + ], + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "4a6936b1faf9de4af6a6fc62257d64ce92a13c12", + "headRepository": "quicwg/load-balancers", + "headRefName": "vector-line-breaks", + "headRefOid": "2d751c57c91fd45be789cb524047bf1e2f7adfd3", + "mergeCommit": { + "oid": "98fe4b33b709f24b57b882ef1e2438bffaa8c47e" + } + }, + { + "number": 18, + "id": "MDExOlB1bGxSZXF1ZXN0NDExNzc5MzI1", + "title": "different line breaks", + "url": "https://github.com/quicwg/load-balancers/pull/18", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "", + "createdAt": "2020-04-30T19:04:09Z", + "updatedAt": "2020-04-30T19:04:39Z", + "closedAt": "2020-04-30T19:04:38Z", + "mergedAt": "2020-04-30T19:04:38Z", + "mergedBy": "martinduke", + "comments": [], + "reviews": [], + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "98fe4b33b709f24b57b882ef1e2438bffaa8c47e", + "headRepository": "quicwg/load-balancers", + "headRefName": "line-break-2", + "headRefOid": "c430fe0be5e81804377f41b8ff2927557d301bb7", + "mergeCommit": { + "oid": "85e0cbaa5d4749596d185c6b3e2a65230c726c04" + } + }, + { + "number": 19, + "id": "MDExOlB1bGxSZXF1ZXN0NDEyMzg0NzE5", + "title": "chose a different word", + "url": "https://github.com/quicwg/load-balancers/pull/19", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "this is mostly to test I've fixed some integration issues.", + "createdAt": "2020-05-02T02:06:27Z", + "updatedAt": "2020-05-02T02:06:40Z", + "closedAt": "2020-05-02T02:06:39Z", + "mergedAt": "2020-05-02T02:06:39Z", + "mergedBy": "martinduke", + "comments": [], + "reviews": [], + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "85e0cbaa5d4749596d185c6b3e2a65230c726c04", + "headRepository": "quicwg/load-balancers", + "headRefName": "nit", + "headRefOid": "ab696021278a487e9520f0b330ae6d79d4ec67df", + "mergeCommit": { + "oid": "38132cf34147a0aa66b0b462f935317b5cb289f1" + } + }, + { + "number": 21, + "id": "MDExOlB1bGxSZXF1ZXN0NDE0OTE0OTg1", + "title": "Add discussion of QUIC invariants", + "url": "https://github.com/quicwg/load-balancers/pull/21", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Somewhat obliquely, this addresses #20.\r\n\r\n", + "createdAt": "2020-05-07T20:55:43Z", + "updatedAt": "2020-05-14T02:26:46Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "38132cf34147a0aa66b0b462f935317b5cb289f1", + "headRepository": "quicwg/load-balancers", + "headRefName": "invariants", + "headRefOid": "4e3d9c0ad9086dacf6d58854e9e3aa595e8a28b4", + "closedAt": "2020-05-14T02:26:45Z", + "mergedAt": "2020-05-14T02:26:45Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "09a09252204907901f4fdb8b8055dfb091bab5e2" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDA3ODM3Mjk4", + "commit": { + "abbreviatedOid": "4e3d9c0" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "LGTM \ud83d\udc4d", + "createdAt": "2020-05-07T21:06:52Z", + "updatedAt": "2020-05-07T21:06:52Z", + "comments": [] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDA3OTAzMDg0", + "commit": { + "abbreviatedOid": "4e3d9c0" + }, + "author": "martinthomson", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-05-07T23:27:36Z", + "updatedAt": "2020-05-08T02:14:52Z", + "comments": [ + { + "originalPosition": 68, + "body": "We might be able to move this into invariants, as I mentioned on the issue. WDYT?", + "createdAt": "2020-05-07T23:27:36Z", + "updatedAt": "2020-05-08T02:14:52Z" + }, + { + "originalPosition": 74, + "body": "I think that this is really the one point. If we move the first point to the invariants doc (and I think we should), then you can just talk about the one assumption: that addressing information doesn't change until after the server is able to give the client a connection ID that works for proper routing.\r\n\r\nHowever, this isn't completely sufficient. If your load balancer is stateless and performs address-tuple routing on long headers and connection ID routing on short headers, you are relying on a different assumption: that long headers are only used prior for that period the address is stable during setup. If we ever found a use for a long header long after connection establishment, the load balancer wouldn't know that and it might route things differently.\r\n\r\nThat's not a great situation to be in.", + "createdAt": "2020-05-07T23:31:33Z", + "updatedAt": "2020-05-08T02:14:52Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDA3OTUzOTcz", + "commit": { + "abbreviatedOid": "4e3d9c0" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-05-08T02:17:24Z", + "updatedAt": "2020-05-08T02:17:25Z", + "comments": [ + { + "originalPosition": 68, + "body": "That would be fine; LBs could safely drop short headers with non compliant DCIDs.", + "createdAt": "2020-05-08T02:17:25Z", + "updatedAt": "2020-05-08T02:17:25Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDA3OTU1NTcy", + "commit": { + "abbreviatedOid": "4e3d9c0" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-05-08T02:23:11Z", + "updatedAt": "2020-05-08T02:23:12Z", + "comments": [ + { + "originalPosition": 74, + "body": "Not quite. Let's say the invariants specify that the server generated CID will be in place within one (lossless) RTT. (The first assumption)\r\n\r\nThen we are still hosed if, for some reason, v2 has clients use different CIDs for each initial and 0rtt packet. Why would v2 do that! I have no idea!\r\n\r\nUltimately, if the invariants can promise that some part of the long header will be consistent and connection unique until we have a server generated CID, we'll update the LB guidance to hash off that.\r\n\r\nLate long headers are not a problem as long as they have a server generated DCID. The LB is always supposed to trial decode the DCID to see if it is compliant.", + "createdAt": "2020-05-08T02:23:12Z", + "updatedAt": "2020-05-08T02:23:12Z" + } + ] + } + ] + }, + { + "number": 24, + "id": "MDExOlB1bGxSZXF1ZXN0NDIzMzQ5Mzgx", + "title": "fix figures", + "url": "https://github.com/quicwg/load-balancers/pull/24", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fixes #23", + "createdAt": "2020-05-26T17:34:10Z", + "updatedAt": "2020-05-26T18:14:15Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "6b5ff625a09407fc4afe7c772c439fe5078ec8ac", + "headRepository": "quicwg/load-balancers", + "headRefName": "fig3-4", + "headRefOid": "97382eaae28603339133f6169aab9f40356f03e9", + "closedAt": "2020-05-26T18:14:13Z", + "mergedAt": "2020-05-26T18:14:13Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "5b6034235feebcf92c64c8aef1a56760f5329996" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDE4NTI2MDYw", + "commit": { + "abbreviatedOid": "97382ea" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-05-26T17:35:39Z", + "updatedAt": "2020-05-26T17:35:39Z", + "comments": [] + } + ] + }, + { + "number": 25, + "id": "MDExOlB1bGxSZXF1ZXN0NDIzMzY1Mzgw", + "title": "Update text on Version Independence", + "url": "https://github.com/quicwg/load-balancers/pull/25", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Carefully phrased language that considers @martinthomson 's suggestion that SCID may not be stable across versions, and tries to suggest (IP, port, DCID) as a suitable long header hash without making promises on behalf of quic-invariants.\r\n\r\nFixes #22.", + "createdAt": "2020-05-26T18:01:03Z", + "updatedAt": "2020-07-01T00:47:55Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "1033d06b11f1fffcde778b40a0eed67748e6da6e", + "headRepository": "quicwg/load-balancers", + "headRefName": "noncompliant", + "headRefOid": "e17243ad2971011250aface9268d82a4750c0984", + "closedAt": "2020-07-01T00:47:53Z", + "mergedAt": "2020-07-01T00:47:53Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "1db2dd1ac29a04eb368a82cfbb7e662999fdfb46" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDE4ODAyMTY0", + "commit": { + "abbreviatedOid": "bc1b638" + }, + "author": "martinthomson", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-05-27T01:44:04Z", + "updatedAt": "2020-05-27T01:45:24Z", + "comments": [ + { + "originalPosition": 8, + "body": "What interval?\r\n\r\n (I think that the list structure is working against you here.)", + "createdAt": "2020-05-27T01:44:04Z", + "updatedAt": "2020-07-01T00:47:26Z" + }, + { + "originalPosition": 9, + "body": "Don't use \"for example\" here. You want to be precise.", + "createdAt": "2020-05-27T01:44:41Z", + "updatedAt": "2020-07-01T00:47:26Z" + }, + { + "originalPosition": 10, + "body": "for all packets sent on the same connection.", + "createdAt": "2020-05-27T01:45:10Z", + "updatedAt": "2020-07-01T00:47:26Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDM5NjQ5ODA4", + "commit": { + "abbreviatedOid": "3188d36" + }, + "author": "martinthomson", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-06-30T03:48:18Z", + "updatedAt": "2020-06-30T03:48:19Z", + "comments": [ + { + "originalPosition": 39, + "body": "As this aims to represent IETF consensus, we should be able to say something more concrete about this than \"the authors believe\" implies.\r\n\r\nI think that what can be said is that these assumption are made by this document and while it is not guaranteed that *every* QUIC version will conform to these assumptions, they are minimal and narrowly scoped. This means that it is likely - and indeed desirable - for new versions of QUIC to conform to these expectations. By doing so, a new version of QUIC will be able to use load balancers that conform to the design in this document.\r\n\r\nThat's a fairly compelling trade: make a small additional allowance to get all this stuff. But it also means that you aren't constraining the design of QUIC versions that might not need or want involvement by a load balancer.", + "createdAt": "2020-06-30T03:48:18Z", + "updatedAt": "2020-07-01T00:47:26Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDQwNDMwMDEy", + "commit": { + "abbreviatedOid": "aec1a54" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-06-30T22:30:00Z", + "updatedAt": "2020-06-30T22:30:00Z", + "comments": [ + { + "originalPosition": 39, + "body": "OK, have another look.", + "createdAt": "2020-06-30T22:30:00Z", + "updatedAt": "2020-07-01T00:47:26Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDQwNDMxMDA0", + "commit": { + "abbreviatedOid": "aec1a54" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-06-30T22:32:21Z", + "updatedAt": "2020-06-30T22:32:21Z", + "comments": [] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDQwNDc0NjAy", + "commit": { + "abbreviatedOid": "aec1a54" + }, + "author": "martinthomson", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-07-01T00:39:15Z", + "updatedAt": "2020-07-01T00:39:24Z", + "comments": [ + { + "originalPosition": 3, + "body": "```suggestion\r\npackets sent on the same connection.\r\n\r\nWhile this document does not update the\r\n```\r\n\r\nI say that because I think that this statement applies to the entire list.", + "createdAt": "2020-07-01T00:39:15Z", + "updatedAt": "2020-07-01T00:47:26Z" + } + ] + } + ] + }, + { + "number": 26, + "id": "MDExOlB1bGxSZXF1ZXN0NDIzMzY4NjU4", + "title": "Get rid of SCID acronym", + "url": "https://github.com/quicwg/load-balancers/pull/26", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Server CID will collide with Source CID.\r\n\r\nFixes #7", + "createdAt": "2020-05-26T18:07:59Z", + "updatedAt": "2020-06-16T22:00:23Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "6b5ff625a09407fc4afe7c772c439fe5078ec8ac", + "headRepository": "quicwg/load-balancers", + "headRefName": "new-acronym", + "headRefOid": "a257b65356790128948bccbb26496d6dc7be33be", + "closedAt": "2020-06-16T22:00:22Z", + "mergedAt": "2020-06-16T22:00:22Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "1033d06b11f1fffcde778b40a0eed67748e6da6e" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDE4NTgwMDY4", + "commit": { + "abbreviatedOid": "a257b65" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-05-26T18:47:23Z", + "updatedAt": "2020-05-26T18:47:23Z", + "comments": [] + } + ] + }, + { + "number": 29, + "id": "MDExOlB1bGxSZXF1ZXN0NDM1NTA4MTg1", + "title": "New Security Considerations", + "url": "https://github.com/quicwg/load-balancers/pull/29", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Added two sections to Security Considerations (Stateless Reset Oracle and Local Configurations Only). Fixes #9 and #27.", + "createdAt": "2020-06-16T22:53:50Z", + "updatedAt": "2020-07-06T19:17:22Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "1033d06b11f1fffcde778b40a0eed67748e6da6e", + "headRepository": "quicwg/load-balancers", + "headRefName": "more-security", + "headRefOid": "60dc0918a7fd69517a1ba90fe5a73ad91ebfcdbf", + "closedAt": "2020-07-06T19:17:21Z", + "mergedAt": "2020-07-06T19:17:21Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "d8055db4a9a50a5b39ee0146adabed5441376ee6" + }, + "comments": [ + { + "author": "martinthomson", + "authorAssociation": "MEMBER", + "body": "Can you speak a little about your reasoning for the recent changes? If this attack is limited to extracting the identity of server instances for other co-hosted entities, that's probably OK, but I'm having trouble connecting the SHOULD here with the preceding text.", + "createdAt": "2020-07-01T00:42:46Z", + "updatedAt": "2020-07-01T00:42:46Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Sure. If an attacker has the same QUIC-LB config as the victim, then it can extract the server mapping, which defeats the whole point of the spec. Obviously, an LB must have the QUIC-LB config for servers it routes to. If I'm an attacker within that group of servers I may already see the packet headers that give away the server mapping, so there's little added linkability here (though there is a little).\r\n\r\nThe moment I share configuration among multiple server pools, I'm expanding the number of entities with access to the config, for no operational benefit except to make the administrator's life easier. In the absurd limit, all of AWS has the same QUIC-LB config, and essentially everyone can extract the server mapping from any CID that goes to AWS.", + "createdAt": "2020-07-01T02:07:58Z", + "updatedAt": "2020-07-01T02:07:58Z" + } + ], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDMyMDA2MTAw", + "commit": { + "abbreviatedOid": "7578c37" + }, + "author": "martinthomson", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "Not sure about the first, but the oracle bit is good, assuming that the mechanisms in the draft actually provide for deterministic routing of the same DCID over the life of a connection.\r\n\r\nThe nuanced point here is that you sometimes end up in a state where a DCID no longer routes to the node that holds the connection, but it is OK if that is the result of an event that also caused the connection to become invalid. The typical example here is that the node died. In that case, a stateless reset is OK, because the connection cannot continue.\r\n\r\nI'll leave it to you as to whether you think that mentioning this case is worth doing.", + "createdAt": "2020-06-17T01:56:54Z", + "updatedAt": "2020-06-17T01:59:32Z", + "comments": [ + { + "originalPosition": 7, + "body": "I don't think that the scope of this is very clear. If the idea is that the cloud provider - the one who provides the load balancer - provides the same configuration to mutually distrustful customers, then there is a very important point to make. But I'm not sure that this is clear from the text here. \"enterprise\" isn't well connected to \"cloud provider\".", + "createdAt": "2020-06-17T01:56:54Z", + "updatedAt": "2020-07-06T19:16:19Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDMyNTg1Mjc0", + "commit": { + "abbreviatedOid": "7578c37" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-06-17T16:44:53Z", + "updatedAt": "2020-06-17T16:44:53Z", + "comments": [ + { + "originalPosition": 7, + "body": "OK, I got rid of the word 'enterprise' and I think it's clearer now.", + "createdAt": "2020-06-17T16:44:53Z", + "updatedAt": "2020-07-06T19:16:19Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDM5NTk5Mjg2", + "commit": { + "abbreviatedOid": "de42903" + }, + "author": "martinthomson", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-06-30T01:03:12Z", + "updatedAt": "2020-06-30T03:48:36Z", + "comments": [ + { + "originalPosition": 14, + "body": "\"as narrow as possible\" is not really going to achieve our security goals. The requirement (and it's a requirement not merely a desideratum) is that mutually distrustful entities cannot acquire information that might be used to mount denial of service on each other.", + "createdAt": "2020-06-30T01:03:12Z", + "updatedAt": "2020-07-06T19:16:19Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDQwNDIyODMz", + "commit": { + "abbreviatedOid": "e530316" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-06-30T22:13:26Z", + "updatedAt": "2020-06-30T22:13:27Z", + "comments": [ + { + "originalPosition": 14, + "body": "OK, I've rephrased it to be a bit more restrictive. How do you like it?", + "createdAt": "2020-06-30T22:13:26Z", + "updatedAt": "2020-07-06T19:16:19Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDQwNDMxODYw", + "commit": { + "abbreviatedOid": "e530316" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-06-30T22:34:21Z", + "updatedAt": "2020-06-30T22:34:21Z", + "comments": [] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDQxMzA3MjAz", + "commit": { + "abbreviatedOid": "50c9731" + }, + "author": "martinthomson", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "Better, though I think that the new SHOULD NOT is toothless.\r\n\r\nIn my view, the recommendation should be that entities that might be mutually distrustful SHOULD be given different load balancer configurations.", + "createdAt": "2020-07-02T02:22:57Z", + "updatedAt": "2020-07-02T02:22:57Z", + "comments": [] + } + ] + }, + { + "number": 30, + "id": "MDExOlB1bGxSZXF1ZXN0NDM1NTI0NTI5", + "title": "ICMP Packet routing", + "url": "https://github.com/quicwg/load-balancers/pull/30", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Added language about ICMP packets. Fixes #28.", + "createdAt": "2020-06-16T23:52:12Z", + "updatedAt": "2020-06-19T19:07:02Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "1033d06b11f1fffcde778b40a0eed67748e6da6e", + "headRepository": "quicwg/load-balancers", + "headRefName": "icmp", + "headRefOid": "c20d3c29dcde8a4067a0f381444ff8fa13b98756", + "closedAt": "2020-06-19T19:07:01Z", + "mergedAt": "2020-06-19T19:07:01Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "9ae14595a863b0c41b5a72925a5b791091c60321" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDM0Mjg0NzU2", + "commit": { + "abbreviatedOid": "982dbcf" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "Looks good to me. One minor suggestion on text change, but feel free to ignore it.", + "createdAt": "2020-06-19T18:57:42Z", + "updatedAt": "2020-06-19T18:58:47Z", + "comments": [ + { + "originalPosition": 7, + "body": "```suggestion\r\nto deliver ICMP packets from the network to the correct server, by\r\n```", + "createdAt": "2020-06-19T18:57:42Z", + "updatedAt": "2020-06-19T19:05:50Z" + } + ] + } + ] + }, + { + "number": 32, + "id": "MDExOlB1bGxSZXF1ZXN0NDM3MzQyNzI1", + "title": "Add retry_source_connection_id to tokens", + "url": "https://github.com/quicwg/load-balancers/pull/32", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "After thinking it through, various XOR schemes were extremely vulnerable to manipulation, so I went with a brute force approach. Fixes #31.", + "createdAt": "2020-06-20T00:52:39Z", + "updatedAt": "2020-06-29T19:11:45Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "9ae14595a863b0c41b5a72925a5b791091c60321", + "headRepository": "quicwg/load-balancers", + "headRefName": "retry-source-cid", + "headRefOid": "765f829f2d011aecaece012818cc969996b548af", + "closedAt": "2020-06-29T19:11:44Z", + "mergedAt": "2020-06-29T19:11:43Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "702833e7259b6e936492fa656b69115185beb560" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDM5NDI2MDUw", + "commit": { + "abbreviatedOid": "765f829" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-06-29T19:11:11Z", + "updatedAt": "2020-06-29T19:11:11Z", + "comments": [] + } + ] + }, + { + "number": 33, + "id": "MDExOlB1bGxSZXF1ZXN0NDQyOTU2Mjc1", + "title": "Describe 3 pass stream cipher.", + "url": "https://github.com/quicwg/load-balancers/pull/33", + "state": "MERGED", + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "This PR describes a three pass stream cipher option. The three passes are:\r\n\r\n1) Encrypt the server-id bytes using the nonce bytes\r\n\r\n2) Encrypt the nonce bytes using the server-id bytes\r\n\r\n3) Encrypt the server-id bytes using the nonce bytes\r\n\r\nThis is effectively a much simplified version of the FFX algorithm. The effect is complete encryption of server-id and nonce, and thus resiliency against bit flipping attacks. With the simple stream cipher, and attacker can flip bits in the server ID, resulting in a different decrypted value which could be used in attacks. With the triple stream cipher, flipping any bit will result in random flips of every other bits, which would be easy for servers or load balancers to detect.\r\n\r\nOf course, full encryption also has these properties. But full encryption requires fairly long CID, while stream encryption works reasonably with small CID.", + "createdAt": "2020-07-01T19:57:52Z", + "updatedAt": "2020-07-09T01:16:05Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "1db2dd1ac29a04eb368a82cfbb7e662999fdfb46", + "headRepository": "huitema/load-balancers", + "headRefName": "better-obfuscate", + "headRefOid": "693877d12810d7b371e12ee37ae26247ce54fed2", + "closedAt": "2020-07-09T01:16:05Z", + "mergedAt": "2020-07-09T01:16:05Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "d997d798f17e034ae35f27778a366451d3cf6964" + }, + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Thanks for writing this. If I can get clarity on the threat model, I would see no reason to retain the original algorithm, and would simply replace it with this one.\r\n\r\nBut I don't quite understand the bit flipping attack against the old algorithm. I can certainly flip the server ID bits to cause the LB to send it to a different server. But I can also do this by generating random CIDs -- only the addition of zero padding, or unallocated server ID space, gives the LB a chance of detecting invalid CIDs.\r\n\r\nHow would LBs detect tampering using the 3 pass technique?", + "createdAt": "2020-07-02T19:36:21Z", + "updatedAt": "2020-07-02T19:36:38Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "I would detect LB tampering by making the server ID bit longer than strictly necessary. With the three pass method, tampering or random generation will cause every server ID bit to have a random value. Forgeries will statistically be detected as out of range, with probability `1- sizeof(range) / sizeof(id)`.\r\n\r\nNote that it should also be possible to make the nonce bit shorter than the original spec, because we are no more relying on the randomness of the nonce value. Each server could set the nonce to some kind of sequence number, incremented at each CID allocation. The size of the number should be enough to cover all allocations during a CID encryption key epoch, instead of twice that to cover the birthday paradox if using random allocations.", + "createdAt": "2020-07-03T00:56:50Z", + "updatedAt": "2020-07-03T00:56:50Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "The bit flipping attack against the old algorithm involves using a side channel to obtain the server ID in existing CID, then flipping selected bits to target a specific server.", + "createdAt": "2020-07-03T01:00:29Z", + "updatedAt": "2020-07-03T01:00:29Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "Another point about stream ciphers. Since we are using an algorithm similar to PN encryption, it is possible to \"mask\" some bits -- such as for example the two topmost bits. That means it is possible to use 6 bits of the \"first octet\" as part of the server-id.\r\n\r\nThis is also possible for the clear method, and for the divider method.", + "createdAt": "2020-07-03T01:03:12Z", + "updatedAt": "2020-07-03T01:03:12Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "> That means it is possible to use 6 bits of the \"first octet\"\r\n\r\nI don't think this is correct. What is not clear in the current language is that the server may choose to use these 6 (5 given an outstanding PR) for length encoding, independent of what the LB wants. This is for crypto offload purposes. Encrypting the length bits would create problems.", + "createdAt": "2020-07-03T17:51:29Z", + "updatedAt": "2020-07-03T17:51:29Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "@huitema Sorry to be obtuse, but I'm still not following the threat model that the 3-pass algorithm addresses.\r\n\r\nI agree that avoiding the birthday problem is a nice result of your proposal.\r\n\r\n**LB tampering detection**: Yes, with stream cipher the only way to detect a randomly generated CID is for the server ID space to be >>> than the number of servers. The LB can then simply discard any packet that maps to an invalid server (unless it has a long header). But this true of the existing design, and isn't unique to 3-pass.\r\n\r\n> The bit flipping attack against the old algorithm involves using a side channel to obtain the server ID in existing CID, then flipping selected bits to target a specific server.\r\n\r\nFor the whole time I've worked on this, I've dealt with people very concerned about DoS vs. a single server in the pool, and people who don't think this is a problem at all. I (weakly) tend toward the latter camp. (Also, if it _is_ a problem, the plaintext algorithm is a walking DoS vector, but that's a different issue).\r\n\r\nNevertheless, let's assume that it's a problem, and that the attacker has obtained both the positions of the server ID bytes and the server ID for two servers in the pool via a side-channel. Then I guess the attack is to connect to server A, gather a number valid CIDs via NCID frames that have different nonces, and then xor the SID field to route to server B. Is that accurate? If so, do you find that compelling? It seems strictly limited to the number of CIDs I can get from a valid server, so why not just DoS those CIDs to that server instead?", + "createdAt": "2020-07-03T18:09:38Z", + "updatedAt": "2020-07-03T18:09:38Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "The current stream cipher proposal can only detect tampering if the server-id space is sparse, for a very specific definition of sparse. The property you want is, \"if you pick at random a number of the same size as the server ID, there is a fixed probability X that this this a valid number\". A linear numbering of the servers will not achieve that, even if you prepend a bunch of zeroes in front of the serial number. \r\n\r\nThe three-pass proposal detects tampering even if the server ID space is used linearly, e.g. even if only numbers lower than N are valid, with N much smaller than the maximum number allowed by the size of the field. This is because the CID is effectively encrypted.\r\n\r\nIn the absence of effective detection of tampering, the malleability of the stream cipher is dangerous. Suppose an attacker does a valid connection, and obtains a series of CID. Suppose the attacker also knows that there are 1024 servers in your pool. For each CID, it can flip the bottom 10 bits of the stream-ID and obtain 1023 new CID, which will all be recognized as valid by the load-balancer or by the firewall. Are you really sure that attackers cannot put that to good use? (Good for them, of course, not so good for the defender.)", + "createdAt": "2020-07-03T21:46:24Z", + "updatedAt": "2020-07-03T21:46:24Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Thanks for clarifying. I increasingly favor this change. \r\n\r\nThe alternative would be that configuration agents SHOULD disperse server IDs over the available space, but that could be difficult if the server ID is an IPv4 address or something. I'll sleep on it, but I think I'll accept this PR next week.", + "createdAt": "2020-07-03T22:11:07Z", + "updatedAt": "2020-07-03T22:11:07Z" + } + ], + "reviews": [] + }, + { + "number": 36, + "id": "MDExOlB1bGxSZXF1ZXN0NDQzNzY3MDU2", + "title": "Remove version-specific text", + "url": "https://github.com/quicwg/load-balancers/pull/36", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "", + "createdAt": "2020-07-02T22:24:24Z", + "updatedAt": "2020-07-02T22:24:44Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "1db2dd1ac29a04eb368a82cfbb7e662999fdfb46", + "headRepository": "quicwg/load-balancers", + "headRefName": "fix-typo", + "headRefOid": "a6932ad03c2d2d7bca36879024ff6e9d69682eb8", + "closedAt": "2020-07-02T22:24:43Z", + "mergedAt": "2020-07-02T22:24:43Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "267ac4ad19c5326373311640e90a5c8d0ecfaad0" + }, + "comments": [], + "reviews": [] + }, + { + "number": 37, + "id": "MDExOlB1bGxSZXF1ZXN0NDQzNzcxNzIw", + "title": "One more config rotation bit.", + "url": "https://github.com/quicwg/load-balancers/pull/37", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fixes #12.\r\n\r\nAlso addresses another version assumption and deletes a reference to the in-band protocol.", + "createdAt": "2020-07-02T22:41:50Z", + "updatedAt": "2020-12-12T00:06:47Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "267ac4ad19c5326373311640e90a5c8d0ecfaad0", + "headRepository": "quicwg/load-balancers", + "headRefName": "more-configs", + "headRefOid": "40320c1c6ab0b8bc0910764b97ab67398058622b", + "closedAt": "2020-12-12T00:06:47Z", + "mergedAt": null, + "mergedBy": null, + "mergeCommit": null, + "comments": [ + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "Shouldn't the CID length be implicit, or maybe part of the configuration?", + "createdAt": "2020-07-03T01:05:47Z", + "updatedAt": "2020-07-03T01:05:47Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "It often is, but we specifically added an optional self-encoded length to assist with hardware crypto offload.", + "createdAt": "2020-07-03T01:12:59Z", + "updatedAt": "2020-07-03T01:12:59Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "@martinthomson \r\n\r\n>My original thought here was that the configuration could indicate how many bits were spent on this vs. server ID.\r\n\r\nI don't think this will work in practice. The self-encoded length bit is mostly there for crypto offload devices on the server. So it's entirely possible (likely, even) that the LB doesn't care about the self-encoded length, but the server absolutely needs to use the 5 bits in that way.\r\n\r\nI see other problems, but this is the most important one.", + "createdAt": "2020-07-03T17:46:06Z", + "updatedAt": "2020-07-03T17:46:06Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "You are placing server specific bits in the CID: an identifier of the class of servers served by a load-balancer, but I am worried about privacy issues. If I understand the intent, you want to partition the set of servers behind the load-balancer based on some level of trust. But doing that creates a privacy issue. When using ESNI/ECH, the privacy of client and services relies on hiding within the \"anonymity set\" of all services behind the load balancer. Having multiple classes partitions that set. (Allowing multiple CID lengths has the same effect.)", + "createdAt": "2020-07-03T20:18:36Z", + "updatedAt": "2020-07-03T20:18:36Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Good point, @huitema. Would you prefer we stick with two bits and have some other way of solving the issue of mutually mistrustful servers, or would you be satisfied if we just added this privacy concern to the security considerations?", + "createdAt": "2020-07-03T22:03:47Z", + "updatedAt": "2020-07-03T22:03:47Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "We need privacy considerations in any case. If you are concerned about privacy, you probably should not use the clear text and obfuscated method, and you also want to make sure that all servers in the anonymity set use the same CID length. (If you are serious about privacy or security, you should probably never use the clear text or obfuscated methods anyhow; maybe they should not make it to the final draft; but that's a different issue.)\r\n\r\nOn the specific case of the third bit, the effect on privacy is not good. You could say that \"if you are serious about privacy, all servers in the same anonymity set must use the same 3 bits pattern\". Or the same 2 bits pattern, for that matter. I do think sticking with 2 bits would be better, but I am not sure that I understand the use case for three bits. Is there that much of a security difference between \"the CID key is shared by 2000 servers\" and \"the CID key is shared by only 1000 servers\"? Are you not just hitting the practical deployment consideration that widely shared secrets are not going to stay secret for long?", + "createdAt": "2020-07-03T22:17:14Z", + "updatedAt": "2020-07-03T22:17:14Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "> Are you not just hitting the practical deployment consideration that widely shared secrets are not going to stay secret for long?\r\n\r\nThat's not the concern. The issue is that some of the servers behind the LB might not be trustworthy in terms of being able to link your clients. (e.g. a hosting service with multiple customers.)", + "createdAt": "2020-07-03T23:05:07Z", + "updatedAt": "2020-07-03T23:05:07Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": ">> That's not the concern. The issue is that some of the servers behind the LB might not be trustworthy in terms of being able to link your clients. (e.g. a hosting service with multiple customers.)\r\n\r\nCare to explain a bit more? You are maybe pointing here at deployment considerations. There seems to be several deployment cases:\r\n\r\n1) The \"example.com\" company manages its own pool of servers, \r\n\r\n2) The content delivery company \"example.net\" manages a bunch of edge servers that serve content for a variety of customers\r\n\r\n3) The hosting company \"example.example\" provides virtual machines to a bunch of customers with additional services like load balancing, firewall or DDoS protection.\r\n\r\nIn all these cases, there are different trust levels. It seems that the draft is making hidden assumptions about these levels. You may want to add something like \"deployment considerations\".\r\n", + "createdAt": "2020-07-03T23:39:06Z", + "updatedAt": "2020-07-03T23:39:06Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Closed #12 with no action, so closing this too.", + "createdAt": "2020-12-12T00:06:47Z", + "updatedAt": "2020-12-12T00:06:47Z" + } + ], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDQyMTY3MjYx", + "commit": { + "abbreviatedOid": "8e719c5" + }, + "author": "martinthomson", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "Of course you could get even more space here if you were willing to impose constraints on length. You don't lose that many options if you do that either. You just have to choose which options don't get to play. I recommend everything from 0 (which you can't not have) to 4. But that's just me, I'm sure.\r\n\r\nMy original thought here was that the *configuration* could indicate how many bits were spent on this vs. server ID. Then you don't have any problems that might arise from constrained space. Nor do you need to have a server ID length either.\r\n\r\nBut of course that moves the complexity into implementations. For that, it's not much, and I would say that implementations are free to limit the range of values they support (probably more so for the load balancer than the more-flexible server). And there is nothing wrong with making a suggestion either.", + "createdAt": "2020-07-03T06:11:11Z", + "updatedAt": "2020-07-03T06:19:34Z", + "comments": [ + { + "originalPosition": 20, + "body": "```suggestion\r\nthese three bits allow four mutually exclusive server pools to coexist, and for\r\n```\r\n\r\nThat assumes of course that you need two keys per server pool, as opposed to rotating each pool one by one, in which case you can have seven (assuming excellent, though probably unrealistically difficult, coordination).\r\n\r\nI don't think that you need to be so definitive about this. Say that you might use this to create 4 distinct pools that are able to independently use two distinct configurations (and therefore keys), or other arrangements.", + "createdAt": "2020-07-03T06:11:11Z", + "updatedAt": "2020-07-06T19:34:20Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDQyNTIwNzcz", + "commit": { + "abbreviatedOid": "8e719c5" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-07-03T17:43:47Z", + "updatedAt": "2020-07-03T17:43:47Z", + "comments": [ + { + "originalPosition": 20, + "body": "Since '111' is reserved for 5-tuple routing, there are 7 codepoints. I believe 3 is the correct number. But I should say \"at least\" three.", + "createdAt": "2020-07-03T17:43:47Z", + "updatedAt": "2020-07-06T19:34:20Z" + } + ] + } + ] + }, + { + "number": 39, + "id": "MDExOlB1bGxSZXF1ZXN0NDQ2NTY2MTAy", + "title": "Editorial Pass on Triple Stream Cipher", + "url": "https://github.com/quicwg/load-balancers/pull/39", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "I will probably delete the Stream Cipher algorithm entirely, but consider this an intermediate step.", + "createdAt": "2020-07-09T01:35:10Z", + "updatedAt": "2020-07-09T20:33:06Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "d997d798f17e034ae35f27778a366451d3cf6964", + "headRepository": "quicwg/load-balancers", + "headRefName": "new-stream-cipher-editorial", + "headRefOid": "e060b07c46bc3223b32e1856552d8344b052c7f2", + "closedAt": "2020-07-09T20:32:48Z", + "mergedAt": "2020-07-09T20:33:05Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "d17b7d0d30bd1e6b9ff54b63c323e7a33f64b3b1" + }, + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Merging to enable the next round of edits", + "createdAt": "2020-07-09T20:32:48Z", + "updatedAt": "2020-07-09T20:32:48Z" + } + ], + "reviews": [] + }, + { + "number": 40, + "id": "MDExOlB1bGxSZXF1ZXN0NDQ3MTE2NjM3", + "title": "Down to one stream cipher algorithm", + "url": "https://github.com/quicwg/load-balancers/pull/40", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Although more complex, the three-pass algorithm seems strictly better.", + "createdAt": "2020-07-09T22:03:53Z", + "updatedAt": "2020-07-10T15:48:25Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "8162de17bcb9d36ce6afbc13ce800693b0f9cd44", + "headRepository": "quicwg/load-balancers", + "headRefName": "one-stream-cipher", + "headRefOid": "2e946ea6749d3197bf56bfeeac186ba2bf1bc00e", + "closedAt": "2020-07-10T15:48:23Z", + "mergedAt": "2020-07-10T15:48:23Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "98a171f7c0c1cec2af30cbf80ec24073ce3e38ca" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDQ2MTIxMTU5", + "commit": { + "abbreviatedOid": "4a26156" + }, + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "I like it, but there is some imprecision in the text. I would like to see something about detecting corruption, probably in the load balancer actions.", + "createdAt": "2020-07-10T04:56:37Z", + "updatedAt": "2020-07-10T05:05:11Z", + "comments": [ + { + "originalPosition": 6, + "body": "Do you need to say triple in the anchor?", + "createdAt": "2020-07-10T04:56:37Z", + "updatedAt": "2020-07-10T14:41:26Z" + }, + { + "originalPosition": 21, + "body": "If you want to detect corruption, you need more than \"sufficiently large\". You need extra bits, and the more you have the more corruption you can detect.", + "createdAt": "2020-07-10T04:58:39Z", + "updatedAt": "2020-07-10T14:41:26Z" + }, + { + "originalPosition": 111, + "body": "Check the anchor. It probably does not compile.", + "createdAt": "2020-07-10T05:03:46Z", + "updatedAt": "2020-07-10T14:41:26Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDQ2NDU4NjE0", + "commit": { + "abbreviatedOid": "2e946ea" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-07-10T14:41:57Z", + "updatedAt": "2020-07-10T14:41:57Z", + "comments": [ + { + "originalPosition": 21, + "body": "I added some text that applies to all the algorithms.", + "createdAt": "2020-07-10T14:41:57Z", + "updatedAt": "2020-07-10T14:41:57Z" + } + ] + } + ] + }, + { + "number": 43, + "id": "MDExOlB1bGxSZXF1ZXN0NDUxNDMyODQ1", + "title": "new stream test vectors", + "url": "https://github.com/quicwg/load-balancers/pull/43", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Updated for the new three-pass algorithm.", + "createdAt": "2020-07-17T20:22:35Z", + "updatedAt": "2020-07-17T20:29:58Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "737b3ed5980745caa2a32ba9bfe64875121ddc4e", + "headRepository": "quicwg/load-balancers", + "headRefName": "stream-test-vector", + "headRefOid": "31a3d11b4f4e94b67cf72e3c4c0f741e819c84cb", + "closedAt": "2020-07-17T20:29:56Z", + "mergedAt": "2020-07-17T20:29:56Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "8b83ace66bf3291fabd06b48179edecf2e3bb1fe" + }, + "comments": [], + "reviews": [] + }, + { + "number": 44, + "id": "MDExOlB1bGxSZXF1ZXN0NDUxNDc0MTQ1", + "title": "Remove zero padding field", + "url": "https://github.com/quicwg/load-balancers/pull/44", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Resolves #41", + "createdAt": "2020-07-17T21:29:18Z", + "updatedAt": "2020-07-20T18:39:55Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "8b83ace66bf3291fabd06b48179edecf2e3bb1fe", + "headRepository": "quicwg/load-balancers", + "headRefName": "no-zero-padding", + "headRefOid": "5058051d8b44a5b13042c57ddf0de240da796c84", + "closedAt": "2020-07-20T18:39:51Z", + "mergedAt": "2020-07-20T18:39:51Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "c2ba946f4d2c48d5817b5ef4f9ed438245b17b28" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDUxMDM3OTIx", + "commit": { + "abbreviatedOid": "5058051" + }, + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "state": "CHANGES_REQUESTED", + "body": "I would like to see some text about the sparse encoding of the server id, i.e., using enough bit to ensure error detection after de-obfuscation or decryption. Probably in or near ## Security.\r\n", + "createdAt": "2020-07-18T07:09:07Z", + "updatedAt": "2020-07-18T07:13:04Z", + "comments": [ + { + "originalPosition": 29, + "body": "There should be some text about the *minimal* length -- long enough to encode all servers, but also long enough to detect errors. Here is probably not the place, it belongs in some common text.", + "createdAt": "2020-07-18T07:09:07Z", + "updatedAt": "2020-07-18T07:13:04Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDUxODUyODU4", + "commit": { + "abbreviatedOid": "5058051" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-07-20T18:24:45Z", + "updatedAt": "2020-07-20T18:24:45Z", + "comments": [ + { + "originalPosition": 29, + "body": "In {{routing-algorithms}} it says:\r\n\r\nA QUIC-LB configuration MAY significantly over-provision the server ID space\r\n(i.e., provide far more codepoints than there are servers) to increase the\r\nprobability that a randomly generated Destination Connection ID is non-\r\ncompliant.\r\n\r\nI am not particularly convinced this is an important feature, so it's just a MAY. But it's there.", + "createdAt": "2020-07-20T18:24:45Z", + "updatedAt": "2020-07-20T18:24:45Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDUxODYzNDg4", + "commit": { + "abbreviatedOid": "5058051" + }, + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-07-20T18:39:55Z", + "updatedAt": "2020-07-20T18:39:55Z", + "comments": [ + { + "originalPosition": 29, + "body": "OK then. If we have common text that's fine.", + "createdAt": "2020-07-20T18:39:55Z", + "updatedAt": "2020-07-20T18:39:55Z" + } + ] + } + ] + }, + { + "number": 45, + "id": "MDExOlB1bGxSZXF1ZXN0NDUxNTAwNjA4", + "title": "Rewrite config rotation", + "url": "https://github.com/quicwg/load-balancers/pull/45", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fixes #42", + "createdAt": "2020-07-17T22:13:51Z", + "updatedAt": "2020-07-17T22:15:09Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "8b83ace66bf3291fabd06b48179edecf2e3bb1fe", + "headRepository": "quicwg/load-balancers", + "headRefName": "config-rotation-terms", + "headRefOid": "4a70f7dbb4aea251c6cd2e64b09ace56308596b3", + "closedAt": "2020-07-17T22:15:08Z", + "mergedAt": "2020-07-17T22:15:08Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "956b0a3644382c41362f2a8fd7a8055081492050" + }, + "comments": [], + "reviews": [] + }, + { + "number": 48, + "id": "MDExOlB1bGxSZXF1ZXN0NDU4NjY2Mjc0", + "title": "Deleted OCID", + "url": "https://github.com/quicwg/load-balancers/pull/48", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "by popular demand in #47.", + "createdAt": "2020-07-29T20:09:37Z", + "updatedAt": "2020-08-13T19:34:43Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "b6126ba11dad17b160407a10ee48dedef0b0558b", + "headRepository": "quicwg/load-balancers", + "headRefName": "delete-ocid", + "headRefOid": "bfc9c0607e9000075eb000f5447ecc45051b4099", + "closedAt": "2020-08-13T19:34:41Z", + "mergedAt": "2020-08-13T19:34:41Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "385254d4ae8c9233c97195e3f99fc68b352a13f9" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDU3ODYwMzIz", + "commit": { + "abbreviatedOid": "b544436" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-07-29T20:11:21Z", + "updatedAt": "2020-07-29T20:11:21Z", + "comments": [] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NDU3OTQxMTI2", + "commit": { + "abbreviatedOid": "b544436" + }, + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "state": "APPROVED", + "body": "Yes, that works. Minor comment.", + "createdAt": "2020-07-29T22:26:09Z", + "updatedAt": "2020-07-29T22:27:07Z", + "comments": [ + { + "originalPosition": 123, + "body": "Are you sure that \"provide robust entropy to making any sort of linkage\" is a valid English sentence? Would it be better to say \"provide robust entropy to defend against any sort of linkage\", or something like that?", + "createdAt": "2020-07-29T22:26:09Z", + "updatedAt": "2020-07-29T23:10:42Z" + } + ] + } + ] + }, + { + "number": 49, + "id": "MDExOlB1bGxSZXF1ZXN0NDcxMjM1Mzgx", + "title": "New test vectors", + "url": "https://github.com/quicwg/load-balancers/pull/49", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Updated the test vectors for the latest version of the spec, added PCID, and made them usable to test server implementations.", + "createdAt": "2020-08-20T20:52:34Z", + "updatedAt": "2020-08-31T16:12:54Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "ca952dcf4a973c8df3c2efb9bcdfcbf8676bc581", + "headRepository": "quicwg/load-balancers", + "headRefName": "new-test-vectors", + "headRefOid": "9f81662060ce61175903dd989e0cae35e5d35d75", + "closedAt": "2020-08-31T16:12:53Z", + "mergedAt": "2020-08-31T16:12:53Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "1dc88e31f72c4ddeff2a7cc20e69d4034cb31201" + }, + "comments": [], + "reviews": [] + }, + { + "number": 52, + "id": "MDExOlB1bGxSZXF1ZXN0NDc2MzkzOTc5", + "title": "Update Noncompliant DCID text", + "url": "https://github.com/quicwg/load-balancers/pull/52", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Make it clear that the server has to provide the client with a compliant DCID if the client isn't already using one.", + "createdAt": "2020-08-31T16:11:30Z", + "updatedAt": "2020-10-28T22:44:30Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "ca952dcf4a973c8df3c2efb9bcdfcbf8676bc581", + "headRepository": "quicwg/load-balancers", + "headRefName": "server-must-change", + "headRefOid": "c340a6f63e1e957953ab3acd3b629d238d60a416", + "closedAt": "2020-10-28T22:44:29Z", + "mergedAt": "2020-10-28T22:44:29Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "1196006bfb6b239817fa528319f1f87f282500a8" + }, + "comments": [], + "reviews": [] + }, + { + "number": 56, + "id": "MDExOlB1bGxSZXF1ZXN0NTEyNTc2MTk4", + "title": "Use POSIX timestamp", + "url": "https://github.com/quicwg/load-balancers/pull/56", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fixes #55.", + "createdAt": "2020-10-29T21:20:06Z", + "updatedAt": "2020-10-30T13:56:12Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "d12573bacd05591bd4b6a4f650d563f383aea111", + "headRepository": "quicwg/load-balancers", + "headRefName": "small-timestamp", + "headRefOid": "117fa3bc3b890e6a8db835c7ac9d13819f1c1866", + "closedAt": "2020-10-30T13:56:11Z", + "mergedAt": "2020-10-30T13:56:11Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "a884d3d0bdf9567fb583427a1b1f4e18077aec44" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTIwMTQ4MzAz", + "commit": { + "abbreviatedOid": "117fa3b" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-10-29T23:03:06Z", + "updatedAt": "2020-10-29T23:03:06Z", + "comments": [] + } + ] + }, + { + "number": 58, + "id": "MDExOlB1bGxSZXF1ZXN0NTE1MDI3NTEy", + "title": "Added transport parameter", + "url": "https://github.com/quicwg/load-balancers/pull/58", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Addresses #8 and #16.", + "createdAt": "2020-11-03T22:34:37Z", + "updatedAt": "2021-03-18T19:19:27Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "5d17ce83c507dd6c7d2a12308fba6f129a7b7e0d", + "headRepository": "quicwg/load-balancers", + "headRefName": "add-transport-parameter", + "headRefOid": "772bf1e435171bf96bd2c9438135a45abb56a973", + "closedAt": "2020-12-11T23:31:39Z", + "mergedAt": null, + "mergedBy": null, + "mergeCommit": null, + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Due to total lack of enthusiasm at IETF 109, closing this PR.", + "createdAt": "2020-12-11T23:31:39Z", + "updatedAt": "2020-12-11T23:31:39Z" + } + ], + "reviews": [] + }, + { + "number": 59, + "id": "MDExOlB1bGxSZXF1ZXN0NTE1MDk1MzE2", + "title": "Aead retry token", + "url": "https://github.com/quicwg/load-balancers/pull/59", + "state": "MERGED", + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Close #35 \r\n\r\nThis PR specifies how the retry token should be encoded using AEAD. This replaces the current method that uses AES ECB, and has potential vulnerabilities since encrypted addresses and encrypted ODCID might be encrypted independently. There are differences between the two solutions:\r\n\r\n* AEAD requires key and IV, not just key. The IV will have to be provisioned with the key.\r\n\r\n* AEAD requires a nonce. The proposed format defines a 64 bit \"token sequence number\". We may want to discuss this further, and specify how exactly this is generated.\r\n\r\n* The client address is not encrypted as part of the token, but is verified through AEAD\r\n\r\n* The AEAD protected token may end up 8 bytes longer than the ECB protected token: remove IP address (-16), add a nonce (+8), add the AEAD checksum (+16). On the other hand, the ECB must be padded to the nearest 16 bytes, while AEAD does not require that. Probably not very important.\r\n\r\n* I assume we are using AES128-GCM, but I suppose the specific algorithm could be provisioned with the key.\r\n\r\n\r\n", + "createdAt": "2020-11-04T02:30:35Z", + "updatedAt": "2020-12-18T16:38:02Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "5d17ce83c507dd6c7d2a12308fba6f129a7b7e0d", + "headRepository": "huitema/load-balancers", + "headRefName": "aead-retry-token", + "headRefOid": "a926e3cf8c71c394a9c5020460ab2719657a07c3", + "closedAt": "2020-12-18T16:38:02Z", + "mergedAt": "2020-12-18T16:38:02Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "596688a9c0a8ca414c3d83570f197994e6db5c93" + }, + "comments": [ + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "Waiting for the resolution of the Token Sequence Number issue before updating the PR. I am tempted to just make that field 96 bits, and specify randomness.", + "createdAt": "2020-11-04T20:02:02Z", + "updatedAt": "2020-11-04T20:02:02Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "@huitema I think we have five options:\r\n(1) A 96-bit random number for the sequence number, and just assume there are no collisions (you've computed the very low probability) -- this is wire inefficient but very easy\r\n(2) For the shared-state case, the service simply forwards packets with server-generated tokens rather than trying to validate them. Therefore this format is *only* generated by the retry service and it can use all the sequence numbers without fear of collision. -- this is very easy and wire-efficient, but slightly reduces the usefulness of the Retry Service.\r\n\r\nThen there are three variations of \"give each server some of the sequence number space\":\r\n(3a) Just put the whole (up to 18B server ID) in the token: easy, but makes big tokens. The retry service must be configured with at least 1 server ID it can use for its own tokens.\r\n(3b) Force the Retry Service to have the same QUIC-LB decoder as the load balancer, so it can extract the server ID from the CID and use that as part of the IV: most wire-efficient, but expensive for the Retry service.\r\n(3c) Assign each server a shorter ID for Retry purposes, and put in the token: medium token size, but involves the most configuration.\r\n\r\nI weakly prefer (2). if you have a different preference, I'm willing to go along with it; or we could take it to the list.\r\n", + "createdAt": "2020-12-12T00:06:03Z", + "updatedAt": "2020-12-12T00:06:03Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "I just did a PR in Picotls to make sure that the API can let us set a 96 bit \"sequence number\". Turns out that this is also required for handling multipath.\r\n\r\nPutting the whole server ID in the token really means \"putting the whole server ID in the sequence number. If you do not do that, you risk AEAD collisions, and that's not too good. Putting the server ID in the token but not in the sequence number does not rid you of AEAD collisions, so 3a is not really an option. 3c can work if the server ID is < 32 bit. You would construct the 96 bit \"sequence number\" as 32 bits of \"short\" server ID and 64 bit of per server sequence number.\r\n\r\nI am not sure that I understand your option 2. There is no big issue for \"retry tokens\" sent through \"retry\" packets, since the protocol also indicates the CID to be used by the client. The LB can route based on the CID. There is only an issue for \"new tokens\" used in conjunction with a random IDCID.", + "createdAt": "2020-12-12T01:54:26Z", + "updatedAt": "2020-12-12T01:54:26Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "A fuller explanation of option 2:\r\nThis design is for the shared-state Retry token, which is for cases where the Retry Service is not guaranteed to be on the path, and therefore both the server and service have to be able to generate (and validate) their own tokens.\r\n\r\nThe current design has both server and service generate tokens according to the same format. Therefore, if a service generates a token, the server can validate it; if the server generates a token, the service can validate it. Obviously, this saves the server from processing invalid tokens if the service can handle it.\r\n\r\nThe problem, of course, is if we increment sequence numbers there will be collisions between server- and service-generated sequence numbers. Option 2 would make the following changes:\r\n- Services produce a fixed-length token, in accordance with the standard format\r\n- Servers MUST NOT generate tokens of this length, but need not follow any format\r\n- Services MUST NOT process or filter Initial Packets with tokens that are not of the fixed length.\r\n\r\nThis entirely solves the sequence number problem, but it also means the server has to do a bit more work. Thus the Retry Service is offloading some of the Token generation, but not any of the token processing.\r\n\r\nWriting it carefully out like this, I don't like Option 2 as much anymore.", + "createdAt": "2020-12-12T04:03:39Z", + "updatedAt": "2020-12-12T04:03:39Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "\"Putting the server ID in the token but not in the sequence number does not rid you of AEAD collisions, so 3a is not really an option\"\r\n\r\nto be clear, it would be in the sequence number. The point of putting it in the token is to allow the decoder to reconstruct the IV.\r\n\r\nI imagine that 32 bits would be plenty of server IDs if it doesn't need to be sparsely populated.\r\n", + "createdAt": "2020-12-12T04:05:12Z", + "updatedAt": "2020-12-12T04:05:12Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "To sum up, I think we only have the following 2 options:\r\n\r\n(1) A 96-bit random number for the sequence number, and just assume there are no collisions (you've computed the very low probability) -- this is wire inefficient but very easy\r\n\r\n(3c) Assign each server a shorter ID for Retry purposes, and put in the token: medium token size, but involves the most configuration. For AEAD, compose the 96 bit sequence as \"(up to) 32 bit server ID\" + \"(up to) 64 bit server-chosen token ID\".\r\n\r\nThe advantage of (3c) over (1) it potentially reduced transmission overhead. For example, the server ID might well be just 16 bits, the token ID might be just 32 bits. If we have a server ID, the LB can use it to direct the incoming Initial to the server that allocated the token, which may or may not be useful. The drawback of (3c) is more configuration, and also exposing the server ID in cleartext. If server ID privacy is an issue, we need something like header protection as part of the token protection.\r\n\r\nIn both cases, we need some kind of key phase bit in the token to understand which key to use.", + "createdAt": "2020-12-12T23:37:01Z", + "updatedAt": "2020-12-12T23:37:01Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "I have tried to elaborate the two options for either random generation or server ID.", + "createdAt": "2020-12-13T01:14:48Z", + "updatedAt": "2020-12-13T01:14:48Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "BTW I am happy to commit if you resolve the nits and we can have a longer discussion on your DISCUSS points.", + "createdAt": "2020-12-16T22:10:12Z", + "updatedAt": "2020-12-16T22:10:12Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "@martinduke I think this is ready now, but you may want to review.", + "createdAt": "2020-12-17T04:40:27Z", + "updatedAt": "2020-12-17T04:40:27Z" + }, + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "@martinduke I think the last commit fixes the last comments.", + "createdAt": "2020-12-18T04:37:15Z", + "updatedAt": "2020-12-18T04:37:15Z" + } + ], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTIzNTU5NDk5", + "commit": { + "abbreviatedOid": "8476890" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "Thank you for this PR. I think this design is the way to go, modulo the open questions you've posed.", + "createdAt": "2020-11-04T17:01:20Z", + "updatedAt": "2020-11-04T17:18:32Z", + "comments": [ + { + "originalPosition": 24, + "body": "I like the ID of prepending the server ID to the sequence number and assigning the Retry Service one or more \"server IDs\" that keep the sequence number spaces separate, but one problem is that the server ID can be as much as 18 Bytes.\r\n\r\nI see three ways forward:\r\n- assign each server a second server ID for these purposes, (blecch)\r\n- just use random numbers\r\n- eliminate the (already very weak) ability of Shared State Retry Services to validate incoming tokens -- they only generate them. Then, each server can do whatever it wants with its self-generated tokens, which should easily be distinguishable by token length or whatever, and the service can use the entire sequence number space without fear of collision.\r\n\r\nI'm leaning towards the third.", + "createdAt": "2020-11-04T17:01:20Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 28, + "body": "Can you file a separate issue for that? It applies to both types of Retry Service and we should address it consistently for both.\r\n\r\nI don't feel strongly one way or the other. I believe the point of that check is so that *some* servers enforce compliance to encourage good behavior, and I don't think Retry Services need to be part of that effort.", + "createdAt": "2020-11-04T17:10:37Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 101, + "body": "Should this make clear that the authentication tag is appended to the end of the token (assuming it is)?", + "createdAt": "2020-11-04T17:12:06Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 48, + "body": "s/follow/follows", + "createdAt": "2020-11-04T17:12:33Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTIzNjkwMTI1", + "commit": { + "abbreviatedOid": "8476890" + }, + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-11-04T19:57:03Z", + "updatedAt": "2020-11-04T19:57:04Z", + "comments": [ + { + "originalPosition": 24, + "body": "Birthday paradox says with a 64 bit random field you will expect collisions after 2^32 tokens -- and that you have to change the key sooner than that if you want to minimize the risk. If you want the risk of collision below 10E-5 (five nines...) then you should not use the key more than 19 million times.\r\n\r\nI should be technically possible to make the identifier 12 bytes long -- that's the normal size of the IV for AES GCM. The same reasoning says that the key should not be use more that 4.0 E+14 times -- 400 trillion times. That may be the way to go. Better than trying to squeeze an 18 bytes ID there.\r\n\r\nOr we would have to use something a bit more exotic than AES GCM, but I would rather not go there.", + "createdAt": "2020-11-04T19:57:04Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTIzNjkyMDAy", + "commit": { + "abbreviatedOid": "8476890" + }, + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-11-04T19:59:50Z", + "updatedAt": "2020-11-04T19:59:50Z", + "comments": [ + { + "originalPosition": 28, + "body": "The PN s only used with the RETRY TOKEN format, which is server specific. So it fits naturally in the server specific part.", + "createdAt": "2020-11-04T19:59:50Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTIzNjkyNDQz", + "commit": { + "abbreviatedOid": "8476890" + }, + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-11-04T20:00:26Z", + "updatedAt": "2020-11-04T20:00:26Z", + "comments": [ + { + "originalPosition": 101, + "body": "Yes it is. I copied the text from the QUIC-TLS draft, the tag is considered part of the encrypted data.", + "createdAt": "2020-11-04T20:00:26Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTIzNjkyNjQx", + "commit": { + "abbreviatedOid": "8476890" + }, + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-11-04T20:00:43Z", + "updatedAt": "2020-11-04T20:00:44Z", + "comments": [ + { + "originalPosition": 48, + "body": "OK, will fix.", + "createdAt": "2020-11-04T20:00:44Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTIzNjk4NjU1", + "commit": { + "abbreviatedOid": "8476890" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-11-04T20:09:57Z", + "updatedAt": "2020-11-04T20:09:58Z", + "comments": [ + { + "originalPosition": 28, + "body": "Yes, but a non-shared-state retry service might be required to include the initial packet number so that the server can do the validation.\r\n\r\nThat said, making the retry service do initial header decryption is a terrible idea. So let's rule out having any type of retry service encode the packet number.", + "createdAt": "2020-11-04T20:09:57Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTIzNzAxODI3", + "commit": { + "abbreviatedOid": "8476890" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-11-04T20:14:57Z", + "updatedAt": "2020-11-04T20:14:57Z", + "comments": [ + { + "originalPosition": 24, + "body": "One way to manage the key rotation would be to actually configure both entities with a secret and make the retry service and server derive the key from that, so that it can be rotated using some signal that the retry service puts in the token?", + "createdAt": "2020-11-04T20:14:57Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTIzNzAyMDU4", + "commit": { + "abbreviatedOid": "8476890" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-11-04T20:15:17Z", + "updatedAt": "2020-11-04T20:15:17Z", + "comments": [ + { + "originalPosition": 24, + "body": "Or we could just do my third option...", + "createdAt": "2020-11-04T20:15:17Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTIzNzAyNjk0", + "commit": { + "abbreviatedOid": "8476890" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-11-04T20:16:13Z", + "updatedAt": "2020-11-04T20:16:14Z", + "comments": [ + { + "originalPosition": 101, + "body": "With the \"opaque\" data and so on it would be helpful to show exactly where the tag goes, so as to leave no ambiguity.", + "createdAt": "2020-11-04T20:16:13Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTU0MTEyODk3", + "commit": { + "abbreviatedOid": "12b9c64" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "CHANGES_REQUESTED", + "body": "", + "createdAt": "2020-12-16T21:50:15Z", + "updatedAt": "2020-12-16T22:08:37Z", + "comments": [ + { + "originalPosition": 12, + "body": "Can we call this a \"generator ID\", in order to (1) not confuse it with the load balancing server ID, and (2) to make clear that the retry service will need at least one too?", + "createdAt": "2020-12-16T21:50:15Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 40, + "body": "s/keyand/key and", + "createdAt": "2020-12-16T21:51:17Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 94, + "body": "If it's the expiration time, then each token generator can specify its own token expiration time; it it's the start time, than the token consumer is always in control of the expiration. The difference is not huge. Consumer decisions happen later, and therefore have (slightly) more information. This is related to your DISCUSS point at Line 871; if the Retry service isn't checking timestamps, than it seems easier to configure if only the servers need to worry about the proper expiration interval.\r\n\r\nI don't feel strongly either way.", + "createdAt": "2020-12-16T22:02:32Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 193, + "body": "Why wouldn't it? As there are multiple token generators in this model, the time thresholds are going to have be forgiving about clock skew anyway.", + "createdAt": "2020-12-16T22:05:56Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 176, + "body": "The Retry Service also needs a \"generator ID\". Arguably, it would make sense to have more than one (it presumably will generate tokens in much higher volume).", + "createdAt": "2020-12-16T22:07:45Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTU0MTg3NjM4", + "commit": { + "abbreviatedOid": "12b9c64" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-12-17T00:16:40Z", + "updatedAt": "2020-12-17T00:16:40Z", + "comments": [ + { + "originalPosition": 12, + "body": "We agreed over the phone not to have a \"controlled\" configuration, so we'll just consolidate these two fields into a 96-bit nonce.", + "createdAt": "2020-12-17T00:16:40Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTU0MTg4MTY1", + "commit": { + "abbreviatedOid": "12b9c64" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-12-17T00:17:56Z", + "updatedAt": "2020-12-17T00:17:57Z", + "comments": [ + { + "originalPosition": 94, + "body": "We talked and realized that as the NEW_TOKEN is also following this format, it is far better for the token to encode the expiration time so as not to force the Service to implement multiple policies and disambiguate the two types.", + "createdAt": "2020-12-17T00:17:57Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTU0MTg4MjU2", + "commit": { + "abbreviatedOid": "12b9c64" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-12-17T00:18:13Z", + "updatedAt": "2020-12-17T00:18:14Z", + "comments": [ + { + "originalPosition": 176, + "body": "Disregard, no server IDs anymore", + "createdAt": "2020-12-17T00:18:14Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTU0MTg4NDA0", + "commit": { + "abbreviatedOid": "12b9c64" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-12-17T00:18:36Z", + "updatedAt": "2020-12-17T00:18:36Z", + "comments": [ + { + "originalPosition": 193, + "body": "Result of call: yes, the service should look at the timestamp (with allowances for clock skew)", + "createdAt": "2020-12-17T00:18:36Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTU1MDgwOTY0", + "commit": { + "abbreviatedOid": "1547d4b" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "APPROVED", + "body": "Looks great! If my proposed nits seem reasonable to you, hit commit on each of them and then I'll merge this.", + "createdAt": "2020-12-17T23:57:35Z", + "updatedAt": "2020-12-18T00:32:49Z", + "comments": [ + { + "originalPosition": 32, + "body": "```suggestion\r\nAEAD key and AEAD IV are provisioned by the configuration agent. \r\n```", + "createdAt": "2020-12-18T00:02:09Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 33, + "body": "```suggestion\r\n```", + "createdAt": "2020-12-18T00:02:20Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 112, + "body": "```suggestion\r\nThe tokens are protected using AES128-GCM as follows:\r\n```", + "createdAt": "2020-12-18T00:16:03Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 117, + "body": "```suggestion\r\n```", + "createdAt": "2020-12-18T00:17:40Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 116, + "body": "```suggestion\r\n*\r\n```", + "createdAt": "2020-12-18T00:18:04Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 118, + "body": "```suggestion\r\n\r\n```", + "createdAt": "2020-12-18T00:19:04Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 12, + "body": "```suggestion\r\n- A 96 bit unique token number transmitted in clear text, but\r\n```", + "createdAt": "2020-12-18T00:19:21Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 27, + "body": "```suggestion\r\nThe 96 bit unique token number is set to a random value\r\n```", + "createdAt": "2020-12-18T00:19:40Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 120, + "body": "```suggestion\r\nwith zeros to the size of the IV. The exclusive OR of the padded unique token\r\n```", + "createdAt": "2020-12-18T00:20:39Z", + "updatedAt": "2020-12-18T16:37:14Z" + }, + { + "originalPosition": 148, + "body": "```suggestion\r\nof the AEAD is transmitted in place of the token body.\r\n```", + "createdAt": "2020-12-18T00:21:07Z", + "updatedAt": "2020-12-18T16:37:14Z" + } + ] + } + ] + }, + { + "number": 61, + "id": "MDExOlB1bGxSZXF1ZXN0NTIyOTExOTQw", + "title": "Add ECMP CID algorithm", + "url": "https://github.com/quicwg/load-balancers/pull/61", + "state": "MERGED", + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "I tried to make this a subset of the plaintext algorithm, but the differences were substantial enough(ie: there are no server IDs) that I created a new algorithm.", + "createdAt": "2020-11-18T04:57:47Z", + "updatedAt": "2021-01-07T18:39:05Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "5d17ce83c507dd6c7d2a12308fba6f129a7b7e0d", + "headRepository": "ianswett/load-balancers", + "headRefName": "patch-1", + "headRefOid": "253862be2093406f455ee2216aa268fb23b2cfe0", + "closedAt": "2021-01-07T18:39:05Z", + "mergedAt": "2021-01-07T18:39:05Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "2b85fff869682105a96b97ae539b119192bceb5c" + }, + "comments": [ + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "@ianswett I'm a bit confused on the difference here with the vanilla plaintext algorithm. Is the only difference that the LB routes initial packets specially? Does the existing plaintext algorithm preclude that behavior?", + "createdAt": "2020-11-18T07:35:53Z", + "updatedAt": "2020-11-18T07:35:53Z" + }, + { + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "body": "I don't think it's precluded, but I do think it's different enough it's worth documenting, but I realize the difference is subtle. @martinduke had the same thought, so I'll try to further clarify this PR.\r\n\r\nThis is a way to adapt existing stateful flow-tracking ECMP L4 load-balancers to QUIC with almost no server coordination. The plaintext requires substantially more coordination and requires leaving some areas of the connection ID space unusable in order to allow for adding servers. When each new flow comes in, the L4 load-balancer can decide where to send it, increasing the evenness of traffic.", + "createdAt": "2020-11-18T15:41:43Z", + "updatedAt": "2020-11-18T15:41:43Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Thanks for the PR. There are definite simplicity benefits to not having explicitly assigned server IDs; if we can work through the issues here, I'd just as soon use this framework to *replace* PCID.\r\n\r\nPresumably the LB is maintaining a table of its SID assignments, and the servers are maintaining lists of all SIDs they've observed.\r\n\r\nAlso, if a server goes down, it seems straightforward that the LB would delete its entry and those SIDs would be free to reallocation to other servers.\r\n\r\nWe would rewrite the non-compliant DCID section a bit, but that seems simple enough.\r\n\r\nSo here are some issues:\r\n- If the clients always initiate with a DCID that is shorter than the minimum, then there is no way for the server to obtain its first server ID. So there would appear to be a strict limit of 7 byte SIDs as v1 specifies a minimum CIDL of 8.\r\n- I think the SID space has to be pretty big because this approach will be profligate with SIDs. Most new connections will consume a new SID codepoint for the existing pool of servers. This is going to be a pretty memory-intensive table! You will probably needs hundreds of thousands (?) of times more entries than you would have for PCID.\r\n- Profligate assignment of SIDs will eventually crowd out the space to bring any new servers on unless other servers die and release their SIDs. Unless there's some kind of timeout mechanism? [1] [2]\r\n\r\n[1] This mechanism could be something like, \"If a server hasn't received a packet in X minutes for a certain SID, it MUST retire that CID with that SID on any connection still in use\" coupled with a load balancer timeout on its mapping after X minutes.\r\n[2] Alternatively, we could do something clever with config rotation where, when the table gets full, or there's a new server, the LB wakes up the config agent to give everyone new CR bits, and this is a cue to flush the SID table.", + "createdAt": "2020-12-12T01:18:47Z", + "updatedAt": "2020-12-12T01:18:47Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Filed #64 as a tracking issue.", + "createdAt": "2020-12-12T01:21:31Z", + "updatedAt": "2020-12-12T01:21:31Z" + }, + { + "author": "nibanks", + "authorAssociation": "MEMBER", + "body": "I'm still not convinced we should have a separate algorithm for this. Instead, I'd argue we should ensure the existing plaintext algorithm is generic enough to handle all related scenarios.", + "createdAt": "2020-12-22T17:05:45Z", + "updatedAt": "2020-12-22T17:05:45Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "@ianswett and discussed this proposal. Google's operational experience is that the memory needs are not onerous. We agreed that this algorithm should have a \"LB Idle timeout\" parameter after which SID allocations will be freed. Also, server IDs must be no more 7 octets in length (or else 8B client-generated CIDs will not successfully populate the server's table).\r\n\r\nThe advantages of this with respect to PCID is that there is much less configuration and that it conforms more closely to some existing load balancers. The disadvantage is that it requires much more per-connection state at the load balancer.\r\n\r\n", + "createdAt": "2020-12-22T19:19:25Z", + "updatedAt": "2020-12-22T19:19:25Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "I am coming around on this design. When this PR is revised, we will go to the list with three options:\r\n\r\n1) Have two unencrypted algorithms\r\n2) Embrace low-state, high-configuration and stick with existing PCID\r\n3) Pick the opposite and replace PCID with this design", + "createdAt": "2020-12-22T19:20:35Z", + "updatedAt": "2020-12-22T19:20:35Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "As @ianswett is inundated with IESG comments right now, I'm going to commit this PR, make some other edits along the lines of what we agreed, and then take the larger issue to the list.", + "createdAt": "2021-01-07T18:38:41Z", + "updatedAt": "2021-01-07T18:38:41Z" + } + ], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTMzMTEwNTk0", + "commit": { + "abbreviatedOid": "7f02a62" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-11-18T05:17:21Z", + "updatedAt": "2020-11-18T05:17:21Z", + "comments": [ + { + "originalPosition": 31, + "body": "```suggestion\r\nbeginning with the second octet. If these octets match an existing server ID,\r\n```", + "createdAt": "2020-11-18T05:17:21Z", + "updatedAt": "2020-12-12T00:18:36Z" + } + ] + } + ] + }, + { + "number": 63, + "id": "MDExOlB1bGxSZXF1ZXN0NTM3NTc4NjAy", + "title": "Paragraph on SNI routing", + "url": "https://github.com/quicwg/load-balancers/pull/63", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Closes #60.", + "createdAt": "2020-12-12T00:17:26Z", + "updatedAt": "2020-12-16T00:02:37Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "a564b0c3cca21a0dea6a41488924dfdc49ce3b3a", + "headRepository": "quicwg/load-balancers", + "headRefName": "sni-switching", + "headRefOid": "d4234f6bbf9903e0cf3d4a79570426e7767a6b18", + "closedAt": "2020-12-16T00:02:35Z", + "mergedAt": "2020-12-16T00:02:35Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "847a6803277cf53b0f13d98b815d939bffca800b" + }, + "comments": [], + "reviews": [] + }, + { + "number": 69, + "id": "MDExOlB1bGxSZXF1ZXN0NTQzNzk2Mzg1", + "title": "Rewrite abstract", + "url": "https://github.com/quicwg/load-balancers/pull/69", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Less emphasis on load balancers, more on the other stuff. More text on the use cases and less on \"how\".", + "createdAt": "2020-12-22T00:23:58Z", + "updatedAt": "2020-12-22T17:23:07Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "f45a900c9182a716d61ab2e540905444a13c6b7b", + "headRepository": "quicwg/load-balancers", + "headRefName": "new-abstract", + "headRefOid": "9a6748f5164f819c08e3e08503d9286c26166b19", + "closedAt": "2020-12-22T17:23:06Z", + "mergedAt": "2020-12-22T17:23:06Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "9c75632c7b24329254be88e602cc6b456338c7ed" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTU3MjI4NzQx", + "commit": { + "abbreviatedOid": "c298464" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "", + "createdAt": "2020-12-22T17:03:40Z", + "updatedAt": "2020-12-22T17:03:40Z", + "comments": [ + { + "originalPosition": 15, + "body": "It's not necessarily just \"agreeing to certain conventions\" but also requires shared state sometime. I think that might be important to spell out, because it means there must some type of communication or shared configuration between the servers and infrastructure. I'm not quite sure how best to put that here though.", + "createdAt": "2020-12-22T17:03:40Z", + "updatedAt": "2020-12-22T17:22:20Z" + } + ] + } + ] + }, + { + "number": 70, + "id": "MDExOlB1bGxSZXF1ZXN0NTQzODAyNzcy", + "title": "Crypto Agility", + "url": "https://github.com/quicwg/load-balancers/pull/70", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Addresses #65", + "createdAt": "2020-12-22T00:46:22Z", + "updatedAt": "2020-12-23T02:44:40Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "f45a900c9182a716d61ab2e540905444a13c6b7b", + "headRepository": "quicwg/load-balancers", + "headRefName": "crypto-agile", + "headRefOid": "a0d48f95d40d58ed59188c6151eddfe1d0ea4795", + "closedAt": "2020-12-23T02:44:39Z", + "mergedAt": "2020-12-23T02:44:39Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "f1243d061fc5aaaeb763ea9e1d38a502c6cc6411" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTU3NDQzMDE1", + "commit": { + "abbreviatedOid": "0f00ed3" + }, + "author": "martinthomson", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "LGTM. A suggestion, but I'm OK either way.", + "createdAt": "2020-12-23T00:36:23Z", + "updatedAt": "2020-12-23T00:36:36Z", + "comments": [ + { + "originalPosition": 6, + "body": "```suggestion\r\nEncryption in the algorithms below uses the AES-128-ECB cipher. Future standards\r\ncould add new algorithms that use other ciphers to provide cryptographic agility in\r\naccordance with {{?RFC7696}}. QUIC-LB implementations SHOULD be\r\n```\r\nNo need to mention deprecation; the important factor here is that you have a path to introducing new algorithms.", + "createdAt": "2020-12-23T00:36:23Z", + "updatedAt": "2020-12-23T02:43:28Z" + } + ] + } + ] + }, + { + "number": 71, + "id": "MDExOlB1bGxSZXF1ZXN0NTQzODA3ODIx", + "title": "Clean up Retry Service Text", + "url": "https://github.com/quicwg/load-balancers/pull/71", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fix #67 and #68", + "createdAt": "2020-12-22T01:07:24Z", + "updatedAt": "2021-01-08T19:15:55Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "f45a900c9182a716d61ab2e540905444a13c6b7b", + "headRepository": "quicwg/load-balancers", + "headRefName": "retry-cleanup", + "headRefOid": "30830a71f1cc5932027c662adcf46b7205c55cfa", + "closedAt": "2021-01-07T17:41:22Z", + "mergedAt": "2021-01-07T17:41:22Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "e356119aaeb61a79be9f592e450364328e69410e" + }, + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Thanks Christian,\n\nYour comments ended up as an editorial rewrite of the section, with port\nverification added.\n\nOn Thu, Jan 7, 2021 at 6:05 PM Christian Huitema \nwrote:\n\n> *@huitema* commented on this pull request.\n>\n> Most changes appear editorial, except for the addition of the port number\n> field. If you add that port, you need to also specify how it should be\n> processed!\n> ------------------------------\n>\n> In draft-ietf-quic-load-balancers.md\n> :\n>\n> > @@ -603,7 +603,7 @@ Retry tokens generated by the service MUST have the format below.\n> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n> |0| ODCIL (7) | RSCIL (8) |\n> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n> -| Original Destination Connection ID (0..160) |\n> +| Original Destination Connection ID (64..160) |\n> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n>\n> Yes, that's correct. AT least for QUIC V1.\n> ------------------------------\n>\n> In draft-ietf-quic-load-balancers.md\n> :\n>\n> > @@ -621,7 +621,8 @@ has the following additional fields:\n>\n> ODCIL: The length of the original destination connection ID from the triggering\n> Initial packet. This is in cleartext to be readable for the server, but\n> -authenticated later in the token.\n> +authenticated later in the token. The Retry Service SHOULD reject any token\n> +in which the value is less than 8.\n>\n>\n> .. at least as long as we are doing QUIC V1. This is not strictly speaking\n> part of the QUIC invariants. But OK, fine.\n> ------------------------------\n>\n> In draft-ietf-quic-load-balancers.md\n> :\n>\n> > @@ -741,6 +746,10 @@ MUST set this field to zero.\n> RSCIL: The retry source connection ID length. Tokens in NEW_TOKEN frames MUST\n> set this field to zero.\n>\n> +Port: The Source Port of the UDP datagram that triggered the Retry packet.\n> +This field MUST be present if and only if the ODCIL is greater than zero. This\n> +field is therefore always absent in tokens in NEW_TOKEN frames.\n> +\n>\n> I think you need to specify how that field is processed. What is the\n> expectation? Shall the server verify that the port matches? Is that\n> something that the LB should do?\n> ------------------------------\n>\n> In draft-ietf-quic-load-balancers.md\n> :\n>\n> > @@ -752,14 +761,15 @@ the expiration time of the token as a number of seconds in POSIX time (see Sec.\n> 4.16 of {{TIME_T}}).\n>\n> Opaque Data: The server may use this field to encode additional information,\n> -such as congestion window, RTT, or MTU. Opaque data MAY also allow servers to\n> -distinguish between retry tokens (which trigger use of certain transport\n> -parameters) and NEW_TOKEN frame tokens.\n> +such as congestion window, RTT, or MTU. The Retry Service MUST have zero-length\n> +opaque data.\n>\n>\n> OK.\n> ------------------------------\n>\n> In draft-ietf-quic-load-balancers.md\n> :\n>\n> > @@ -778,7 +788,13 @@ On the wire, the token is presented as:\n> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n> | AEAD Encrypted Token (variable) |\n> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n> -| AEAD Checksum (variable, function of encryption algorithm) | |\n> +| |\n> ++ +\n> +| |\n> ++ AEAD Checksum (128) +\n> +| |\n> ++ +\n> +| |\n> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n> ~~~\n>\n>\n> OK.\n> ------------------------------\n>\n> In draft-ietf-quic-load-balancers.md\n> :\n>\n> > @@ -852,9 +873,8 @@ the server can issue an up-to-date token to the client.\n>\n> When issuing Retry or NEW_TOKEN tokens, the server MUST include the client IP\n> address in the authenticated data as specified in\n> -{{token-protection-with-aead}}. It MUST include a means of distinguishing\n> -service-generated Retry tokens, server-generated Retry tokens (if different),\n> -and NEW_TOKEN tokens.\n> +{{token-protection-with-aead}}. The ODCIL and RSCIL fields are zero for\n> +NEW_TOKEN tokens, making them easily distinguishable from Retry tokens.\n>\n>\n> The text about port verification should probably be added there, or in the\n> next paragraphs.\n>\n> \u2014\n> You are receiving this because you modified the open/close state.\n> Reply to this email directly, view it on GitHub\n> ,\n> or unsubscribe\n> \n> .\n>\n", + "createdAt": "2021-01-08T19:15:54Z", + "updatedAt": "2021-01-08T19:15:54Z" + } + ], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTU3MjI1MzA1", + "commit": { + "abbreviatedOid": "71923d2" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2020-12-22T16:58:11Z", + "updatedAt": "2020-12-22T16:58:11Z", + "comments": [] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTYzOTQ5Mjcy", + "commit": { + "abbreviatedOid": "30830a7" + }, + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "Most changes appear editorial, except for the addition of the port number field. If you add that port, you need to also specify how it should be processed!", + "createdAt": "2021-01-08T01:43:03Z", + "updatedAt": "2021-01-08T02:04:59Z", + "comments": [ + { + "originalPosition": 6, + "body": "Yes, that's correct. AT least for QUIC V1.", + "createdAt": "2021-01-08T01:43:03Z", + "updatedAt": "2021-01-08T02:04:59Z" + }, + { + "originalPosition": 16, + "body": ".. at least as long as we are doing QUIC V1. This is not strictly speaking part of the QUIC invariants. But OK, fine.", + "createdAt": "2021-01-08T01:44:31Z", + "updatedAt": "2021-01-08T02:04:59Z" + }, + { + "originalPosition": 63, + "body": "I think you need to specify how that field is processed. What is the expectation? Shall the server verify that the port matches? Is that something that the LB should do?\r\n\r\n\r\n", + "createdAt": "2021-01-08T01:50:35Z", + "updatedAt": "2021-01-08T02:04:59Z" + }, + { + "originalPosition": 76, + "body": "OK.", + "createdAt": "2021-01-08T01:51:58Z", + "updatedAt": "2021-01-08T02:04:59Z" + }, + { + "originalPosition": 101, + "body": "OK.", + "createdAt": "2021-01-08T01:53:33Z", + "updatedAt": "2021-01-08T02:04:59Z" + }, + { + "originalPosition": 123, + "body": "The text about port verification should probably be added there, or in the next paragraphs. ", + "createdAt": "2021-01-08T02:03:53Z", + "updatedAt": "2021-01-08T02:05:00Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTY0NDcyOTM5", + "commit": { + "abbreviatedOid": "30830a7" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-01-08T18:07:10Z", + "updatedAt": "2021-01-08T18:07:11Z", + "comments": [ + { + "originalPosition": 16, + "body": "Retry services are version-specific, so this is OK.", + "createdAt": "2021-01-08T18:07:11Z", + "updatedAt": "2021-01-08T18:07:11Z" + } + ] + } + ] + }, + { + "number": 75, + "id": "MDExOlB1bGxSZXF1ZXN0NTUxMjA0MTQy", + "title": "Sync Retry-cleanup with master", + "url": "https://github.com/quicwg/load-balancers/pull/75", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "", + "createdAt": "2021-01-07T17:39:58Z", + "updatedAt": "2021-01-07T17:41:23Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "30830a71f1cc5932027c662adcf46b7205c55cfa", + "headRepository": "quicwg/load-balancers", + "headRefName": "master", + "headRefOid": "e356119aaeb61a79be9f592e450364328e69410e", + "closedAt": "2021-01-07T17:41:23Z", + "mergedAt": "2021-01-07T17:41:23Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "e356119aaeb61a79be9f592e450364328e69410e" + }, + "comments": [], + "reviews": [] + }, + { + "number": 76, + "id": "MDExOlB1bGxSZXF1ZXN0NTUxMjIzOTQw", + "title": "Use quic-transport notation", + "url": "https://github.com/quicwg/load-balancers/pull/76", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Resolves #73", + "createdAt": "2021-01-07T18:20:26Z", + "updatedAt": "2021-01-07T18:32:55Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "e356119aaeb61a79be9f592e450364328e69410e", + "headRepository": "quicwg/load-balancers", + "headRefName": "quic-notation", + "headRefOid": "6b9aad406902478dd2146bbae7d1e5af8b3f0112", + "closedAt": "2021-01-07T18:32:54Z", + "mergedAt": "2021-01-07T18:32:54Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "86649a626f257642a4d837780e6379c0b3d097c6" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTYzNzIyOTg0", + "commit": { + "abbreviatedOid": "6b9aad4" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "APPROVED", + "body": "", + "createdAt": "2021-01-07T18:28:56Z", + "updatedAt": "2021-01-07T18:28:56Z", + "comments": [] + } + ] + }, + { + "number": 77, + "id": "MDExOlB1bGxSZXF1ZXN0NTUxMzg4NDE2", + "title": "Cleanup of ECMP/Low-config design", + "url": "https://github.com/quicwg/load-balancers/pull/77", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "follow-on to #61, also fixing #64", + "createdAt": "2021-01-07T23:27:57Z", + "updatedAt": "2021-01-11T21:37:13Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "d985a9f171ec244f1c9290315e4ee5bf8c3b922d", + "headRepository": "quicwg/load-balancers", + "headRefName": "ecmp-edits", + "headRefOid": "1e3a1d94bd921003bd7b7b5ac7964169018f8a9f", + "closedAt": "2021-01-11T21:37:12Z", + "mergedAt": "2021-01-11T21:37:11Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "59321280e476bba2ffdb785256fc2f13995de069" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTY1NjM2NDY0", + "commit": { + "abbreviatedOid": "bcc4464" + }, + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "Thanks for adding all this extra detail, I think this will make it a lot clearer to readers.", + "createdAt": "2021-01-11T18:40:24Z", + "updatedAt": "2021-01-11T20:42:22Z", + "comments": [ + { + "originalPosition": 6, + "body": "Q: Does it have to be in octets? It seems like it could be in bits if one wanted?", + "createdAt": "2021-01-11T18:40:24Z", + "updatedAt": "2021-01-11T21:34:10Z" + }, + { + "originalPosition": 53, + "body": "```suggestion\r\nhave at least enough entropy to have a different code point for each server. It MUST be\r\n```", + "createdAt": "2021-01-11T18:43:00Z", + "updatedAt": "2021-01-11T21:34:10Z" + }, + { + "originalPosition": 68, + "body": "```suggestion\r\nexisting server ID, the packets are routed to the matching server ID. As there are no\r\n```", + "createdAt": "2021-01-11T18:52:18Z", + "updatedAt": "2021-01-11T21:34:10Z" + }, + { + "originalPosition": 82, + "body": "Editorial comment: I find the word non-compliant a bit odd in this context. No need to change it now, but I feel like there might be a slightly better name.", + "createdAt": "2021-01-11T18:54:38Z", + "updatedAt": "2021-01-11T21:34:10Z" + }, + { + "originalPosition": 97, + "body": "I'm a bit confused about how multiple configurations are intended to be used. Is this just the concept that you can rotate configs and you want to pick the newest config when adding a new server ID?", + "createdAt": "2021-01-11T20:32:08Z", + "updatedAt": "2021-01-11T21:34:10Z" + }, + { + "originalPosition": 94, + "body": "It might be worth summarizing what the following steps are intended to do. I think they're intending to use the existing bytes in the DCID as the Server ID with the most recent config?", + "createdAt": "2021-01-11T20:37:17Z", + "updatedAt": "2021-01-11T21:34:10Z" + }, + { + "originalPosition": 141, + "body": "```suggestion\r\nA server SHOULD have a mechanism to stop using some server IDs if the list\r\n```", + "createdAt": "2021-01-11T20:40:11Z", + "updatedAt": "2021-01-11T21:34:10Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTY1NzQ4NDQz", + "commit": { + "abbreviatedOid": "51640df" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-01-11T21:22:00Z", + "updatedAt": "2021-01-11T21:22:00Z", + "comments": [ + { + "originalPosition": 6, + "body": "I suppose that applies to all the algorithms, but... yech.", + "createdAt": "2021-01-11T21:22:00Z", + "updatedAt": "2021-01-11T21:34:10Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTY1NzQ4ODc0", + "commit": { + "abbreviatedOid": "51640df" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-01-11T21:22:40Z", + "updatedAt": "2021-01-11T21:22:41Z", + "comments": [ + { + "originalPosition": 82, + "body": "This is defined at the top of the algorithms section, and is critical to the spec. I'm happy to pick another name.", + "createdAt": "2021-01-11T21:22:41Z", + "updatedAt": "2021-01-11T21:34:10Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTY1NzUxMDk3", + "commit": { + "abbreviatedOid": "51640df" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-01-11T21:26:00Z", + "updatedAt": "2021-01-11T21:26:00Z", + "comments": [ + { + "originalPosition": 97, + "body": "QUIC-LB can maintain up to three simultaneous configurations. If a CID arrives with the codepoint for one of them, it routes using it. If it arrives with '11', it's 4-tuple routed.\r\n\r\nClient generated-CIDs will generally be non-compliant and be routed arbitrarily, and then that CID will be replaced. With this algorithm, however, we need to extract a server ID even though the config rotation bits might not match a known config.\r\n\r\nIf the CID has unknown config rotation bits and there is one low-config CID configuration, this is easy. However, if there are two, we have to know how long of an SID to extract and which table to put it in. The heuristic here isn't perfect, but it will at least be consistent.", + "createdAt": "2021-01-11T21:26:00Z", + "updatedAt": "2021-01-11T21:34:10Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTY1NzUxNzUy", + "commit": { + "abbreviatedOid": "51640df" + }, + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-01-11T21:26:58Z", + "updatedAt": "2021-01-11T21:26:58Z", + "comments": [ + { + "originalPosition": 6, + "body": "File an issue and keep it as is for now?", + "createdAt": "2021-01-11T21:26:58Z", + "updatedAt": "2021-01-11T21:34:10Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTY1NzUyMDg0", + "commit": { + "abbreviatedOid": "51640df" + }, + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-01-11T21:27:29Z", + "updatedAt": "2021-01-11T21:27:30Z", + "comments": [ + { + "originalPosition": 82, + "body": "Yeah, it's a bit of a bikeshed, I'll tell you if I think of something better.", + "createdAt": "2021-01-11T21:27:30Z", + "updatedAt": "2021-01-11T21:34:10Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTY1NzU1MzU5", + "commit": { + "abbreviatedOid": "51640df" + }, + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-01-11T21:32:35Z", + "updatedAt": "2021-01-11T21:32:35Z", + "comments": [ + { + "originalPosition": 97, + "body": "Thanks, this makes sense. A summary of what the algorithm is attempting to do would still be useful.", + "createdAt": "2021-01-11T21:32:35Z", + "updatedAt": "2021-01-11T21:34:10Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTY1NzU3MzY5", + "commit": { + "abbreviatedOid": "1e3a1d9" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-01-11T21:34:32Z", + "updatedAt": "2021-01-11T21:34:32Z", + "comments": [ + { + "originalPosition": 94, + "body": "fixed", + "createdAt": "2021-01-11T21:34:32Z", + "updatedAt": "2021-01-11T21:34:32Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTY1NzU4OTY2", + "commit": { + "abbreviatedOid": "1e3a1d9" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-01-11T21:37:03Z", + "updatedAt": "2021-01-11T21:37:03Z", + "comments": [ + { + "originalPosition": 6, + "body": "Filed #80 ", + "createdAt": "2021-01-11T21:37:03Z", + "updatedAt": "2021-01-11T21:37:03Z" + } + ] + } + ] + }, + { + "number": 78, + "id": "MDExOlB1bGxSZXF1ZXN0NTUxNTI3ODU4", + "title": "Add security considerations for retry token encryption", + "url": "https://github.com/quicwg/load-balancers/pull/78", + "state": "MERGED", + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Close #71", + "createdAt": "2021-01-08T06:05:37Z", + "updatedAt": "2021-01-11T15:10:52Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "d985a9f171ec244f1c9290315e4ee5bf8c3b922d", + "headRepository": "huitema/load-balancers", + "headRefName": "retry-sec-issues", + "headRefOid": "43784c587755777f50564aa03d89e9a285aa0800", + "closedAt": "2021-01-11T15:10:52Z", + "mergedAt": "2021-01-11T15:10:52Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "88aa81ced7b6d953796fbee9c2460c019e9db567" + }, + "comments": [ + { + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "body": "@martinduke please take a look.", + "createdAt": "2021-01-08T06:06:19Z", + "updatedAt": "2021-01-08T06:06:19Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Thanks Christian, this looks great.", + "createdAt": "2021-01-11T15:10:47Z", + "updatedAt": "2021-01-11T15:10:47Z" + } + ], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NTY1NDQzNTM0", + "commit": { + "abbreviatedOid": "4b012d3" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-01-11T15:10:22Z", + "updatedAt": "2021-01-11T15:10:23Z", + "comments": [ + { + "originalPosition": 64, + "body": "```suggestion\r\nIt is prudent to adopt the same limit here, and configure the service in such a way that\r\n```", + "createdAt": "2021-01-11T15:10:23Z", + "updatedAt": "2021-01-11T15:10:28Z" + } + ] + } + ] + }, + { + "number": 79, + "id": "MDExOlB1bGxSZXF1ZXN0NTUxOTEyNTA0", + "title": "Address Christian's late review", + "url": "https://github.com/quicwg/load-balancers/pull/79", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Ended up rewriting the Retry Requirements for shared-state while adding the bit about port verification.\r\n\r\nInspired by the review here: https://github.com/quicwg/load-balancers/pull/71", + "createdAt": "2021-01-08T19:14:40Z", + "updatedAt": "2021-01-11T15:07:41Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "d985a9f171ec244f1c9290315e4ee5bf8c3b922d", + "headRepository": "quicwg/load-balancers", + "headRefName": "huitema-comments", + "headRefOid": "ed99d9e2080bb4ec2fac8ea7a3aaaa5425c9f4af", + "closedAt": "2021-01-11T15:07:40Z", + "mergedAt": "2021-01-11T15:07:40Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "b0f0e66bc0814281a3d9fe654de2b7d18c9482ec" + }, + "comments": [], + "reviews": [] + }, + { + "number": 83, + "id": "MDExOlB1bGxSZXF1ZXN0NTUzNzY1NTgx", + "title": "Added version allow-lists and deny-lists to Retry services", + "url": "https://github.com/quicwg/load-balancers/pull/83", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fixes #82. Hopefully this will close the gap between what we want Retry Services to do and reality.", + "createdAt": "2021-01-12T21:15:19Z", + "updatedAt": "2021-01-25T17:21:43Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "59321280e476bba2ffdb785256fc2f13995de069", + "headRepository": "quicwg/load-balancers", + "headRefName": "allow-deny-list", + "headRefOid": "8fa98ee3f8d1378ef77cefe260c3b51c7d5931e1", + "closedAt": "2021-01-25T17:21:42Z", + "mergedAt": "2021-01-25T17:21:42Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "173222c345575842cc6b7061022d13c72d7410fb" + }, + "comments": [], + "reviews": [] + }, + { + "number": 86, + "id": "MDExOlB1bGxSZXF1ZXN0NTYxMzEyNTMy", + "title": "Clean up server-use bytes", + "url": "https://github.com/quicwg/load-balancers/pull/86", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fixes #85", + "createdAt": "2021-01-25T19:26:47Z", + "updatedAt": "2021-02-02T23:23:08Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "ad518a51acfc20e39f1d93ad1e3e33362fc73337", + "headRepository": "quicwg/load-balancers", + "headRefName": "more-server-use", + "headRefOid": "c3f0269a09bd72fc986e9e9fa90083d8d29670f6", + "closedAt": "2021-02-02T23:23:07Z", + "mergedAt": "2021-02-02T23:23:07Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "50f9c367fea204de941f4f12f1af965b86382868" + }, + "comments": [], + "reviews": [] + }, + { + "number": 87, + "id": "MDExOlB1bGxSZXF1ZXN0NTYzNjQ1OTkx", + "title": "Update branch from master", + "url": "https://github.com/quicwg/load-balancers/pull/87", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "", + "createdAt": "2021-01-29T00:04:36Z", + "updatedAt": "2021-01-29T00:04:47Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "all-lowconfig", + "baseRefOid": "11c934ac8400b97af014bbe3ce43ee900cf99ba9", + "headRepository": "quicwg/load-balancers", + "headRefName": "master", + "headRefOid": "ad518a51acfc20e39f1d93ad1e3e33362fc73337", + "closedAt": "2021-01-29T00:04:47Z", + "mergedAt": "2021-01-29T00:04:47Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "433f0d5e41f2ee0dc8a27cdd933df60d08b8139c" + }, + "comments": [], + "reviews": [] + }, + { + "number": 89, + "id": "MDExOlB1bGxSZXF1ZXN0NTY0MzI0MzQ2", + "title": "Generalize SID Allocation", + "url": "https://github.com/quicwg/load-balancers/pull/89", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fixes the broken bits in #84 and also extends to encrypted algorithms (fixing #88)", + "createdAt": "2021-01-30T00:31:49Z", + "updatedAt": "2021-02-05T01:43:41Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "ad518a51acfc20e39f1d93ad1e3e33362fc73337", + "headRepository": "quicwg/load-balancers", + "headRefName": "all-lowconfig", + "headRefOid": "607ab4fcec881ada10b59a00b414517c19e7d21c", + "closedAt": "2021-02-02T23:35:01Z", + "mergedAt": "2021-02-02T23:35:01Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "d9e263347ec15cb0f1c3db0d8769df846d835508" + }, + "comments": [], + "reviews": [] + }, + { + "number": 90, + "id": "MDExOlB1bGxSZXF1ZXN0NTY0MzQ2MTE1", + "title": "YANG Model", + "url": "https://github.com/quicwg/load-balancers/pull/90", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "", + "createdAt": "2021-01-30T02:44:59Z", + "updatedAt": "2021-02-04T20:36:06Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "d9e263347ec15cb0f1c3db0d8769df846d835508", + "headRepository": "quicwg/load-balancers", + "headRefName": "yang", + "headRefOid": "75fea235fde4e8652399786642e0ab0a3f9279d7", + "closedAt": "2021-02-04T20:36:05Z", + "mergedAt": "2021-02-04T20:36:05Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "12c09553f63998dbbe50d86d00166248afca8994" + }, + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "fixes #91 ", + "createdAt": "2021-02-02T18:37:02Z", + "updatedAt": "2021-02-02T18:37:02Z" + } + ], + "reviews": [] + }, + { + "number": 92, + "id": "MDExOlB1bGxSZXF1ZXN0NTY2NDA1NDQ3", + "title": "Sync all-lowconfig with master", + "url": "https://github.com/quicwg/load-balancers/pull/92", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "", + "createdAt": "2021-02-02T23:29:33Z", + "updatedAt": "2021-02-02T23:35:02Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "607ab4fcec881ada10b59a00b414517c19e7d21c", + "headRepository": "quicwg/load-balancers", + "headRefName": "master", + "headRefOid": "d9e263347ec15cb0f1c3db0d8769df846d835508", + "closedAt": "2021-02-02T23:35:02Z", + "mergedAt": "2021-02-02T23:35:02Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "d9e263347ec15cb0f1c3db0d8769df846d835508" + }, + "comments": [], + "reviews": [] + }, + { + "number": 93, + "id": "MDExOlB1bGxSZXF1ZXN0NTY2NDA4MTM3", + "title": "sync yang with master", + "url": "https://github.com/quicwg/load-balancers/pull/93", + "state": "CLOSED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "", + "createdAt": "2021-02-02T23:36:48Z", + "updatedAt": "2021-02-02T23:38:50Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "yang", + "baseRefOid": "7253e9fa54523612113991b2a712c4250576bcf3", + "headRepository": "quicwg/load-balancers", + "headRefName": "master", + "headRefOid": "d9e263347ec15cb0f1c3db0d8769df846d835508", + "closedAt": "2021-02-02T23:38:50Z", + "mergedAt": null, + "mergedBy": null, + "mergeCommit": null, + "comments": [], + "reviews": [] + }, + { + "number": 94, + "id": "MDExOlB1bGxSZXF1ZXN0NTY3OTA4MDkz", + "title": "shortened references", + "url": "https://github.com/quicwg/load-balancers/pull/94", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [ + "editorial" + ], + "body": "", + "createdAt": "2021-02-04T20:51:15Z", + "updatedAt": "2021-02-04T20:51:34Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "a15185369fc2fbc051f77cad82f729c0fa8abfec", + "headRepository": "quicwg/load-balancers", + "headRefName": "shorter-refs", + "headRefOid": "e38fbd0fd1adc6fafdb5476ec7b9e9f85438ff54", + "closedAt": "2021-02-04T20:51:33Z", + "mergedAt": "2021-02-04T20:51:33Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "d70769ddf6721140d68bde4b49c121e09646e909" + }, + "comments": [], + "reviews": [] + }, + { + "number": 95, + "id": "MDExOlB1bGxSZXF1ZXN0NTY4MDM4NTYz", + "title": "Ian's Editorial Nits", + "url": "https://github.com/quicwg/load-balancers/pull/95", + "state": "MERGED", + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Here are some suggestions from my first pass, but overall I think the static vs dynamic server ID allocation idea works nicely.\r\n\r\n2 Q's:\r\n- Is the definition of non-compliant different at LB and server in some cases?\r\n- Might non-routable be a better term than non-compliant?", + "createdAt": "2021-02-05T02:19:53Z", + "updatedAt": "2021-03-05T17:06:09Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "c9898856f1ae54b27bca79a0852e03d5e2b018fd", + "headRepository": "ianswett/load-balancers", + "headRefName": "patch-2", + "headRefOid": "3148cbdf457a7e732fb354bfc0a5db036363f5b8", + "closedAt": "2021-03-05T17:01:24Z", + "mergedAt": "2021-03-05T17:01:24Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "710f916f4a6f41071e0ca64665a6a3975bd0e3d4" + }, + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "> Here are some suggestions from my first pass, but overall I think the static vs dynamic server ID allocation idea works nicely.\r\n> \r\n\r\nThanks, I merged your suggestions.\r\n\r\n> 2 Q's:\r\n> \r\n> * Is the definition of non-compliant different at LB and server in some cases?\r\n\r\nYes, they can be different because the perception of the configuration is different. In general, during configuration updates the LB will have a configs that some servers don't. Therefore, a DCID with those CR bits will be compliant at the LB and non-compliant at the server.\r\n\r\nWith static allocation, servers don't do anything with non-compliant DCIDs, so this is irrelevant. With dynamic allocation, it means that the LB will allocate an SID that the server doesn't know anything about, until:\r\n1) the allocation times out\r\n2) the LB has the occasion to forward another packet with that SID to the server when the server has the configuration.\r\n\r\n> \r\n> * Might non-routable be a better term than non-compliant?\r\n\r\nI don't feel strongly about this, but it works for me. If you want to file a PR with this change I'd approve it.\r\n", + "createdAt": "2021-03-05T17:06:09Z", + "updatedAt": "2021-03-05T17:06:09Z" + } + ], + "reviews": [] + }, + { + "number": 97, + "id": "MDExOlB1bGxSZXF1ZXN0NTg1ODM4NTIz", + "title": "Clarify Retry Service handling of non-Initial Packets", + "url": "https://github.com/quicwg/load-balancers/pull/97", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fixes #96", + "createdAt": "2021-03-05T19:52:37Z", + "updatedAt": "2021-03-18T19:19:36Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "710f916f4a6f41071e0ca64665a6a3975bd0e3d4", + "headRepository": "quicwg/load-balancers", + "headRefName": "retry-non-initial", + "headRefOid": "f89e6bdc7b578a3e683925ed64eef7fbd106e504", + "closedAt": "2021-03-12T22:32:28Z", + "mergedAt": "2021-03-12T22:32:28Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "b425b1c36600166dc83fed5d72114b79f4dafd8a" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjA1NTc0MTYw", + "commit": { + "abbreviatedOid": "6b0b864" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-03-05T20:26:43Z", + "updatedAt": "2021-03-05T20:26:43Z", + "comments": [ + { + "originalPosition": 22, + "body": "Do you mean a non-Initial & non-1-RTT packet here? You respond to an unknown 1-RTT packet with a stateless reset.", + "createdAt": "2021-03-05T20:26:43Z", + "updatedAt": "2021-03-05T20:57:49Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjA1NTc1NDgy", + "commit": { + "abbreviatedOid": "6b0b864" + }, + "author": "nibanks", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-03-05T20:28:49Z", + "updatedAt": "2021-03-05T20:28:49Z", + "comments": [ + { + "originalPosition": 29, + "body": "\"valid and invalid packets\" here refers to \"valid and invalid non-Initial packets\" right? Probably worth clarifying.", + "createdAt": "2021-03-05T20:28:49Z", + "updatedAt": "2021-03-05T20:57:49Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjA1NTkyMjI2", + "commit": { + "abbreviatedOid": "6b0b864" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-03-05T20:56:32Z", + "updatedAt": "2021-03-05T20:56:33Z", + "comments": [ + { + "originalPosition": 22, + "body": "Oh, good point.", + "createdAt": "2021-03-05T20:56:33Z", + "updatedAt": "2021-03-05T20:57:49Z" + } + ] + } + ] + }, + { + "number": 100, + "id": "MDExOlB1bGxSZXF1ZXN0NTkxNjcyNzc4", + "title": "Changing wording about server/service synchronization", + "url": "https://github.com/quicwg/load-balancers/pull/100", + "state": "MERGED", + "author": "fiestajetsam", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "This is in response to a post @wbl made on [the mailing list](https://mailarchive.ietf.org/arch/msg/quic/xcP0cwxpu1GcUnl4_XSBN70hF8E/).", + "createdAt": "2021-03-12T13:18:04Z", + "updatedAt": "2021-03-18T15:12:35Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "710f916f4a6f41071e0ca64665a6a3975bd0e3d4", + "headRepository": "fiestajetsam/load-balancers", + "headRefName": "time", + "headRefOid": "6829983553597e6868e0ae4011928134224843b8", + "closedAt": "2021-03-18T15:12:35Z", + "mergedAt": "2021-03-18T15:12:34Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "ef833f7843d1ab48963bcb4572e74f3a49a5fe9c" + }, + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Thanks for the PR!\r\n\r\nSo as an interoperability standard, if the retry service encodes \"4000\", what does the server do with that? Do we need to add a config parameter for the time_t that serves as time 0?", + "createdAt": "2021-03-12T22:27:37Z", + "updatedAt": "2021-03-12T22:27:37Z" + }, + { + "author": "wbl", + "authorAssociation": "NONE", + "body": "Timestamps should be absolute, not relative, in which case I'm not sure you need a 0. There's nothing special about midnight 1 January 1970.", + "createdAt": "2021-03-13T19:19:58Z", + "updatedAt": "2021-03-13T19:19:58Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Ah, so you're just suggesting declaring a later date to begin the epoch? Makes sense ", + "createdAt": "2021-03-13T20:22:33Z", + "updatedAt": "2021-03-13T20:22:33Z" + }, + { + "author": "wbl", + "authorAssociation": "NONE", + "body": "Why do we need to have a sential time? If it's a precision vs. range issue then shifting the epoch makes sense.", + "createdAt": "2021-03-13T20:34:09Z", + "updatedAt": "2021-03-13T20:34:09Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Sorry, I don't know what \"sential time\" is. What are you proposing?", + "createdAt": "2021-03-15T17:24:53Z", + "updatedAt": "2021-03-15T17:24:53Z" + }, + { + "author": "wbl", + "authorAssociation": "NONE", + "body": "What I'm proposing is that we not treat any times differently. It's not clear to me why 4000 needed special treatment.", + "createdAt": "2021-03-16T02:32:50Z", + "updatedAt": "2021-03-16T03:16:39Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "4000 is just an example. The intent of using the epoch was to have common agreement on when tokens expire without any QUIC-LB-specific coordination.\r\n\r\nThe current draft uses 1970 as a timebase, which absolutely makes integers longer than it needs to be. IIUC the PR doesn't have any baseline so it's unclear how the server and retry service are supposed to interpret each other's expiration times.\r\n\r\nAs we're probably speaking past each other: what, precisely, does the integer in this field indicate?\r\n", + "createdAt": "2021-03-16T18:45:22Z", + "updatedAt": "2021-03-16T18:45:22Z" + }, + { + "author": "wbl", + "authorAssociation": "NONE", + "body": "It's the end of the validity period for the token in some convenient timebase.", + "createdAt": "2021-03-17T01:35:21Z", + "updatedAt": "2021-03-17T01:35:21Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Alright, we agree on that. So this PR is being a little less precise on synchronization, which is fine, but isn't addressing the fact that we're counting from 1970. Fair enough.", + "createdAt": "2021-03-17T14:40:42Z", + "updatedAt": "2021-03-17T14:40:42Z" + } + ], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjE0Mzg4NDMy", + "commit": { + "abbreviatedOid": "644a796" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-03-17T14:38:53Z", + "updatedAt": "2021-03-17T14:38:54Z", + "comments": [ + { + "originalPosition": 6, + "body": "```suggestion\r\nBoth server and service must have time synchronized with respect to one another to prevent tokens\r\n```", + "createdAt": "2021-03-17T14:38:53Z", + "updatedAt": "2021-03-18T12:47:45Z" + } + ] + } + ] + }, + { + "number": 104, + "id": "MDExOlB1bGxSZXF1ZXN0NTk2MDQwNDAw", + "title": "Smaller tables", + "url": "https://github.com/quicwg/load-balancers/pull/104", + "state": "OPEN", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fixes #101. This tweak, IMO, substantially improves dynamic allocation.", + "createdAt": "2021-03-18T23:46:20Z", + "updatedAt": "2021-03-18T23:46:24Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "ef833f7843d1ab48963bcb4572e74f3a49a5fe9c", + "headRepository": "quicwg/load-balancers", + "headRefName": "smaller-tables", + "headRefOid": "6cf5924689f88c516abe16db28ceb63494ea8d05", + "closedAt": null, + "mergedAt": null, + "mergedBy": null, + "mergeCommit": null, + "comments": [], + "reviews": [] + }, + { + "number": 106, + "id": "MDExOlB1bGxSZXF1ZXN0NTk5ODk2MDc3", + "title": "Dtls", + "url": "https://github.com/quicwg/load-balancers/pull/106", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "", + "createdAt": "2021-03-24T17:30:10Z", + "updatedAt": "2021-05-05T18:52:14Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "e2a452f8d58f890d5d17f3eedde42905bd42b7fa", + "headRepository": "quicwg/load-balancers", + "headRefName": "dtls", + "headRefOid": "661531d6776f8dda0a33267b05d564b3378ebc38", + "closedAt": "2021-05-05T18:52:14Z", + "mergedAt": "2021-05-05T18:52:14Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "99088755d82ac9d7e68bc33901e7918282778767" + }, + "comments": [ + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "Fixes #105 ", + "createdAt": "2021-03-24T17:30:25Z", + "updatedAt": "2021-03-24T17:30:25Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "To expand on the comment that we should explain how to parse DTLS:\r\n\r\nTo me, it is more important to remain as QUIC-version-invariant as possible than to support DTLS. DTLS-awareness implies a very specific set of assumptions about the first byte which are not consistent with version-invariance.\r\n\r\nThis PR is mostly non-normative text about what happens if you're also running DTLS on the same port in the server pool behind QUIC-LB. I've added a few normative statements about what DTLS servers should do to avoid the most serious problems, but I would rather delete the normative bits than expand the scope to fully support DTLS.\r\n\r\nI am open to the argument that this should be a non-normative appendix.\r\n", + "createdAt": "2021-03-25T17:38:56Z", + "updatedAt": "2021-03-25T17:38:56Z" + }, + { + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "body": "The most substantive critique was that this was \"halfway\". Putting it a non-normative appendix backs it off being halfway to just being some notes. I think expanding this spec to include a full DTLS-aware load balancer would be a mistake.", + "createdAt": "2021-05-05T18:49:04Z", + "updatedAt": "2021-05-05T18:49:04Z" + } + ], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjIwMzQxMjQ4", + "commit": { + "abbreviatedOid": "2f2f55d" + }, + "author": "martinthomson", + "authorAssociation": "MEMBER", + "state": "COMMENTED", + "body": "I'm ambivalent on this. Especially this half-way approach.\r\n\r\nIf you are going to do DTLS, then for a tiny bit more text you can tell people how to find the CID. And then you can deal with clients that don't want to support connection IDs properly also.", + "createdAt": "2021-03-25T00:50:49Z", + "updatedAt": "2021-03-25T00:57:06Z", + "comments": [ + { + "originalPosition": 18, + "body": "DTLS 1.0 isn't getting connection ID support as far as I'm aware.", + "createdAt": "2021-03-25T00:50:50Z", + "updatedAt": "2021-05-05T18:50:08Z" + }, + { + "originalPosition": 47, + "body": "It seems like, given the amount of text you just added for DTLS it would be trivial to identify how to match the first DTLS octet and then find the connection ID. It's just a few bytes down at a fixed location.", + "createdAt": "2021-03-25T00:54:27Z", + "updatedAt": "2021-05-05T18:50:08Z" + }, + { + "originalPosition": 72, + "body": "NEVER recommend downgrade. Maybe just imply that a server that requires the use of connection IDs might not be able to deploy DTLS 1.3.", + "createdAt": "2021-03-25T00:55:57Z", + "updatedAt": "2021-05-05T18:50:08Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjIwMzQ1OTg2", + "commit": { + "abbreviatedOid": "2f2f55d" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-03-25T01:04:50Z", + "updatedAt": "2021-03-25T01:04:51Z", + "comments": [ + { + "originalPosition": 18, + "body": "Yes, this is addressing a couple of things:\r\n\r\n1) Running DTLS in the same infrastructure as QUIC on the same port. Will a plain old QUIC-LB load balancer break my stuff? The answer is no, except DTLS 1.3 when not using CIDs.\r\n2) #1, plus I want to use Connection IDs to be resistant to address changes. This will just not work for DTLS 1.2 but it will work fine for 1.3 unless the client refuses to use CIDs.", + "createdAt": "2021-03-25T01:04:50Z", + "updatedAt": "2021-05-05T18:50:08Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjIwMzQ2NTE2", + "commit": { + "abbreviatedOid": "2f2f55d" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-03-25T01:06:19Z", + "updatedAt": "2021-03-25T01:06:19Z", + "comments": [ + { + "originalPosition": 47, + "body": "I guess, but then you have to talk about demultiplexing QUIC and DTLS, the bit-grease extension, and you're breaking the almost-version-invariance of QUIC-LB pretty badly.\r\n\r\nThis draft has already got too much stuff in it, so I thought I'd just write down how DTLS would work out of the box. If people care about this use case I could write DTLS-LB or whatever.", + "createdAt": "2021-03-25T01:06:19Z", + "updatedAt": "2021-05-05T18:50:08Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjIwMzQ3NDI3", + "commit": { + "abbreviatedOid": "2f2f55d" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-03-25T01:08:45Z", + "updatedAt": "2021-03-25T01:08:45Z", + "comments": [ + { + "originalPosition": 72, + "body": "Yeah, downgrade is a gross suggestion, but it's the only way to continue. This is a case where DTLS 1.3 will often be fine but can negotiate itself into a mode that fails catastrophically.\r\n\r\nBut your second sentence is backwards. A TLS1.3 server MUST support connection IDs, or else the ciphertext packets will spray all over the place. The real problem is if the client refuses to use them.", + "createdAt": "2021-03-25T01:08:45Z", + "updatedAt": "2021-05-05T18:50:08Z" + } + ] + } + ] + }, + { + "number": 109, + "id": "MDExOlB1bGxSZXF1ZXN0NjA4Mjc0MzEz", + "title": "Replace \"non-compliant\" and \"arbitrary\"", + "url": "https://github.com/quicwg/load-balancers/pull/109", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fixes #98 and #99", + "createdAt": "2021-04-02T22:11:58Z", + "updatedAt": "2021-04-03T18:34:45Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "19fd1994889ad4face0ad11c0b84abd60d1b5cc7", + "headRepository": "quicwg/load-balancers", + "headRefName": "new-terms", + "headRefOid": "20d595aee3d614ddbfeee1369a2b29b41489d3f9", + "closedAt": "2021-04-03T18:34:45Z", + "mergedAt": "2021-04-03T18:34:45Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "0e5b20fe561a403038cf5a92ce30b6c7a0dfb3cf" + }, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjI3NDYxOTU3", + "commit": { + "abbreviatedOid": "2b0314b" + }, + "author": "ianswett", + "authorAssociation": "CONTRIBUTOR", + "state": "APPROVED", + "body": "Thanks, this is a lot easier to read for me.", + "createdAt": "2021-04-03T14:32:25Z", + "updatedAt": "2021-04-03T14:32:25Z", + "comments": [] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjI3NDc3NTc2", + "commit": { + "abbreviatedOid": "2b0314b" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-04-03T18:31:04Z", + "updatedAt": "2021-04-03T18:32:00Z", + "comments": [ + { + "originalPosition": 183, + "body": "```suggestion\r\n{{unroutable}} provides guidance about how load balancers should handle\r\n```", + "createdAt": "2021-04-03T18:31:04Z", + "updatedAt": "2021-04-03T18:32:22Z" + }, + { + "originalPosition": 184, + "body": "```suggestion\r\nunroutable DCIDs. This guidance, and the implementation of an algorithm to\r\n```", + "createdAt": "2021-04-03T18:31:18Z", + "updatedAt": "2021-04-03T18:32:22Z" + }, + { + "originalPosition": 193, + "body": "```suggestion\r\nof packets that contain unroutable DCIDs, and in extreme cases connection\r\n```", + "createdAt": "2021-04-03T18:31:36Z", + "updatedAt": "2021-04-03T18:32:22Z" + } + ] + } + ] + }, + { + "number": 110, + "id": "MDExOlB1bGxSZXF1ZXN0NjA4MjgyNzQx", + "title": "More text on tenants that share an IP", + "url": "https://github.com/quicwg/load-balancers/pull/110", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "Fixes #107", + "createdAt": "2021-04-02T22:47:46Z", + "updatedAt": "2021-04-21T21:03:53Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "19fd1994889ad4face0ad11c0b84abd60d1b5cc7", + "headRepository": "quicwg/load-balancers", + "headRefName": "shared-ip", + "headRefOid": "c143314bed226514d1cc103a86a7bc068cc3117e", + "closedAt": "2021-04-21T21:03:40Z", + "mergedAt": "2021-04-21T21:03:40Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "1c1a02ac188de2b55a545eb018a104d7aab7ce1e" + }, + "comments": [], + "reviews": [] + }, + { + "number": 112, + "id": "MDExOlB1bGxSZXF1ZXN0NjEwMzgzMjg2", + "title": "change AEAD checksum to AEAD ICV", + "url": "https://github.com/quicwg/load-balancers/pull/112", + "state": "MERGED", + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "fix #111, detail info:\r\n1. fix a typo.\r\n2. change AEAD checksum to AEAD ICV(defined in rfc4106)", + "createdAt": "2021-04-07T06:46:48Z", + "updatedAt": "2021-04-21T23:16:38Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "0e5b20fe561a403038cf5a92ce30b6c7a0dfb3cf", + "headRepository": "william-zk/load-balancers", + "headRefName": "dev_fix_aead_checksum", + "headRefOid": "309186d500d0ce7486c8703d056dbc2f08580c8d", + "closedAt": "2021-04-21T23:16:38Z", + "mergedAt": "2021-04-21T23:16:38Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "01797dfcece8cd23605dda6747309fa5438f5eaa" + }, + "comments": [], + "reviews": [] + }, + { + "number": 115, + "id": "MDExOlB1bGxSZXF1ZXN0NjEwNDc3MDM4", + "title": "Give more illustration of AEAD IV and key sequence", + "url": "https://github.com/quicwg/load-balancers/pull/115", + "state": "OPEN", + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "fix #113", + "createdAt": "2021-04-07T08:54:47Z", + "updatedAt": "2021-05-06T02:17:50Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "0e5b20fe561a403038cf5a92ce30b6c7a0dfb3cf", + "headRepository": "william-zk/load-balancers", + "headRefName": "dev_rename_iv_and_nonce", + "headRefOid": "2aab2d9408411cfe751c43c081851c3f56954120", + "closedAt": null, + "mergedAt": null, + "mergedBy": null, + "mergeCommit": null, + "comments": [], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjQxNjM0MDUx", + "commit": { + "abbreviatedOid": "3b17197" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "Most of this is fine, but there would appear to be some confusion.", + "createdAt": "2021-04-21T23:23:46Z", + "updatedAt": "2021-04-21T23:47:28Z", + "comments": [ + { + "originalPosition": 5, + "body": "```suggestion\r\n* The Key Sequence is the 8 bit identifier to retrieve the token key and IV.\r\n```", + "createdAt": "2021-04-21T23:23:46Z", + "updatedAt": "2021-04-24T06:08:25Z" + }, + { + "originalPosition": 27, + "body": "```suggestion\r\nbit identifier of the AES-GCM encryption context. There are three important\r\n```", + "createdAt": "2021-04-21T23:25:56Z", + "updatedAt": "2021-04-24T06:08:25Z" + }, + { + "originalPosition": 11, + "body": "It's not a sequence number and it's not incremented by one. The IV is a product of the key derivation function.", + "createdAt": "2021-04-21T23:28:13Z", + "updatedAt": "2021-04-24T06:08:25Z" + }, + { + "originalPosition": 17, + "body": "This paragraph doesn't correctly capture what the original paragraph did. To generate the nonce:\r\n1. left-pad the unique token number to the length of the IV\r\n2. nonce = IV ^ (padded unique token number)", + "createdAt": "2021-04-21T23:31:24Z", + "updatedAt": "2021-04-24T06:08:25Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjQxNzE3Mzc5", + "commit": { + "abbreviatedOid": "853012c" + }, + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-04-22T02:01:51Z", + "updatedAt": "2021-04-22T02:01:51Z", + "comments": [ + { + "originalPosition": 17, + "body": "Should we limit that length of nonce and IV is just 96 bit? See section 5.1 of RFC5116(https://tools.ietf.org/html/rfc5116#section-5.1)\r\n```\r\nAEAD_AES_128_GCM input and output lengths are as follows:\r\n\r\n K_LEN is 16 octets,\r\n\r\n P_MAX is 2^36 - 31 octets,\r\n\r\n A_MAX is 2^61 - 1 octets,\r\n\r\n N_MIN and N_MAX are both 12 octets, and\r\n\r\n C_MAX is 2^36 - 15 octets.\r\n```\r\nIf we limit that, then there is no need for padding", + "createdAt": "2021-04-22T02:01:51Z", + "updatedAt": "2021-04-24T06:08:25Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjQxNzM3MTkw", + "commit": { + "abbreviatedOid": "46f9bef" + }, + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-04-22T02:55:44Z", + "updatedAt": "2021-04-22T02:55:44Z", + "comments": [ + { + "originalPosition": 11, + "body": "I have rewrite the illustration of `AEAD IV`, please check it ;-)", + "createdAt": "2021-04-22T02:55:44Z", + "updatedAt": "2021-04-24T06:08:25Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjQyNTQ2MjA4", + "commit": { + "abbreviatedOid": "46f9bef" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-04-22T18:31:55Z", + "updatedAt": "2021-04-22T18:31:55Z", + "comments": [ + { + "originalPosition": 17, + "body": "I don't see much value in that. Selecting long keys and IVs probably has some security value that there isn't much reason to prohibit.", + "createdAt": "2021-04-22T18:31:55Z", + "updatedAt": "2021-04-24T06:08:25Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjQyOTAxOTI5", + "commit": { + "abbreviatedOid": "46f9bef" + }, + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-04-23T03:38:58Z", + "updatedAt": "2021-04-23T03:38:58Z", + "comments": [ + { + "originalPosition": 17, + "body": "Please have a look at this discussion: https://crypto.stackexchange.com/questions/41601/aes-gcm-recommended-iv-size-why-12-bytes\r\n\r\nA 12 byte nonce(which was called IV in the link) is the best practice of aes-gcm related cipher.\r\n\r\nFurther more, in cryptography related discussion, the definition of IV and nonce terms is always confusing, that's why I propose to add some explanation about them in our draft", + "createdAt": "2021-04-23T03:38:58Z", + "updatedAt": "2021-04-24T06:08:25Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjQzNTU5NDc2", + "commit": { + "abbreviatedOid": "46f9bef" + }, + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "More precision is always good. I would not make the implicit hypothesis that the IV is always 96 bits, but that could be a simplification.", + "createdAt": "2021-04-23T18:22:41Z", + "updatedAt": "2021-04-23T18:26:37Z", + "comments": [ + { + "originalPosition": 17, + "body": "It would be simpler to just add the paragraph describing the IV and keep the description of the nonce as is. Something like:\r\n```\r\n* The Key Sequence is the 8 bit identifier to retrieve the token key and IV.\r\n\r\n* The AEAD IV, is a 96 bit data which produced by implementer's custom\r\nAEAD IV derivation function.\r\n\r\n* The AEAD nonce, N, is formed by combining the IV with the 96 bit unique token\r\nnumber. The 96 bits of the unique token number are left-padded with zeros to the\r\nsize of the IV. The exclusive OR of the padded unique token number and the IV\r\nforms the AEAD nonce.\r\n", + "createdAt": "2021-04-23T18:22:41Z", + "updatedAt": "2021-04-24T06:08:25Z" + }, + { + "originalPosition": 28, + "body": "Context is a better word, since it encompasses both Key and IV. But if we do that, it might be good to say something like \"AES-GCM encryption context containing Key and IV\".", + "createdAt": "2021-04-23T18:24:48Z", + "updatedAt": "2021-04-24T06:08:25Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjQzNzY0ODk3", + "commit": { + "abbreviatedOid": "46f9bef" + }, + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-04-24T05:38:05Z", + "updatedAt": "2021-04-24T05:38:05Z", + "comments": [ + { + "originalPosition": 17, + "body": "> It would be simpler to just add the paragraph describing the IV and keep the description of the nonce as is. Something like:\r\n> \r\n> ```\r\n> * The Key Sequence is the 8 bit identifier to retrieve the token key and IV.\r\n> \r\n> * The AEAD IV, is a 96 bit data which produced by implementer's custom\r\n> AEAD IV derivation function.\r\n> \r\n> * The AEAD nonce, N, is formed by combining the IV with the 96 bit unique token\r\n> number. The 96 bits of the unique token number are left-padded with zeros to the\r\n> size of the IV. The exclusive OR of the padded unique token number and the IV\r\n> forms the AEAD nonce.\r\n> ```\r\n\r\nHi huitema:\r\nOur current discussion is about whether we need to limit AEAD nonce to 96 bits, I find that 12-byte nonce is the best practice of aes-gcm related cipher, if we limit that, then we need not do padding for unique token number. Can you give us some better advice about it?", + "createdAt": "2021-04-24T05:38:05Z", + "updatedAt": "2021-04-24T06:08:25Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjQzNzY1NjQ2", + "commit": { + "abbreviatedOid": "46f9bef" + }, + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-04-24T05:50:16Z", + "updatedAt": "2021-04-24T05:50:16Z", + "comments": [ + { + "originalPosition": 28, + "body": "> Context is a better word, since it encompasses both Key and IV. But if we do that, it might be good to say something like \"AES-GCM encryption context containing Key and IV\".\r\n\r\nOK, I have fix it, just like this:\r\n```\r\nand an 8 bit identifier used to get the AES-GCM encryption context. The AES-GCM encryption\r\ncontext contains a 96 bit key and a 96 bit AEAD IV\r\n```", + "createdAt": "2021-04-24T05:50:16Z", + "updatedAt": "2021-04-24T06:08:25Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjQzNzg4NzMy", + "commit": { + "abbreviatedOid": "aba2a9f" + }, + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-04-24T06:06:09Z", + "updatedAt": "2021-04-24T06:06:09Z", + "comments": [ + { + "originalPosition": 28, + "body": "The key is 128 bits for AES_GCM 128.", + "createdAt": "2021-04-24T06:06:09Z", + "updatedAt": "2021-04-24T06:08:25Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjQzNzkzNTYx", + "commit": { + "abbreviatedOid": "aba2a9f" + }, + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-04-24T06:08:45Z", + "updatedAt": "2021-04-24T06:08:45Z", + "comments": [ + { + "originalPosition": 28, + "body": "sorry, I made a foolish mistake...fixed", + "createdAt": "2021-04-24T06:08:45Z", + "updatedAt": "2021-04-24T06:08:45Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjQzODAwMzE1", + "commit": { + "abbreviatedOid": "aba2a9f" + }, + "author": "huitema", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-04-24T06:12:27Z", + "updatedAt": "2021-04-24T06:12:38Z", + "comments": [ + { + "originalPosition": 17, + "body": "In theory, the IV could be as large as the block size, 128 bits. In practice, it is indeed using 96 bits for AES GCM. @martinduke if we are OK with only supporting AES GCM, then we can fix the IV size to 96 bits.", + "createdAt": "2021-04-24T06:12:27Z", + "updatedAt": "2021-04-24T06:12:38Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjUyNjU2OTIx", + "commit": { + "abbreviatedOid": "2aab2d9" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-05-05T19:09:58Z", + "updatedAt": "2021-05-05T19:09:58Z", + "comments": [ + { + "originalPosition": 17, + "body": "I guess that's where we are now. I'm tempted to have more crypto agility, but ultimately Retry Services are version dependent and everyone has to speak 128GCM in QUICv1 to handle Initial Packets. Let's use William's proposal.", + "createdAt": "2021-05-05T19:09:58Z", + "updatedAt": "2021-05-05T19:09:58Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjUyNjU4NDI4", + "commit": { + "abbreviatedOid": "2aab2d9" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-05-05T19:11:50Z", + "updatedAt": "2021-05-05T19:11:50Z", + "comments": [ + { + "originalPosition": 17, + "body": "Actually, I take that back. Initial encryption doesn't protect anything and is much lower stakes. There should be a way to negotiate different ciphers.\r\n\r\nWilliam, let's get rid of the 12 Byte restriction. When this PR lands, I'll do another to introduce crypto agility.", + "createdAt": "2021-05-05T19:11:50Z", + "updatedAt": "2021-05-05T19:11:50Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjUyNjU5MTgw", + "commit": { + "abbreviatedOid": "2aab2d9" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "CHANGES_REQUESTED", + "body": "Let's get rid of the 96 bit IV restriction, and then this good to go.", + "createdAt": "2021-05-05T19:12:44Z", + "updatedAt": "2021-05-05T19:12:44Z", + "comments": [] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjUyOTA2Nzc2", + "commit": { + "abbreviatedOid": "2aab2d9" + }, + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-05-06T02:17:49Z", + "updatedAt": "2021-05-06T02:17:50Z", + "comments": [ + { + "originalPosition": 17, + "body": "OK, I got it.", + "createdAt": "2021-05-06T02:17:49Z", + "updatedAt": "2021-05-06T02:17:50Z" + } + ] + } + ] + }, + { + "number": 116, + "id": "MDExOlB1bGxSZXF1ZXN0NjIwNTUxMzkz", + "title": "sync with master", + "url": "https://github.com/quicwg/load-balancers/pull/116", + "state": "MERGED", + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "", + "createdAt": "2021-04-21T21:02:23Z", + "updatedAt": "2021-04-21T21:03:41Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "c143314bed226514d1cc103a86a7bc068cc3117e", + "headRepository": "quicwg/load-balancers", + "headRefName": "master", + "headRefOid": "1c1a02ac188de2b55a545eb018a104d7aab7ce1e", + "closedAt": "2021-04-21T21:03:41Z", + "mergedAt": "2021-04-21T21:03:40Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "1c1a02ac188de2b55a545eb018a104d7aab7ce1e" + }, + "comments": [], + "reviews": [] + }, + { + "number": 117, + "id": "MDExOlB1bGxSZXF1ZXN0NjI1ODQwMjI1", + "title": "add test vector for shared-stated retry service, see #114", + "url": "https://github.com/quicwg/load-balancers/pull/117", + "state": "MERGED", + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "see issue: #114 ", + "createdAt": "2021-04-29T07:08:23Z", + "updatedAt": "2021-05-14T20:37:30Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "99088755d82ac9d7e68bc33901e7918282778767", + "headRepository": "william-zk/load-balancers", + "headRefName": "dev_add_test_vector_for_share_state_retry_service", + "headRefOid": "52517ce4b9e6d49c3a1e9f5c73985b820b501c50", + "closedAt": "2021-05-14T20:37:30Z", + "mergedAt": "2021-05-14T20:37:30Z", + "mergedBy": "martinduke", + "mergeCommit": { + "oid": "398ba6514002231273dc96df88868d26d189f19f" + }, + "comments": [ + { + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "body": "> When I fake my inputs to use the inverted IP address as you have here, I get the same output. So I think your code is sound except for that.\r\n\r\nSounds great, I have rewrite the test-vector and give more information about it,please confirm again if you are free", + "createdAt": "2021-05-11T03:36:01Z", + "updatedAt": "2021-05-11T03:36:01Z" + } + ], + "reviews": [ + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjUyNjc3NDg3", + "commit": { + "abbreviatedOid": "4d99f59" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-05-05T19:36:04Z", + "updatedAt": "2021-05-05T19:36:05Z", + "comments": [ + { + "originalPosition": 4, + "body": "```suggestion\r\n## Shared-state Retry Token\r\n```", + "createdAt": "2021-05-05T19:36:04Z", + "updatedAt": "2021-05-11T03:31:55Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjUyNzM5MzE2", + "commit": { + "abbreviatedOid": "27e5336" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-05-05T20:56:31Z", + "updatedAt": "2021-05-05T20:56:32Z", + "comments": [ + { + "originalPosition": 30, + "body": "The IP address is backwards. It should appear as it does it does in the IP header: 7f000001.", + "createdAt": "2021-05-05T20:56:31Z", + "updatedAt": "2021-05-11T03:31:55Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjUyNzk5OTIy", + "commit": { + "abbreviatedOid": "27e5336" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "CHANGES_REQUESTED", + "body": "When I fake my inputs to use the inverted IP address as you have here, I get the same output. So I think your code is sound except for that.", + "createdAt": "2021-05-05T21:46:04Z", + "updatedAt": "2021-05-05T21:46:04Z", + "comments": [] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjU2MjUzNDU3", + "commit": { + "abbreviatedOid": "dae2b01" + }, + "author": "william-zk", + "authorAssociation": "CONTRIBUTOR", + "state": "COMMENTED", + "body": "", + "createdAt": "2021-05-11T03:34:08Z", + "updatedAt": "2021-05-11T03:34:09Z", + "comments": [ + { + "originalPosition": 30, + "body": "I have fixed it and rewrite the whole test-vector, please have a look at it", + "createdAt": "2021-05-11T03:34:08Z", + "updatedAt": "2021-05-11T03:34:09Z" + } + ] + }, + { + "id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3NjYwMTk0MzQz", + "commit": { + "abbreviatedOid": "dae2b01" + }, + "author": "martinduke", + "authorAssociation": "CONTRIBUTOR", + "state": "APPROVED", + "body": "Checks out, thanks", + "createdAt": "2021-05-14T20:36:42Z", + "updatedAt": "2021-05-14T20:36:42Z", + "comments": [] + } + ] + }, + { + "number": 120, + "id": "MDExOlB1bGxSZXF1ZXN0NjM3OTI4NjM0", + "title": "first commit: add stateless reset.", + "url": "https://github.com/quicwg/load-balancers/pull/120", + "state": "OPEN", + "author": "Lingtaonju", + "authorAssociation": "FIRST_TIME_CONTRIBUTOR", + "assignees": [], + "labels": [], + "body": "details:\r\n[#119](https://github.com/quicwg/load-balancers/issues/119)", + "createdAt": "2021-05-10T16:10:44Z", + "updatedAt": "2021-05-11T04:05:06Z", + "baseRepository": "quicwg/load-balancers", + "baseRefName": "master", + "baseRefOid": "99088755d82ac9d7e68bc33901e7918282778767", + "headRepository": "Lingtaonju/load-balancers", + "headRefName": "dev_reset", + "headRefOid": "99fd21a77ce7e92d430d2307720a5882076083f1", + "closedAt": null, + "mergedAt": null, + "mergedBy": null, + "mergeCommit": null, + "comments": [], + "reviews": [] + } + ] +} \ No newline at end of file diff --git a/draft-ietf-quic-load-balancers.html b/draft-ietf-quic-load-balancers.html new file mode 100644 index 0000000..6a73d2b --- /dev/null +++ b/draft-ietf-quic-load-balancers.html @@ -0,0 +1,3652 @@ + + + + + + +QUIC-LB: Generating Routable QUIC Connection IDs + + + + + + + + + + + + + + + + + + + + + + + +
Internet-DraftQUIC-LBMay 2021
Duke & BanksExpires 15 November 2021[Page]
+
+
+
+
Workgroup:
+
QUIC
+
Internet-Draft:
+
draft-ietf-quic-load-balancers-07
+
Published:
+
+ +
+
Intended Status:
+
Standards Track
+
Expires:
+
+
Authors:
+
+
+
M. Duke
+
F5 Networks, Inc.
+
+
+
N. Banks
+
Microsoft
+
+
+
+
+

QUIC-LB: Generating Routable QUIC Connection IDs

+
+

Abstract

+

The QUIC protocol design is resistant to transparent packet inspection, +injection, and modification by intermediaries. However, the server can +explicitly cooperate with network services by agreeing to certain conventions +and/or sharing state with those services. This specification provides a +standardized means of solving three problems: (1) maintaining routability to +servers via a low-state load balancer even when the connection IDs in use +change; (2) explicit encoding of the connection ID length in all packets to +assist hardware accelerators; and (3) injection of QUIC Retry packets by an +anti-Denial-of-Service agent on behalf of the server.¶

+
+
+

+Note to Readers +

+

Discussion of this document takes place on the + QUIC Working Group mailing list (quic@ietf.org), + which is archived at https://mailarchive.ietf.org/arch/browse/quic/.¶

+

Source for this draft and an issue tracker can be found at + https://github.com/quicwg/load-balancers.¶

+
+
+
+

+Status of This Memo +

+

+ This Internet-Draft is submitted in full conformance with the + provisions of BCP 78 and BCP 79.¶

+

+ Internet-Drafts are working documents of the Internet Engineering Task + Force (IETF). Note that other groups may also distribute working + documents as Internet-Drafts. The list of current Internet-Drafts is + at https://datatracker.ietf.org/drafts/current/.¶

+

+ Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as "work in progress."¶

+

+ This Internet-Draft will expire on 15 November 2021.¶

+
+
+ +
+
+ â–²

+Table of Contents +

+ +
+
+
+
+

+1. Introduction +

+

QUIC packets [QUIC-TRANSPORT] usually contain a +connection ID to allow endpoints to associate packets with different address/ +port 4-tuples to the same connection context. This feature makes connections +robust in the event of NAT rebinding. QUIC endpoints usually designate the +connection ID which peers use to address packets. Server-generated connection +IDs create a potential need for out-of-band communication to support QUIC.¶

+

QUIC allows servers (or load balancers) to designate an initial connection ID to +encode useful routing information for load balancers. It also encourages +servers, in packets protected by cryptography, to provide additional connection +IDs to the client. This allows clients that know they are going to change IP +address or port to use a separate connection ID on the new path, thus reducing +linkability as clients move through the world.¶

+

There is a tension between the requirements to provide routing information and +mitigate linkability. Ultimately, because new connection IDs are in protected +packets, they must be generated at the server if the load balancer does not have +access to the connection keys. However, it is the load balancer that has the +context necessary to generate a connection ID that encodes useful routing +information. In the absence of any shared state between load balancer and +server, the load balancer must maintain a relatively expensive table of +server-generated connection IDs, and will not route packets correctly if they +use a connection ID that was originally communicated in a protected +NEW_CONNECTION_ID frame.¶

+

This specification provides common algorithms for encoding the server mapping in +a connection ID given some shared parameters. The mapping is generally only +discoverable by observers that have the parameters, preserving unlinkability as +much as possible.¶

+

Aside from load balancing, a QUIC server may also desire to offload other +protocol functions to trusted intermediaries. These intermediaries might +include hardware assist on the server host itself, without access to fully +decrypted QUIC packets. For example, this document specifies a means of +offloading stateless retry to counter Denial of Service attacks. It also +proposes a system for self-encoding connection ID length in all packets, so that +crypto 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 +

+

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", +"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be +interpreted as described in RFC 2119 [RFC2119].¶

+

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 interpreted as carrying +significance described in RFC 2119.¶

+

In this document, "client" and "server" refer to the endpoints of a QUIC +connection unless otherwise indicated. A "load balancer" is an intermediary for +that connection that does not possess QUIC connection keys, but it may rewrite +IP addresses or conduct other IP or UDP processing. A "configuration agent" is +the entity that determines the QUIC-LB configuration parameters for the network +and leverages some system to distribute that configuration.¶

+

Note that stateful load balancers that act as proxies, by terminating a QUIC +connection with the client and then retrieving data from the server using QUIC +or another protocol, are treated as a server with respect to this specification.¶

+

For brevity, "Connection ID" will often be abbreviated as "CID".¶

+
+
+
+
+

+1.2. Notation +

+

All wire formats will be depicted using the notation defined in Section 1.3 of +[QUIC-TRANSPORT]. There is one addition: the function len() refers to the +length of a field which can serve as a limit on a different field, so that the +lengths of two fields can be concisely defined as limited to a sum, for example:¶

+

x(A..B) +y(C..B-len(x))¶

+

indicates that x can be of any length between A and B, and y can be of any +length between C and B provided that (len(x) + len(y)) does not exceed B.¶

+

The example below illustrates the basic framework:¶

+
+
+
+
+Example Structure {
+  One-bit Field (1),
+  7-bit Field with Fixed Value (7) = 61,
+  Field with Variable-Length Integer (i),
+  Arbitrary-Length Field (..),
+  Variable-Length Field (8..24),
+  Variable-Length Field with Dynamic Limit (8..24-len(Variable-Length Field)),
+  Field With Minimum Length (16..),
+  Field With Maximum Length (..128),
+  [Optional Field (64)],
+  Repeated Field (8) ...,
+}
+
+
+
Figure 1: +Example Format +
+
+
+
+
+
+
+
+

+2. Protocol Objectives +

+
+
+

+2.1. Simplicity +

+

QUIC is intended to provide unlinkability across connection migration, but +servers are not required to provide additional connection IDs that effectively +prevent linkability. If the coordination scheme is too difficult to implement, +servers behind load balancers using connection IDs for routing will use +trivially linkable connection IDs. Clients will therefore be forced to choose +between terminating the connection during migration or remaining linkable, +subverting a design objective of QUIC.¶

+

The solution should be both simple to implement and require little additional +infrastructure for cryptographic keys, etc.¶

+
+
+
+
+

+2.2. Security +

+

In the limit where there are very few connections to a pool of servers, no +scheme can prevent the linking of two connection IDs with high probability. In +the opposite limit, where all servers have many connections that start and end +frequently, it will be difficult to associate two connection IDs even if they +are known to map to the same server.¶

+

QUIC-LB is relevant in the region between these extremes: when the information +that two connection IDs map to the same server is helpful to linking two +connection IDs. Obviously, any scheme that transparently communicates this +mapping to outside observers compromises QUIC's defenses against linkability.¶

+

Though not an explicit goal of the QUIC-LB design, concealing the server mapping +also complicates attempts to focus attacks on a specific server in the pool.¶

+
+
+
+
+
+
+

+3. First CID octet +

+

The first octet of a Connection ID is reserved for two special purposes, one +mandatory (config rotation) and one optional (length self-description).¶

+

Subsequent sections of this document refer to the contents of this octet as the +"first octet."¶

+
+
+

+3.1. Config Rotation +

+

The first two bits of any connection ID MUST encode an identifier for the +configuration that the connection ID uses. This enables incremental deployment +of new QUIC-LB settings (e.g., keys).¶

+

When new configuration is distributed to servers, there will be a transition +period when connection IDs reflecting old and new configuration coexist in the +network. The rotation bits allow load balancers to apply the correct routing +algorithm and parameters to incoming packets.¶

+

Configuration Agents SHOULD deliver new configurations to load balancers before +doing so to servers, so that load balancers are ready to process CIDs using the +new parameters when they arrive.¶

+

A Configuration Agent SHOULD NOT use a codepoint to represent a new +configuration until it takes precautions to make sure that all connections using +CIDs with an old configuration at that codepoint have closed or transitioned.¶

+

Servers MUST NOT generate new connection IDs using an old configuration after +receiving a new one from the configuration agent. Servers MUST send +NEW_CONNECTION_ID frames that provide CIDs using the new configuration, and +retire CIDs using the old configuration using the "Retire Prior To" field of +that frame.¶

+

It also possible to use these bits for more long-lived distinction of different +configurations, but this has privacy implications (see Section 11.3).¶

+
+
+
+
+

+3.2. Configuration Failover +

+

If a server has not received a valid QUIC-LB configuration, and believes that +low-state, Connection-ID aware load balancers are in the path, it SHOULD +generate connection IDs with the config rotation bits set to '11' and SHOULD use +the "disable_active_migration" transport parameter in all new QUIC connections. +It SHOULD NOT send NEW_CONNECTION_ID frames with new values.¶

+

A load balancer that sees a connection ID with config rotation bits set to +'11' MUST revert to 5-tuple routing.¶

+
+
+
+
+

+3.3. Length Self-Description +

+

Local hardware cryptographic offload devices may accelerate QUIC servers by +receiving keys from the QUIC implementation indexed to the connection ID. +However, on physical devices operating multiple QUIC servers, it is impractical +to efficiently lookup these keys if the connection ID does not self-encode its +own length.¶

+

Note that this is a function of particular server devices and is irrelevant to +load balancers. As such, load balancers MAY omit this from their configuration. +However, the remaining 6 bits in the first octet of the Connection ID are +reserved to express the length of the following connection ID, not including +the first octet.¶

+

A server not using this functionality SHOULD make the six bits appear to be +random.¶

+
+
+
+
+

+3.4. Format +

+
+
+
+
+First Octet {
+  Config Rotation (2),
+  CID Len or Random Bits (6),
+}
+
+
+
Figure 2: +First Octet Format +
+
+

The first octet has the following fields:¶

+

Config Rotation: Indicates the configuration used to interpret the CID.¶

+

CID Len or Random Bits: Length Self-Description (if applicable), or random bits +otherwise. Encodes the length of the Connection ID following the First Octet.¶

+
+
+
+
+
+
+

+4. Load Balancing Preliminaries +

+

In QUIC-LB, load balancers do not generate individual connection IDs for +servers. Instead, they communicate the parameters of an algorithm to generate +routable connection IDs.¶

+

The algorithms differ in the complexity of configuration at both load balancer +and server. Increasing complexity improves obfuscation of the server mapping.¶

+

This section describes three participants: the configuration agent, the load +balancer, and the server. For any given QUIC-LB configuration that enables +connection-ID-aware load balancing, there must be a choice of (1) routing +algorithm, (2) server ID allocation strategy, and (3) algorithm parameters.¶

+

Fundamentally, servers generate connection IDs that encode their server ID. +Load balancers decode the server ID from the CID in incoming packets to route +to the correct server.¶

+

There are situations where a server pool might be operating two or more routing +algorithms or parameter sets simultaneously. The load balancer uses the first +two bits of the connection ID to multiplex incoming DCIDs over these schemes +(see Section 3.1).¶

+
+
+

+4.1. Unroutable Connection IDs +

+

QUIC-LB servers will generate Connection IDs that are decodable to extract a +server ID in accordance with a specified algorithm and parameters. However, +QUIC often uses client-generated Connection IDs prior to receiving a packet from +the server.¶

+

These client-generated CIDs might not conform to the expectations of the +routing algorithm and therefore not be routable by the load balancer. Those that +are not routable are "unroutable DCIDs" and receive similar treatment +regardless of why they're unroutable:¶

+
    +
  • The config rotation bits (Section 3.1) may not correspond to an active +configuration. Note: a packet with a DCID that indicates 5-tuple routing (see +Section 3.2) is always routable.¶ +
  • +
  • The DCID might not be long enough for the decoder to process.¶ +
  • +
  • The extracted server mapping might not correspond to an active server.¶ +
  • +
+

All other DCIDs are routable.¶

+

Load balancers MUST forward packets with routable DCIDs to a server in +accordance with the chosen routing algorithm.¶

+

Load balancers SHOULD drop short header packets with unroutable DCIDs.¶

+

The routing of long headers with unroutable DCIDs depends on the server ID +allocation strategy, described in Section 4.3. However, the load balancer +MUST NOT drop these packets, with one exception.¶

+

Load balancers MAY drop packets with long headers and unroutable DCIDs if +and only if it knows that the encoded QUIC version does not allow an unroutable +DCID in a packet with that signature. For example, a load balancer can safely +drop a QUIC version 1 Handshake packet with an unroutable DCID, as a +version 1 Handshake packet sent to a QUIC-LB routable server will always have +a server-generated routable CID. The prohibition against dropping packets with +long headers remains for unknown QUIC versions.¶

+

Furthermore, while the load balancer function MUST NOT drop packets, the device +might implement other security policies, outside the scope of this +specification, that might force a drop.¶

+

Servers that receive packets with unroutable CIDs MUST use the available +mechanisms to induce the client to use a routable CID in future packets. In +QUIC version 1, this requires using a routable CID in the Source CID field of +server-generated long headers.¶

+
+
+
+
+

+4.2. Fallback Algorithms +

+

There are conditions described below where a load balancer routes a packet using +a "fallback algorithm." It can choose any algorithm, without coordination with +the servers, but the algorithm SHOULD be deterministic over short time scales so +that related packets go to the same server. The design of this algorithm SHOULD +consider the version-invariant properties of QUIC described in +[QUIC-INVARIANTS] to maximize its robustness to +future versions of QUIC.¶

+

A fallback algorithm MUST NOT make the routing behavior dependent on any 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-dependent and +intermediaries SHOULD NOT base their design on version-specific templates.¶

+

For example, one fallback algorithm might convert a unroutable DCID to an +integer and divided by the number of servers, with the modulus used to forward +the packet. The number of servers is usually consistent on the time scale of a +QUIC connection handshake. Another might simply hash the address/port 4-tuple. +See also Section 10.¶

+
+
+
+
+

+4.3. Server ID Allocation +

+

For any given configuration, the configuration agent must specify if server IDs +will be statically or dynamically allocated. Load Balancer configurations with +statically allocated server IDs explicitly include a mapping of server IDs to +forwarding addresses. The corresponding server configurations contain one or +more unique server IDs.¶

+

A dynamically allocated configuration does not have a pre-defined assignment, +reducing configuration complexity. However, it places limits on the maximum +server ID length and requires more state at the load balancer. In certain edge +cases, it can force parts of the system to fail over to 5-tuple routing for a +short time.¶

+

In either case, the configuration agent chooses a server ID length for each +configuration that MUST be at least one octet. For Static Allocation, the +maximum length depends on the algorithm. For dynamic allocation, the maximum +length is 7 octets.¶

+

A QUIC-LB configuration MAY significantly over-provision the server ID space +(i.e., provide far more codepoints than there are servers) to increase the +probability that a randomly generated Destination Connection ID is unroutable.¶

+

Conceptually, each configuration has its own set of server ID allocations, +though two static configurations with identical server ID lengths MAY use a +common allocation between them.¶

+

A server encodes one of its assigned server IDs in any CID it generates using +the relevant configuration.¶

+
+
+

+4.3.1. Static Allocation +

+

In the static allocation method, the configuration agent assigns at least one +server ID to each server.¶

+

When forwarding a packet with a long header and unroutable DCID, load +balancers MUST forward packets with long headers and unroutable DCIDs +using an fallback algorithm as specified in Section 4.2.¶

+
+
+
+
+

+4.3.2. Dynamic Allocation +

+

In the dynamic allocation method, the load balancer assigns server IDs +dynamically so that configuration does not require fixed server ID assignment. +This reduces linkability. However, it requires state at the load balancer +that roughly scales with the number of connections, until the server ID +codespace is exhausted.¶

+
+
+
+4.3.2.1. Configuration Agent Actions +
+

The configuration agent does not assign server IDs, but does configure a server +ID length and an "LB timeout". The server ID MUST be at least one and no more +than seven octets.¶

+
+
+
+
+
+4.3.2.2. Load Balancer Actions +
+

The load balancer maintains a table of all assigned server IDs and +corresponding routing information, which is initialized empty. These tables are +independent for each operating configuration.¶

+

The load balancer MUST keep track of the most recent observation of each server +ID, in any sort of packet it forwards, in the table and delete the entries when +the time since that observation exceeds the LB Timeout.¶

+

Note that when the load balancer's table for a configuration is empty, all +incoming DCIDs corresponding to that configuration are unroutable by +definition.¶

+

The handling of an unroutable long-header packet depends on the reason for +unroutability. The load balancer MUST applyt this logic:¶

+
    +
  • If the config rotation bits do not match a known configuration, the load +balancer routes the packet using a fallback algorithm (see +Section 4.2).¶ +
  • +
  • If there is a matching configuration, but the CID is not long enough to apply +the algorithm, the load balancer skips the first octet of the CID and then +reads a server ID from the following octets, up to the server ID length. If +this server ID matches a known server ID for that configuration, it forwards the +packet accordingly and takes no further action. If it does not match, it routes +using a fallback algorithm and adds the new server ID to that server's table +entry.¶ +
  • +
  • If the sole reason for unroutability is that the server ID is not in the load +balancer's table, the load balancer routes the packet with a fallback +algorithm. It adds the decoded server ID to table entry for the server the +algorithm chooses and forwards the packet accordingly.¶ +
  • +
+
+
+
+
+
+4.3.2.3. Server actions +
+

Each server maintains a list of server IDs assigned to it, initialized empty. +For each SID, it records the last time it received any packet with an CID that +encoded that SID.¶

+

Upon receipt of a packet with a client-generated DCID, the server MUST follow +these steps in order:¶

+
    +
  • If the config rotation bits do not correspond to a known configuration, do not +attempt to extract a server ID.¶ +
  • +
  • If the DCID is not long enough to decode using the configured algorithm, +extract a number of octets equal to the server ID length, beginning with the +second octet. If the extracted value does not match a server ID in the server's +list, add it to the list.¶ +
  • +
  • If the DCID is long enough to decode but the server ID is not in the server's +list, add it to the list.¶ +
  • +
+

After any possible SID is extracted, the server processes the packet normally.¶

+

When a server needs a new connection ID, it uses one of the server IDs in its +list to populate the server ID field of that CID. It SHOULD vary this selection +to reduce linkability within a connection.¶

+

After loading a new configuration or long periods of idleness, a server may not +have any available SIDs. This is because an incoming packet may not the config +rotation bits necessary to extract a server ID in accordance with the +algorithm above. When required to generate a CID under these conditions, the +server MUST generate CIDs using the 5-tuple routing codepoint (see +Section 3.2. Note that these connections will not be robust to client +address changes while they use this connection ID. For this reason, a server +SHOULD retire these connection IDs and replace them with routable ones once +it receives a client-generated CID that allows it to acquire a server ID. As, +statistically, one in every four such CIDs can provide a server ID, this is +typically a short interval.¶

+

If a server has not received a connection ID encoding a particular server ID +within the LB timeout, it MUST retire any outstanding CIDs that use that server +ID and cease generating any new ones.¶

+

A server SHOULD have a mechanism to stop using some server IDs if the list +gets large relative to its share of the codepoint space, so that these +allocations time out and are freed for reuse by servers that have recently +joined the pool.¶

+
+
+
+
+
+
+
+
+
+
+

+5. Routing Algorithms +

+

Encryption in the algorithms below uses the AES-128-ECB cipher. Future standards +could add new algorithms that use other ciphers to provide cryptographic agility +in accordance with [RFC7696]. QUIC-LB implementations SHOULD be extensible to +support new algorithms.¶

+
+
+

+5.1. Plaintext CID Algorithm +

+

The Plaintext CID Algorithm makes no attempt to obscure the mapping of +connections to servers, significantly increasing linkability. The format is +depicted in the figure below.¶

+
+
+
+
+Plaintext CID {
+  First Octet (8),
+  Server ID (8..128),
+  For Server Use (8..152-len(Server ID)),
+}
+
+
+
Figure 3: +Plaintext CID Format +
+
+
+
+

+5.1.1. Configuration Agent Actions +

+

For static SID allocation, the server ID length is limited to 16 octets. There +are no parameters specific to this algorithm.¶

+
+
+
+
+

+5.1.2. Load Balancer Actions +

+

On each incoming packet, the load balancer extracts consecutive octets, +beginning with the second octet. These bytes represent the server ID.¶

+
+
+
+
+

+5.1.3. Server Actions +

+

The server chooses how many octets to reserve for its own use, which MUST be at +least one octet.¶

+

When a server needs a new connection ID, it encodes one of its assigned server +IDs in consecutive octets beginning with the second. All other 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.¶

+
+
+
+
+
+
+

+5.2. Stream Cipher CID Algorithm +

+

The Stream Cipher CID algorithm provides cryptographic protection at the cost of +additional per-packet processing at the load balancer to decrypt every incoming +connection ID. The CID format is depicted below.¶

+
+
+
+
+Stream Cipher CID {
+  First Octet (8),
+  Nonce (64..120),
+  Encrypted Server ID (8..128-len(Nonce)),
+  For Server Use (0..152-len(Nonce)-len(Encrypted Server ID)),
+}
+
+
+
Figure 4: +Stream Cipher CID Format +
+
+
+
+

+5.2.1. Configuration Agent Actions +

+

The configuration agent assigns a server ID to every server in its pool, and +determines a server ID length (in octets) sufficiently large to encode all +server IDs, including potential future servers.¶

+

The configuration agent also selects a nonce length and an 16-octet AES-ECB key +to use for connection ID decryption. The nonce length MUST be at least 8 octets +and no more than 16 octets. The nonce length and server ID length MUST sum to 19 +or fewer octets, but SHOULD sum to 15 or fewer to allow space for server use.¶

+
+
+
+
+

+5.2.2. Load Balancer Actions +

+

Upon receipt of a QUIC packet, the load balancer extracts as many of the +earliest octets from the destination connection ID as necessary to match the +nonce length. The server ID immediately follows.¶

+

The load balancer decrypts the nonce and the server ID using the following three +pass algorithm:¶

+
    +
  • Pass 1: The load balancer decrypts the server ID using 128-bit AES Electronic +Codebook (ECB) mode, much like QUIC header protection. The encrypted nonce +octets are zero-padded to 16 octets. AES-ECB encrypts this encrypted nonce +using its key to generate a mask which it applies to the encrypted server id. +This provides an intermediate value of the server ID, referred to as server-id +intermediate.¶ +
  • +
+

server_id_intermediate = encrypted_server_id ^ AES-ECB(key, padded-encrypted-nonce)¶

+
    +
  • Pass 2: The load balancer decrypts the nonce octets using 128-bit AES +ECB mode, using the server-id intermediate as "nonce" for this pass. The +server-id intermediate octets are zero-padded to 16 octets. AES-ECB encrypts +this padded server-id intermediate using its key to generate a mask which it +applies to the encrypted nonce. This provides the decrypted nonce value.¶ +
  • +
+

nonce = encrypted_nonce ^ AES-ECB(key, padded-server_id_intermediate)¶

+
    +
  • Pass 3: The load balancer decrypts the server ID using 128-bit AES ECB mode. +The 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 intermediate server id. +This provides the decrypted server ID.¶ +
  • +
+

server_id = server_id_intermediate ^ AES-ECB(key, padded-nonce)¶

+

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. The load balancer uses +the the second through eleventh octets of the connection ID for the nonce, +zero-pads it to 16 octets, uses xors the result with the twelfth and thirteenth +octet. The result is padded with 14 octets of zeros and encrypted to obtain a +mask that is xored with the nonce octets. Finally, the nonce octets are padded +with six octets of zeros, encrypted, and the first two octets xored with the +server ID octets to obtain the actual server ID.¶

+

This three-pass algorithm is a simplified version of the FFX algorithm, with +the property that each encrypted nonce value depends on all server ID bits, and +each encrypted server ID bit depends on all nonce bits and all server ID bits. +This mitigates attacks against stream ciphers in which attackers simply flip +encrypted server-ID bits.¶

+

The output of the decryption is the server ID that the load balancer uses for +routing.¶

+
+
+
+
+

+5.2.3. Server Actions +

+

When generating a routable connection ID, the server writes arbitrary bits into +its nonce octets, and its provided server ID into the server ID octets. Servers +MAY opt to have a longer connection ID beyond the nonce and server ID. The +additional bits MAY encode additional information, but SHOULD appear essentially +random to observers.¶

+

If the decrypted nonce bits increase monotonically, that guarantees that nonces +are not reused between connection IDs from the same server.¶

+

The server encrypts the server ID using exactly the algorithm as described in +Section 5.2.2, performing the three passes +in reverse order.¶

+
+
+
+
+
+
+

+5.3. Block Cipher CID Algorithm +

+

The Block Cipher CID Algorithm, by using a full 16 octets of plaintext and a +128-bit cipher, provides higher cryptographic protection and detection of +unroutable connection IDs. However, it also requires connection IDs of at +least 17 octets, increasing overhead of client-to-server packets.¶

+
+
+
+
+Block Cipher CID {
+  First Octet (8),
+  Encrypted Server ID (8..128),
+  Encrypted Bits for Server Use (128-len(Encrypted Server ID)),
+  Unencrypted Bits for Server Use (0..24),
+}
+
+
+
Figure 5: +Block Cipher CID Format +
+
+
+
+

+5.3.1. Configuration Agent Actions +

+

If server IDs are statically allocated, the server ID length MUST be no more +than 12 octets, to provide servers adequate entropy to generate unique CIDs.¶

+

The configuration agent also selects an 16-octet AES-ECB key to use for +connection ID decryption.¶

+
+
+
+
+

+5.3.2. Load Balancer Actions +

+

Upon receipt of a QUIC packet, the load balancer reads the first octet to +obtain the config rotation bits. It then decrypts the subsequent 16 octets using +AES-ECB decryption and the chosen key.¶

+

The decrypted plaintext contains the server id and opaque server data in that +order. The load balancer uses the server ID octets for routing.¶

+
+
+
+
+

+5.3.3. Server Actions +

+

When generating a routable connection ID, the server MUST choose a connection ID +length between 17 and 20 octets. The server writes its server ID into the server +ID octets and arbitrary bits into the remaining bits. These arbitrary bits MAY +encode additional information, and MUST differ between connection IDs. Bits in +the eighteenth, nineteenth, and twentieth octets SHOULD appear essentially +random to observers. The first octet is reserved as described in Section 3.¶

+

The server then encrypts the second through seventeenth octets using the 128-bit +AES-ECB cipher.¶

+
+
+
+
+
+
+
+
+

+6. ICMP Processing +

+

For protocols where 4-tuple load balancing is sufficient, it is straightforward +to deliver ICMP packets from the network to the correct server, by reading the +echoed IP and transport-layer headers to obtain the 4-tuple. When routing is +based on connection ID, further measures are required, as most QUIC packets that +trigger ICMP responses will only contain a client-generated connection ID that +contains no routing information.¶

+

To solve this problem, load balancers MAY maintain a mapping of Client IP and +port to server ID based on recently observed packets.¶

+

Alternatively, servers MAY implement the technique described in Section 14.4.1 +of [QUIC-TRANSPORT] to increase the likelihood a Source Connection ID is +included in ICMP responses to Path Maximum Transmission Unit (PMTU) probes. Load +balancers MAY parse the echoed packet to extract the Source Connection ID, if +it contains a QUIC long header, and extract the Server ID as if it were in a +Destination CID.¶

+
+
+
+
+

+7. Retry Service +

+

When a server is under load, QUICv1 allows it to defer storage of connection +state until the client proves it can receive packets at its advertised IP +address. Through the use of a Retry packet, a token in subsequent client +Initial packets, and transport parameters, servers verify address ownership and +clients verify that there is no on-path attacker generating Retry packets.¶

+

A "Retry Service" detects potential Denial of Service attacks and handles +sending of Retry packets on behalf of the server. As it is, by definition, +literally an on-path entity, the service must communicate some of the original +connection IDs back to the server so that it can pass client verification. It +also must either verify the address itself (with the server trusting this +verification) or make sure there is common context for the server to verify the +address using a service-generated token.¶

+

There are two different mechanisms to allow offload of DoS mitigation to a +trusted network service. One requires no shared state; the server need only be +configured to trust a retry service, though this imposes other operational +constraints. The other requires a shared key, but has no such constraints.¶

+
+
+

+7.1. Common Requirements +

+

Regardless of mechanism, a retry service has an active mode, where it is +generating Retry packets, and an inactive mode, where it is not, based on its +assessment of server load and the likelihood an attack is underway. The choice +of mode MAY be made on a per-packet or per-connection basis, through a +stochastic process or based on client address.¶

+

A configuration agent MUST distribute a list of QUIC versions the Retry Service +supports. It MAY also distribute either an "Allow-List" or a "Deny-List" of +other QUIC versions. It MUST NOT distribute both an Allow-List and a Deny-List.¶

+

The Allow-List or Deny-List MUST NOT include any versions included for Retry +Service Support.¶

+

The Configuration Agent MUST provide a means for the entity that controls the +Retry Service to report its supported version(s) to the configuration Agent. If +the entity has not reported this information, it MUST NOT activate the Retry +Service and the configuration agent MUST NOT distribute configuration that +activates it.¶

+

The configuration agent MAY delete versions from the final supported version +list if policy does not require the Retry Service to operate on those versions.¶

+

The configuration Agent MUST provide a means for the entities that control +servers behind the Retry Service to report either an Allow-List or a Deny-List.¶

+

If all entities supply Allow-Lists, the consolidated list MUST be the union of +these sets. If all entities supply Deny-Lists, the consolidated list MUST be +the intersection of these sets.¶

+

If entities provide a mixture of Allow-Lists and Deny-Lists, the consolidated +list MUST be a Deny-List that is the intersection of all provided Deny-Lists and +the inverses of all Allow-Lists.¶

+

If no entities that control servers have reported Allow-Lists or Deny-Lists, +the default is a Deny-List with the null set (i.e., all unsupported versions +will be admitted). This preserves the future extensibilty of QUIC.¶

+

A retry service MUST forward all packets for a QUIC version it does not +support that are not on a Deny-List or absent from an Allow-List. Note that if +servers support versions the retry service does not, this may increase load on +the servers.¶

+

Note that future versions of QUIC might not have Retry packets, require +different information in Retry, or use different packet type indicators.¶

+
+
+

+7.1.1. Considerations for Non-Initial Packets +

+

Initial Packets are especially effective at consuming server resources +because they cause the server to create connection state. Even when mitigating +this load with Retry Packets, the act of validating an Initial Token and sending +a Retry Packet is more expensive than the response to a non-Initial packet with +an unknown Connection ID: simply dropping it and/or sending a Stateless Reset.¶

+

Nevertheless, a Retry Service in Active Mode might desire to shield servers +from non-Initial packets that do not correspond to a previously admitted +Initial Packet. This has a number of considerations.¶

+
    +
  • If a Retry Service maintains no per-flow state whatsoever, it cannot +distinguish between valid and invalid non_Initial packets and MUST forward all +non-Initial Packets to the server.¶ +
  • +
  • For QUIC versions the Retry Service does not support and are present on the +Allow-List (or absent from the Deny-List), the Retry Service cannot distinguish +Initial Packets from other long headers and therefore MUST admit all long +headers.¶ +
  • +
  • If a Retry Service keeps per-flow state, it can identify 4-tuples that have +been previously approved, admit non-Initial packets from those flows, and +drop all others. However, dropping short headers will effectively break Address +Migration and NAT Rebinding when in Active Mode, as post-migration packets will +arrive with a previously unknown 4-tuple. This policy will also break connection +attempts using any new QUIC versions that begin connections with a short header.¶ +
  • +
  • If a Retry Service is integrated with a QUIC-LB routable load balancer, it +can verify that the Destination Connection ID is routable, and only admit +non-Initial packets with routable DCIDs. As the Connection ID encoding is +invariant across QUIC versions, the Retry Service can do this for all short +headers.¶ +
  • +
+

Nothing in this section prevents Retry Services from making basic syntax +correctness checks on packets with QUIC versions that it understands (e.g., +enforcing the Initial Packet datagram size minimum in version 1) and +dropping packets that are not routable with the QUIC specification.¶

+
+
+
+
+
+
+

+7.2. No-Shared-State Retry Service +

+

The no-shared-state retry service requires no coordination, except that the +server must be configured to accept this service and know which QUIC versions +the retry service supports. The scheme uses the first bit of the token to +distinguish between tokens from Retry packets (codepoint '0') and tokens from +NEW_TOKEN frames (codepoint '1').¶

+ +
+
+

+7.2.2. Service Requirements +

+

A no-shared-state retry service MUST be present on all paths from potential +clients to the server. These paths MUST fail to pass QUIC traffic should the +service fail for any reason. That is, if the service is not operational, the +server MUST NOT be exposed to client traffic. Otherwise, servers that have +already disabled their Retry capability would be vulnerable to attack.¶

+

The path between service and server MUST be free of any potential attackers. +Note that this and other requirements above severely restrict the operational +conditions in which a no-shared-state retry service can safely operate.¶

+

Retry tokens generated by the service MUST have the format below.¶

+
+
+
+
+Non-Shared-State Retry Service Token {
+  Token Type (1) = 0,
+  ODCIL (7) = 8..20,
+  RSCIL (8) = 0..20,
+  Original Destination Connection ID (64..160),
+  Retry Source Connection ID (0..160),
+  Opaque Data (..),
+}
+
+
+
Figure 6: +Format of non-shared-state retry service tokens +
+
+

The first bit of retry tokens generated by the service MUST be zero. The token +has the following additional fields:¶

+

ODCIL: The length of the original destination connection ID from the triggering +Initial packet. This is in cleartext to be readable for the server, but +authenticated later in the token. The Retry Service SHOULD reject any token +in which the value is less than 8.¶

+

RSCIL: The retry source connection ID length.¶

+

Original Destination Connection ID: This also in cleartext and authenticated +later.¶

+

Retry Source Connection ID: This also in cleartext and authenticated +later.¶

+

Opaque Data: This data MUST contain encrypted information that allows the retry +service to validate the client's IP address, in accordance with the QUIC +specification. It MUST also provide a cryptographically secure means to +validate the integrity of the entire token.¶

+

Upon receipt of an Initial packet with a token that begins with '0', the retry +service MUST validate the token in accordance with the QUIC specification.¶

+

In active mode, the service MUST issue Retry packets for all Client initial +packets that contain no token, or a token that has the first bit set to '1'. It +MUST NOT forward the packet to the server. The service MUST validate all tokens +with the first bit set to '0'. If successful, the service MUST forward the +packet with the token intact. If unsuccessful, it MUST drop the packet. The +Retry Service MAY send an Initial Packet containing a CONNECTION_CLOSE frame +with the INVALID_TOKEN error code when dropping the packet.¶

+

Note that this scheme has a performance drawback. When the retry service is in +active mode, clients with a token from a NEW_TOKEN frame will suffer a 1-RTT +penalty even though its token provides proof of address.¶

+

In inactive mode, the service MUST forward all packets that have no token or a +token with the first bit set to '1'. It MUST validate all tokens with the first +bit set to '0'. If successful, the service MUST forward the packet with the +token intact. If unsuccessful, it MUST either drop the packet or forward it +with the token removed. The latter requires decryption and re-encryption of the +entire Initial packet to avoid authentication failure. Forwarding the packet +causes the server to respond without the original_destination_connection_id +transport parameter, which preserves the normal QUIC signal to the client that +there is an on-path attacker.¶

+
+
+
+
+

+7.2.3. Server Requirements +

+

A server behind a non-shared-state retry service MUST NOT send Retry packets +for a QUIC version the retry service understands. It MAY send Retry for QUIC +versions the Retry Service does not understand.¶

+

Tokens sent in NEW_TOKEN frames MUST have the first bit set to '1'.¶

+

If a server receives an Initial Packet with the first bit set to '1', it could +be from a server-generated NEW_TOKEN frame and should be processed in accordance +with the QUIC specification. If a server receives an Initial Packet with the +first bit to '0', it is a Retry token and the server MUST NOT attempt to +validate it. Instead, it MUST assume the address is validated and MUST extract +the Original Destination Connection ID and Retry Source Connection ID, assuming +the format described in Section 7.2.2.¶

+
+
+
+
+
+
+

+7.3. Shared-State Retry Service +

+

A shared-state retry service uses a shared key, so that the server can decode +the service's retry tokens. It does not require that all traffic pass through +the Retry service, so servers MAY send Retry packets in response to Initial +packets that don't include a valid token.¶

+

Both server and service must have time synchronized with respect to one another to prevent tokens +being incorrectly marked as expired, though tight synchronization is +unnecessary.¶

+

The tokens are protected using AES128-GCM AEAD, as explained in +Section 7.3.1. All tokens, generated by either the server or +retry service, MUST use the following format, which includes:¶

+
    +
  • A 96 bit unique token number transmitted in clear text, but protected as part +of the AEAD associated data.¶ +
  • +
  • An 8 bit token key identifier.¶ +
  • +
  • A token body, encoding the Original Destination Connection ID, the Retry +Source Connection ID, and the Timestamp, optionally followed by server specific +Opaque Data.¶ +
  • +
+

The token protection uses an 128 bit representation of the source IP address +from the triggering Initial packet. The client IP address is 16 octets. If an +IPv4 address, the last 12 octets are zeroes.¶

+

If there is a Network Address Translator (NAT) in the server infrastructure that +changes the client IP, the Retry Service MUST either be positioned behind the +NAT, or the NAT must have the token key to rewrite the Retry token accordingly. +Note also that a host that obtains a token through a NAT and then attempts to +connect over a path that does not have an identically configured NAT will fail +address validation.¶

+

The 96 bit unique token number is set to a random value using a +cryptography-grade random number generator.¶

+

The token key identifier and the corresponding AEAD key and AEAD IV are +provisioned by the configuration agent.¶

+

The token body is encoded as follows:¶

+
+
+
+
+Shared-State Retry Service Token Body {
+   ODCIL (8) = 0..20,
+   RSCIL (8) = 0..20,
+   [Port (16)],
+   Original Destination Connection ID (0..160),
+   Retry Source Connection ID (0..160),
+   Timestamp (64),
+   Opaque Data (..),
+}
+
+
+
Figure 7: +Body of shared-state retry service tokens +
+
+

The token body has the following fields:¶

+

ODCIL: The original destination connection ID length. Tokens in NEW_TOKEN frames +MUST set this field to zero.¶

+

RSCIL: The retry source connection ID length. Tokens in NEW_TOKEN frames MUST +set this field to zero.¶

+

Port: The Source Port of the UDP datagram that triggered the Retry packet. +This field MUST be present if and only if the ODCIL is greater than zero. This +field is therefore always absent in tokens in NEW_TOKEN frames.¶

+

Original Destination Connection ID: The server or Retry Service copies this +from the field in the client Initial packet.¶

+

Retry Source Connection ID: The server or Retry service copies this from the +Source Connection ID of the Retry packet.¶

+

Timestamp: The Timestamp is a 64-bit integer, in network order, that expresses +the expiration time of the token as a number of seconds in POSIX time (see Sec. +4.16 of [TIME_T]).¶

+

Opaque Data: The server may use this field to encode additional information, +such as congestion window, RTT, or MTU. The Retry Service MUST have zero-length +opaque data.¶

+

Some implementations of QUIC encode in the token the Initial Packet Number used +by the client, in order to verify that the client sends the retried Initial +with a PN larger that the triggering Initial. Such implementations will encode +the Initial Packet Number as part of the opaque data. As tokens may be +generated by the Service, servers MUST NOT reject tokens because they lack +opaque data and therefore the packet number.¶

+
+
+

+7.3.1. Token Protection with AEAD +

+

On the wire, the token is presented as:¶

+
+
+
+
+Shared-State Retry Service Token {
+  Unique Token Number (96),
+  Key Sequence (8),
+  Encrypted Shared-State Retry Service Token Body (80..),
+  AEAD Integrity Check Value (128),
+}
+
+
+
Figure 8: +Wire image of shared-state retry service tokens +
+
+

The tokens are protected using AES128-GCM as follows:¶

+
    +
  • The token key and IV are retrieved using the Key Sequence.¶ +
  • +
  • The nonce, N, is formed by combining the IV with the 96 bit unique token +number. The 96 bits of the unique token number are left-padded with zeros to the +size of the IV. The exclusive OR of the padded unique token number and the IV +forms the AEAD nonce.¶ +
  • +
  • The associated data is a formatted as a pseudo header by combining the +cleartext part of the token with the IP address of the client.¶ +
  • +
+
+
+
+
+Shared-State Retry Service Token Pseudoheader {
+  IP Address (128),
+  Unique Token Number (96),
+  Key Sequence (8),
+}
+
+
+
Figure 9: +Psuedoheader for shared-state retry service tokens +
+
+
    +
  • The input plaintext for the AEAD is the token body. The output ciphertext of +the AEAD is transmitted in place of the token body.¶ +
  • +
  • The AEAD Integrity Check Value(ICV), defined in Section 6 of [RFC4106], is +computed as part of the AEAD encryption process, and is verified during + decryption.¶ +
  • +
+
+
+
+
+

+7.3.2. Configuration Agent Actions +

+

The configuration agent generates and distributes a "token key", a "token IV", +a key sequence, and the information described in Section 7.1.¶

+
+
+
+
+

+7.3.3. Service Requirements +

+

In inactive mode, the Retry service forwards all packets without further +inspection or processing.¶

+

Retry services MUST NOT issue Retry packets except where explicitly allowed +below, to avoid sending a Retry packet in response to a Retry token.¶

+

When in active mode, the service MUST generate Retry tokens with the format +described above when it receives a client Initial packet with no token.¶

+

The service SHOULD decrypt incoming tokens. The service SHOULD drop packets +with unknown key sequence, or an AEAD ICV that does not match the expected +value. (By construction, the AEAD ICV will only match if the client IP +Address also matches.)¶

+

If the token verification passes, and the ODCIL and RSCIL fields are both zero, +then this is a NEW_TOKEN token generated by the server. Processing of NEW_TOKEN +tokens is subtly different from Retry tokens, as described below.¶

+

The service SHOULD drop a packet containing a token where the ODCIL is greater +than zero and less than the minimum number of octets for a client-generated CID +(8 in QUIC version 1). The service also SHOULD drop a packet containing a token +where the ODCIL is zero and RSCIL is nonzero.¶

+

If the Timestamp of a token points to time in the past, the token has expired; +however, in order to allow for clock skew, it SHOULD NOT consider tokens to be +expired if the Timestamp encodes a few seconds in the past. An active Retry +service SHOULD drop packets with expired tokens. If a NEW_TOKEN token, the +service MUST generate a Retry packet in response. It MUST NOT generate a Retry +packet in response to an expired Retry token.¶

+

If a Retry token, the service SHOULD drop packets where the port number +encoded in the token does not match the source port in the encapsulating UDP +header.¶

+

All other packets SHOULD be forwarded to the server.¶

+
+
+
+
+

+7.3.4. Server Requirements +

+

When issuing Retry or NEW_TOKEN tokens, the server MUST include the client IP +address in the authenticated data as specified in +Section 7.3.1. The ODCIL and RSCIL fields are zero for +NEW_TOKEN tokens, making them easily distinguishable from Retry tokens.¶

+

The server MUST validate all tokens that arrive in Initial packets, as they may +have bypassed the Retry service.¶

+

For Retry tokens that follow the format above, servers SHOULD use the timestamp +field to apply its expiration limits for tokens. This need not be precisely +synchronized with the retry service. However, servers MAY allow retry tokens +marked as being a few seconds in the past, due to possible clock +synchronization issues.¶

+

After decrypting the token, the server uses the corresponding fields to +populate the original_destination_connection_id transport parameter, with a +length equal to ODCIL, and the retry_source_connection_id transport parameter, +with length equal to RSCIL.¶

+

For QUIC versions the service does not support, the server MAY use any token +format.¶

+

As discussed in [QUIC-TRANSPORT], a server MUST NOT send a Retry packet in +response to an Initial packet that contains a retry token.¶

+
+
+
+
+
+
+
+
+

+8. Configuration Requirements +

+

QUIC-LB requires common configuration to synchronize understanding of encodings +and guarantee explicit consent of the server.¶

+

The load balancer and server MUST agree on a routing algorithm, server ID +allocation method, and the relevant parameters for that algorithm.¶

+

All algorithms require a server ID length. If server IDs are statically +allocated, the load balancer MUST receive the full table of mappings, and +each server must receive its assigned SID(s), from the configuration agent.¶

+

For Stream Cipher CID Routing, the servers and load balancer also MUST have a +common understanding of the key and nonce length.¶

+

For Block Cipher CID Routing, the servers and load balancer also MUST have a +common understanding of the key.¶

+

Note that server IDs are opaque bytes, not integers, so there is no notion of +network order or host order.¶

+

A server configuration MUST specify if the first octet encodes the CID length. +Note that a load balancer does not need the CID length, as the required bytes +are present in the QUIC packet.¶

+

A full QUIC-LB server configuration MUST also specify the supported QUIC +versions of any Retry Service. If a shared-state service, the server also must +have the token key.¶

+

A non-shared-state Retry Service need only be configured with the QUIC versions +it supports, and an Allow- or Deny-List. A shared-state Retry Service also needs +the token key, and to be aware if a NAT sits between it and the servers.¶

+

Appendix A provides a YANG Model of the a full QUIC-LB configuration.¶

+
+
+
+
+

+9. Additional Use Cases +

+

This section discusses considerations for some deployment scenarios not implied +by the specification above.¶

+
+
+

+9.1. Load balancer chains +

+

Some network architectures may have multiple tiers of low-state load balancers, +where a first tier of devices makes a routing decision to the next tier, and so +on, until packets reach the server. Although QUIC-LB is not explicitly designed +for this use case, it is possible to support it.¶

+

If each load balancer is assigned a range of server IDs that is a subset of the +range of IDs assigned to devices that are closer to the client, then the first +devices to process an incoming packet can extract the server ID and then map it +to the correct forwarding address. Note that this solution is extensible to +arbitrarily large numbers of load-balancing tiers, as the maximum server ID +space is quite large.¶

+
+
+
+
+

+9.2. Moving connections between servers +

+

Some deployments may transparently move a connection from one server to another. +The means of transferring connection state between servers is out of scope of +this document.¶

+

To support a handover, a server involved in the transition could issue CIDs that +map to the new server via a NEW_CONNECTION_ID frame, and retire CIDs associated +with the new server using the "Retire Prior To" field in that frame.¶

+

Alternately, if the old server is going offline, the load balancer could simply +map its server ID to the new server's address.¶

+
+
+
+
+
+
+

+10. Version Invariance of QUIC-LB +

+

Non-shared-state Retry Services are inherently dependent on the format (and +existence) of Retry Packets in each version of QUIC, and so Retry Service +configuration explicitly includes the supported QUIC versions.¶

+

The server ID encodings, and requirements for their handling, are designed to be +QUIC version independent (see [QUIC-INVARIANTS]). A QUIC-LB load balancer will +generally not require changes as servers deploy new versions of QUIC. However, +there are several unlikely future design decisions that could impact the +operation of QUIC-LB.¶

+

The maximum Connection ID length could be below the minimum necessary for one or +more encoding algorithms.¶

+

Section 4.1 provides guidance about how load balancers should handle +unroutable DCIDs. This guidance, and the implementation of an algorithm to +handle these DCIDs, rests on some assumptions:¶

+
    +
  • Incoming short headers do not contain DCIDs that are client-generated.¶ +
  • +
  • The use of client-generated incoming DCIDs does not persist beyond a few round +trips in the connection.¶ +
  • +
  • While the client is using DCIDs it generated, some exposed fields (IP address, +UDP port, client-generated destination Connection ID) remain constant for all +packets sent on the same connection.¶ +
  • +
  • Dynamic server ID allocation is dependent on client-generated Destination CIDs +in Initial Packets being at least 8 octets in length. If they are not, the load +balancer may not be able to extract a valid server ID to add to its table. +Configuring a shorter server ID length can increase robustness to a change.¶ +
  • +
+

While this document does not update the commitments in [QUIC-INVARIANTS], the +additional assumptions are minimal and narrowly scoped, and provide a likely +set of constants that load balancers can use with minimal risk of version- +dependence.¶

+

If these assumptions are invalid, this specification is likely to lead to loss +of packets that contain unroutable DCIDs, and in extreme cases connection +failure.¶

+

Some load balancers might inspect elements of the Server Name Indication (SNI) +extension in the TLS Client Hello to make a routing decision. Note that the +format and cryptographic protection of this information may change in future +versions or extensions of TLS or QUIC, and therefore this functionality is +inherently not version-invariant.¶

+
+
+
+
+

+11. Security Considerations +

+

QUIC-LB is intended to prevent linkability. Attacks would therefore attempt to +subvert this purpose.¶

+

Note that the Plaintext CID algorithm makes no attempt to obscure the server +mapping, and therefore does not address these concerns. It exists to allow +consistent CID encoding for compatibility across a network infrastructure, which +makes QUIC robust to NAT rebinding. Servers that are running the Plaintext CID +algorithm SHOULD only use it to generate new CIDs for the Server Initial Packet +and SHOULD NOT send CIDs in QUIC NEW_CONNECTION_ID frames, except that it sends +one new Connection ID in the event of config rotation Section 3.1. +Doing so might falsely suggest to the client that said CIDs were generated in a +secure fashion.¶

+

A linkability attack would find some means of determining that two connection +IDs route to the same server. As described above, there is no scheme that +strictly prevents linkability for all traffic patterns, and therefore efforts to +frustrate any analysis of server ID encoding have diminishing returns.¶

+
+
+

+11.1. Attackers not between the load balancer and server +

+

Any attacker might open a connection to the server infrastructure and +aggressively simulate migration 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.¶

+

The Stream and Block Cipher CID algorithms provide robust protection against +any sort of linkage. The Plaintext CID algorithm makes no attempt to protect +this encoding.¶

+

Were this analysis to obtain the server encoding, then on-path observers might +apply this analysis to correlating different client IP addresses.¶

+
+
+
+
+

+11.2. Attackers between the load balancer and server +

+

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 IDs for that connection.¶

+
+
+
+
+

+11.3. Multiple Configuration IDs +

+

During the period in which there are multiple deployed configuration IDs (see +Section 3.1), there is a slight increase in linkability. The server +space is effectively divided into segments with CIDs that have different config +rotation bits. Entities that manage servers SHOULD strive to minimize these +periods by quickly deploying new configurations across the server pool.¶

+
+
+
+
+

+11.4. Limited configuration scope +

+

A simple deployment of QUIC-LB in a cloud provider might use the same global +QUIC-LB configuration across all its load balancers that route to customer +servers. An attacker could then simply become a customer, obtain the +configuration, and then extract server IDs of other customers' connections at +will.¶

+

To avoid this, the configuration agent SHOULD issue QUIC-LB configurations to +mutually distrustful servers that have different keys for encryption +algorithms. In many cases, the load balancers can distinguish these +configurations by external IP address.¶

+

However, assigning multiple entities to an IP address is complimentary with +concealing DNS requests (e.g., DoH [RFC8484]) and the TLS Server Name +Indicator (SNI) ([I-D.ietf-tls-esni]) to obscure the ultimate destination +of traffic. While the load balancer's fallback algorithm +(Section 4.2) can use the SNI to make a routing decision on the +first packet, there are three ways to route subsequent packets:¶

+
    +
  • all co-tenants can use the same QUIC-LB configuration, leaking the server +mapping to each other as described above;¶ +
  • +
  • co-tenants can be issued one of up to three configurations distinguished by +the config rotation bits (Section 3.1), exposing information about the +target domain to the entire network; or¶ +
  • +
  • tenants can use 4-tuple routing in their CIDs (in which case they SHOULD +disable migration in their connections), which neutralizes the value of +QUIC-LB but preserves privacy.¶ +
  • +
+

When configuring QUIC-LB, administrators must evaluate the privacy tradeoff +considering the relative value of each of these properties, given the trust +model between tenants, the presence of methods to obscure the domain name, and +value of address migration in the tenant use cases.¶

+

As the plaintext algorithm makes no attempt to conceal the server mapping, +these deployments SHOULD simply use a common configuration.¶

+
+
+
+
+

+11.5. Stateless Reset Oracle +

+

Section 21.9 of [QUIC-TRANSPORT] discusses the Stateless Reset Oracle attack. +For a server deployment to be vulnerable, an attacking client must be able to +cause two packets with the same Destination CID to arrive at two different +servers that share the same cryptographic context for Stateless Reset tokens. As +QUIC-LB requires deterministic routing of DCIDs over the life of a connection, +it is a sufficient means of avoiding an Oracle without additional measures.¶

+
+
+
+
+

+11.6. Connection ID Entropy +

+

The Stream Cipher and Block Cipher algorithms need to generate different cipher +text for each generated Connection ID instance to protect the Server ID. To +do so, at least four octets of the Block Cipher CID and at least eight octets +of the Stream Cipher CID are reserved for a nonce that, if used only once, will +result in unique cipher text for each Connection ID.¶

+

If servers simply increment the nonce by one with each generated connection ID, +then it is safe to use the existing keys until any server's nonce counter +exhausts the allocated space and rolls over to zero. Whether or not it +implements this method, the server MUST NOT reuse a nonce until it switches to a +configuration with new keys.¶

+

Configuration agents SHOULD implement an out-of-band method to discover when +servers are in danger of exhausting their nonce space, and SHOULD respond by +issuing a new configuration. A server that has exhausted its nonces MUST +either switch to a different configuration, or if none exists, use the 4-tuple +routing config rotation codepoint.¶

+
+
+
+
+

+11.7. Shared-State Retry Keys +

+

The Shared-State Retry Service defined in Section 7.3 describes the +format of retry tokens or new tokens protected and encrypted using AES128-GCM. +Each token includes a 96 bit randomly generated unique token number, and an 8 +bit identifier of the AES-GCM encryption key. There are three important security +considerations for these tokens:¶

+
    +
  • An attacker that obtains a copy of the encryption key will be able to decrypt +and forge tokens.¶ +
  • +
  • Attackers may be able to retrieve the key if they capture a sufficently large +number of retry tokens encrypted with a given key.¶ +
  • +
  • Confidentiality of the token data will fail if separate tokens reuse the +same 96 bit unique token number and the same key.¶ +
  • +
+

To protect against disclosure of keys to attackers, service and servers MUST +ensure that the keys are stored securely. To limit the consequences of potential +exposures, the time to live of any given key should be limited.¶

+

Section 6.6 of [QUIC-TLS] states that "Endpoints MUST count +the number of encrypted packets for each set of keys. If the total number of +encrypted packets with the same key exceeds the confidentiality limit for the +selected AEAD, the endpoint MUST stop using those keys." It goes on with the +specific limit: "For AEAD_AES_128_GCM and AEAD_AES_256_GCM, the confidentiality +limit is 2^23 encrypted packets; see Appendix B.1." It is prudent to adopt the +same limit here, and configure the service in such a way that no more than 2^23 +tokens are generated with the same key.¶

+

In order to protect against collisions, the 96 bit unique token numbers should +be generated using a cryptographically secure pseudorandom number generator +(CSPRNG), as specified in Appendix C.1 of the TLS 1.3 specification +[RFC8446]. With proper random numbers, if fewer than 2^40 tokens are +generated with a single key, the risk of collisions is lower than 0.001%.¶

+
+
+
+
+
+
+

+12. IANA Considerations +

+

There are no IANA requirements.¶

+
+
+
+

+13. References +

+
+

+13.1. Normative References +

+
+
[QUIC-INVARIANTS]
+
+Thomson, M., "Version-Independent Properties of QUIC", Work in Progress, Internet-Draft, draft-ietf-quic-invariants-13, , <https://www.ietf.org/archive/id/draft-ietf-quic-invariants-13.txt>.
+
+
[QUIC-TRANSPORT]
+
+Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed and Secure Transport", Work in Progress, Internet-Draft, draft-ietf-quic-transport-34, , <https://www.ietf.org/archive/id/draft-ietf-quic-transport-34.txt>.
+
+
[RFC8446]
+
+Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, , <https://www.rfc-editor.org/info/rfc8446>.
+
+
[TIME_T]
+
+"Open Group Standard: Vol. 1: Base Definitions, Issue 7", IEEE Std 1003.1 , , <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16>.
+
+
+
+
+

+13.2. Informative References +

+
+
[I-D.ietf-tls-esni]
+
+Rescorla, E., Oku, K., Sullivan, N., and C. A. Wood, "TLS Encrypted Client Hello", Work in Progress, Internet-Draft, draft-ietf-tls-esni-10, , <https://www.ietf.org/archive/id/draft-ietf-tls-esni-10.txt>.
+
+
[QUIC-TLS]
+
+Thomson, M. and S. Turner, "Using TLS to Secure QUIC", Work in Progress, Internet-Draft, draft-ietf-quic-tls-34, , <https://www.ietf.org/archive/id/draft-ietf-quic-tls-34.txt>.
+
+
[RFC2119]
+
+Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
+
+
[RFC4106]
+
+Viega, J. and D. McGrew, "The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating Security Payload (ESP)", RFC 4106, DOI 10.17487/RFC4106, , <https://www.rfc-editor.org/info/rfc4106>.
+
+
[RFC6020]
+
+Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, , <https://www.rfc-editor.org/info/rfc6020>.
+
+
[RFC7696]
+
+Housley, R., "Guidelines for Cryptographic Algorithm Agility and Selecting Mandatory-to-Implement Algorithms", BCP 201, RFC 7696, DOI 10.17487/RFC7696, , <https://www.rfc-editor.org/info/rfc7696>.
+
+
[RFC8340]
+
+Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, , <https://www.rfc-editor.org/info/rfc8340>.
+
+
[RFC8484]
+
+Hoffman, P. and P. McManus, "DNS Queries over HTTPS (DoH)", RFC 8484, DOI 10.17487/RFC8484, , <https://www.rfc-editor.org/info/rfc8484>.
+
+
+
+
+
+
+

+Appendix A. QUIC-LB YANG Model +

+

This YANG model conforms to [RFC6020] and expresses a complete QUIC-LB +configuration.¶

+
+
+module ietf-quic-lb {
+  yang-version "1.1";
+  namespace "urn:ietf:params:xml:ns:yang:ietf-quic-lb";
+  prefix "quic-lb";
+
+  import ietf-yang-types {
+    prefix yang;
+    reference
+      "RFC 6991: Common YANG Data Types.";
+  }
+
+  import ietf-inet-types {
+    prefix inet;
+    reference
+      "RFC 6991: Common YANG Data Types.";
+  }
+
+  organization
+    "IETF QUIC Working Group";
+
+  contact
+    "WG Web:   <http://datatracker.ietf.org/wg/quic>
+     WG List:  <quic@ietf.org>
+
+     Authors: Martin Duke (martin.h.duke at gmail dot com)
+              Nick Banks (nibanks at microsoft dot com)";
+
+  description
+    "This module enables the explicit cooperation of QUIC servers with
+     trusted intermediaries without breaking important protocol features.
+
+     Copyright (c) 2021 IETF Trust and the persons identified as
+     authors of the code.  All rights reserved.
+
+     Redistribution and use in source and binary forms, with or
+     without modification, is permitted pursuant to, and subject to
+     the license terms contained in, the Simplified BSD License set
+     forth in Section 4.c of the IETF Trust's Legal Provisions
+     Relating to IETF Documents
+     (https://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC XXXX
+     (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
+     for full legal notices.
+
+     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
+     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
+     'MAY', and 'OPTIONAL' in this document are to be interpreted as
+     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
+     they appear in all capitals, as shown here.";
+
+  revision "2021-01-29" {
+    description
+      "Initial Version";
+    reference
+      "RFC XXXX, QUIC-LB: Generating Routable QUIC Connection IDs";
+  }
+
+  container quic-lb {
+    presence "The container for QUIC-LB configuration.";
+
+    description
+      "QUIC-LB container.";
+
+    typedef quic-lb-key {
+      type yang:hex-string {
+        length 47;
+      }
+      description
+        "This is a 16-byte key, represented with 47 bytes";
+    }
+
+    list cid-configs {
+      key "config-rotation-bits";
+      description
+        "List up to three load balancer configurations";
+
+      leaf config-rotation-bits {
+        type uint8 {
+          range "0..2";
+        }
+        mandatory true;
+        description
+          "Identifier for this CID configuration.";
+      }
+
+      leaf first-octet-encodes-cid-length {
+        type boolean;
+        default false;
+        description
+          "If true, the six least significant bits of the first CID
+           octet encode the CID length minus one.";
+      }
+
+      leaf cid-key {
+        type quic-lb-key;
+        description
+          "Key for encrypting the connection ID. If absent, the
+           configuration uses the Plaintext algorithm.";
+      }
+
+      leaf nonce-length {
+        type uint8 {
+          range "8..16";
+        }
+        must '(../cid-key)' {
+          error-message "nonce-length only valid if cid-key is set";
+        }
+        description
+          "Length, in octets, of the nonce. If absent when cid-key is
+           present, the configuration uses the Block Cipher Algorithm.
+           If present along with cid-key, the configurationuses the
+           Stream Cipher Algorithm.";
+      }
+
+      leaf lb-timeout {
+        type uint32;
+        description
+          "Existence means the configuration uses dynamic Server ID allocation.
+           Time (in seconds) to keep a server ID allocation if no packets with
+           that server ID arrive.";
+      }
+
+      leaf server-id-length {
+        type uint8 {
+          range "1..18";
+        }
+        must '(../lb-timeout and . <= 7) or
+               (not(../lb-timeout) and
+                (not(../cid-key) and . <= 16) or
+                ((../nonce-length) and . <= (19 - ../nonce-length)) or
+                ((../cid-key) and not(../nonce-length) and . <= 12))' {
+          error-message
+            "Server ID length too long for routing algorithm and server ID
+             allocation method";
+        }
+        mandatory true;
+        description
+          "Length (in octets) of a server ID. Further range-limited
+           by sid-allocation, cid-key, and nonce-length.";
+      }
+
+      list server-id-mappings {
+        when "not(../lb-timeout)";
+        key "server-id";
+        description "Statically allocated Server IDs";
+
+        leaf server-id {
+          type yang:hex-string;
+          must "string-length(.) = 3 * ../../server-id-length - 1";
+          mandatory true;
+          description
+            "An allocated server ID";
+        }
+
+        leaf server-address {
+          type inet:ip-address;
+          mandatory true;
+          description
+            "Destination address corresponding to the server ID";
+        }
+      }
+    }
+
+    container retry-service-config {
+      description
+        "Configuration of Retry Service. If supported-versions is empty, there
+         is no retry service. If token-keys is empty, it uses the non-shared-
+         state service. If present, it uses shared-state tokens.";
+
+      leaf-list supported-versions {
+        type uint32;
+        description
+          "QUIC versions that the retry service supports. If empty, there
+           is no retry service.";
+      }
+
+      leaf unsupported-version-default {
+        type enumeration {
+          enum allow {
+            description "Unsupported versions admitted by default";
+          }
+          enum deny {
+            description "Unsupported versions denied by default";
+          }
+        }
+        default allow;
+        description
+          "Are unsupported versions not in version-exceptions allowed
+           or denied?";
+      }
+
+      leaf-list version-exceptions {
+        type uint32;
+        description
+          "Exceptions to the default-deny or default-allow rule.";
+      }
+
+      list token-keys {
+        key "key-sequence-number";
+        description
+          "list of active keys, for key rotation purposes. Existence implies
+           shared-state format";
+
+        leaf key-sequence-number {
+          type uint8;
+          mandatory true;
+          description
+            "Identifies the key used to encrypt the token";
+        }
+
+        leaf token-key {
+          type quic-lb-key;
+          mandatory true;
+          description
+            "16-byte key to encrypt the token";
+        }
+
+        leaf token-iv {
+          type yang:hex-string {
+            length 23;
+          }
+          mandatory true;
+          description
+            "8-byte IV to encrypt the token, encoded in 23 bytes";
+        }
+      }
+    }
+  }
+}
+
¶ +
+
+
+

+A.1. Tree Diagram +

+

This summary of the YANG model uses the notation in [RFC8340].¶

+
+
+module: ietf-quic-lb
+  +--rw quic-lb
+     +--rw cid-configs*
+     |       [config-rotation-bits]
+     |  +--rw config-rotation-bits             uint8
+     |  +--rw first-octet-encodes-cid-length?  boolean
+     |  +--rw cid-key?                         yang:hex-string
+     |  +--rw nonce-length?                    uint8
+     |  +--rw lb-timeout?                      uint32
+     |  +--rw server-id-length                 uint8
+     |  +--rw server-id-mappings*?
+     |  |       [server-id]
+     |  |  +--rw server-id                     yang:hex-string
+     |  |  +--rw server-address                inet:ip-address
+     +--ro retry-service-config
+     |  +--rw supported-versions*
+     |  |  +--rw version                       uint32
+     |  +--rw unsupported-version-default      enumeration {allow deny}
+     |  +--rw version-exceptions*
+     |  |  +--rw version                       uint32
+     |  +--rw token-keys*?
+     |  |       [key-sequence-number]
+     |  |  +--rw key-sequence-number           uint8
+     |  |  +--rw token-key                     yang:hex-string
+     |  |  +--rw token-iv                      yang:hex-string
+
¶ +
+
+
+
+
+
+
+

+Appendix B. Load Balancer Test Vectors +

+

Each section of this draft includes multiple sets of load balancer +configuration, each of which has five examples of server ID and server use +bytes and how they are encoded in a CID.¶

+

In some cases, there are no server use bytes. Note that, for simplicity, the +first octet bits used for neither config rotation nor length self-encoding are +random, rather than listed in the server use field. Therefore, a server +implementation using these parameters may generate CIDs with a slightly different +first octet.¶

+

This section uses the following abbreviations:¶

+
+
+cid      Connection ID
+cr_bits  Config Rotation Bits
+LB       Load Balancer
+sid      Server ID
+sid_len  Server ID length
+su       Server Use Bytes
+
¶ +
+

All values except length_self_encoding and sid_len are expressed in hexidecimal +format.¶

+
+
+

+B.1. Plaintext Connection ID Algorithm +

+
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1
+
+cid 01be sid be su
+cid 0221b7 sid 21 su b7
+cid 03cadfd8 sid ca su dfd8
+cid 041e0c9328 sid 1e su 0c9328
+cid 050c8f6d9129 sid 0c su 8f6d9129
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2
+
+cid 02aab0 sid aab0 su
+cid 3ac4b106 sid c4b1 su 06
+cid 08bd3cf4a0 sid bd3c su f4a0
+cid 3771d59502d6 sid 71d5 su 9502d6
+cid 1d57dee8b888f3 sid 57de su e8b888f3
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3
+
+cid 0336c976 sid 36c976 su
+cid 04aa291806 sid aa2918 su 06
+cid 0586897bd8b6 sid 86897b su d8b6
+cid 063625bcae4de0 sid 3625bc su ae4de0
+cid 07966fb1f3cb535f sid 966fb1 su f3cb535f
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4
+
+cid 185172fab8 sid 5172fab8 su
+cid 2eb7ff2c9297 sid b7ff2c92 su 97
+cid 14f3eb3dd3edbe sid f3eb3dd3 su edbe
+cid 3feb31cece744b74 sid eb31cece su 744b74
+cid 06b9f34c353ce23bb5 sid b9f34c35 su 3ce23bb5
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5
+
+cid 05bdcd8d0b1d sid bdcd8d0b1d su
+cid 06aee673725a63 sid aee673725a su 63
+cid 07bbf338ddbf37f4 sid bbf338ddbf su 37f4
+cid 08fbbca64c26756840 sid fbbca64c26 su 756840
+cid 09e7737c495b93894e34 sid e7737c495b su 93894e34
+
¶ +
+
+
+
+
+

+B.2. Stream Cipher Connection ID Algorithm +

+

In each case below, the server is using a plain text nonce value of zero.¶

+
+
+LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 12 sid_len 1
+    key 4d9d0fd25a25e7f321ef464e13f9fa3d
+
+cid 0d69fe8ab8293680395ae256e89c sid c5 su
+cid 0e420d74ed99b985e10f5073f43027 sid d5 su 27
+cid 0f380f440c6eefd3142ee776f6c16027 sid 10 su 6027
+cid 1020607efbe82049ddbf3a7c3d9d32604d sid 3c su 32604d
+cid 11e132d12606a1bb0fa17e1caef00ec54c10 sid e3 su 0ec54c10
+
+LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 2
+    key 49e1cec7fd264b1f4af37413baf8ada9
+
+cid 3d3a5e1126414271cc8dc2ec7c8c15 sid f7fe su
+cid 007042539e7c5f139ac2adfbf54ba748 sid eaf4 su 48
+cid 2bc125dd2aed2aafacf59855d99e029217 sid e880 su 9217
+cid 3be6728dc082802d9862c6c8e4dda3d984d8 sid 62c6 su d984d8
+cid 1afe9c6259ad350fc7bad28e0aeb2e8d4d4742 sid 8502 su 8d4d4742
+
+LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 14 sid_len 3
+    key 2c70df0b399bd33a7335523dcdb884ad
+
+cid 11d62e8670565cd30b552edff6782ff5a740 sid d794bb su
+cid 12c70e481f49363cabd9370d1fd5012c12bca5 sid 2cbd5d su a5
+cid 133b95dfd8ad93566782f8424df82458069fc9e9 sid d126cd su c9e9
+cid 13ac6ffcd635532ab60370306c7ee572d6b6e795 sid 539e42 su e795
+cid 1383ed07a9700777ff450bb39bb9c1981266805c sid 9094dd su 805c
+
+LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 4
+    key 2297b8a95c776cf9c048b76d9dc27019
+
+cid 32873890c3059ca62628089439c44c1f84 sid 7398d8ca su
+cid 1ff7c7d7b9823954b178636c99a7dc93ac83 sid 9655f091 su 83
+cid 31044000a5ebb3bf2fa7629a17f2c78b077c17 sid 8b035fc6 su 7c17
+cid 1791bd28c66721e8fea0c6f34fd2d8e663a6ef70 sid 6672e0e2 su a6ef70
+cid 3df1d90ad5ccd5f8f475f040e90aeca09ec9839d sid b98b1fff su c9839d
+
+LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 8 sid_len 5
+    key 484b2ed942d9f4765e45035da3340423
+
+cid 0da995b7537db605bfd3a38881ae sid 391a7840dc su
+cid 0ed8d02d55b91d06443540d1bf6e98 sid 10f7f7b284 su 98
+cid 0f3f74be6d46a84ccb1fd1ee92cdeaf2 sid 0606918fc0 su eaf2
+cid 1045626dbf20e03050837633cc5650f97c sid e505eea637 su 50f97c
+cid 11bb9a17f691ab446a938427febbeb593eaa sid 99343a2a96 su eb593eaa
+
¶ +
+
+
+
+
+

+B.3. Block Cipher Connection ID Algorithm +

+
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1
+    key 411592e4160268398386af84ea7505d4
+
+cid 10564f7c0df399f6d93bdddb1a03886f25 sid 23 su 05231748a80884ed58007847eb9fd0
+cid 10d5c03f9dd765d73b3d8610b244f74d02 sid 15 su 76cd6b6f0d3f0b20fc8e633e3a05f3
+cid 108ca55228ab23b92845341344a2f956f2 sid 64 su 65c0ce170a9548717498b537cb8790
+cid 10e73f3d034aef2f6f501e3a7693d6270a sid 07 su f9ad10c84cc1e89a2492221d74e707
+cid 101a6ce13d48b14a77ecfd365595ad2582 sid 6c su 76ce4689b0745b956ef71c2608045d
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2
+    key 92ce44aecd636aeeff78da691ef48f77
+
+cid 20aa09bc65ed52b1ccd29feb7ef995d318 sid a52f su 99278b92a86694ff0ecd64bc2f73
+cid 30b8dbef657bd78a2f870e93f9485d5211 sid 6c49 su 7381c8657a388b4e9594297afe96
+cid 043a8137331eacd2e78383279b202b9a6d sid 4188 su 5ac4b0e0b95f4e7473b49ee2d0dd
+cid 3ba71ea2bcf0ab95719ab59d3d7fde770d sid 8ccc su 08728807605db25f2ca88be08e0f
+cid 37ef1956b4ec354f40dc68336a23d42b31 sid c89d su 5a3ccd1471caa0de221ad6c185c0
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3
+    key 5c49cb9265efe8ae7b1d3886948b0a34
+
+cid 10efcffc161d232d113998a49b1dbc4aa0 sid 0690b3 su 958fc9f38fe61b83881b2c5780
+cid 10fc13bdbcb414ba90e391833400c19505 sid 031ac3 su 9a55e1e1904e780346fcc32c3c
+cid 10d3cc1efaf5dc52c7a0f6da2746a8c714 sid 572d3a su ff2ec9712664e7174dc03ca3f8
+cid 107edf37f6788e33c0ec7758a485215f2b sid 562c25 su 02c5a5dcbea629c3840da5f567
+cid 10bc28da122582b7312e65aa096e9724fc sid 2fa4f0 su 8ae8c666bfc0fc364ebfd06b9a
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4
+    key e787a3a491551fb2b4901a3fa15974f3
+
+cid 26125351da12435615e3be6b16fad35560 sid 0cb227d3 su 65b40b1ab54e05bff55db046
+cid 14de05fc84e41b611dfbe99ed5b1c9d563 sid 6a0f23ad su d73bee2f3a7e72b3ffea52d9
+cid 1306052c3f973db87de6d7904914840ff1 sid ca21402d su 5829465f7418b56ee6ada431
+cid 1d202b5811af3e1dba9ea2950d27879a92 sid b14e1307 su 4902aba8b23a5f24616df3cf
+cid 26538b78efc2d418539ad1de13ab73e477 sid a75e0148 su 0040323f1854e75aeb449b9f
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5
+    key d5a6d7824336fbe0f25d28487cdda57c
+
+cid 10a2794871aadb20ddf274a95249e57fde sid 82d3b0b1a1 su 0935471478c2edb8120e60
+cid 108122fe80a6e546a285c475a3b8613ec9 sid fbcc902c9d su 59c47946882a9a93981c15
+cid 104d227ad9dd0fef4c8cb6eb75887b6ccc sid 2808e22642 su 2a7ef40e2c7e17ae40b3fb
+cid 10b3f367d8627b36990a28d67f50b97846 sid 5e018f0197 su 2289cae06a566e5cb6cfa4
+cid 1024412bfe25f4547510204bdda6143814 sid 8a8dd3d036 su 4b12933a135e5eaaebc6fd
+
¶ +
+

In this case, the shared-state retry token is issued by retry service, so the +opaque data of shared-state retry token body would be null(Section 7.3). +~~~ +LB configuration: +key_seq 0x00 +encrypt_key 0x30313233343536373839303132333435 +AEAD_IV 0x313233343536373839303132¶

+

Shared-State Retry Service Token Body: +ODCIL 0x12 +RSCIL 0x10 +port 0x1a0a +original_destination_connection_id 0x0c3817b544ca1c94313bba41757547eec937 +retry_source_connection_id 0x0301e770d24b3b13070dd5c2a9264307 +timestamp 0x0000000060c7bf4d¶

+

Shared-State Retry Service Token: +unique_token_number 0x59ef316b70575e793e1a8782 +key_sequence 0x00 +encrypted_shared_state_retry_service_token_body +0x7d38b274aa4427c7a1557c3fa666945931defc65da387a83855196a7cb73caac1e28e5346fd76868de94f8b62294 +AEAD_ICV 0xf91174fdd711543a32d5e959867f9c22¶

+

AEAD related parameters: +client_ip_addr 127.0.0.1 +client_port 6666 +AEAD_nonce 0x68dd025f45616941072ab6b0 +AEAD_associated_data 0x7f00000100000000000000000000000059ef316b70575e793e1a878200 +~~~¶

+
+
+
+
+
+
+

+Appendix C. Interoperability with DTLS over UDP +

+

Some environments may contain DTLS traffic as well as QUIC operating over UDP, +which may be hard to distinguish.¶

+

In most cases, the packet parsing rules above will cause a QUIC-LB load +balancer to route DTLS traffic in an appropriate way. DTLS 1.3 implementations +that use the connection_id extension [?I-D.ietf-tls-dtls-connection-id] might +use the techniques in this document to generate connection IDs and achieve +robust routability for DTLS associations if they meet a few additional +requirements. This non-normative appendix describes this interaction.¶

+
+
+

+C.1. DTLS 1.0 and 1.2 +

+

DTLS 1.0 [?RFC4347] and 1.2 [?RFC6347] use packet formats that a QUIC-LB router +will interpret as short header packets with CIDs that request 4-tuple routing. +As such, they will route such packets consistently as long as the 4-tuple does +not change. Note that DTLS 1.0 has been deprecated by the IETF.¶

+

The first octet of every DTLS 1.0 or 1.2 datagram contains the content type. +A QUIC-LB load balancer will interpret any content type less than 128 as a short +header packet, meaning that the subsequent octets should contain a connection +ID.¶

+

Existing TLS content types comfortably fit in the range below 128. Assignment of +codepoints greater than 64 would require coordination in accordance with +[?RFC7983], and anyway would likely create problems demultiplexing DTLS and +version 1 of QUIC. Therefore, this document believes it is extremely unlikely +that TLS content types of 128 or greater will be assigned. Nevertheless, such +an assignment would cause a QUIC-LB load balancer to interpret the packet as a +QUIC long header with an essentially random connection ID, which is likely to be +routed irregularly.¶

+

The second octet of every DTLS 1.0 or 1.2 datagram is the bitwise complement +of the DTLS Major version (i.e. version 1.x = 0xfe). A QUIC-LB load balancer +will interpret this as a connection ID that requires 4-tuple based load +balancing, meaning that the routing will be consistent as long as the 4-tuple +remains the same.¶

+

[?I-D.ietf-tls-dtls-connection-id] defines an extension to add connection IDs +to DTLS 1.2. Unfortunately, a QUIC-LB load balancer will not correctly parse +the connection ID and will continue 4-tuple routing. An modified QUIC-LB load +balancer that correctly identifies DTLS and parses a DTLS 1.2 datagram for +the connection ID is outside the scope of this document.¶

+
+
+
+
+

+C.2. DTLS 1.3 +

+

DTLS 1.3 [?I-D.draft-ietf-tls-dtls13] changes the structure of datagram headers +in relevant ways.¶

+

Handshake packets continue to have a TLS content type in the first octet and +0xfe in the second octet, so they will be 4-tuple routed, which should not +present problems for likely NAT rebinding or address change events.¶

+

Non-handshake packets always have zero in their most significant bit and will +therefore always be treated as QUIC short headers. If the connection ID is +present, it follows in the succeeding octets. Therefore, a DTLS 1.3 association +where the server utilizes Connection IDs and the encodings in this document +will be routed correctly in the presence of client address and port changes.¶

+

However, if the client does not include the connection_id extension in its +ClientHello, the server is unable to use connection IDs. In this case, non- +handshake packets will appear to contain random connection IDs and be routed +randomly. Thus, unmodified QUIC-LB load balancers will not work with DTLS 1.3 +if the client does not advertise support for connection IDs, or the server does +not request the use of a compliant connection ID.¶

+

A QUIC-LB load balancer might be modified to identify DTLS 1.3 packets and +correctly parse the fields to identify when there is no connection ID and +revert to 4-tuple routing, removing the server requirement above. However, such +a modification is outside the scope of this document, and classifying some +packets as DTLS might be incompatible with future versions of QUIC.¶

+
+
+
+
+

+C.3. Future Versions of DTLS +

+

As DTLS does not have an IETF consensus document that defines what parts of +DTLS will be invariant in future versions, it is difficult to speculate about +the applicability of this section to future versions of DTLS.¶

+
+
+
+
+
+
+

+Appendix D. Acknowledgments +

+

The authors would like to thank Christian Huitema and Ian Swett for their major +design contributions.¶

+

Manasi Deval, Erik Fuller, Toma Gavrichenkov, Jana Iyengar, Subodh Iyengar, +Ladislav Lhotka, Jan Lindblad, Ling Tao Nju, Kazuho Oku, Udip Pant, Martin +Thomson, Dmitri Tikhonov, Victor Vasiliev, and William Zeng Ke all provided +useful input to this document.¶

+
+
+
+
+

+Appendix E. Change Log +

+
    +
  • + RFC Editor's Note: Please remove this section prior to +publication of a final version of this document.¶ +
  • +
+
+
+

+E.1. since draft-ietf-quic-load-balancers-06 +

+
    +
  • Added interoperability with DTLS¶ +
  • +
  • Changed "non-compliant" to "unroutable"¶ +
  • +
  • Changed "arbitrary" algorithm to "fallback"¶ +
  • +
  • Revised security considerations for mistrustful tenants¶ +
  • +
+
+
+
+
+

+E.2. since draft-ietf-quic-load-balancers-05 +

+
    +
  • Added low-config CID for further discussion¶ +
  • +
  • Complete revision of shared-state Retry Token¶ +
  • +
  • Added YANG model¶ +
  • +
  • Updated configuration limits to ensure CID entropy¶ +
  • +
  • Switched to notation from quic-transport¶ +
  • +
+
+
+
+
+

+E.3. since draft-ietf-quic-load-balancers-04 +

+
    +
  • Rearranged the shared-state retry token to simplify token processing¶ +
  • +
  • More compact timestamp in shared-state retry token¶ +
  • +
  • Revised server requirements for shared-state retries¶ +
  • +
  • Eliminated zero padding from the test vectors¶ +
  • +
  • Added server use bytes to the test vectors¶ +
  • +
  • Additional compliant DCID criteria¶ +
  • +
+
+
+
+
+

+E.4. since-draft-ietf-quic-load-balancers-03 +

+
    +
  • Improved Config Rotation text¶ +
  • +
  • Added stream cipher test vectors¶ +
  • +
  • Deleted the Obfuscated CID algorithm¶ +
  • +
+
+
+
+
+

+E.5. since-draft-ietf-quic-load-balancers-02 +

+
    +
  • Replaced stream cipher algorithm with three-pass version¶ +
  • +
  • Updated Retry format to encode info for required TPs¶ +
  • +
  • Added discussion of version invariance¶ +
  • +
  • Cleaned up text about config rotation¶ +
  • +
  • Added Reset Oracle and limited configuration considerations¶ +
  • +
  • Allow dropped long-header packets for known QUIC versions¶ +
  • +
+
+
+
+
+

+E.6. since-draft-ietf-quic-load-balancers-01 +

+
    +
  • Test vectors for load balancer decoding¶ +
  • +
  • Deleted remnants of in-band protocol¶ +
  • +
  • Light edit of Retry Services section¶ +
  • +
  • Discussed load balancer chains¶ +
  • +
+
+
+
+
+

+E.7. since-draft-ietf-quic-load-balancers-00 +

+
    +
  • Removed in-band protocol from the document¶ +
  • +
+
+
+
+
+

+E.8. Since draft-duke-quic-load-balancers-06 +

+
    +
  • Switch to IETF WG draft.¶ +
  • +
+
+
+
+
+

+E.9. Since draft-duke-quic-load-balancers-05 +

+
    +
  • Editorial changes¶ +
  • +
  • Made load balancer behavior independent of QUIC version¶ +
  • +
  • Got rid of token in stream cipher encoding, because server might not have it¶ +
  • +
  • Defined "non-compliant DCID" and specified rules for handling them.¶ +
  • +
  • Added psuedocode for config schema¶ +
  • +
+
+
+
+
+

+E.10. Since draft-duke-quic-load-balancers-04 +

+
    +
  • Added standard for retry services¶ +
  • +
+
+
+
+
+

+E.11. Since draft-duke-quic-load-balancers-03 +

+
    +
  • Renamed Plaintext CID algorithm as Obfuscated CID¶ +
  • +
  • Added new Plaintext CID algorithm¶ +
  • +
  • Updated to allow 20B CIDs¶ +
  • +
  • Added self-encoding of CID length¶ +
  • +
+
+
+
+
+

+E.12. Since draft-duke-quic-load-balancers-02 +

+
    +
  • Added Config Rotation¶ +
  • +
  • Added failover mode¶ +
  • +
  • Tweaks to existing CID algorithms¶ +
  • +
  • Added Block Cipher CID algorithm¶ +
  • +
  • Reformatted QUIC-LB packets¶ +
  • +
+
+
+
+
+

+E.13. Since draft-duke-quic-load-balancers-01 +

+
    +
  • Complete rewrite¶ +
  • +
  • Supports multiple security levels¶ +
  • +
  • Lightweight messages¶ +
  • +
+
+
+
+
+

+E.14. Since draft-duke-quic-load-balancers-00 +

+
    +
  • Converted to markdown¶ +
  • +
  • Added variable length connection IDs¶ +
  • +
+
+
+
+
+
+
+

+Authors' Addresses +

+
+
Martin Duke
+
F5 Networks, Inc.
+ +
+
+
Nick Banks
+
Microsoft
+ +
+
+
+ + + diff --git a/draft-ietf-quic-load-balancers.txt b/draft-ietf-quic-load-balancers.txt new file mode 100644 index 0000000..ed72e6c --- /dev/null +++ b/draft-ietf-quic-load-balancers.txt @@ -0,0 +1,2856 @@ + + + + +QUIC M. Duke +Internet-Draft F5 Networks, Inc. +Intended status: Standards Track N. Banks +Expires: 15 November 2021 Microsoft + 14 May 2021 + + + QUIC-LB: Generating Routable QUIC Connection IDs + draft-ietf-quic-load-balancers-07 + +Abstract + + The QUIC protocol design is resistant to transparent packet + inspection, injection, and modification by intermediaries. However, + the server can explicitly cooperate with network services by agreeing + to certain conventions and/or sharing state with those services. + This specification provides a standardized means of solving three + problems: (1) maintaining routability to servers via a low-state load + balancer even when the connection IDs in use change; (2) explicit + encoding of the connection ID length in all packets to assist + hardware accelerators; and (3) injection of QUIC Retry packets by an + anti-Denial-of-Service agent on behalf of the server. + +Note to Readers + + Discussion of this document takes place on the QUIC Working Group + mailing list (quic@ietf.org), which is archived at + https://mailarchive.ietf.org/arch/browse/quic/ + (https://mailarchive.ietf.org/arch/browse/quic/). + + Source for this draft and an issue tracker can be found at + https://github.com/quicwg/load-balancers (https://github.com/quicwg/ + load-balancers). + +Status of This Memo + + This Internet-Draft is submitted in full conformance with the + provisions of BCP 78 and BCP 79. + + Internet-Drafts are working documents of the Internet Engineering + Task Force (IETF). Note that other groups may also distribute + working documents as Internet-Drafts. The list of current Internet- + Drafts is at https://datatracker.ietf.org/drafts/current/. + + Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as "work in progress." + + + +Duke & Banks Expires 15 November 2021 [Page 1] + +Internet-Draft QUIC-LB May 2021 + + + This Internet-Draft will expire on 15 November 2021. + +Copyright Notice + + Copyright (c) 2021 IETF Trust and the persons identified as the + document authors. All rights reserved. + + This document is subject to BCP 78 and the IETF Trust's Legal + Provisions Relating to IETF Documents (https://trustee.ietf.org/ + license-info) in effect on the date of publication of this document. + Please review these documents carefully, as they describe your rights + and restrictions with respect to this document. Code Components + extracted from this document must include Simplified BSD License text + as described in Section 4.e of the Trust Legal Provisions and are + provided without warranty as described in the Simplified BSD License. + +Table of Contents + + 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 + 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 + 1.2. Notation . . . . . . . . . . . . . . . . . . . . . . . . 5 + 2. Protocol Objectives . . . . . . . . . . . . . . . . . . . . . 6 + 2.1. Simplicity . . . . . . . . . . . . . . . . . . . . . . . 6 + 2.2. Security . . . . . . . . . . . . . . . . . . . . . . . . 6 + 3. First CID octet . . . . . . . . . . . . . . . . . . . . . . . 7 + 3.1. Config Rotation . . . . . . . . . . . . . . . . . . . . . 7 + 3.2. Configuration Failover . . . . . . . . . . . . . . . . . 8 + 3.3. Length Self-Description . . . . . . . . . . . . . . . . . 8 + 3.4. Format . . . . . . . . . . . . . . . . . . . . . . . . . 8 + 4. Load Balancing Preliminaries . . . . . . . . . . . . . . . . 9 + 4.1. Unroutable Connection IDs . . . . . . . . . . . . . . . . 9 + 4.2. Fallback Algorithms . . . . . . . . . . . . . . . . . . . 10 + 4.3. Server ID Allocation . . . . . . . . . . . . . . . . . . 11 + 4.3.1. Static Allocation . . . . . . . . . . . . . . . . . . 11 + 4.3.2. Dynamic Allocation . . . . . . . . . . . . . . . . . 12 + 5. Routing Algorithms . . . . . . . . . . . . . . . . . . . . . 14 + 5.1. Plaintext CID Algorithm . . . . . . . . . . . . . . . . . 14 + 5.1.1. Configuration Agent Actions . . . . . . . . . . . . . 14 + 5.1.2. Load Balancer Actions . . . . . . . . . . . . . . . . 14 + 5.1.3. Server Actions . . . . . . . . . . . . . . . . . . . 14 + 5.2. Stream Cipher CID Algorithm . . . . . . . . . . . . . . . 15 + 5.2.1. Configuration Agent Actions . . . . . . . . . . . . . 15 + 5.2.2. Load Balancer Actions . . . . . . . . . . . . . . . . 15 + 5.2.3. Server Actions . . . . . . . . . . . . . . . . . . . 17 + 5.3. Block Cipher CID Algorithm . . . . . . . . . . . . . . . 17 + 5.3.1. Configuration Agent Actions . . . . . . . . . . . . . 17 + 5.3.2. Load Balancer Actions . . . . . . . . . . . . . . . . 17 + 5.3.3. Server Actions . . . . . . . . . . . . . . . . . . . 18 + + + +Duke & Banks Expires 15 November 2021 [Page 2] + +Internet-Draft QUIC-LB May 2021 + + + 6. ICMP Processing . . . . . . . . . . . . . . . . . . . . . . . 18 + 7. Retry Service . . . . . . . . . . . . . . . . . . . . . . . . 18 + 7.1. Common Requirements . . . . . . . . . . . . . . . . . . . 19 + 7.1.1. Considerations for Non-Initial Packets . . . . . . . 20 + 7.2. No-Shared-State Retry Service . . . . . . . . . . . . . . 21 + 7.2.1. Configuration Agent Actions . . . . . . . . . . . . . 21 + 7.2.2. Service Requirements . . . . . . . . . . . . . . . . 21 + 7.2.3. Server Requirements . . . . . . . . . . . . . . . . . 23 + 7.3. Shared-State Retry Service . . . . . . . . . . . . . . . 23 + 7.3.1. Token Protection with AEAD . . . . . . . . . . . . . 25 + 7.3.2. Configuration Agent Actions . . . . . . . . . . . . . 26 + 7.3.3. Service Requirements . . . . . . . . . . . . . . . . 26 + 7.3.4. Server Requirements . . . . . . . . . . . . . . . . . 27 + 8. Configuration Requirements . . . . . . . . . . . . . . . . . 28 + 9. Additional Use Cases . . . . . . . . . . . . . . . . . . . . 28 + 9.1. Load balancer chains . . . . . . . . . . . . . . . . . . 29 + 9.2. Moving connections between servers . . . . . . . . . . . 29 + 10. Version Invariance of QUIC-LB . . . . . . . . . . . . . . . . 29 + 11. Security Considerations . . . . . . . . . . . . . . . . . . . 30 + 11.1. Attackers not between the load balancer and server . . . 31 + 11.2. Attackers between the load balancer and server . . . . . 31 + 11.3. Multiple Configuration IDs . . . . . . . . . . . . . . . 31 + 11.4. Limited configuration scope . . . . . . . . . . . . . . 32 + 11.5. Stateless Reset Oracle . . . . . . . . . . . . . . . . . 33 + 11.6. Connection ID Entropy . . . . . . . . . . . . . . . . . 33 + 11.7. Shared-State Retry Keys . . . . . . . . . . . . . . . . 33 + 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 + 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 34 + 13.1. Normative References . . . . . . . . . . . . . . . . . . 34 + 13.2. Informative References . . . . . . . . . . . . . . . . . 35 + Appendix A. QUIC-LB YANG Model . . . . . . . . . . . . . . . . . 36 + A.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 41 + Appendix B. Load Balancer Test Vectors . . . . . . . . . . . . . 41 + B.1. Plaintext Connection ID Algorithm . . . . . . . . . . . . 42 + B.2. Stream Cipher Connection ID Algorithm . . . . . . . . . . 43 + B.3. Block Cipher Connection ID Algorithm . . . . . . . . . . 44 + Appendix C. Interoperability with DTLS over UDP . . . . . . . . 46 + C.1. DTLS 1.0 and 1.2 . . . . . . . . . . . . . . . . . . . . 46 + C.2. DTLS 1.3 . . . . . . . . . . . . . . . . . . . . . . . . 47 + C.3. Future Versions of DTLS . . . . . . . . . . . . . . . . . 48 + Appendix D. Acknowledgments . . . . . . . . . . . . . . . . . . 48 + Appendix E. Change Log . . . . . . . . . . . . . . . . . . . . . 48 + E.1. since draft-ietf-quic-load-balancers-06 . . . . . . . . . 48 + E.2. since draft-ietf-quic-load-balancers-05 . . . . . . . . . 48 + E.3. since draft-ietf-quic-load-balancers-04 . . . . . . . . . 49 + E.4. since-draft-ietf-quic-load-balancers-03 . . . . . . . . . 49 + E.5. since-draft-ietf-quic-load-balancers-02 . . . . . . . . . 49 + E.6. since-draft-ietf-quic-load-balancers-01 . . . . . . . . . 49 + + + +Duke & Banks Expires 15 November 2021 [Page 3] + +Internet-Draft QUIC-LB May 2021 + + + E.7. since-draft-ietf-quic-load-balancers-00 . . . . . . . . . 50 + E.8. Since draft-duke-quic-load-balancers-06 . . . . . . . . . 50 + E.9. Since draft-duke-quic-load-balancers-05 . . . . . . . . . 50 + E.10. Since draft-duke-quic-load-balancers-04 . . . . . . . . . 50 + E.11. Since draft-duke-quic-load-balancers-03 . . . . . . . . . 50 + E.12. Since draft-duke-quic-load-balancers-02 . . . . . . . . . 50 + E.13. Since draft-duke-quic-load-balancers-01 . . . . . . . . . 51 + E.14. Since draft-duke-quic-load-balancers-00 . . . . . . . . . 51 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 51 + +1. Introduction + + QUIC packets [QUIC-TRANSPORT] usually contain a connection ID to + allow endpoints to associate packets with different address/ port + 4-tuples to the same connection context. This feature makes + connections robust in the event of NAT rebinding. QUIC endpoints + usually designate the connection ID which peers use to address + packets. Server-generated connection IDs create a potential need for + out-of-band communication to support QUIC. + + QUIC allows servers (or load balancers) to designate an initial + connection ID to encode useful routing information for load + balancers. It also encourages servers, in packets protected by + cryptography, to provide additional connection IDs to the client. + This allows clients that know they are going to change IP address or + port to use a separate connection ID on the new path, thus reducing + linkability as clients move through the world. + + There is a tension between the requirements to provide routing + information and mitigate linkability. Ultimately, because new + connection IDs are in protected packets, they must be generated at + the server if the load balancer does not have access to the + connection keys. However, it is the load balancer that has the + context necessary to generate a connection ID that encodes useful + routing information. In the absence of any shared state between load + balancer and server, the load balancer must maintain a relatively + expensive table of server-generated connection IDs, and will not + route packets correctly if they use a connection ID that was + originally communicated in a protected NEW_CONNECTION_ID frame. + + This specification provides common algorithms for encoding the server + mapping in a connection ID given some shared parameters. The mapping + is generally only discoverable by observers that have the parameters, + preserving unlinkability as much as possible. + + Aside from load balancing, a QUIC server may also desire to offload + other protocol functions to trusted intermediaries. These + intermediaries might include hardware assist on the server host + + + +Duke & Banks Expires 15 November 2021 [Page 4] + +Internet-Draft QUIC-LB May 2021 + + + itself, without access to fully decrypted QUIC packets. For example, + this document specifies a means of offloading stateless retry to + counter Denial of Service attacks. It also proposes a system for + self-encoding connection ID length in all packets, so that crypto + 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 + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + document are to be interpreted as described in RFC 2119 [RFC2119]. + + 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 + interpreted as carrying significance described in RFC 2119. + + In this document, "client" and "server" refer to the endpoints of a + QUIC connection unless otherwise indicated. A "load balancer" is an + intermediary for that connection that does not possess QUIC + connection keys, but it may rewrite IP addresses or conduct other IP + or UDP processing. A "configuration agent" is the entity that + determines the QUIC-LB configuration parameters for the network and + leverages some system to distribute that configuration. + + Note that stateful load balancers that act as proxies, by terminating + a QUIC connection with the client and then retrieving data from the + server using QUIC or another protocol, are treated as a server with + respect to this specification. + + For brevity, "Connection ID" will often be abbreviated as "CID". + +1.2. Notation + + All wire formats will be depicted using the notation defined in + Section 1.3 of [QUIC-TRANSPORT]. There is one addition: the function + len() refers to the length of a field which can serve as a limit on a + different field, so that the lengths of two fields can be concisely + defined as limited to a sum, for example: + + x(A..B) y(C..B-len(x)) + + + + + +Duke & Banks Expires 15 November 2021 [Page 5] + +Internet-Draft QUIC-LB May 2021 + + + indicates that x can be of any length between A and B, and y can be + of any length between C and B provided that (len(x) + len(y)) does + not exceed B. + + The example below illustrates the basic framework: + +Example Structure { + One-bit Field (1), + 7-bit Field with Fixed Value (7) = 61, + Field with Variable-Length Integer (i), + Arbitrary-Length Field (..), + Variable-Length Field (8..24), + Variable-Length Field with Dynamic Limit (8..24-len(Variable-Length Field)), + Field With Minimum Length (16..), + Field With Maximum Length (..128), + [Optional Field (64)], + Repeated Field (8) ..., +} + + Figure 1: Example Format + +2. Protocol Objectives + +2.1. Simplicity + + QUIC is intended to provide unlinkability across connection + migration, but servers are not required to provide additional + connection IDs that effectively prevent linkability. If the + coordination scheme is too difficult to implement, servers behind + load balancers using connection IDs for routing will use trivially + linkable connection IDs. Clients will therefore be forced to choose + between terminating the connection during migration or remaining + linkable, subverting a design objective of QUIC. + + The solution should be both simple to implement and require little + additional infrastructure for cryptographic keys, etc. + +2.2. Security + + In the limit where there are very few connections to a pool of + servers, no scheme can prevent the linking of two connection IDs with + high probability. In the opposite limit, where all servers have many + connections that start and end frequently, it will be difficult to + associate two connection IDs even if they are known to map to the + same server. + + + + + + +Duke & Banks Expires 15 November 2021 [Page 6] + +Internet-Draft QUIC-LB May 2021 + + + QUIC-LB is relevant in the region between these extremes: when the + information that two connection IDs map to the same server is helpful + to linking two connection IDs. Obviously, any scheme that + transparently communicates this mapping to outside observers + compromises QUIC's defenses against linkability. + + Though not an explicit goal of the QUIC-LB design, concealing the + server mapping also complicates attempts to focus attacks on a + specific server in the pool. + +3. First CID octet + + The first octet of a Connection ID is reserved for two special + purposes, one mandatory (config rotation) and one optional (length + self-description). + + Subsequent sections of this document refer to the contents of this + octet as the "first octet." + +3.1. Config Rotation + + The first two bits of any connection ID MUST encode an identifier for + the configuration that the connection ID uses. This enables + incremental deployment of new QUIC-LB settings (e.g., keys). + + When new configuration is distributed to servers, there will be a + transition period when connection IDs reflecting old and new + configuration coexist in the network. The rotation bits allow load + balancers to apply the correct routing algorithm and parameters to + incoming packets. + + Configuration Agents SHOULD deliver new configurations to load + balancers before doing so to servers, so that load balancers are + ready to process CIDs using the new parameters when they arrive. + + A Configuration Agent SHOULD NOT use a codepoint to represent a new + configuration until it takes precautions to make sure that all + connections using CIDs with an old configuration at that codepoint + have closed or transitioned. + + Servers MUST NOT generate new connection IDs using an old + configuration after receiving a new one from the configuration agent. + Servers MUST send NEW_CONNECTION_ID frames that provide CIDs using + the new configuration, and retire CIDs using the old configuration + using the "Retire Prior To" field of that frame. + + + + + + +Duke & Banks Expires 15 November 2021 [Page 7] + +Internet-Draft QUIC-LB May 2021 + + + It also possible to use these bits for more long-lived distinction of + different configurations, but this has privacy implications (see + Section 11.3). + +3.2. Configuration Failover + + If a server has not received a valid QUIC-LB configuration, and + believes that low-state, Connection-ID aware load balancers are in + the path, it SHOULD generate connection IDs with the config rotation + bits set to '11' and SHOULD use the "disable_active_migration" + transport parameter in all new QUIC connections. It SHOULD NOT send + NEW_CONNECTION_ID frames with new values. + + A load balancer that sees a connection ID with config rotation bits + set to '11' MUST revert to 5-tuple routing. + +3.3. Length Self-Description + + Local hardware cryptographic offload devices may accelerate QUIC + servers by receiving keys from the QUIC implementation indexed to the + connection ID. However, on physical devices operating multiple QUIC + servers, it is impractical to efficiently lookup these keys if the + connection ID does not self-encode its own length. + + Note that this is a function of particular server devices and is + irrelevant to load balancers. As such, load balancers MAY omit this + from their configuration. However, the remaining 6 bits in the first + octet of the Connection ID are reserved to express the length of the + following connection ID, not including the first octet. + + A server not using this functionality SHOULD make the six bits appear + to be random. + +3.4. Format + + First Octet { + Config Rotation (2), + CID Len or Random Bits (6), + } + + Figure 2: First Octet Format + + The first octet has the following fields: + + Config Rotation: Indicates the configuration used to interpret the + CID. + + + + + +Duke & Banks Expires 15 November 2021 [Page 8] + +Internet-Draft QUIC-LB May 2021 + + + CID Len or Random Bits: Length Self-Description (if applicable), or + random bits otherwise. Encodes the length of the Connection ID + following the First Octet. + +4. Load Balancing Preliminaries + + In QUIC-LB, load balancers do not generate individual connection IDs + for servers. Instead, they communicate the parameters of an + algorithm to generate routable connection IDs. + + The algorithms differ in the complexity of configuration at both load + balancer and server. Increasing complexity improves obfuscation of + the server mapping. + + This section describes three participants: the configuration agent, + the load balancer, and the server. For any given QUIC-LB + configuration that enables connection-ID-aware load balancing, there + must be a choice of (1) routing algorithm, (2) server ID allocation + strategy, and (3) algorithm parameters. + + Fundamentally, servers generate connection IDs that encode their + server ID. Load balancers decode the server ID from the CID in + incoming packets to route to the correct server. + + There are situations where a server pool might be operating two or + more routing algorithms or parameter sets simultaneously. The load + balancer uses the first two bits of the connection ID to multiplex + incoming DCIDs over these schemes (see Section 3.1). + +4.1. Unroutable Connection IDs + + QUIC-LB servers will generate Connection IDs that are decodable to + extract a server ID in accordance with a specified algorithm and + parameters. However, QUIC often uses client-generated Connection IDs + prior to receiving a packet from the server. + + These client-generated CIDs might not conform to the expectations of + the routing algorithm and therefore not be routable by the load + balancer. Those that are not routable are "unroutable DCIDs" and + receive similar treatment regardless of why they're unroutable: + + * The config rotation bits (Section 3.1) may not correspond to an + active configuration. Note: a packet with a DCID that indicates + 5-tuple routing (see Section 3.2) is always routable. + + * The DCID might not be long enough for the decoder to process. + + + + + +Duke & Banks Expires 15 November 2021 [Page 9] + +Internet-Draft QUIC-LB May 2021 + + + * The extracted server mapping might not correspond to an active + server. + + All other DCIDs are routable. + + Load balancers MUST forward packets with routable DCIDs to a server + in accordance with the chosen routing algorithm. + + Load balancers SHOULD drop short header packets with unroutable + DCIDs. + + The routing of long headers with unroutable DCIDs depends on the + server ID allocation strategy, described in Section 4.3. However, + the load balancer MUST NOT drop these packets, with one exception. + + Load balancers MAY drop packets with long headers and unroutable + DCIDs if and only if it knows that the encoded QUIC version does not + allow an unroutable DCID in a packet with that signature. For + example, a load balancer can safely drop a QUIC version 1 Handshake + packet with an unroutable DCID, as a version 1 Handshake packet sent + to a QUIC-LB routable server will always have a server-generated + routable CID. The prohibition against dropping packets with long + headers remains for unknown QUIC versions. + + Furthermore, while the load balancer function MUST NOT drop packets, + the device might implement other security policies, outside the scope + of this specification, that might force a drop. + + Servers that receive packets with unroutable CIDs MUST use the + available mechanisms to induce the client to use a routable CID in + future packets. In QUIC version 1, this requires using a routable + CID in the Source CID field of server-generated long headers. + +4.2. Fallback Algorithms + + There are conditions described below where a load balancer routes a + packet using a "fallback algorithm." It can choose any algorithm, + without coordination with the servers, but the algorithm SHOULD be + deterministic over short time scales so that related packets go to + the same server. The design of this algorithm SHOULD consider the + version-invariant properties of QUIC described in [QUIC-INVARIANTS] + to maximize its robustness to future versions of QUIC. + + A fallback algorithm MUST NOT make the routing behavior dependent on + any 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-dependent and intermediaries SHOULD NOT base their design on + version-specific templates. + + + +Duke & Banks Expires 15 November 2021 [Page 10] + +Internet-Draft QUIC-LB May 2021 + + + For example, one fallback algorithm might convert a unroutable DCID + to an integer and divided by the number of servers, with the modulus + used to forward the packet. The number of servers is usually + consistent on the time scale of a QUIC connection handshake. Another + might simply hash the address/port 4-tuple. See also Section 10. + +4.3. Server ID Allocation + + For any given configuration, the configuration agent must specify if + server IDs will be statically or dynamically allocated. Load + Balancer configurations with statically allocated server IDs + explicitly include a mapping of server IDs to forwarding addresses. + The corresponding server configurations contain one or more unique + server IDs. + + A dynamically allocated configuration does not have a pre-defined + assignment, reducing configuration complexity. However, it places + limits on the maximum server ID length and requires more state at the + load balancer. In certain edge cases, it can force parts of the + system to fail over to 5-tuple routing for a short time. + + In either case, the configuration agent chooses a server ID length + for each configuration that MUST be at least one octet. For Static + Allocation, the maximum length depends on the algorithm. For dynamic + allocation, the maximum length is 7 octets. + + A QUIC-LB configuration MAY significantly over-provision the server + ID space (i.e., provide far more codepoints than there are servers) + to increase the probability that a randomly generated Destination + Connection ID is unroutable. + + Conceptually, each configuration has its own set of server ID + allocations, though two static configurations with identical server + ID lengths MAY use a common allocation between them. + + A server encodes one of its assigned server IDs in any CID it + generates using the relevant configuration. + +4.3.1. Static Allocation + + In the static allocation method, the configuration agent assigns at + least one server ID to each server. + + When forwarding a packet with a long header and unroutable DCID, load + balancers MUST forward packets with long headers and unroutable DCIDs + using an fallback algorithm as specified in Section 4.2. + + + + + +Duke & Banks Expires 15 November 2021 [Page 11] + +Internet-Draft QUIC-LB May 2021 + + +4.3.2. Dynamic Allocation + + In the dynamic allocation method, the load balancer assigns server + IDs dynamically so that configuration does not require fixed server + ID assignment. This reduces linkability. However, it requires state + at the load balancer that roughly scales with the number of + connections, until the server ID codespace is exhausted. + +4.3.2.1. Configuration Agent Actions + + The configuration agent does not assign server IDs, but does + configure a server ID length and an "LB timeout". The server ID MUST + be at least one and no more than seven octets. + +4.3.2.2. Load Balancer Actions + + The load balancer maintains a table of all assigned server IDs and + corresponding routing information, which is initialized empty. These + tables are independent for each operating configuration. + + The load balancer MUST keep track of the most recent observation of + each server ID, in any sort of packet it forwards, in the table and + delete the entries when the time since that observation exceeds the + LB Timeout. + + Note that when the load balancer's table for a configuration is + empty, all incoming DCIDs corresponding to that configuration are + unroutable by definition. + + The handling of an unroutable long-header packet depends on the + reason for unroutability. The load balancer MUST applyt this logic: + + * If the config rotation bits do not match a known configuration, + the load balancer routes the packet using a fallback algorithm + (see Section 4.2). + + * If there is a matching configuration, but the CID is not long + enough to apply the algorithm, the load balancer skips the first + octet of the CID and then reads a server ID from the following + octets, up to the server ID length. If this server ID matches a + known server ID for that configuration, it forwards the packet + accordingly and takes no further action. If it does not match, it + routes using a fallback algorithm and adds the new server ID to + that server's table entry. + + + + + + + +Duke & Banks Expires 15 November 2021 [Page 12] + +Internet-Draft QUIC-LB May 2021 + + + * If the sole reason for unroutability is that the server ID is not + in the load balancer's table, the load balancer routes the packet + with a fallback algorithm. It adds the decoded server ID to table + entry for the server the algorithm chooses and forwards the packet + accordingly. + +4.3.2.3. Server actions + + Each server maintains a list of server IDs assigned to it, + initialized empty. For each SID, it records the last time it + received any packet with an CID that encoded that SID. + + Upon receipt of a packet with a client-generated DCID, the server + MUST follow these steps in order: + + * If the config rotation bits do not correspond to a known + configuration, do not attempt to extract a server ID. + + * If the DCID is not long enough to decode using the configured + algorithm, extract a number of octets equal to the server ID + length, beginning with the second octet. If the extracted value + does not match a server ID in the server's list, add it to the + list. + + * If the DCID is long enough to decode but the server ID is not in + the server's list, add it to the list. + + After any possible SID is extracted, the server processes the packet + normally. + + When a server needs a new connection ID, it uses one of the server + IDs in its list to populate the server ID field of that CID. It + SHOULD vary this selection to reduce linkability within a connection. + + After loading a new configuration or long periods of idleness, a + server may not have any available SIDs. This is because an incoming + packet may not the config rotation bits necessary to extract a server + ID in accordance with the algorithm above. When required to generate + a CID under these conditions, the server MUST generate CIDs using the + 5-tuple routing codepoint (see Section 3.2. Note that these + connections will not be robust to client address changes while they + use this connection ID. For this reason, a server SHOULD retire + these connection IDs and replace them with routable ones once it + receives a client-generated CID that allows it to acquire a server + ID. As, statistically, one in every four such CIDs can provide a + server ID, this is typically a short interval. + + + + + +Duke & Banks Expires 15 November 2021 [Page 13] + +Internet-Draft QUIC-LB May 2021 + + + If a server has not received a connection ID encoding a particular + server ID within the LB timeout, it MUST retire any outstanding CIDs + that use that server ID and cease generating any new ones. + + A server SHOULD have a mechanism to stop using some server IDs if the + list gets large relative to its share of the codepoint space, so that + these allocations time out and are freed for reuse by servers that + have recently joined the pool. + +5. Routing Algorithms + + Encryption in the algorithms below uses the AES-128-ECB cipher. + Future standards could add new algorithms that use other ciphers to + provide cryptographic agility in accordance with [RFC7696]. QUIC-LB + implementations SHOULD be extensible to support new algorithms. + +5.1. Plaintext CID Algorithm + + The Plaintext CID Algorithm makes no attempt to obscure the mapping + of connections to servers, significantly increasing linkability. The + format is depicted in the figure below. + + Plaintext CID { + First Octet (8), + Server ID (8..128), + For Server Use (8..152-len(Server ID)), + } + + Figure 3: Plaintext CID Format + +5.1.1. Configuration Agent Actions + + For static SID allocation, the server ID length is limited to 16 + octets. There are no parameters specific to this algorithm. + +5.1.2. Load Balancer Actions + + On each incoming packet, the load balancer extracts consecutive + octets, beginning with the second octet. These bytes represent the + server ID. + +5.1.3. Server Actions + + The server chooses how many octets to reserve for its own use, which + MUST be at least one octet. + + + + + + +Duke & Banks Expires 15 November 2021 [Page 14] + +Internet-Draft QUIC-LB May 2021 + + + When a server needs a new connection ID, it encodes one of its + assigned server IDs in consecutive octets beginning with the second. + All other 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. + +5.2. Stream Cipher CID Algorithm + + The Stream Cipher CID algorithm provides cryptographic protection at + the cost of additional per-packet processing at the load balancer to + decrypt every incoming connection ID. The CID format is depicted + below. + + Stream Cipher CID { + First Octet (8), + Nonce (64..120), + Encrypted Server ID (8..128-len(Nonce)), + For Server Use (0..152-len(Nonce)-len(Encrypted Server ID)), + } + + Figure 4: Stream Cipher CID Format + +5.2.1. Configuration Agent Actions + + The configuration agent assigns a server ID to every server in its + pool, and determines a server ID length (in octets) sufficiently + large to encode all server IDs, including potential future servers. + + The configuration agent also selects a nonce length and an 16-octet + AES-ECB key to use for connection ID decryption. The nonce length + MUST be at least 8 octets and no more than 16 octets. The nonce + length and server ID length MUST sum to 19 or fewer octets, but + SHOULD sum to 15 or fewer to allow space for server use. + +5.2.2. Load Balancer Actions + + Upon receipt of a QUIC packet, the load balancer extracts as many of + the earliest octets from the destination connection ID as necessary + to match the nonce length. The server ID immediately follows. + + The load balancer decrypts the nonce and the server ID using the + following three pass algorithm: + + + + + + + + + +Duke & Banks Expires 15 November 2021 [Page 15] + +Internet-Draft QUIC-LB May 2021 + + + * Pass 1: The load balancer decrypts the server ID using 128-bit AES + Electronic Codebook (ECB) mode, much like QUIC header protection. + The encrypted nonce octets are zero-padded to 16 octets. AES-ECB + encrypts this encrypted nonce using its key to generate a mask + which it applies to the encrypted server id. This provides an + intermediate value of the server ID, referred to as server-id + intermediate. + + server_id_intermediate = encrypted_server_id ^ AES-ECB(key, padded- + encrypted-nonce) + + * Pass 2: The load balancer decrypts the nonce octets using 128-bit + AES ECB mode, using the server-id intermediate as "nonce" for this + pass. The server-id intermediate octets are zero-padded to 16 + octets. AES-ECB encrypts this padded server-id intermediate using + its key to generate a mask which it applies to the encrypted + nonce. This provides the decrypted nonce value. + + nonce = encrypted_nonce ^ AES-ECB(key, padded-server_id_intermediate) + + * Pass 3: The load balancer decrypts the server ID using 128-bit AES + ECB mode. The 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 intermediate server id. This provides the + decrypted server ID. + + server_id = server_id_intermediate ^ AES-ECB(key, padded-nonce) + + 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. + The load balancer uses the the second through eleventh octets of the + connection ID for the nonce, zero-pads it to 16 octets, uses xors the + result with the twelfth and thirteenth octet. The result is padded + with 14 octets of zeros and encrypted to obtain a mask that is xored + with the nonce octets. Finally, the nonce octets are padded with six + octets of zeros, encrypted, and the first two octets xored with the + server ID octets to obtain the actual server ID. + + This three-pass algorithm is a simplified version of the FFX + algorithm, with the property that each encrypted nonce value depends + on all server ID bits, and each encrypted server ID bit depends on + all nonce bits and all server ID bits. This mitigates attacks + against stream ciphers in which attackers simply flip encrypted + server-ID bits. + + The output of the decryption is the server ID that the load balancer + uses for routing. + + + + +Duke & Banks Expires 15 November 2021 [Page 16] + +Internet-Draft QUIC-LB May 2021 + + +5.2.3. Server Actions + + When generating a routable connection ID, the server writes arbitrary + bits into its nonce octets, and its provided server ID into the + server ID octets. Servers MAY opt to have a longer connection ID + beyond the nonce and server ID. The additional bits MAY encode + additional information, but SHOULD appear essentially random to + observers. + + If the decrypted nonce bits increase monotonically, that guarantees + that nonces are not reused between connection IDs from the same + server. + + The server encrypts the server ID using exactly the algorithm as + described in Section 5.2.2, performing the three passes in reverse + order. + +5.3. Block Cipher CID Algorithm + + The Block Cipher CID Algorithm, by using a full 16 octets of + plaintext and a 128-bit cipher, provides higher cryptographic + protection and detection of unroutable connection IDs. However, it + also requires connection IDs of at least 17 octets, increasing + overhead of client-to-server packets. + + Block Cipher CID { + First Octet (8), + Encrypted Server ID (8..128), + Encrypted Bits for Server Use (128-len(Encrypted Server ID)), + Unencrypted Bits for Server Use (0..24), + } + + Figure 5: Block Cipher CID Format + +5.3.1. Configuration Agent Actions + + If server IDs are statically allocated, the server ID length MUST be + no more than 12 octets, to provide servers adequate entropy to + generate unique CIDs. + + The configuration agent also selects an 16-octet AES-ECB key to use + for connection ID decryption. + +5.3.2. Load Balancer Actions + + Upon receipt of a QUIC packet, the load balancer reads the first + octet to obtain the config rotation bits. It then decrypts the + subsequent 16 octets using AES-ECB decryption and the chosen key. + + + +Duke & Banks Expires 15 November 2021 [Page 17] + +Internet-Draft QUIC-LB May 2021 + + + The decrypted plaintext contains the server id and opaque server data + in that order. The load balancer uses the server ID octets for + routing. + +5.3.3. Server Actions + + When generating a routable connection ID, the server MUST choose a + connection ID length between 17 and 20 octets. The server writes its + server ID into the server ID octets and arbitrary bits into the + remaining bits. These arbitrary bits MAY encode additional + information, and MUST differ between connection IDs. Bits in the + eighteenth, nineteenth, and twentieth octets SHOULD appear + essentially random to observers. The first octet is reserved as + described in Section 3. + + The server then encrypts the second through seventeenth octets using + the 128-bit AES-ECB cipher. + +6. ICMP Processing + + For protocols where 4-tuple load balancing is sufficient, it is + straightforward to deliver ICMP packets from the network to the + correct server, by reading the echoed IP and transport-layer headers + to obtain the 4-tuple. When routing is based on connection ID, + further measures are required, as most QUIC packets that trigger ICMP + responses will only contain a client-generated connection ID that + contains no routing information. + + To solve this problem, load balancers MAY maintain a mapping of + Client IP and port to server ID based on recently observed packets. + + Alternatively, servers MAY implement the technique described in + Section 14.4.1 of [QUIC-TRANSPORT] to increase the likelihood a + Source Connection ID is included in ICMP responses to Path Maximum + Transmission Unit (PMTU) probes. Load balancers MAY parse the echoed + packet to extract the Source Connection ID, if it contains a QUIC + long header, and extract the Server ID as if it were in a Destination + CID. + +7. Retry Service + + When a server is under load, QUICv1 allows it to defer storage of + connection state until the client proves it can receive packets at + its advertised IP address. Through the use of a Retry packet, a + token in subsequent client Initial packets, and transport parameters, + servers verify address ownership and clients verify that there is no + on-path attacker generating Retry packets. + + + + +Duke & Banks Expires 15 November 2021 [Page 18] + +Internet-Draft QUIC-LB May 2021 + + + A "Retry Service" detects potential Denial of Service attacks and + handles sending of Retry packets on behalf of the server. As it is, + by definition, literally an on-path entity, the service must + communicate some of the original connection IDs back to the server so + that it can pass client verification. It also must either verify the + address itself (with the server trusting this verification) or make + sure there is common context for the server to verify the address + using a service-generated token. + + There are two different mechanisms to allow offload of DoS mitigation + to a trusted network service. One requires no shared state; the + server need only be configured to trust a retry service, though this + imposes other operational constraints. The other requires a shared + key, but has no such constraints. + +7.1. Common Requirements + + Regardless of mechanism, a retry service has an active mode, where it + is generating Retry packets, and an inactive mode, where it is not, + based on its assessment of server load and the likelihood an attack + is underway. The choice of mode MAY be made on a per-packet or per- + connection basis, through a stochastic process or based on client + address. + + A configuration agent MUST distribute a list of QUIC versions the + Retry Service supports. It MAY also distribute either an "Allow- + List" or a "Deny-List" of other QUIC versions. It MUST NOT + distribute both an Allow-List and a Deny-List. + + The Allow-List or Deny-List MUST NOT include any versions included + for Retry Service Support. + + The Configuration Agent MUST provide a means for the entity that + controls the Retry Service to report its supported version(s) to the + configuration Agent. If the entity has not reported this + information, it MUST NOT activate the Retry Service and the + configuration agent MUST NOT distribute configuration that activates + it. + + The configuration agent MAY delete versions from the final supported + version list if policy does not require the Retry Service to operate + on those versions. + + The configuration Agent MUST provide a means for the entities that + control servers behind the Retry Service to report either an Allow- + List or a Deny-List. + + + + + +Duke & Banks Expires 15 November 2021 [Page 19] + +Internet-Draft QUIC-LB May 2021 + + + If all entities supply Allow-Lists, the consolidated list MUST be the + union of these sets. If all entities supply Deny-Lists, the + consolidated list MUST be the intersection of these sets. + + If entities provide a mixture of Allow-Lists and Deny-Lists, the + consolidated list MUST be a Deny-List that is the intersection of all + provided Deny-Lists and the inverses of all Allow-Lists. + + If no entities that control servers have reported Allow-Lists or + Deny-Lists, the default is a Deny-List with the null set (i.e., all + unsupported versions will be admitted). This preserves the future + extensibilty of QUIC. + + A retry service MUST forward all packets for a QUIC version it does + not support that are not on a Deny-List or absent from an Allow-List. + Note that if servers support versions the retry service does not, + this may increase load on the servers. + + Note that future versions of QUIC might not have Retry packets, + require different information in Retry, or use different packet type + indicators. + +7.1.1. Considerations for Non-Initial Packets + + Initial Packets are especially effective at consuming server + resources because they cause the server to create connection state. + Even when mitigating this load with Retry Packets, the act of + validating an Initial Token and sending a Retry Packet is more + expensive than the response to a non-Initial packet with an unknown + Connection ID: simply dropping it and/or sending a Stateless Reset. + + Nevertheless, a Retry Service in Active Mode might desire to shield + servers from non-Initial packets that do not correspond to a + previously admitted Initial Packet. This has a number of + considerations. + + * If a Retry Service maintains no per-flow state whatsoever, it + cannot distinguish between valid and invalid non_Initial packets + and MUST forward all non-Initial Packets to the server. + + * For QUIC versions the Retry Service does not support and are + present on the Allow-List (or absent from the Deny-List), the + Retry Service cannot distinguish Initial Packets from other long + headers and therefore MUST admit all long headers. + + * If a Retry Service keeps per-flow state, it can identify 4-tuples + that have been previously approved, admit non-Initial packets from + those flows, and drop all others. However, dropping short headers + + + +Duke & Banks Expires 15 November 2021 [Page 20] + +Internet-Draft QUIC-LB May 2021 + + + will effectively break Address Migration and NAT Rebinding when in + Active Mode, as post-migration packets will arrive with a + previously unknown 4-tuple. This policy will also break + connection attempts using any new QUIC versions that begin + connections with a short header. + + * If a Retry Service is integrated with a QUIC-LB routable load + balancer, it can verify that the Destination Connection ID is + routable, and only admit non-Initial packets with routable DCIDs. + As the Connection ID encoding is invariant across QUIC versions, + the Retry Service can do this for all short headers. + + Nothing in this section prevents Retry Services from making basic + syntax correctness checks on packets with QUIC versions that it + understands (e.g., enforcing the Initial Packet datagram size minimum + in version 1) and dropping packets that are not routable with the + QUIC specification. + +7.2. No-Shared-State Retry Service + + The no-shared-state retry service requires no coordination, except + that the server must be configured to accept this service and know + which QUIC versions the retry service supports. The scheme uses the + first bit of the token to distinguish between tokens from Retry + packets (codepoint '0') and tokens from NEW_TOKEN frames (codepoint + '1'). + +7.2.1. Configuration Agent Actions + + See Section 7.1. + +7.2.2. Service Requirements + + A no-shared-state retry service MUST be present on all paths from + potential clients to the server. These paths MUST fail to pass QUIC + traffic should the service fail for any reason. That is, if the + service is not operational, the server MUST NOT be exposed to client + traffic. Otherwise, servers that have already disabled their Retry + capability would be vulnerable to attack. + + The path between service and server MUST be free of any potential + attackers. Note that this and other requirements above severely + restrict the operational conditions in which a no-shared-state retry + service can safely operate. + + Retry tokens generated by the service MUST have the format below. + + + + + +Duke & Banks Expires 15 November 2021 [Page 21] + +Internet-Draft QUIC-LB May 2021 + + + Non-Shared-State Retry Service Token { + Token Type (1) = 0, + ODCIL (7) = 8..20, + RSCIL (8) = 0..20, + Original Destination Connection ID (64..160), + Retry Source Connection ID (0..160), + Opaque Data (..), + } + + Figure 6: Format of non-shared-state retry service tokens + + The first bit of retry tokens generated by the service MUST be zero. + The token has the following additional fields: + + ODCIL: The length of the original destination connection ID from the + triggering Initial packet. This is in cleartext to be readable for + the server, but authenticated later in the token. The Retry Service + SHOULD reject any token in which the value is less than 8. + + RSCIL: The retry source connection ID length. + + Original Destination Connection ID: This also in cleartext and + authenticated later. + + Retry Source Connection ID: This also in cleartext and authenticated + later. + + Opaque Data: This data MUST contain encrypted information that allows + the retry service to validate the client's IP address, in accordance + with the QUIC specification. It MUST also provide a + cryptographically secure means to validate the integrity of the + entire token. + + Upon receipt of an Initial packet with a token that begins with '0', + the retry service MUST validate the token in accordance with the QUIC + specification. + + In active mode, the service MUST issue Retry packets for all Client + initial packets that contain no token, or a token that has the first + bit set to '1'. It MUST NOT forward the packet to the server. The + service MUST validate all tokens with the first bit set to '0'. If + successful, the service MUST forward the packet with the token + intact. If unsuccessful, it MUST drop the packet. The Retry Service + MAY send an Initial Packet containing a CONNECTION_CLOSE frame with + the INVALID_TOKEN error code when dropping the packet. + + + + + + +Duke & Banks Expires 15 November 2021 [Page 22] + +Internet-Draft QUIC-LB May 2021 + + + Note that this scheme has a performance drawback. When the retry + service is in active mode, clients with a token from a NEW_TOKEN + frame will suffer a 1-RTT penalty even though its token provides + proof of address. + + In inactive mode, the service MUST forward all packets that have no + token or a token with the first bit set to '1'. It MUST validate all + tokens with the first bit set to '0'. If successful, the service + MUST forward the packet with the token intact. If unsuccessful, it + MUST either drop the packet or forward it with the token removed. + The latter requires decryption and re-encryption of the entire + Initial packet to avoid authentication failure. Forwarding the + packet causes the server to respond without the + original_destination_connection_id transport parameter, which + preserves the normal QUIC signal to the client that there is an on- + path attacker. + +7.2.3. Server Requirements + + A server behind a non-shared-state retry service MUST NOT send Retry + packets for a QUIC version the retry service understands. It MAY + send Retry for QUIC versions the Retry Service does not understand. + + Tokens sent in NEW_TOKEN frames MUST have the first bit set to '1'. + + If a server receives an Initial Packet with the first bit set to '1', + it could be from a server-generated NEW_TOKEN frame and should be + processed in accordance with the QUIC specification. If a server + receives an Initial Packet with the first bit to '0', it is a Retry + token and the server MUST NOT attempt to validate it. Instead, it + MUST assume the address is validated and MUST extract the Original + Destination Connection ID and Retry Source Connection ID, assuming + the format described in Section 7.2.2. + +7.3. Shared-State Retry Service + + A shared-state retry service uses a shared key, so that the server + can decode the service's retry tokens. It does not require that all + traffic pass through the Retry service, so servers MAY send Retry + packets in response to Initial packets that don't include a valid + token. + + Both server and service must have time synchronized with respect to + one another to prevent tokens being incorrectly marked as expired, + though tight synchronization is unnecessary. + + + + + + +Duke & Banks Expires 15 November 2021 [Page 23] + +Internet-Draft QUIC-LB May 2021 + + + The tokens are protected using AES128-GCM AEAD, as explained in + Section 7.3.1. All tokens, generated by either the server or retry + service, MUST use the following format, which includes: + + * A 96 bit unique token number transmitted in clear text, but + protected as part of the AEAD associated data. + + * An 8 bit token key identifier. + + * A token body, encoding the Original Destination Connection ID, the + Retry Source Connection ID, and the Timestamp, optionally followed + by server specific Opaque Data. + + The token protection uses an 128 bit representation of the source IP + address from the triggering Initial packet. The client IP address is + 16 octets. If an IPv4 address, the last 12 octets are zeroes. + + If there is a Network Address Translator (NAT) in the server + infrastructure that changes the client IP, the Retry Service MUST + either be positioned behind the NAT, or the NAT must have the token + key to rewrite the Retry token accordingly. Note also that a host + that obtains a token through a NAT and then attempts to connect over + a path that does not have an identically configured NAT will fail + address validation. + + The 96 bit unique token number is set to a random value using a + cryptography-grade random number generator. + + The token key identifier and the corresponding AEAD key and AEAD IV + are provisioned by the configuration agent. + + The token body is encoded as follows: + + Shared-State Retry Service Token Body { + ODCIL (8) = 0..20, + RSCIL (8) = 0..20, + [Port (16)], + Original Destination Connection ID (0..160), + Retry Source Connection ID (0..160), + Timestamp (64), + Opaque Data (..), + } + + Figure 7: Body of shared-state retry service tokens + + The token body has the following fields: + + + + + +Duke & Banks Expires 15 November 2021 [Page 24] + +Internet-Draft QUIC-LB May 2021 + + + ODCIL: The original destination connection ID length. Tokens in + NEW_TOKEN frames MUST set this field to zero. + + RSCIL: The retry source connection ID length. Tokens in NEW_TOKEN + frames MUST set this field to zero. + + Port: The Source Port of the UDP datagram that triggered the Retry + packet. This field MUST be present if and only if the ODCIL is + greater than zero. This field is therefore always absent in tokens + in NEW_TOKEN frames. + + Original Destination Connection ID: The server or Retry Service + copies this from the field in the client Initial packet. + + Retry Source Connection ID: The server or Retry service copies this + from the Source Connection ID of the Retry packet. + + Timestamp: The Timestamp is a 64-bit integer, in network order, that + expresses the expiration time of the token as a number of seconds in + POSIX time (see Sec. 4.16 of [TIME_T]). + + Opaque Data: The server may use this field to encode additional + information, such as congestion window, RTT, or MTU. The Retry + Service MUST have zero-length opaque data. + + Some implementations of QUIC encode in the token the Initial Packet + Number used by the client, in order to verify that the client sends + the retried Initial with a PN larger that the triggering Initial. + Such implementations will encode the Initial Packet Number as part of + the opaque data. As tokens may be generated by the Service, servers + MUST NOT reject tokens because they lack opaque data and therefore + the packet number. + +7.3.1. Token Protection with AEAD + + On the wire, the token is presented as: + + Shared-State Retry Service Token { + Unique Token Number (96), + Key Sequence (8), + Encrypted Shared-State Retry Service Token Body (80..), + AEAD Integrity Check Value (128), + } + + Figure 8: Wire image of shared-state retry service tokens + + The tokens are protected using AES128-GCM as follows: + + + + +Duke & Banks Expires 15 November 2021 [Page 25] + +Internet-Draft QUIC-LB May 2021 + + + * The token key and IV are retrieved using the Key Sequence. + + * The nonce, N, is formed by combining the IV with the 96 bit unique + token number. The 96 bits of the unique token number are left- + padded with zeros to the size of the IV. The exclusive OR of the + padded unique token number and the IV forms the AEAD nonce. + + * The associated data is a formatted as a pseudo header by combining + the cleartext part of the token with the IP address of the client. + + Shared-State Retry Service Token Pseudoheader { + IP Address (128), + Unique Token Number (96), + Key Sequence (8), + } + + Figure 9: Psuedoheader for shared-state retry service tokens + + * The input plaintext for the AEAD is the token body. The output + ciphertext of the AEAD is transmitted in place of the token body. + + * The AEAD Integrity Check Value(ICV), defined in Section 6 of + [RFC4106], is computed as part of the AEAD encryption process, and + is verified during decryption. + +7.3.2. Configuration Agent Actions + + The configuration agent generates and distributes a "token key", a + "token IV", a key sequence, and the information described in + Section 7.1. + +7.3.3. Service Requirements + + In inactive mode, the Retry service forwards all packets without + further inspection or processing. + + Retry services MUST NOT issue Retry packets except where explicitly + allowed below, to avoid sending a Retry packet in response to a Retry + token. + + When in active mode, the service MUST generate Retry tokens with the + format described above when it receives a client Initial packet with + no token. + + The service SHOULD decrypt incoming tokens. The service SHOULD drop + packets with unknown key sequence, or an AEAD ICV that does not match + the expected value. (By construction, the AEAD ICV will only match + if the client IP Address also matches.) + + + +Duke & Banks Expires 15 November 2021 [Page 26] + +Internet-Draft QUIC-LB May 2021 + + + If the token verification passes, and the ODCIL and RSCIL fields are + both zero, then this is a NEW_TOKEN token generated by the server. + Processing of NEW_TOKEN tokens is subtly different from Retry tokens, + as described below. + + The service SHOULD drop a packet containing a token where the ODCIL + is greater than zero and less than the minimum number of octets for a + client-generated CID (8 in QUIC version 1). The service also SHOULD + drop a packet containing a token where the ODCIL is zero and RSCIL is + nonzero. + + If the Timestamp of a token points to time in the past, the token has + expired; however, in order to allow for clock skew, it SHOULD NOT + consider tokens to be expired if the Timestamp encodes a few seconds + in the past. An active Retry service SHOULD drop packets with + expired tokens. If a NEW_TOKEN token, the service MUST generate a + Retry packet in response. It MUST NOT generate a Retry packet in + response to an expired Retry token. + + If a Retry token, the service SHOULD drop packets where the port + number encoded in the token does not match the source port in the + encapsulating UDP header. + + All other packets SHOULD be forwarded to the server. + +7.3.4. Server Requirements + + When issuing Retry or NEW_TOKEN tokens, the server MUST include the + client IP address in the authenticated data as specified in + Section 7.3.1. The ODCIL and RSCIL fields are zero for NEW_TOKEN + tokens, making them easily distinguishable from Retry tokens. + + The server MUST validate all tokens that arrive in Initial packets, + as they may have bypassed the Retry service. + + For Retry tokens that follow the format above, servers SHOULD use the + timestamp field to apply its expiration limits for tokens. This need + not be precisely synchronized with the retry service. However, + servers MAY allow retry tokens marked as being a few seconds in the + past, due to possible clock synchronization issues. + + After decrypting the token, the server uses the corresponding fields + to populate the original_destination_connection_id transport + parameter, with a length equal to ODCIL, and the + retry_source_connection_id transport parameter, with length equal to + RSCIL. + + + + + +Duke & Banks Expires 15 November 2021 [Page 27] + +Internet-Draft QUIC-LB May 2021 + + + For QUIC versions the service does not support, the server MAY use + any token format. + + As discussed in [QUIC-TRANSPORT], a server MUST NOT send a Retry + packet in response to an Initial packet that contains a retry token. + +8. Configuration Requirements + + QUIC-LB requires common configuration to synchronize understanding of + encodings and guarantee explicit consent of the server. + + The load balancer and server MUST agree on a routing algorithm, + server ID allocation method, and the relevant parameters for that + algorithm. + + All algorithms require a server ID length. If server IDs are + statically allocated, the load balancer MUST receive the full table + of mappings, and each server must receive its assigned SID(s), from + the configuration agent. + + For Stream Cipher CID Routing, the servers and load balancer also + MUST have a common understanding of the key and nonce length. + + For Block Cipher CID Routing, the servers and load balancer also MUST + have a common understanding of the key. + + Note that server IDs are opaque bytes, not integers, so there is no + notion of network order or host order. + + A server configuration MUST specify if the first octet encodes the + CID length. Note that a load balancer does not need the CID length, + as the required bytes are present in the QUIC packet. + + A full QUIC-LB server configuration MUST also specify the supported + QUIC versions of any Retry Service. If a shared-state service, the + server also must have the token key. + + A non-shared-state Retry Service need only be configured with the + QUIC versions it supports, and an Allow- or Deny-List. A shared- + state Retry Service also needs the token key, and to be aware if a + NAT sits between it and the servers. + + Appendix A provides a YANG Model of the a full QUIC-LB configuration. + +9. Additional Use Cases + + This section discusses considerations for some deployment scenarios + not implied by the specification above. + + + +Duke & Banks Expires 15 November 2021 [Page 28] + +Internet-Draft QUIC-LB May 2021 + + +9.1. Load balancer chains + + Some network architectures may have multiple tiers of low-state load + balancers, where a first tier of devices makes a routing decision to + the next tier, and so on, until packets reach the server. Although + QUIC-LB is not explicitly designed for this use case, it is possible + to support it. + + If each load balancer is assigned a range of server IDs that is a + subset of the range of IDs assigned to devices that are closer to the + client, then the first devices to process an incoming packet can + extract the server ID and then map it to the correct forwarding + address. Note that this solution is extensible to arbitrarily large + numbers of load-balancing tiers, as the maximum server ID space is + quite large. + +9.2. Moving connections between servers + + Some deployments may transparently move a connection from one server + to another. The means of transferring connection state between + servers is out of scope of this document. + + To support a handover, a server involved in the transition could + issue CIDs that map to the new server via a NEW_CONNECTION_ID frame, + and retire CIDs associated with the new server using the "Retire + Prior To" field in that frame. + + Alternately, if the old server is going offline, the load balancer + could simply map its server ID to the new server's address. + +10. Version Invariance of QUIC-LB + + Non-shared-state Retry Services are inherently dependent on the + format (and existence) of Retry Packets in each version of QUIC, and + so Retry Service configuration explicitly includes the supported QUIC + versions. + + The server ID encodings, and requirements for their handling, are + designed to be QUIC version independent (see [QUIC-INVARIANTS]). A + QUIC-LB load balancer will generally not require changes as servers + deploy new versions of QUIC. However, there are several unlikely + future design decisions that could impact the operation of QUIC-LB. + + The maximum Connection ID length could be below the minimum necessary + for one or more encoding algorithms. + + + + + + +Duke & Banks Expires 15 November 2021 [Page 29] + +Internet-Draft QUIC-LB May 2021 + + + Section 4.1 provides guidance about how load balancers should handle + unroutable DCIDs. This guidance, and the implementation of an + algorithm to handle these DCIDs, rests on some assumptions: + + * Incoming short headers do not contain DCIDs that are client- + generated. + + * The use of client-generated incoming DCIDs does not persist beyond + a few round trips in the connection. + + * While the client is using DCIDs it generated, some exposed fields + (IP address, UDP port, client-generated destination Connection ID) + remain constant for all packets sent on the same connection. + + * Dynamic server ID allocation is dependent on client-generated + Destination CIDs in Initial Packets being at least 8 octets in + length. If they are not, the load balancer may not be able to + extract a valid server ID to add to its table. Configuring a + shorter server ID length can increase robustness to a change. + + While this document does not update the commitments in + [QUIC-INVARIANTS], the additional assumptions are minimal and + narrowly scoped, and provide a likely set of constants that load + balancers can use with minimal risk of version- dependence. + + If these assumptions are invalid, this specification is likely to + lead to loss of packets that contain unroutable DCIDs, and in extreme + cases connection failure. + + Some load balancers might inspect elements of the Server Name + Indication (SNI) extension in the TLS Client Hello to make a routing + decision. Note that the format and cryptographic protection of this + information may change in future versions or extensions of TLS or + QUIC, and therefore this functionality is inherently not version- + invariant. + +11. Security Considerations + + QUIC-LB is intended to prevent linkability. Attacks would therefore + attempt to subvert this purpose. + + Note that the Plaintext CID algorithm makes no attempt to obscure the + server mapping, and therefore does not address these concerns. It + exists to allow consistent CID encoding for compatibility across a + network infrastructure, which makes QUIC robust to NAT rebinding. + Servers that are running the Plaintext CID algorithm SHOULD only use + it to generate new CIDs for the Server Initial Packet and SHOULD NOT + send CIDs in QUIC NEW_CONNECTION_ID frames, except that it sends one + + + +Duke & Banks Expires 15 November 2021 [Page 30] + +Internet-Draft QUIC-LB May 2021 + + + new Connection ID in the event of config rotation Section 3.1. Doing + so might falsely suggest to the client that said CIDs were generated + in a secure fashion. + + A linkability attack would find some means of determining that two + connection IDs route to the same server. As described above, there + is no scheme that strictly prevents linkability for all traffic + patterns, and therefore efforts to frustrate any analysis of server + ID encoding have diminishing returns. + +11.1. Attackers not between the load balancer and server + + Any attacker might open a connection to the server infrastructure and + aggressively simulate migration 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. + + The Stream and Block Cipher CID algorithms provide robust protection + against any sort of linkage. The Plaintext CID algorithm makes no + attempt to protect this encoding. + + Were this analysis to obtain the server encoding, then on-path + observers might apply this analysis to correlating different client + IP addresses. + +11.2. Attackers between the load balancer and server + + 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 + IDs for that connection. + +11.3. Multiple Configuration IDs + + During the period in which there are multiple deployed configuration + IDs (see Section 3.1), there is a slight increase in linkability. + The server space is effectively divided into segments with CIDs that + have different config rotation bits. Entities that manage servers + SHOULD strive to minimize these periods by quickly deploying new + configurations across the server pool. + + + + + + + + + + +Duke & Banks Expires 15 November 2021 [Page 31] + +Internet-Draft QUIC-LB May 2021 + + +11.4. Limited configuration scope + + A simple deployment of QUIC-LB in a cloud provider might use the same + global QUIC-LB configuration across all its load balancers that route + to customer servers. An attacker could then simply become a + customer, obtain the configuration, and then extract server IDs of + other customers' connections at will. + + To avoid this, the configuration agent SHOULD issue QUIC-LB + configurations to mutually distrustful servers that have different + keys for encryption algorithms. In many cases, the load balancers + can distinguish these configurations by external IP address. + + However, assigning multiple entities to an IP address is + complimentary with concealing DNS requests (e.g., DoH [RFC8484]) and + the TLS Server Name Indicator (SNI) ([I-D.ietf-tls-esni]) to obscure + the ultimate destination of traffic. While the load balancer's + fallback algorithm (Section 4.2) can use the SNI to make a routing + decision on the first packet, there are three ways to route + subsequent packets: + + * all co-tenants can use the same QUIC-LB configuration, leaking the + server mapping to each other as described above; + + * co-tenants can be issued one of up to three configurations + distinguished by the config rotation bits (Section 3.1), exposing + information about the target domain to the entire network; or + + * tenants can use 4-tuple routing in their CIDs (in which case they + SHOULD disable migration in their connections), which neutralizes + the value of QUIC-LB but preserves privacy. + + When configuring QUIC-LB, administrators must evaluate the privacy + tradeoff considering the relative value of each of these properties, + given the trust model between tenants, the presence of methods to + obscure the domain name, and value of address migration in the tenant + use cases. + + As the plaintext algorithm makes no attempt to conceal the server + mapping, these deployments SHOULD simply use a common configuration. + + + + + + + + + + + +Duke & Banks Expires 15 November 2021 [Page 32] + +Internet-Draft QUIC-LB May 2021 + + +11.5. Stateless Reset Oracle + + Section 21.9 of [QUIC-TRANSPORT] discusses the Stateless Reset Oracle + attack. For a server deployment to be vulnerable, an attacking + client must be able to cause two packets with the same Destination + CID to arrive at two different servers that share the same + cryptographic context for Stateless Reset tokens. As QUIC-LB + requires deterministic routing of DCIDs over the life of a + connection, it is a sufficient means of avoiding an Oracle without + additional measures. + +11.6. Connection ID Entropy + + The Stream Cipher and Block Cipher algorithms need to generate + different cipher text for each generated Connection ID instance to + protect the Server ID. To do so, at least four octets of the Block + Cipher CID and at least eight octets of the Stream Cipher CID are + reserved for a nonce that, if used only once, will result in unique + cipher text for each Connection ID. + + If servers simply increment the nonce by one with each generated + connection ID, then it is safe to use the existing keys until any + server's nonce counter exhausts the allocated space and rolls over to + zero. Whether or not it implements this method, the server MUST NOT + reuse a nonce until it switches to a configuration with new keys. + + Configuration agents SHOULD implement an out-of-band method to + discover when servers are in danger of exhausting their nonce space, + and SHOULD respond by issuing a new configuration. A server that has + exhausted its nonces MUST either switch to a different configuration, + or if none exists, use the 4-tuple routing config rotation codepoint. + +11.7. Shared-State Retry Keys + + The Shared-State Retry Service defined in Section 7.3 describes the + format of retry tokens or new tokens protected and encrypted using + AES128-GCM. Each token includes a 96 bit randomly generated unique + token number, and an 8 bit identifier of the AES-GCM encryption key. + There are three important security considerations for these tokens: + + * An attacker that obtains a copy of the encryption key will be able + to decrypt and forge tokens. + + * Attackers may be able to retrieve the key if they capture a + sufficently large number of retry tokens encrypted with a given + key. + + + + + +Duke & Banks Expires 15 November 2021 [Page 33] + +Internet-Draft QUIC-LB May 2021 + + + * Confidentiality of the token data will fail if separate tokens + reuse the same 96 bit unique token number and the same key. + + To protect against disclosure of keys to attackers, service and + servers MUST ensure that the keys are stored securely. To limit the + consequences of potential exposures, the time to live of any given + key should be limited. + + Section 6.6 of [QUIC-TLS] states that "Endpoints MUST count the + number of encrypted packets for each set of keys. If the total + number of encrypted packets with the same key exceeds the + confidentiality limit for the selected AEAD, the endpoint MUST stop + using those keys." It goes on with the specific limit: "For + AEAD_AES_128_GCM and AEAD_AES_256_GCM, the confidentiality limit is + 2^23 encrypted packets; see Appendix B.1." It is prudent to adopt + the same limit here, and configure the service in such a way that no + more than 2^23 tokens are generated with the same key. + + In order to protect against collisions, the 96 bit unique token + numbers should be generated using a cryptographically secure + pseudorandom number generator (CSPRNG), as specified in Appendix C.1 + of the TLS 1.3 specification [RFC8446]. With proper random numbers, + if fewer than 2^40 tokens are generated with a single key, the risk + of collisions is lower than 0.001%. + +12. IANA Considerations + + There are no IANA requirements. + +13. References + +13.1. Normative References + + [QUIC-INVARIANTS] + Thomson, M., "Version-Independent Properties of QUIC", + Work in Progress, Internet-Draft, draft-ietf-quic- + invariants-13, 14 January 2021, + . + + [QUIC-TRANSPORT] + Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed + and Secure Transport", Work in Progress, Internet-Draft, + draft-ietf-quic-transport-34, 14 January 2021, + . + + + + + +Duke & Banks Expires 15 November 2021 [Page 34] + +Internet-Draft QUIC-LB May 2021 + + + [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol + Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, + . + + [TIME_T] "Open Group Standard: Vol. 1: Base Definitions, Issue 7", + IEEE Std 1003.1 , 2018, + . + +13.2. Informative References + + [I-D.ietf-tls-esni] + Rescorla, E., Oku, K., Sullivan, N., and C. A. Wood, "TLS + Encrypted Client Hello", Work in Progress, Internet-Draft, + draft-ietf-tls-esni-10, 8 March 2021, + . + + [QUIC-TLS] Thomson, M. and S. Turner, "Using TLS to Secure QUIC", + Work in Progress, Internet-Draft, draft-ietf-quic-tls-34, + 14 January 2021, . + + [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate + Requirement Levels", BCP 14, RFC 2119, + DOI 10.17487/RFC2119, March 1997, + . + + [RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode + (GCM) in IPsec Encapsulating Security Payload (ESP)", + RFC 4106, DOI 10.17487/RFC4106, June 2005, + . + + [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for + the Network Configuration Protocol (NETCONF)", RFC 6020, + DOI 10.17487/RFC6020, October 2010, + . + + [RFC7696] Housley, R., "Guidelines for Cryptographic Algorithm + Agility and Selecting Mandatory-to-Implement Algorithms", + BCP 201, RFC 7696, DOI 10.17487/RFC7696, November 2015, + . + + [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", + BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, + . + + + + + +Duke & Banks Expires 15 November 2021 [Page 35] + +Internet-Draft QUIC-LB May 2021 + + + [RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS + (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, + . + +Appendix A. QUIC-LB YANG Model + + This YANG model conforms to [RFC6020] and expresses a complete QUIC- + LB configuration. + +module ietf-quic-lb { + yang-version "1.1"; + namespace "urn:ietf:params:xml:ns:yang:ietf-quic-lb"; + prefix "quic-lb"; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types."; + } + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types."; + } + + organization + "IETF QUIC Working Group"; + + contact + "WG Web: + WG List: + + Authors: Martin Duke (martin.h.duke at gmail dot com) + Nick Banks (nibanks at microsoft dot com)"; + + description + "This module enables the explicit cooperation of QUIC servers with + trusted intermediaries without breaking important protocol features. + + Copyright (c) 2021 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + + + +Duke & Banks Expires 15 November 2021 [Page 36] + +Internet-Draft QUIC-LB May 2021 + + + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX + (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself + for full legal notices. + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + 'MAY', and 'OPTIONAL' in this document are to be interpreted as + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, + they appear in all capitals, as shown here."; + + revision "2021-01-29" { + description + "Initial Version"; + reference + "RFC XXXX, QUIC-LB: Generating Routable QUIC Connection IDs"; + } + + container quic-lb { + presence "The container for QUIC-LB configuration."; + + description + "QUIC-LB container."; + + typedef quic-lb-key { + type yang:hex-string { + length 47; + } + description + "This is a 16-byte key, represented with 47 bytes"; + } + + list cid-configs { + key "config-rotation-bits"; + description + "List up to three load balancer configurations"; + + leaf config-rotation-bits { + type uint8 { + range "0..2"; + } + mandatory true; + description + "Identifier for this CID configuration."; + } + + leaf first-octet-encodes-cid-length { + + + +Duke & Banks Expires 15 November 2021 [Page 37] + +Internet-Draft QUIC-LB May 2021 + + + type boolean; + default false; + description + "If true, the six least significant bits of the first CID + octet encode the CID length minus one."; + } + + leaf cid-key { + type quic-lb-key; + description + "Key for encrypting the connection ID. If absent, the + configuration uses the Plaintext algorithm."; + } + + leaf nonce-length { + type uint8 { + range "8..16"; + } + must '(../cid-key)' { + error-message "nonce-length only valid if cid-key is set"; + } + description + "Length, in octets, of the nonce. If absent when cid-key is + present, the configuration uses the Block Cipher Algorithm. + If present along with cid-key, the configurationuses the + Stream Cipher Algorithm."; + } + + leaf lb-timeout { + type uint32; + description + "Existence means the configuration uses dynamic Server ID allocation. + Time (in seconds) to keep a server ID allocation if no packets with + that server ID arrive."; + } + + leaf server-id-length { + type uint8 { + range "1..18"; + } + must '(../lb-timeout and . <= 7) or + (not(../lb-timeout) and + (not(../cid-key) and . <= 16) or + ((../nonce-length) and . <= (19 - ../nonce-length)) or + ((../cid-key) and not(../nonce-length) and . <= 12))' { + error-message + "Server ID length too long for routing algorithm and server ID + allocation method"; + + + +Duke & Banks Expires 15 November 2021 [Page 38] + +Internet-Draft QUIC-LB May 2021 + + + } + mandatory true; + description + "Length (in octets) of a server ID. Further range-limited + by sid-allocation, cid-key, and nonce-length."; + } + + list server-id-mappings { + when "not(../lb-timeout)"; + key "server-id"; + description "Statically allocated Server IDs"; + + leaf server-id { + type yang:hex-string; + must "string-length(.) = 3 * ../../server-id-length - 1"; + mandatory true; + description + "An allocated server ID"; + } + + leaf server-address { + type inet:ip-address; + mandatory true; + description + "Destination address corresponding to the server ID"; + } + } + } + + container retry-service-config { + description + "Configuration of Retry Service. If supported-versions is empty, there + is no retry service. If token-keys is empty, it uses the non-shared- + state service. If present, it uses shared-state tokens."; + + leaf-list supported-versions { + type uint32; + description + "QUIC versions that the retry service supports. If empty, there + is no retry service."; + } + + leaf unsupported-version-default { + type enumeration { + enum allow { + description "Unsupported versions admitted by default"; + } + enum deny { + + + +Duke & Banks Expires 15 November 2021 [Page 39] + +Internet-Draft QUIC-LB May 2021 + + + description "Unsupported versions denied by default"; + } + } + default allow; + description + "Are unsupported versions not in version-exceptions allowed + or denied?"; + } + + leaf-list version-exceptions { + type uint32; + description + "Exceptions to the default-deny or default-allow rule."; + } + + list token-keys { + key "key-sequence-number"; + description + "list of active keys, for key rotation purposes. Existence implies + shared-state format"; + + leaf key-sequence-number { + type uint8; + mandatory true; + description + "Identifies the key used to encrypt the token"; + } + + leaf token-key { + type quic-lb-key; + mandatory true; + description + "16-byte key to encrypt the token"; + } + + leaf token-iv { + type yang:hex-string { + length 23; + } + mandatory true; + description + "8-byte IV to encrypt the token, encoded in 23 bytes"; + } + } + } + } +} + + + + +Duke & Banks Expires 15 November 2021 [Page 40] + +Internet-Draft QUIC-LB May 2021 + + +A.1. Tree Diagram + + This summary of the YANG model uses the notation in [RFC8340]. + + module: ietf-quic-lb + +--rw quic-lb + +--rw cid-configs* + | [config-rotation-bits] + | +--rw config-rotation-bits uint8 + | +--rw first-octet-encodes-cid-length? boolean + | +--rw cid-key? yang:hex-string + | +--rw nonce-length? uint8 + | +--rw lb-timeout? uint32 + | +--rw server-id-length uint8 + | +--rw server-id-mappings*? + | | [server-id] + | | +--rw server-id yang:hex-string + | | +--rw server-address inet:ip-address + +--ro retry-service-config + | +--rw supported-versions* + | | +--rw version uint32 + | +--rw unsupported-version-default enumeration {allow deny} + | +--rw version-exceptions* + | | +--rw version uint32 + | +--rw token-keys*? + | | [key-sequence-number] + | | +--rw key-sequence-number uint8 + | | +--rw token-key yang:hex-string + | | +--rw token-iv yang:hex-string + +Appendix B. Load Balancer Test Vectors + + Each section of this draft includes multiple sets of load balancer + configuration, each of which has five examples of server ID and + server use bytes and how they are encoded in a CID. + + In some cases, there are no server use bytes. Note that, for + simplicity, the first octet bits used for neither config rotation nor + length self-encoding are random, rather than listed in the server use + field. Therefore, a server implementation using these parameters may + generate CIDs with a slightly different first octet. + + This section uses the following abbreviations: + + + + + + + + +Duke & Banks Expires 15 November 2021 [Page 41] + +Internet-Draft QUIC-LB May 2021 + + + cid Connection ID + cr_bits Config Rotation Bits + LB Load Balancer + sid Server ID + sid_len Server ID length + su Server Use Bytes + + All values except length_self_encoding and sid_len are expressed in + hexidecimal format. + +B.1. Plaintext Connection ID Algorithm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Duke & Banks Expires 15 November 2021 [Page 42] + +Internet-Draft QUIC-LB May 2021 + + + LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1 + + cid 01be sid be su + cid 0221b7 sid 21 su b7 + cid 03cadfd8 sid ca su dfd8 + cid 041e0c9328 sid 1e su 0c9328 + cid 050c8f6d9129 sid 0c su 8f6d9129 + + LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2 + + cid 02aab0 sid aab0 su + cid 3ac4b106 sid c4b1 su 06 + cid 08bd3cf4a0 sid bd3c su f4a0 + cid 3771d59502d6 sid 71d5 su 9502d6 + cid 1d57dee8b888f3 sid 57de su e8b888f3 + + LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3 + + cid 0336c976 sid 36c976 su + cid 04aa291806 sid aa2918 su 06 + cid 0586897bd8b6 sid 86897b su d8b6 + cid 063625bcae4de0 sid 3625bc su ae4de0 + cid 07966fb1f3cb535f sid 966fb1 su f3cb535f + + LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4 + + cid 185172fab8 sid 5172fab8 su + cid 2eb7ff2c9297 sid b7ff2c92 su 97 + cid 14f3eb3dd3edbe sid f3eb3dd3 su edbe + cid 3feb31cece744b74 sid eb31cece su 744b74 + cid 06b9f34c353ce23bb5 sid b9f34c35 su 3ce23bb5 + + LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5 + + cid 05bdcd8d0b1d sid bdcd8d0b1d su + cid 06aee673725a63 sid aee673725a su 63 + cid 07bbf338ddbf37f4 sid bbf338ddbf su 37f4 + cid 08fbbca64c26756840 sid fbbca64c26 su 756840 + cid 09e7737c495b93894e34 sid e7737c495b su 93894e34 + +B.2. Stream Cipher Connection ID Algorithm + + In each case below, the server is using a plain text nonce value of + zero. + + + + + + + +Duke & Banks Expires 15 November 2021 [Page 43] + +Internet-Draft QUIC-LB May 2021 + + +LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 12 sid_len 1 + key 4d9d0fd25a25e7f321ef464e13f9fa3d + +cid 0d69fe8ab8293680395ae256e89c sid c5 su +cid 0e420d74ed99b985e10f5073f43027 sid d5 su 27 +cid 0f380f440c6eefd3142ee776f6c16027 sid 10 su 6027 +cid 1020607efbe82049ddbf3a7c3d9d32604d sid 3c su 32604d +cid 11e132d12606a1bb0fa17e1caef00ec54c10 sid e3 su 0ec54c10 + +LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 2 + key 49e1cec7fd264b1f4af37413baf8ada9 + +cid 3d3a5e1126414271cc8dc2ec7c8c15 sid f7fe su +cid 007042539e7c5f139ac2adfbf54ba748 sid eaf4 su 48 +cid 2bc125dd2aed2aafacf59855d99e029217 sid e880 su 9217 +cid 3be6728dc082802d9862c6c8e4dda3d984d8 sid 62c6 su d984d8 +cid 1afe9c6259ad350fc7bad28e0aeb2e8d4d4742 sid 8502 su 8d4d4742 + +LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 14 sid_len 3 + key 2c70df0b399bd33a7335523dcdb884ad + +cid 11d62e8670565cd30b552edff6782ff5a740 sid d794bb su +cid 12c70e481f49363cabd9370d1fd5012c12bca5 sid 2cbd5d su a5 +cid 133b95dfd8ad93566782f8424df82458069fc9e9 sid d126cd su c9e9 +cid 13ac6ffcd635532ab60370306c7ee572d6b6e795 sid 539e42 su e795 +cid 1383ed07a9700777ff450bb39bb9c1981266805c sid 9094dd su 805c + +LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 4 + key 2297b8a95c776cf9c048b76d9dc27019 + +cid 32873890c3059ca62628089439c44c1f84 sid 7398d8ca su +cid 1ff7c7d7b9823954b178636c99a7dc93ac83 sid 9655f091 su 83 +cid 31044000a5ebb3bf2fa7629a17f2c78b077c17 sid 8b035fc6 su 7c17 +cid 1791bd28c66721e8fea0c6f34fd2d8e663a6ef70 sid 6672e0e2 su a6ef70 +cid 3df1d90ad5ccd5f8f475f040e90aeca09ec9839d sid b98b1fff su c9839d + +LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 8 sid_len 5 + key 484b2ed942d9f4765e45035da3340423 + +cid 0da995b7537db605bfd3a38881ae sid 391a7840dc su +cid 0ed8d02d55b91d06443540d1bf6e98 sid 10f7f7b284 su 98 +cid 0f3f74be6d46a84ccb1fd1ee92cdeaf2 sid 0606918fc0 su eaf2 +cid 1045626dbf20e03050837633cc5650f97c sid e505eea637 su 50f97c +cid 11bb9a17f691ab446a938427febbeb593eaa sid 99343a2a96 su eb593eaa + +B.3. Block Cipher Connection ID Algorithm + + + + + +Duke & Banks Expires 15 November 2021 [Page 44] + +Internet-Draft QUIC-LB May 2021 + + +LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1 + key 411592e4160268398386af84ea7505d4 + +cid 10564f7c0df399f6d93bdddb1a03886f25 sid 23 su 05231748a80884ed58007847eb9fd0 +cid 10d5c03f9dd765d73b3d8610b244f74d02 sid 15 su 76cd6b6f0d3f0b20fc8e633e3a05f3 +cid 108ca55228ab23b92845341344a2f956f2 sid 64 su 65c0ce170a9548717498b537cb8790 +cid 10e73f3d034aef2f6f501e3a7693d6270a sid 07 su f9ad10c84cc1e89a2492221d74e707 +cid 101a6ce13d48b14a77ecfd365595ad2582 sid 6c su 76ce4689b0745b956ef71c2608045d + +LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2 + key 92ce44aecd636aeeff78da691ef48f77 + +cid 20aa09bc65ed52b1ccd29feb7ef995d318 sid a52f su 99278b92a86694ff0ecd64bc2f73 +cid 30b8dbef657bd78a2f870e93f9485d5211 sid 6c49 su 7381c8657a388b4e9594297afe96 +cid 043a8137331eacd2e78383279b202b9a6d sid 4188 su 5ac4b0e0b95f4e7473b49ee2d0dd +cid 3ba71ea2bcf0ab95719ab59d3d7fde770d sid 8ccc su 08728807605db25f2ca88be08e0f +cid 37ef1956b4ec354f40dc68336a23d42b31 sid c89d su 5a3ccd1471caa0de221ad6c185c0 + +LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3 + key 5c49cb9265efe8ae7b1d3886948b0a34 + +cid 10efcffc161d232d113998a49b1dbc4aa0 sid 0690b3 su 958fc9f38fe61b83881b2c5780 +cid 10fc13bdbcb414ba90e391833400c19505 sid 031ac3 su 9a55e1e1904e780346fcc32c3c +cid 10d3cc1efaf5dc52c7a0f6da2746a8c714 sid 572d3a su ff2ec9712664e7174dc03ca3f8 +cid 107edf37f6788e33c0ec7758a485215f2b sid 562c25 su 02c5a5dcbea629c3840da5f567 +cid 10bc28da122582b7312e65aa096e9724fc sid 2fa4f0 su 8ae8c666bfc0fc364ebfd06b9a + +LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4 + key e787a3a491551fb2b4901a3fa15974f3 + +cid 26125351da12435615e3be6b16fad35560 sid 0cb227d3 su 65b40b1ab54e05bff55db046 +cid 14de05fc84e41b611dfbe99ed5b1c9d563 sid 6a0f23ad su d73bee2f3a7e72b3ffea52d9 +cid 1306052c3f973db87de6d7904914840ff1 sid ca21402d su 5829465f7418b56ee6ada431 +cid 1d202b5811af3e1dba9ea2950d27879a92 sid b14e1307 su 4902aba8b23a5f24616df3cf +cid 26538b78efc2d418539ad1de13ab73e477 sid a75e0148 su 0040323f1854e75aeb449b9f + +LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5 + key d5a6d7824336fbe0f25d28487cdda57c + +cid 10a2794871aadb20ddf274a95249e57fde sid 82d3b0b1a1 su 0935471478c2edb8120e60 +cid 108122fe80a6e546a285c475a3b8613ec9 sid fbcc902c9d su 59c47946882a9a93981c15 +cid 104d227ad9dd0fef4c8cb6eb75887b6ccc sid 2808e22642 su 2a7ef40e2c7e17ae40b3fb +cid 10b3f367d8627b36990a28d67f50b97846 sid 5e018f0197 su 2289cae06a566e5cb6cfa4 +cid 1024412bfe25f4547510204bdda6143814 sid 8a8dd3d036 su 4b12933a135e5eaaebc6fd + + + + + + + +Duke & Banks Expires 15 November 2021 [Page 45] + +Internet-Draft QUIC-LB May 2021 + + + In this case, the shared-state retry token is issued by retry + service, so the opaque data of shared-state retry token body would be + null(Section 7.3). ~~~ LB configuration: key_seq 0x00 encrypt_key + 0x30313233343536373839303132333435 AEAD_IV 0x313233343536373839303132 + + Shared-State Retry Service Token Body: ODCIL 0x12 RSCIL 0x10 port + 0x1a0a original_destination_connection_id + 0x0c3817b544ca1c94313bba41757547eec937 retry_source_connection_id + 0x0301e770d24b3b13070dd5c2a9264307 timestamp 0x0000000060c7bf4d + + Shared-State Retry Service Token: unique_token_number + 0x59ef316b70575e793e1a8782 key_sequence 0x00 + encrypted_shared_state_retry_service_token_body 0x7d38b274aa4427c7a15 + 57c3fa666945931defc65da387a83855196a7cb73caac1e28e5346fd76868de94f8b6 + 2294 AEAD_ICV 0xf91174fdd711543a32d5e959867f9c22 + + AEAD related parameters: client_ip_addr 127.0.0.1 client_port 6666 + AEAD_nonce 0x68dd025f45616941072ab6b0 AEAD_associated_data + 0x7f00000100000000000000000000000059ef316b70575e793e1a878200 ~~~ + +Appendix C. Interoperability with DTLS over UDP + + Some environments may contain DTLS traffic as well as QUIC operating + over UDP, which may be hard to distinguish. + + In most cases, the packet parsing rules above will cause a QUIC-LB + load balancer to route DTLS traffic in an appropriate way. DTLS 1.3 + implementations that use the connection_id extension [?I-D.ietf-tls- + dtls-connection-id] might use the techniques in this document to + generate connection IDs and achieve robust routability for DTLS + associations if they meet a few additional requirements. This non- + normative appendix describes this interaction. + +C.1. DTLS 1.0 and 1.2 + + DTLS 1.0 [?RFC4347] and 1.2 [?RFC6347] use packet formats that a + QUIC-LB router will interpret as short header packets with CIDs that + request 4-tuple routing. As such, they will route such packets + consistently as long as the 4-tuple does not change. Note that DTLS + 1.0 has been deprecated by the IETF. + + The first octet of every DTLS 1.0 or 1.2 datagram contains the + content type. A QUIC-LB load balancer will interpret any content + type less than 128 as a short header packet, meaning that the + subsequent octets should contain a connection ID. + + + + + + +Duke & Banks Expires 15 November 2021 [Page 46] + +Internet-Draft QUIC-LB May 2021 + + + Existing TLS content types comfortably fit in the range below 128. + Assignment of codepoints greater than 64 would require coordination + in accordance with [?RFC7983], and anyway would likely create + problems demultiplexing DTLS and version 1 of QUIC. Therefore, this + document believes it is extremely unlikely that TLS content types of + 128 or greater will be assigned. Nevertheless, such an assignment + would cause a QUIC-LB load balancer to interpret the packet as a QUIC + long header with an essentially random connection ID, which is likely + to be routed irregularly. + + The second octet of every DTLS 1.0 or 1.2 datagram is the bitwise + complement of the DTLS Major version (i.e. version 1.x = 0xfe). A + QUIC-LB load balancer will interpret this as a connection ID that + requires 4-tuple based load balancing, meaning that the routing will + be consistent as long as the 4-tuple remains the same. + + [?I-D.ietf-tls-dtls-connection-id] defines an extension to add + connection IDs to DTLS 1.2. Unfortunately, a QUIC-LB load balancer + will not correctly parse the connection ID and will continue 4-tuple + routing. An modified QUIC-LB load balancer that correctly identifies + DTLS and parses a DTLS 1.2 datagram for the connection ID is outside + the scope of this document. + +C.2. DTLS 1.3 + + DTLS 1.3 [?I-D.draft-ietf-tls-dtls13] changes the structure of + datagram headers in relevant ways. + + Handshake packets continue to have a TLS content type in the first + octet and 0xfe in the second octet, so they will be 4-tuple routed, + which should not present problems for likely NAT rebinding or address + change events. + + Non-handshake packets always have zero in their most significant bit + and will therefore always be treated as QUIC short headers. If the + connection ID is present, it follows in the succeeding octets. + Therefore, a DTLS 1.3 association where the server utilizes + Connection IDs and the encodings in this document will be routed + correctly in the presence of client address and port changes. + + However, if the client does not include the connection_id extension + in its ClientHello, the server is unable to use connection IDs. In + this case, non- handshake packets will appear to contain random + connection IDs and be routed randomly. Thus, unmodified QUIC-LB load + balancers will not work with DTLS 1.3 if the client does not + advertise support for connection IDs, or the server does not request + the use of a compliant connection ID. + + + + +Duke & Banks Expires 15 November 2021 [Page 47] + +Internet-Draft QUIC-LB May 2021 + + + A QUIC-LB load balancer might be modified to identify DTLS 1.3 + packets and correctly parse the fields to identify when there is no + connection ID and revert to 4-tuple routing, removing the server + requirement above. However, such a modification is outside the scope + of this document, and classifying some packets as DTLS might be + incompatible with future versions of QUIC. + +C.3. Future Versions of DTLS + + As DTLS does not have an IETF consensus document that defines what + parts of DTLS will be invariant in future versions, it is difficult + to speculate about the applicability of this section to future + versions of DTLS. + +Appendix D. Acknowledgments + + The authors would like to thank Christian Huitema and Ian Swett for + their major design contributions. + + Manasi Deval, Erik Fuller, Toma Gavrichenkov, Jana Iyengar, Subodh + Iyengar, Ladislav Lhotka, Jan Lindblad, Ling Tao Nju, Kazuho Oku, + Udip Pant, Martin Thomson, Dmitri Tikhonov, Victor Vasiliev, and + William Zeng Ke all provided useful input to this document. + +Appendix E. Change Log + + *RFC Editor's Note:* Please remove this section prior to + publication of a final version of this document. + +E.1. since draft-ietf-quic-load-balancers-06 + + * Added interoperability with DTLS + + * Changed "non-compliant" to "unroutable" + + * Changed "arbitrary" algorithm to "fallback" + + * Revised security considerations for mistrustful tenants + +E.2. since draft-ietf-quic-load-balancers-05 + + * Added low-config CID for further discussion + + * Complete revision of shared-state Retry Token + + * Added YANG model + + * Updated configuration limits to ensure CID entropy + + + +Duke & Banks Expires 15 November 2021 [Page 48] + +Internet-Draft QUIC-LB May 2021 + + + * Switched to notation from quic-transport + +E.3. since draft-ietf-quic-load-balancers-04 + + * Rearranged the shared-state retry token to simplify token + processing + + * More compact timestamp in shared-state retry token + + * Revised server requirements for shared-state retries + + * Eliminated zero padding from the test vectors + + * Added server use bytes to the test vectors + + * Additional compliant DCID criteria + +E.4. since-draft-ietf-quic-load-balancers-03 + + * Improved Config Rotation text + + * Added stream cipher test vectors + + * Deleted the Obfuscated CID algorithm + +E.5. since-draft-ietf-quic-load-balancers-02 + + * Replaced stream cipher algorithm with three-pass version + + * Updated Retry format to encode info for required TPs + + * Added discussion of version invariance + + * Cleaned up text about config rotation + + * Added Reset Oracle and limited configuration considerations + + * Allow dropped long-header packets for known QUIC versions + +E.6. since-draft-ietf-quic-load-balancers-01 + + * Test vectors for load balancer decoding + + * Deleted remnants of in-band protocol + + * Light edit of Retry Services section + + * Discussed load balancer chains + + + +Duke & Banks Expires 15 November 2021 [Page 49] + +Internet-Draft QUIC-LB May 2021 + + +E.7. since-draft-ietf-quic-load-balancers-00 + + * Removed in-band protocol from the document + +E.8. Since draft-duke-quic-load-balancers-06 + + * Switch to IETF WG draft. + +E.9. Since draft-duke-quic-load-balancers-05 + + * Editorial changes + + * Made load balancer behavior independent of QUIC version + + * Got rid of token in stream cipher encoding, because server might + not have it + + * Defined "non-compliant DCID" and specified rules for handling + them. + + * Added psuedocode for config schema + +E.10. Since draft-duke-quic-load-balancers-04 + + * Added standard for retry services + +E.11. Since draft-duke-quic-load-balancers-03 + + * Renamed Plaintext CID algorithm as Obfuscated CID + + * Added new Plaintext CID algorithm + + * Updated to allow 20B CIDs + + * Added self-encoding of CID length + +E.12. Since draft-duke-quic-load-balancers-02 + + * Added Config Rotation + + * Added failover mode + + * Tweaks to existing CID algorithms + + * Added Block Cipher CID algorithm + + * Reformatted QUIC-LB packets + + + + +Duke & Banks Expires 15 November 2021 [Page 50] + +Internet-Draft QUIC-LB May 2021 + + +E.13. Since draft-duke-quic-load-balancers-01 + + * Complete rewrite + + * Supports multiple security levels + + * Lightweight messages + +E.14. Since draft-duke-quic-load-balancers-00 + + * Converted to markdown + + * Added variable length connection IDs + +Authors' Addresses + + Martin Duke + F5 Networks, Inc. + + Email: martin.h.duke@gmail.com + + + Nick Banks + Microsoft + + Email: nibanks@microsoft.com + + + + + + + + + + + + + + + + + + + + + + + + + +Duke & Banks Expires 15 November 2021 [Page 51] diff --git a/dtls/draft-ietf-quic-load-balancers.html b/dtls/draft-ietf-quic-load-balancers.html new file mode 100644 index 0000000..c501a8d --- /dev/null +++ b/dtls/draft-ietf-quic-load-balancers.html @@ -0,0 +1,3626 @@ + + + + + + +QUIC-LB: Generating Routable QUIC Connection IDs + + + + + + + + + + + + + + + + + + + + + + + +
Internet-DraftQUIC-LBMay 2021
Duke & BanksExpires 6 November 2021[Page]
+
+
+
+
Workgroup:
+
QUIC
+
Internet-Draft:
+
draft-ietf-quic-load-balancers-07
+
Published:
+
+ +
+
Intended Status:
+
Standards Track
+
Expires:
+
+
Authors:
+
+
+
M. Duke
+
F5 Networks, Inc.
+
+
+
N. Banks
+
Microsoft
+
+
+
+
+

QUIC-LB: Generating Routable QUIC Connection IDs

+
+

Abstract

+

The QUIC protocol design is resistant to transparent packet inspection, +injection, and modification by intermediaries. However, the server can +explicitly cooperate with network services by agreeing to certain conventions +and/or sharing state with those services. This specification provides a +standardized means of solving three problems: (1) maintaining routability to +servers via a low-state load balancer even when the connection IDs in use +change; (2) explicit encoding of the connection ID length in all packets to +assist hardware accelerators; and (3) injection of QUIC Retry packets by an +anti-Denial-of-Service agent on behalf of the server.¶

+
+
+

+Note to Readers +

+

Discussion of this document takes place on the + QUIC Working Group mailing list (quic@ietf.org), + which is archived at https://mailarchive.ietf.org/arch/browse/quic/.¶

+

Source for this draft and an issue tracker can be found at + https://github.com/quicwg/load-balancers.¶

+
+
+
+

+Status of This Memo +

+

+ This Internet-Draft is submitted in full conformance with the + provisions of BCP 78 and BCP 79.¶

+

+ Internet-Drafts are working documents of the Internet Engineering Task + Force (IETF). Note that other groups may also distribute working + documents as Internet-Drafts. The list of current Internet-Drafts is + at https://datatracker.ietf.org/drafts/current/.¶

+

+ Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as "work in progress."¶

+

+ This Internet-Draft will expire on 6 November 2021.¶

+
+
+ +
+
+ â–²

+Table of Contents +

+ +
+
+
+
+

+1. Introduction +

+

QUIC packets [QUIC-TRANSPORT] usually contain a +connection ID to allow endpoints to associate packets with different address/ +port 4-tuples to the same connection context. This feature makes connections +robust in the event of NAT rebinding. QUIC endpoints usually designate the +connection ID which peers use to address packets. Server-generated connection +IDs create a potential need for out-of-band communication to support QUIC.¶

+

QUIC allows servers (or load balancers) to designate an initial connection ID to +encode useful routing information for load balancers. It also encourages +servers, in packets protected by cryptography, to provide additional connection +IDs to the client. This allows clients that know they are going to change IP +address or port to use a separate connection ID on the new path, thus reducing +linkability as clients move through the world.¶

+

There is a tension between the requirements to provide routing information and +mitigate linkability. Ultimately, because new connection IDs are in protected +packets, they must be generated at the server if the load balancer does not have +access to the connection keys. However, it is the load balancer that has the +context necessary to generate a connection ID that encodes useful routing +information. In the absence of any shared state between load balancer and +server, the load balancer must maintain a relatively expensive table of +server-generated connection IDs, and will not route packets correctly if they +use a connection ID that was originally communicated in a protected +NEW_CONNECTION_ID frame.¶

+

This specification provides common algorithms for encoding the server mapping in +a connection ID given some shared parameters. The mapping is generally only +discoverable by observers that have the parameters, preserving unlinkability as +much as possible.¶

+

Aside from load balancing, a QUIC server may also desire to offload other +protocol functions to trusted intermediaries. These intermediaries might +include hardware assist on the server host itself, without access to fully +decrypted QUIC packets. For example, this document specifies a means of +offloading stateless retry to counter Denial of Service attacks. It also +proposes a system for self-encoding connection ID length in all packets, so that +crypto 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 +

+

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", +"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be +interpreted as described in RFC 2119 [RFC2119].¶

+

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 interpreted as carrying +significance described in RFC 2119.¶

+

In this document, "client" and "server" refer to the endpoints of a QUIC +connection unless otherwise indicated. A "load balancer" is an intermediary for +that connection that does not possess QUIC connection keys, but it may rewrite +IP addresses or conduct other IP or UDP processing. A "configuration agent" is +the entity that determines the QUIC-LB configuration parameters for the network +and leverages some system to distribute that configuration.¶

+

Note that stateful load balancers that act as proxies, by terminating a QUIC +connection with the client and then retrieving data from the server using QUIC +or another protocol, are treated as a server with respect to this specification.¶

+

For brevity, "Connection ID" will often be abbreviated as "CID".¶

+
+
+
+
+

+1.2. Notation +

+

All wire formats will be depicted using the notation defined in Section 1.3 of +[QUIC-TRANSPORT]. There is one addition: the function len() refers to the +length of a field which can serve as a limit on a different field, so that the +lengths of two fields can be concisely defined as limited to a sum, for example:¶

+

x(A..B) +y(C..B-len(x))¶

+

indicates that x can be of any length between A and B, and y can be of any +length between C and B provided that (len(x) + len(y)) does not exceed B.¶

+

The example below illustrates the basic framework:¶

+
+
+
+
+Example Structure {
+  One-bit Field (1),
+  7-bit Field with Fixed Value (7) = 61,
+  Field with Variable-Length Integer (i),
+  Arbitrary-Length Field (..),
+  Variable-Length Field (8..24),
+  Variable-Length Field with Dynamic Limit (8..24-len(Variable-Length Field)),
+  Field With Minimum Length (16..),
+  Field With Maximum Length (..128),
+  [Optional Field (64)],
+  Repeated Field (8) ...,
+}
+
+
+
Figure 1: +Example Format +
+
+
+
+
+
+
+
+

+2. Protocol Objectives +

+
+
+

+2.1. Simplicity +

+

QUIC is intended to provide unlinkability across connection migration, but +servers are not required to provide additional connection IDs that effectively +prevent linkability. If the coordination scheme is too difficult to implement, +servers behind load balancers using connection IDs for routing will use +trivially linkable connection IDs. Clients will therefore be forced to choose +between terminating the connection during migration or remaining linkable, +subverting a design objective of QUIC.¶

+

The solution should be both simple to implement and require little additional +infrastructure for cryptographic keys, etc.¶

+
+
+
+
+

+2.2. Security +

+

In the limit where there are very few connections to a pool of servers, no +scheme can prevent the linking of two connection IDs with high probability. In +the opposite limit, where all servers have many connections that start and end +frequently, it will be difficult to associate two connection IDs even if they +are known to map to the same server.¶

+

QUIC-LB is relevant in the region between these extremes: when the information +that two connection IDs map to the same server is helpful to linking two +connection IDs. Obviously, any scheme that transparently communicates this +mapping to outside observers compromises QUIC's defenses against linkability.¶

+

Though not an explicit goal of the QUIC-LB design, concealing the server mapping +also complicates attempts to focus attacks on a specific server in the pool.¶

+
+
+
+
+
+
+

+3. First CID octet +

+

The first octet of a Connection ID is reserved for two special purposes, one +mandatory (config rotation) and one optional (length self-description).¶

+

Subsequent sections of this document refer to the contents of this octet as the +"first octet."¶

+
+
+

+3.1. Config Rotation +

+

The first two bits of any connection ID MUST encode an identifier for the +configuration that the connection ID uses. This enables incremental deployment +of new QUIC-LB settings (e.g., keys).¶

+

When new configuration is distributed to servers, there will be a transition +period when connection IDs reflecting old and new configuration coexist in the +network. The rotation bits allow load balancers to apply the correct routing +algorithm and parameters to incoming packets.¶

+

Configuration Agents SHOULD deliver new configurations to load balancers before +doing so to servers, so that load balancers are ready to process CIDs using the +new parameters when they arrive.¶

+

A Configuration Agent SHOULD NOT use a codepoint to represent a new +configuration until it takes precautions to make sure that all connections using +CIDs with an old configuration at that codepoint have closed or transitioned.¶

+

Servers MUST NOT generate new connection IDs using an old configuration after +receiving a new one from the configuration agent. Servers MUST send +NEW_CONNECTION_ID frames that provide CIDs using the new configuration, and +retire CIDs using the old configuration using the "Retire Prior To" field of +that frame.¶

+

It also possible to use these bits for more long-lived distinction of different +configurations, but this has privacy implications (see Section 11.3).¶

+
+
+
+
+

+3.2. Configuration Failover +

+

If a server has not received a valid QUIC-LB configuration, and believes that +low-state, Connection-ID aware load balancers are in the path, it SHOULD +generate connection IDs with the config rotation bits set to '11' and SHOULD use +the "disable_active_migration" transport parameter in all new QUIC connections. +It SHOULD NOT send NEW_CONNECTION_ID frames with new values.¶

+

A load balancer that sees a connection ID with config rotation bits set to +'11' MUST revert to 5-tuple routing.¶

+
+
+
+
+

+3.3. Length Self-Description +

+

Local hardware cryptographic offload devices may accelerate QUIC servers by +receiving keys from the QUIC implementation indexed to the connection ID. +However, on physical devices operating multiple QUIC servers, it is impractical +to efficiently lookup these keys if the connection ID does not self-encode its +own length.¶

+

Note that this is a function of particular server devices and is irrelevant to +load balancers. As such, load balancers MAY omit this from their configuration. +However, the remaining 6 bits in the first octet of the Connection ID are +reserved to express the length of the following connection ID, not including +the first octet.¶

+

A server not using this functionality SHOULD make the six bits appear to be +random.¶

+
+
+
+
+

+3.4. Format +

+
+
+
+
+First Octet {
+  Config Rotation (2),
+  CID Len or Random Bits (6),
+}
+
+
+
Figure 2: +First Octet Format +
+
+

The first octet has the following fields:¶

+

Config Rotation: Indicates the configuration used to interpret the CID.¶

+

CID Len or Random Bits: Length Self-Description (if applicable), or random bits +otherwise. Encodes the length of the Connection ID following the First Octet.¶

+
+
+
+
+
+
+

+4. Load Balancing Preliminaries +

+

In QUIC-LB, load balancers do not generate individual connection IDs for +servers. Instead, they communicate the parameters of an algorithm to generate +routable connection IDs.¶

+

The algorithms differ in the complexity of configuration at both load balancer +and server. Increasing complexity improves obfuscation of the server mapping.¶

+

This section describes three participants: the configuration agent, the load +balancer, and the server. For any given QUIC-LB configuration that enables +connection-ID-aware load balancing, there must be a choice of (1) routing +algorithm, (2) server ID allocation strategy, and (3) algorithm parameters.¶

+

Fundamentally, servers generate connection IDs that encode their server ID. +Load balancers decode the server ID from the CID in incoming packets to route +to the correct server.¶

+

There are situations where a server pool might be operating two or more routing +algorithms or parameter sets simultaneously. The load balancer uses the first +two bits of the connection ID to multiplex incoming DCIDs over these schemes +(see Section 3.1).¶

+
+
+

+4.1. Unroutable Connection IDs +

+

QUIC-LB servers will generate Connection IDs that are decodable to extract a +server ID in accordance with a specified algorithm and parameters. However, +QUIC often uses client-generated Connection IDs prior to receiving a packet from +the server.¶

+

These client-generated CIDs might not conform to the expectations of the +routing algorithm and therefore not be routable by the load balancer. Those that +are not routable are "unroutable DCIDs" and receive similar treatment +regardless of why they're unroutable:¶

+
    +
  • The config rotation bits (Section 3.1) may not correspond to an active +configuration. Note: a packet with a DCID that indicates 5-tuple routing (see +Section 3.2) is always routable.¶ +
  • +
  • The DCID might not be long enough for the decoder to process.¶ +
  • +
  • The extracted server mapping might not correspond to an active server.¶ +
  • +
+

All other DCIDs are routable.¶

+

Load balancers MUST forward packets with routable DCIDs to a server in +accordance with the chosen routing algorithm.¶

+

Load balancers SHOULD drop short header packets with unroutable DCIDs.¶

+

The routing of long headers with unroutable DCIDs depends on the server ID +allocation strategy, described in Section 4.3. However, the load balancer +MUST NOT drop these packets, with one exception.¶

+

Load balancers MAY drop packets with long headers and unroutable DCIDs if +and only if it knows that the encoded QUIC version does not allow an unroutable +DCID in a packet with that signature. For example, a load balancer can safely +drop a QUIC version 1 Handshake packet with an unroutable DCID, as a +version 1 Handshake packet sent to a QUIC-LB routable server will always have +a server-generated routable CID. The prohibition against dropping packets with +long headers remains for unknown QUIC versions.¶

+

Furthermore, while the load balancer function MUST NOT drop packets, the device +might implement other security policies, outside the scope of this +specification, that might force a drop.¶

+

Servers that receive packets with unroutable CIDs MUST use the available +mechanisms to induce the client to use a routable CID in future packets. In +QUIC version 1, this requires using a routable CID in the Source CID field of +server-generated long headers.¶

+
+
+
+
+

+4.2. Fallback Algorithms +

+

There are conditions described below where a load balancer routes a packet using +a "fallback algorithm." It can choose any algorithm, without coordination with +the servers, but the algorithm SHOULD be deterministic over short time scales so +that related packets go to the same server. The design of this algorithm SHOULD +consider the version-invariant properties of QUIC described in +[QUIC-INVARIANTS] to maximize its robustness to +future versions of QUIC.¶

+

A fallback algorithm MUST NOT make the routing behavior dependent on any 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-dependent and +intermediaries SHOULD NOT base their design on version-specific templates.¶

+

For example, one fallback algorithm might convert a unroutable DCID to an +integer and divided by the number of servers, with the modulus used to forward +the packet. The number of servers is usually consistent on the time scale of a +QUIC connection handshake. Another might simply hash the address/port 4-tuple. +See also Section 10.¶

+
+
+
+
+

+4.3. Server ID Allocation +

+

For any given configuration, the configuration agent must specify if server IDs +will be statically or dynamically allocated. Load Balancer configurations with +statically allocated server IDs explicitly include a mapping of server IDs to +forwarding addresses. The corresponding server configurations contain one or +more unique server IDs.¶

+

A dynamically allocated configuration does not have a pre-defined assignment, +reducing configuration complexity. However, it places limits on the maximum +server ID length and requires more state at the load balancer. In certain edge +cases, it can force parts of the system to fail over to 5-tuple routing for a +short time.¶

+

In either case, the configuration agent chooses a server ID length for each +configuration that MUST be at least one octet. For Static Allocation, the +maximum length depends on the algorithm. For dynamic allocation, the maximum +length is 7 octets.¶

+

A QUIC-LB configuration MAY significantly over-provision the server ID space +(i.e., provide far more codepoints than there are servers) to increase the +probability that a randomly generated Destination Connection ID is unroutable.¶

+

Conceptually, each configuration has its own set of server ID allocations, +though two static configurations with identical server ID lengths MAY use a +common allocation between them.¶

+

A server encodes one of its assigned server IDs in any CID it generates using +the relevant configuration.¶

+
+
+

+4.3.1. Static Allocation +

+

In the static allocation method, the configuration agent assigns at least one +server ID to each server.¶

+

When forwarding a packet with a long header and unroutable DCID, load +balancers MUST forward packets with long headers and unroutable DCIDs +using an fallback algorithm as specified in Section 4.2.¶

+
+
+
+
+

+4.3.2. Dynamic Allocation +

+

In the dynamic allocation method, the load balancer assigns server IDs +dynamically so that configuration does not require fixed server ID assignment. +This reduces linkability. However, it requires state at the load balancer +that roughly scales with the number of connections, until the server ID +codespace is exhausted.¶

+
+
+
+4.3.2.1. Configuration Agent Actions +
+

The configuration agent does not assign server IDs, but does configure a server +ID length and an "LB timeout". The server ID MUST be at least one and no more +than seven octets.¶

+
+
+
+
+
+4.3.2.2. Load Balancer Actions +
+

The load balancer maintains a table of all assigned server IDs and +corresponding routing information, which is initialized empty. These tables are +independent for each operating configuration.¶

+

The load balancer MUST keep track of the most recent observation of each server +ID, in any sort of packet it forwards, in the table and delete the entries when +the time since that observation exceeds the LB Timeout.¶

+

Note that when the load balancer's table for a configuration is empty, all +incoming DCIDs corresponding to that configuration are unroutable by +definition.¶

+

The handling of an unroutable long-header packet depends on the reason for +unroutability. The load balancer MUST applyt this logic:¶

+
    +
  • If the config rotation bits do not match a known configuration, the load +balancer routes the packet using a fallback algorithm (see +Section 4.2).¶ +
  • +
  • If there is a matching configuration, but the CID is not long enough to apply +the algorithm, the load balancer skips the first octet of the CID and then +reads a server ID from the following octets, up to the server ID length. If +this server ID matches a known server ID for that configuration, it forwards the +packet accordingly and takes no further action. If it does not match, it routes +using a fallback algorithm and adds the new server ID to that server's table +entry.¶ +
  • +
  • If the sole reason for unroutability is that the server ID is not in the load +balancer's table, the load balancer routes the packet with a fallback +algorithm. It adds the decoded server ID to table entry for the server the +algorithm chooses and forwards the packet accordingly.¶ +
  • +
+
+
+
+
+
+4.3.2.3. Server actions +
+

Each server maintains a list of server IDs assigned to it, initialized empty. +For each SID, it records the last time it received any packet with an CID that +encoded that SID.¶

+

Upon receipt of a packet with a client-generated DCID, the server MUST follow +these steps in order:¶

+
    +
  • If the config rotation bits do not correspond to a known configuration, do not +attempt to extract a server ID.¶ +
  • +
  • If the DCID is not long enough to decode using the configured algorithm, +extract a number of octets equal to the server ID length, beginning with the +second octet. If the extracted value does not match a server ID in the server's +list, add it to the list.¶ +
  • +
  • If the DCID is long enough to decode but the server ID is not in the server's +list, add it to the list.¶ +
  • +
+

After any possible SID is extracted, the server processes the packet normally.¶

+

When a server needs a new connection ID, it uses one of the server IDs in its +list to populate the server ID field of that CID. It SHOULD vary this selection +to reduce linkability within a connection.¶

+

After loading a new configuration or long periods of idleness, a server may not +have any available SIDs. This is because an incoming packet may not the config +rotation bits necessary to extract a server ID in accordance with the +algorithm above. When required to generate a CID under these conditions, the +server MUST generate CIDs using the 5-tuple routing codepoint (see +Section 3.2. Note that these connections will not be robust to client +address changes while they use this connection ID. For this reason, a server +SHOULD retire these connection IDs and replace them with routable ones once +it receives a client-generated CID that allows it to acquire a server ID. As, +statistically, one in every four such CIDs can provide a server ID, this is +typically a short interval.¶

+

If a server has not received a connection ID encoding a particular server ID +within the LB timeout, it MUST retire any outstanding CIDs that use that server +ID and cease generating any new ones.¶

+

A server SHOULD have a mechanism to stop using some server IDs if the list +gets large relative to its share of the codepoint space, so that these +allocations time out and are freed for reuse by servers that have recently +joined the pool.¶

+
+
+
+
+
+
+
+
+
+
+

+5. Routing Algorithms +

+

Encryption in the algorithms below uses the AES-128-ECB cipher. Future standards +could add new algorithms that use other ciphers to provide cryptographic agility +in accordance with [RFC7696]. QUIC-LB implementations SHOULD be extensible to +support new algorithms.¶

+
+
+

+5.1. Plaintext CID Algorithm +

+

The Plaintext CID Algorithm makes no attempt to obscure the mapping of +connections to servers, significantly increasing linkability. The format is +depicted in the figure below.¶

+
+
+
+
+Plaintext CID {
+  First Octet (8),
+  Server ID (8..128),
+  For Server Use (8..152-len(Server ID)),
+}
+
+
+
Figure 3: +Plaintext CID Format +
+
+
+
+

+5.1.1. Configuration Agent Actions +

+

For static SID allocation, the server ID length is limited to 16 octets. There +are no parameters specific to this algorithm.¶

+
+
+
+
+

+5.1.2. Load Balancer Actions +

+

On each incoming packet, the load balancer extracts consecutive octets, +beginning with the second octet. These bytes represent the server ID.¶

+
+
+
+
+

+5.1.3. Server Actions +

+

The server chooses how many octets to reserve for its own use, which MUST be at +least one octet.¶

+

When a server needs a new connection ID, it encodes one of its assigned server +IDs in consecutive octets beginning with the second. All other 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.¶

+
+
+
+
+
+
+

+5.2. Stream Cipher CID Algorithm +

+

The Stream Cipher CID algorithm provides cryptographic protection at the cost of +additional per-packet processing at the load balancer to decrypt every incoming +connection ID. The CID format is depicted below.¶

+
+
+
+
+Stream Cipher CID {
+  First Octet (8),
+  Nonce (64..120),
+  Encrypted Server ID (8..128-len(Nonce)),
+  For Server Use (0..152-len(Nonce)-len(Encrypted Server ID)),
+}
+
+
+
Figure 4: +Stream Cipher CID Format +
+
+
+
+

+5.2.1. Configuration Agent Actions +

+

The configuration agent assigns a server ID to every server in its pool, and +determines a server ID length (in octets) sufficiently large to encode all +server IDs, including potential future servers.¶

+

The configuration agent also selects a nonce length and an 16-octet AES-ECB key +to use for connection ID decryption. The nonce length MUST be at least 8 octets +and no more than 16 octets. The nonce length and server ID length MUST sum to 19 +or fewer octets, but SHOULD sum to 15 or fewer to allow space for server use.¶

+
+
+
+
+

+5.2.2. Load Balancer Actions +

+

Upon receipt of a QUIC packet, the load balancer extracts as many of the +earliest octets from the destination connection ID as necessary to match the +nonce length. The server ID immediately follows.¶

+

The load balancer decrypts the nonce and the server ID using the following three +pass algorithm:¶

+
    +
  • Pass 1: The load balancer decrypts the server ID using 128-bit AES Electronic +Codebook (ECB) mode, much like QUIC header protection. The encrypted nonce +octets are zero-padded to 16 octets. AES-ECB encrypts this encrypted nonce +using its key to generate a mask which it applies to the encrypted server id. +This provides an intermediate value of the server ID, referred to as server-id +intermediate.¶ +
  • +
+

server_id_intermediate = encrypted_server_id ^ AES-ECB(key, padded-encrypted-nonce)¶

+
    +
  • Pass 2: The load balancer decrypts the nonce octets using 128-bit AES +ECB mode, using the server-id intermediate as "nonce" for this pass. The +server-id intermediate octets are zero-padded to 16 octets. AES-ECB encrypts +this padded server-id intermediate using its key to generate a mask which it +applies to the encrypted nonce. This provides the decrypted nonce value.¶ +
  • +
+

nonce = encrypted_nonce ^ AES-ECB(key, padded-server_id_intermediate)¶

+
    +
  • Pass 3: The load balancer decrypts the server ID using 128-bit AES ECB mode. +The 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 intermediate server id. +This provides the decrypted server ID.¶ +
  • +
+

server_id = server_id_intermediate ^ AES-ECB(key, padded-nonce)¶

+

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. The load balancer uses +the the second through eleventh octets of the connection ID for the nonce, +zero-pads it to 16 octets, uses xors the result with the twelfth and thirteenth +octet. The result is padded with 14 octets of zeros and encrypted to obtain a +mask that is xored with the nonce octets. Finally, the nonce octets are padded +with six octets of zeros, encrypted, and the first two octets xored with the +server ID octets to obtain the actual server ID.¶

+

This three-pass algorithm is a simplified version of the FFX algorithm, with +the property that each encrypted nonce value depends on all server ID bits, and +each encrypted server ID bit depends on all nonce bits and all server ID bits. +This mitigates attacks against stream ciphers in which attackers simply flip +encrypted server-ID bits.¶

+

The output of the decryption is the server ID that the load balancer uses for +routing.¶

+
+
+
+
+

+5.2.3. Server Actions +

+

When generating a routable connection ID, the server writes arbitrary bits into +its nonce octets, and its provided server ID into the server ID octets. Servers +MAY opt to have a longer connection ID beyond the nonce and server ID. The +additional bits MAY encode additional information, but SHOULD appear essentially +random to observers.¶

+

If the decrypted nonce bits increase monotonically, that guarantees that nonces +are not reused between connection IDs from the same server.¶

+

The server encrypts the server ID using exactly the algorithm as described in +Section 5.2.2, performing the three passes +in reverse order.¶

+
+
+
+
+
+
+

+5.3. Block Cipher CID Algorithm +

+

The Block Cipher CID Algorithm, by using a full 16 octets of plaintext and a +128-bit cipher, provides higher cryptographic protection and detection of +unroutable connection IDs. However, it also requires connection IDs of at +least 17 octets, increasing overhead of client-to-server packets.¶

+
+
+
+
+Block Cipher CID {
+  First Octet (8),
+  Encrypted Server ID (8..128),
+  Encrypted Bits for Server Use (128-len(Encrypted Server ID)),
+  Unencrypted Bits for Server Use (0..24),
+}
+
+
+
Figure 5: +Block Cipher CID Format +
+
+
+
+

+5.3.1. Configuration Agent Actions +

+

If server IDs are statically allocated, the server ID length MUST be no more +than 12 octets, to provide servers adequate entropy to generate unique CIDs.¶

+

The configuration agent also selects an 16-octet AES-ECB key to use for +connection ID decryption.¶

+
+
+
+
+

+5.3.2. Load Balancer Actions +

+

Upon receipt of a QUIC packet, the load balancer reads the first octet to +obtain the config rotation bits. It then decrypts the subsequent 16 octets using +AES-ECB decryption and the chosen key.¶

+

The decrypted plaintext contains the server id and opaque server data in that +order. The load balancer uses the server ID octets for routing.¶

+
+
+
+
+

+5.3.3. Server Actions +

+

When generating a routable connection ID, the server MUST choose a connection ID +length between 17 and 20 octets. The server writes its server ID into the server +ID octets and arbitrary bits into the remaining bits. These arbitrary bits MAY +encode additional information, and MUST differ between connection IDs. Bits in +the eighteenth, nineteenth, and twentieth octets SHOULD appear essentially +random to observers. The first octet is reserved as described in Section 3.¶

+

The server then encrypts the second through seventeenth octets using the 128-bit +AES-ECB cipher.¶

+
+
+
+
+
+
+
+
+

+6. ICMP Processing +

+

For protocols where 4-tuple load balancing is sufficient, it is straightforward +to deliver ICMP packets from the network to the correct server, by reading the +echoed IP and transport-layer headers to obtain the 4-tuple. When routing is +based on connection ID, further measures are required, as most QUIC packets that +trigger ICMP responses will only contain a client-generated connection ID that +contains no routing information.¶

+

To solve this problem, load balancers MAY maintain a mapping of Client IP and +port to server ID based on recently observed packets.¶

+

Alternatively, servers MAY implement the technique described in Section 14.4.1 +of [QUIC-TRANSPORT] to increase the likelihood a Source Connection ID is +included in ICMP responses to Path Maximum Transmission Unit (PMTU) probes. Load +balancers MAY parse the echoed packet to extract the Source Connection ID, if +it contains a QUIC long header, and extract the Server ID as if it were in a +Destination CID.¶

+
+
+
+
+

+7. Retry Service +

+

When a server is under load, QUICv1 allows it to defer storage of connection +state until the client proves it can receive packets at its advertised IP +address. Through the use of a Retry packet, a token in subsequent client +Initial packets, and transport parameters, servers verify address ownership and +clients verify that there is no on-path attacker generating Retry packets.¶

+

A "Retry Service" detects potential Denial of Service attacks and handles +sending of Retry packets on behalf of the server. As it is, by definition, +literally an on-path entity, the service must communicate some of the original +connection IDs back to the server so that it can pass client verification. It +also must either verify the address itself (with the server trusting this +verification) or make sure there is common context for the server to verify the +address using a service-generated token.¶

+

There are two different mechanisms to allow offload of DoS mitigation to a +trusted network service. One requires no shared state; the server need only be +configured to trust a retry service, though this imposes other operational +constraints. The other requires a shared key, but has no such constraints.¶

+
+
+

+7.1. Common Requirements +

+

Regardless of mechanism, a retry service has an active mode, where it is +generating Retry packets, and an inactive mode, where it is not, based on its +assessment of server load and the likelihood an attack is underway. The choice +of mode MAY be made on a per-packet or per-connection basis, through a +stochastic process or based on client address.¶

+

A configuration agent MUST distribute a list of QUIC versions the Retry Service +supports. It MAY also distribute either an "Allow-List" or a "Deny-List" of +other QUIC versions. It MUST NOT distribute both an Allow-List and a Deny-List.¶

+

The Allow-List or Deny-List MUST NOT include any versions included for Retry +Service Support.¶

+

The Configuration Agent MUST provide a means for the entity that controls the +Retry Service to report its supported version(s) to the configuration Agent. If +the entity has not reported this information, it MUST NOT activate the Retry +Service and the configuration agent MUST NOT distribute configuration that +activates it.¶

+

The configuration agent MAY delete versions from the final supported version +list if policy does not require the Retry Service to operate on those versions.¶

+

The configuration Agent MUST provide a means for the entities that control +servers behind the Retry Service to report either an Allow-List or a Deny-List.¶

+

If all entities supply Allow-Lists, the consolidated list MUST be the union of +these sets. If all entities supply Deny-Lists, the consolidated list MUST be +the intersection of these sets.¶

+

If entities provide a mixture of Allow-Lists and Deny-Lists, the consolidated +list MUST be a Deny-List that is the intersection of all provided Deny-Lists and +the inverses of all Allow-Lists.¶

+

If no entities that control servers have reported Allow-Lists or Deny-Lists, +the default is a Deny-List with the null set (i.e., all unsupported versions +will be admitted). This preserves the future extensibilty of QUIC.¶

+

A retry service MUST forward all packets for a QUIC version it does not +support that are not on a Deny-List or absent from an Allow-List. Note that if +servers support versions the retry service does not, this may increase load on +the servers.¶

+

Note that future versions of QUIC might not have Retry packets, require +different information in Retry, or use different packet type indicators.¶

+
+
+

+7.1.1. Considerations for Non-Initial Packets +

+

Initial Packets are especially effective at consuming server resources +because they cause the server to create connection state. Even when mitigating +this load with Retry Packets, the act of validating an Initial Token and sending +a Retry Packet is more expensive than the response to a non-Initial packet with +an unknown Connection ID: simply dropping it and/or sending a Stateless Reset.¶

+

Nevertheless, a Retry Service in Active Mode might desire to shield servers +from non-Initial packets that do not correspond to a previously admitted +Initial Packet. This has a number of considerations.¶

+
    +
  • If a Retry Service maintains no per-flow state whatsoever, it cannot +distinguish between valid and invalid non_Initial packets and MUST forward all +non-Initial Packets to the server.¶ +
  • +
  • For QUIC versions the Retry Service does not support and are present on the +Allow-List (or absent from the Deny-List), the Retry Service cannot distinguish +Initial Packets from other long headers and therefore MUST admit all long +headers.¶ +
  • +
  • If a Retry Service keeps per-flow state, it can identify 4-tuples that have +been previously approved, admit non-Initial packets from those flows, and +drop all others. However, dropping short headers will effectively break Address +Migration and NAT Rebinding when in Active Mode, as post-migration packets will +arrive with a previously unknown 4-tuple. This policy will also break connection +attempts using any new QUIC versions that begin connections with a short header.¶ +
  • +
  • If a Retry Service is integrated with a QUIC-LB routable load balancer, it +can verify that the Destination Connection ID is routable, and only admit +non-Initial packets with routable DCIDs. As the Connection ID encoding is +invariant across QUIC versions, the Retry Service can do this for all short +headers.¶ +
  • +
+

Nothing in this section prevents Retry Services from making basic syntax +correctness checks on packets with QUIC versions that it understands (e.g., +enforcing the Initial Packet datagram size minimum in version 1) and +dropping packets that are not routable with the QUIC specification.¶

+
+
+
+
+
+
+

+7.2. No-Shared-State Retry Service +

+

The no-shared-state retry service requires no coordination, except that the +server must be configured to accept this service and know which QUIC versions +the retry service supports. The scheme uses the first bit of the token to +distinguish between tokens from Retry packets (codepoint '0') and tokens from +NEW_TOKEN frames (codepoint '1').¶

+ +
+
+

+7.2.2. Service Requirements +

+

A no-shared-state retry service MUST be present on all paths from potential +clients to the server. These paths MUST fail to pass QUIC traffic should the +service fail for any reason. That is, if the service is not operational, the +server MUST NOT be exposed to client traffic. Otherwise, servers that have +already disabled their Retry capability would be vulnerable to attack.¶

+

The path between service and server MUST be free of any potential attackers. +Note that this and other requirements above severely restrict the operational +conditions in which a no-shared-state retry service can safely operate.¶

+

Retry tokens generated by the service MUST have the format below.¶

+
+
+
+
+Non-Shared-State Retry Service Token {
+  Token Type (1) = 0,
+  ODCIL (7) = 8..20,
+  RSCIL (8) = 0..20,
+  Original Destination Connection ID (64..160),
+  Retry Source Connection ID (0..160),
+  Opaque Data (..),
+}
+
+
+
Figure 6: +Format of non-shared-state retry service tokens +
+
+

The first bit of retry tokens generated by the service MUST be zero. The token +has the following additional fields:¶

+

ODCIL: The length of the original destination connection ID from the triggering +Initial packet. This is in cleartext to be readable for the server, but +authenticated later in the token. The Retry Service SHOULD reject any token +in which the value is less than 8.¶

+

RSCIL: The retry source connection ID length.¶

+

Original Destination Connection ID: This also in cleartext and authenticated +later.¶

+

Retry Source Connection ID: This also in cleartext and authenticated +later.¶

+

Opaque Data: This data MUST contain encrypted information that allows the retry +service to validate the client's IP address, in accordance with the QUIC +specification. It MUST also provide a cryptographically secure means to +validate the integrity of the entire token.¶

+

Upon receipt of an Initial packet with a token that begins with '0', the retry +service MUST validate the token in accordance with the QUIC specification.¶

+

In active mode, the service MUST issue Retry packets for all Client initial +packets that contain no token, or a token that has the first bit set to '1'. It +MUST NOT forward the packet to the server. The service MUST validate all tokens +with the first bit set to '0'. If successful, the service MUST forward the +packet with the token intact. If unsuccessful, it MUST drop the packet. The +Retry Service MAY send an Initial Packet containing a CONNECTION_CLOSE frame +with the INVALID_TOKEN error code when dropping the packet.¶

+

Note that this scheme has a performance drawback. When the retry service is in +active mode, clients with a token from a NEW_TOKEN frame will suffer a 1-RTT +penalty even though its token provides proof of address.¶

+

In inactive mode, the service MUST forward all packets that have no token or a +token with the first bit set to '1'. It MUST validate all tokens with the first +bit set to '0'. If successful, the service MUST forward the packet with the +token intact. If unsuccessful, it MUST either drop the packet or forward it +with the token removed. The latter requires decryption and re-encryption of the +entire Initial packet to avoid authentication failure. Forwarding the packet +causes the server to respond without the original_destination_connection_id +transport parameter, which preserves the normal QUIC signal to the client that +there is an on-path attacker.¶

+
+
+
+
+

+7.2.3. Server Requirements +

+

A server behind a non-shared-state retry service MUST NOT send Retry packets +for a QUIC version the retry service understands. It MAY send Retry for QUIC +versions the Retry Service does not understand.¶

+

Tokens sent in NEW_TOKEN frames MUST have the first bit set to '1'.¶

+

If a server receives an Initial Packet with the first bit set to '1', it could +be from a server-generated NEW_TOKEN frame and should be processed in accordance +with the QUIC specification. If a server receives an Initial Packet with the +first bit to '0', it is a Retry token and the server MUST NOT attempt to +validate it. Instead, it MUST assume the address is validated and MUST extract +the Original Destination Connection ID and Retry Source Connection ID, assuming +the format described in Section 7.2.2.¶

+
+
+
+
+
+
+

+7.3. Shared-State Retry Service +

+

A shared-state retry service uses a shared key, so that the server can decode +the service's retry tokens. It does not require that all traffic pass through +the Retry service, so servers MAY send Retry packets in response to Initial +packets that don't include a valid token.¶

+

Both server and service must have time synchronized with respect to one another to prevent tokens +being incorrectly marked as expired, though tight synchronization is +unnecessary.¶

+

The tokens are protected using AES128-GCM AEAD, as explained in +Section 7.3.1. All tokens, generated by either the server or +retry service, MUST use the following format, which includes:¶

+
    +
  • A 96 bit unique token number transmitted in clear text, but protected as part +of the AEAD associated data.¶ +
  • +
  • An 8 bit token key identifier.¶ +
  • +
  • A token body, encoding the Original Destination Connection ID, the Retry +Source Connection ID, and the Timestamp, optionally followed by server specific +Opaque Data.¶ +
  • +
+

The token protection uses an 128 bit representation of the source IP address +from the triggering Initial packet. The client IP address is 16 octets. If an +IPv4 address, the last 12 octets are zeroes.¶

+

If there is a Network Address Translator (NAT) in the server infrastructure that +changes the client IP, the Retry Service MUST either be positioned behind the +NAT, or the NAT must have the token key to rewrite the Retry token accordingly. +Note also that a host that obtains a token through a NAT and then attempts to +connect over a path that does not have an identically configured NAT will fail +address validation.¶

+

The 96 bit unique token number is set to a random value using a +cryptography-grade random number generator.¶

+

The token key identifier and the corresponding AEAD key and AEAD IV are +provisioned by the configuration agent.¶

+

The token body is encoded as follows:¶

+
+
+
+
+Shared-State Retry Service Token Body {
+   ODCIL (8) = 0..20,
+   RSCIL (8) = 0..20,
+   [Port (16)],
+   Original Destination Connection ID (0..160),
+   Retry Source Connection ID (0..160),
+   Timestamp (64),
+   Opaque Data (..),
+}
+
+
+
Figure 7: +Body of shared-state retry service tokens +
+
+

The token body has the following fields:¶

+

ODCIL: The original destination connection ID length. Tokens in NEW_TOKEN frames +MUST set this field to zero.¶

+

RSCIL: The retry source connection ID length. Tokens in NEW_TOKEN frames MUST +set this field to zero.¶

+

Port: The Source Port of the UDP datagram that triggered the Retry packet. +This field MUST be present if and only if the ODCIL is greater than zero. This +field is therefore always absent in tokens in NEW_TOKEN frames.¶

+

Original Destination Connection ID: The server or Retry Service copies this +from the field in the client Initial packet.¶

+

Retry Source Connection ID: The server or Retry service copies this from the +Source Connection ID of the Retry packet.¶

+

Timestamp: The Timestamp is a 64-bit integer, in network order, that expresses +the expiration time of the token as a number of seconds in POSIX time (see Sec. +4.16 of [TIME_T]).¶

+

Opaque Data: The server may use this field to encode additional information, +such as congestion window, RTT, or MTU. The Retry Service MUST have zero-length +opaque data.¶

+

Some implementations of QUIC encode in the token the Initial Packet Number used +by the client, in order to verify that the client sends the retried Initial +with a PN larger that the triggering Initial. Such implementations will encode +the Initial Packet Number as part of the opaque data. As tokens may be +generated by the Service, servers MUST NOT reject tokens because they lack +opaque data and therefore the packet number.¶

+
+
+

+7.3.1. Token Protection with AEAD +

+

On the wire, the token is presented as:¶

+
+
+
+
+Shared-State Retry Service Token {
+  Unique Token Number (96),
+  Key Sequence (8),
+  Encrypted Shared-State Retry Service Token Body (80..),
+  AEAD Integrity Check Value (128),
+}
+
+
+
Figure 8: +Wire image of shared-state retry service tokens +
+
+

The tokens are protected using AES128-GCM as follows:¶

+
    +
  • The token key and IV are retrieved using the Key Sequence.¶ +
  • +
  • The nonce, N, is formed by combining the IV with the 96 bit unique token +number. The 96 bits of the unique token number are left-padded with zeros to the +size of the IV. The exclusive OR of the padded unique token number and the IV +forms the AEAD nonce.¶ +
  • +
  • The associated data is a formatted as a pseudo header by combining the +cleartext part of the token with the IP address of the client.¶ +
  • +
+
+
+
+
+Shared-State Retry Service Token Pseudoheader {
+  IP Address (128),
+  Unique Token Number (96),
+  Key Sequence (8),
+}
+
+
+
Figure 9: +Psuedoheader for shared-state retry service tokens +
+
+
    +
  • The input plaintext for the AEAD is the token body. The output ciphertext of +the AEAD is transmitted in place of the token body.¶ +
  • +
  • The AEAD Integrity Check Value(ICV), defined in Section 6 of [RFC4106], is +computed as part of the AEAD encryption process, and is verified during + decryption.¶ +
  • +
+
+
+
+
+

+7.3.2. Configuration Agent Actions +

+

The configuration agent generates and distributes a "token key", a "token IV", +a key sequence, and the information described in Section 7.1.¶

+
+
+
+
+

+7.3.3. Service Requirements +

+

In inactive mode, the Retry service forwards all packets without further +inspection or processing.¶

+

Retry services MUST NOT issue Retry packets except where explicitly allowed +below, to avoid sending a Retry packet in response to a Retry token.¶

+

When in active mode, the service MUST generate Retry tokens with the format +described above when it receives a client Initial packet with no token.¶

+

The service SHOULD decrypt incoming tokens. The service SHOULD drop packets +with unknown key sequence, or an AEAD ICV that does not match the expected +value. (By construction, the AEAD ICV will only match if the client IP +Address also matches.)¶

+

If the token verification passes, and the ODCIL and RSCIL fields are both zero, +then this is a NEW_TOKEN token generated by the server. Processing of NEW_TOKEN +tokens is subtly different from Retry tokens, as described below.¶

+

The service SHOULD drop a packet containing a token where the ODCIL is greater +than zero and less than the minimum number of octets for a client-generated CID +(8 in QUIC version 1). The service also SHOULD drop a packet containing a token +where the ODCIL is zero and RSCIL is nonzero.¶

+

If the Timestamp of a token points to time in the past, the token has expired; +however, in order to allow for clock skew, it SHOULD NOT consider tokens to be +expired if the Timestamp encodes a few seconds in the past. An active Retry +service SHOULD drop packets with expired tokens. If a NEW_TOKEN token, the +service MUST generate a Retry packet in response. It MUST NOT generate a Retry +packet in response to an expired Retry token.¶

+

If a Retry token, the service SHOULD drop packets where the port number +encoded in the token does not match the source port in the encapsulating UDP +header.¶

+

All other packets SHOULD be forwarded to the server.¶

+
+
+
+
+

+7.3.4. Server Requirements +

+

When issuing Retry or NEW_TOKEN tokens, the server MUST include the client IP +address in the authenticated data as specified in +Section 7.3.1. The ODCIL and RSCIL fields are zero for +NEW_TOKEN tokens, making them easily distinguishable from Retry tokens.¶

+

The server MUST validate all tokens that arrive in Initial packets, as they may +have bypassed the Retry service.¶

+

For Retry tokens that follow the format above, servers SHOULD use the timestamp +field to apply its expiration limits for tokens. This need not be precisely +synchronized with the retry service. However, servers MAY allow retry tokens +marked as being a few seconds in the past, due to possible clock +synchronization issues.¶

+

After decrypting the token, the server uses the corresponding fields to +populate the original_destination_connection_id transport parameter, with a +length equal to ODCIL, and the retry_source_connection_id transport parameter, +with length equal to RSCIL.¶

+

For QUIC versions the service does not support, the server MAY use any token +format.¶

+

As discussed in [QUIC-TRANSPORT], a server MUST NOT send a Retry packet in +response to an Initial packet that contains a retry token.¶

+
+
+
+
+
+
+
+
+

+8. Configuration Requirements +

+

QUIC-LB requires common configuration to synchronize understanding of encodings +and guarantee explicit consent of the server.¶

+

The load balancer and server MUST agree on a routing algorithm, server ID +allocation method, and the relevant parameters for that algorithm.¶

+

All algorithms require a server ID length. If server IDs are statically +allocated, the load balancer MUST receive the full table of mappings, and +each server must receive its assigned SID(s), from the configuration agent.¶

+

For Stream Cipher CID Routing, the servers and load balancer also MUST have a +common understanding of the key and nonce length.¶

+

For Block Cipher CID Routing, the servers and load balancer also MUST have a +common understanding of the key.¶

+

Note that server IDs are opaque bytes, not integers, so there is no notion of +network order or host order.¶

+

A server configuration MUST specify if the first octet encodes the CID length. +Note that a load balancer does not need the CID length, as the required bytes +are present in the QUIC packet.¶

+

A full QUIC-LB server configuration MUST also specify the supported QUIC +versions of any Retry Service. If a shared-state service, the server also must +have the token key.¶

+

A non-shared-state Retry Service need only be configured with the QUIC versions +it supports, and an Allow- or Deny-List. A shared-state Retry Service also needs +the token key, and to be aware if a NAT sits between it and the servers.¶

+

Appendix A provides a YANG Model of the a full QUIC-LB configuration.¶

+
+
+
+
+

+9. Additional Use Cases +

+

This section discusses considerations for some deployment scenarios not implied +by the specification above.¶

+
+
+

+9.1. Load balancer chains +

+

Some network architectures may have multiple tiers of low-state load balancers, +where a first tier of devices makes a routing decision to the next tier, and so +on, until packets reach the server. Although QUIC-LB is not explicitly designed +for this use case, it is possible to support it.¶

+

If each load balancer is assigned a range of server IDs that is a subset of the +range of IDs assigned to devices that are closer to the client, then the first +devices to process an incoming packet can extract the server ID and then map it +to the correct forwarding address. Note that this solution is extensible to +arbitrarily large numbers of load-balancing tiers, as the maximum server ID +space is quite large.¶

+
+
+
+
+

+9.2. Moving connections between servers +

+

Some deployments may transparently move a connection from one server to another. +The means of transferring connection state between servers is out of scope of +this document.¶

+

To support a handover, a server involved in the transition could issue CIDs that +map to the new server via a NEW_CONNECTION_ID frame, and retire CIDs associated +with the new server using the "Retire Prior To" field in that frame.¶

+

Alternately, if the old server is going offline, the load balancer could simply +map its server ID to the new server's address.¶

+
+
+
+
+
+
+

+10. Version Invariance of QUIC-LB +

+

Non-shared-state Retry Services are inherently dependent on the format (and +existence) of Retry Packets in each version of QUIC, and so Retry Service +configuration explicitly includes the supported QUIC versions.¶

+

The server ID encodings, and requirements for their handling, are designed to be +QUIC version independent (see [QUIC-INVARIANTS]). A QUIC-LB load balancer will +generally not require changes as servers deploy new versions of QUIC. However, +there are several unlikely future design decisions that could impact the +operation of QUIC-LB.¶

+

The maximum Connection ID length could be below the minimum necessary for one or +more encoding algorithms.¶

+

Section 4.1 provides guidance about how load balancers should handle +unroutable DCIDs. This guidance, and the implementation of an algorithm to +handle these DCIDs, rests on some assumptions:¶

+
    +
  • Incoming short headers do not contain DCIDs that are client-generated.¶ +
  • +
  • The use of client-generated incoming DCIDs does not persist beyond a few round +trips in the connection.¶ +
  • +
  • While the client is using DCIDs it generated, some exposed fields (IP address, +UDP port, client-generated destination Connection ID) remain constant for all +packets sent on the same connection.¶ +
  • +
  • Dynamic server ID allocation is dependent on client-generated Destination CIDs +in Initial Packets being at least 8 octets in length. If they are not, the load +balancer may not be able to extract a valid server ID to add to its table. +Configuring a shorter server ID length can increase robustness to a change.¶ +
  • +
+

While this document does not update the commitments in [QUIC-INVARIANTS], the +additional assumptions are minimal and narrowly scoped, and provide a likely +set of constants that load balancers can use with minimal risk of version- +dependence.¶

+

If these assumptions are invalid, this specification is likely to lead to loss +of packets that contain unroutable DCIDs, and in extreme cases connection +failure.¶

+

Some load balancers might inspect elements of the Server Name Indication (SNI) +extension in the TLS Client Hello to make a routing decision. Note that the +format and cryptographic protection of this information may change in future +versions or extensions of TLS or QUIC, and therefore this functionality is +inherently not version-invariant.¶

+
+
+
+
+

+11. Security Considerations +

+

QUIC-LB is intended to prevent linkability. Attacks would therefore attempt to +subvert this purpose.¶

+

Note that the Plaintext CID algorithm makes no attempt to obscure the server +mapping, and therefore does not address these concerns. It exists to allow +consistent CID encoding for compatibility across a network infrastructure, which +makes QUIC robust to NAT rebinding. Servers that are running the Plaintext CID +algorithm SHOULD only use it to generate new CIDs for the Server Initial Packet +and SHOULD NOT send CIDs in QUIC NEW_CONNECTION_ID frames, except that it sends +one new Connection ID in the event of config rotation Section 3.1. +Doing so might falsely suggest to the client that said CIDs were generated in a +secure fashion.¶

+

A linkability attack would find some means of determining that two connection +IDs route to the same server. As described above, there is no scheme that +strictly prevents linkability for all traffic patterns, and therefore efforts to +frustrate any analysis of server ID encoding have diminishing returns.¶

+
+
+

+11.1. Attackers not between the load balancer and server +

+

Any attacker might open a connection to the server infrastructure and +aggressively simulate migration 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.¶

+

The Stream and Block Cipher CID algorithms provide robust protection against +any sort of linkage. The Plaintext CID algorithm makes no attempt to protect +this encoding.¶

+

Were this analysis to obtain the server encoding, then on-path observers might +apply this analysis to correlating different client IP addresses.¶

+
+
+
+
+

+11.2. Attackers between the load balancer and server +

+

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 IDs for that connection.¶

+
+
+
+
+

+11.3. Multiple Configuration IDs +

+

During the period in which there are multiple deployed configuration IDs (see +Section 3.1), there is a slight increase in linkability. The server +space is effectively divided into segments with CIDs that have different config +rotation bits. Entities that manage servers SHOULD strive to minimize these +periods by quickly deploying new configurations across the server pool.¶

+
+
+
+
+

+11.4. Limited configuration scope +

+

A simple deployment of QUIC-LB in a cloud provider might use the same global +QUIC-LB configuration across all its load balancers that route to customer +servers. An attacker could then simply become a customer, obtain the +configuration, and then extract server IDs of other customers' connections at +will.¶

+

To avoid this, the configuration agent SHOULD issue QUIC-LB configurations to +mutually distrustful servers that have different keys for encryption +algorithms. In many cases, the load balancers can distinguish these +configurations by external IP address.¶

+

However, assigning multiple entities to an IP address is complimentary with +concealing DNS requests (e.g., DoH [RFC8484]) and the TLS Server Name +Indicator (SNI) ([I-D.ietf-tls-esni]) to obscure the ultimate destination +of traffic. While the load balancer's fallback algorithm +(Section 4.2) can use the SNI to make a routing decision on the +first packet, there are three ways to route subsequent packets:¶

+
    +
  • all co-tenants can use the same QUIC-LB configuration, leaking the server +mapping to each other as described above;¶ +
  • +
  • co-tenants can be issued one of up to three configurations distinguished by +the config rotation bits (Section 3.1), exposing information about the +target domain to the entire network; or¶ +
  • +
  • tenants can use 4-tuple routing in their CIDs (in which case they SHOULD +disable migration in their connections), which neutralizes the value of +QUIC-LB but preserves privacy.¶ +
  • +
+

When configuring QUIC-LB, administrators must evaluate the privacy tradeoff +considering the relative value of each of these properties, given the trust +model between tenants, the presence of methods to obscure the domain name, and +value of address migration in the tenant use cases.¶

+

As the plaintext algorithm makes no attempt to conceal the server mapping, +these deployments SHOULD simply use a common configuration.¶

+
+
+
+
+

+11.5. Stateless Reset Oracle +

+

Section 21.9 of [QUIC-TRANSPORT] discusses the Stateless Reset Oracle attack. +For a server deployment to be vulnerable, an attacking client must be able to +cause two packets with the same Destination CID to arrive at two different +servers that share the same cryptographic context for Stateless Reset tokens. As +QUIC-LB requires deterministic routing of DCIDs over the life of a connection, +it is a sufficient means of avoiding an Oracle without additional measures.¶

+
+
+
+
+

+11.6. Connection ID Entropy +

+

The Stream Cipher and Block Cipher algorithms need to generate different cipher +text for each generated Connection ID instance to protect the Server ID. To +do so, at least four octets of the Block Cipher CID and at least eight octets +of the Stream Cipher CID are reserved for a nonce that, if used only once, will +result in unique cipher text for each Connection ID.¶

+

If servers simply increment the nonce by one with each generated connection ID, +then it is safe to use the existing keys until any server's nonce counter +exhausts the allocated space and rolls over to zero. Whether or not it +implements this method, the server MUST NOT reuse a nonce until it switches to a +configuration with new keys.¶

+

Configuration agents SHOULD implement an out-of-band method to discover when +servers are in danger of exhausting their nonce space, and SHOULD respond by +issuing a new configuration. A server that has exhausted its nonces MUST +either switch to a different configuration, or if none exists, use the 4-tuple +routing config rotation codepoint.¶

+
+
+
+
+

+11.7. Shared-State Retry Keys +

+

The Shared-State Retry Service defined in Section 7.3 describes the +format of retry tokens or new tokens protected and encrypted using AES128-GCM. +Each token includes a 96 bit randomly generated unique token number, and an 8 +bit identifier of the AES-GCM encryption key. There are three important security +considerations for these tokens:¶

+
    +
  • An attacker that obtains a copy of the encryption key will be able to decrypt +and forge tokens.¶ +
  • +
  • Attackers may be able to retrieve the key if they capture a sufficently large +number of retry tokens encrypted with a given key.¶ +
  • +
  • Confidentiality of the token data will fail if separate tokens reuse the +same 96 bit unique token number and the same key.¶ +
  • +
+

To protect against disclosure of keys to attackers, service and servers MUST +ensure that the keys are stored securely. To limit the consequences of potential +exposures, the time to live of any given key should be limited.¶

+

Section 6.6 of [QUIC-TLS] states that "Endpoints MUST count +the number of encrypted packets for each set of keys. If the total number of +encrypted packets with the same key exceeds the confidentiality limit for the +selected AEAD, the endpoint MUST stop using those keys." It goes on with the +specific limit: "For AEAD_AES_128_GCM and AEAD_AES_256_GCM, the confidentiality +limit is 2^23 encrypted packets; see Appendix B.1." It is prudent to adopt the +same limit here, and configure the service in such a way that no more than 2^23 +tokens are generated with the same key.¶

+

In order to protect against collisions, the 96 bit unique token numbers should +be generated using a cryptographically secure pseudorandom number generator +(CSPRNG), as specified in Appendix C.1 of the TLS 1.3 specification +[RFC8446]. With proper random numbers, if fewer than 2^40 tokens are +generated with a single key, the risk of collisions is lower than 0.001%.¶

+
+
+
+
+
+
+

+12. IANA Considerations +

+

There are no IANA requirements.¶

+
+
+
+

+13. References +

+
+

+13.1. Normative References +

+
+
[QUIC-INVARIANTS]
+
+Thomson, M., "Version-Independent Properties of QUIC", Work in Progress, Internet-Draft, draft-ietf-quic-invariants-13, , <https://www.ietf.org/archive/id/draft-ietf-quic-invariants-13.txt>.
+
+
[QUIC-TRANSPORT]
+
+Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed and Secure Transport", Work in Progress, Internet-Draft, draft-ietf-quic-transport-34, , <https://www.ietf.org/archive/id/draft-ietf-quic-transport-34.txt>.
+
+
[RFC8446]
+
+Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, , <https://www.rfc-editor.org/info/rfc8446>.
+
+
[TIME_T]
+
+"Open Group Standard: Vol. 1: Base Definitions, Issue 7", IEEE Std 1003.1 , , <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16>.
+
+
+
+
+

+13.2. Informative References +

+
+
[I-D.ietf-tls-esni]
+
+Rescorla, E., Oku, K., Sullivan, N., and C. A. Wood, "TLS Encrypted Client Hello", Work in Progress, Internet-Draft, draft-ietf-tls-esni-10, , <https://www.ietf.org/archive/id/draft-ietf-tls-esni-10.txt>.
+
+
[QUIC-TLS]
+
+Thomson, M. and S. Turner, "Using TLS to Secure QUIC", Work in Progress, Internet-Draft, draft-ietf-quic-tls-34, , <https://www.ietf.org/archive/id/draft-ietf-quic-tls-34.txt>.
+
+
[RFC2119]
+
+Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
+
+
[RFC4106]
+
+Viega, J. and D. McGrew, "The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating Security Payload (ESP)", RFC 4106, DOI 10.17487/RFC4106, , <https://www.rfc-editor.org/info/rfc4106>.
+
+
[RFC6020]
+
+Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, , <https://www.rfc-editor.org/info/rfc6020>.
+
+
[RFC7696]
+
+Housley, R., "Guidelines for Cryptographic Algorithm Agility and Selecting Mandatory-to-Implement Algorithms", BCP 201, RFC 7696, DOI 10.17487/RFC7696, , <https://www.rfc-editor.org/info/rfc7696>.
+
+
[RFC8340]
+
+Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, , <https://www.rfc-editor.org/info/rfc8340>.
+
+
[RFC8484]
+
+Hoffman, P. and P. McManus, "DNS Queries over HTTPS (DoH)", RFC 8484, DOI 10.17487/RFC8484, , <https://www.rfc-editor.org/info/rfc8484>.
+
+
+
+
+
+
+

+Appendix A. QUIC-LB YANG Model +

+

This YANG model conforms to [RFC6020] and expresses a complete QUIC-LB +configuration.¶

+
+
+module ietf-quic-lb {
+  yang-version "1.1";
+  namespace "urn:ietf:params:xml:ns:yang:ietf-quic-lb";
+  prefix "quic-lb";
+
+  import ietf-yang-types {
+    prefix yang;
+    reference
+      "RFC 6991: Common YANG Data Types.";
+  }
+
+  import ietf-inet-types {
+    prefix inet;
+    reference
+      "RFC 6991: Common YANG Data Types.";
+  }
+
+  organization
+    "IETF QUIC Working Group";
+
+  contact
+    "WG Web:   <http://datatracker.ietf.org/wg/quic>
+     WG List:  <quic@ietf.org>
+
+     Authors: Martin Duke (martin.h.duke at gmail dot com)
+              Nick Banks (nibanks at microsoft dot com)";
+
+  description
+    "This module enables the explicit cooperation of QUIC servers with
+     trusted intermediaries without breaking important protocol features.
+
+     Copyright (c) 2021 IETF Trust and the persons identified as
+     authors of the code.  All rights reserved.
+
+     Redistribution and use in source and binary forms, with or
+     without modification, is permitted pursuant to, and subject to
+     the license terms contained in, the Simplified BSD License set
+     forth in Section 4.c of the IETF Trust's Legal Provisions
+     Relating to IETF Documents
+     (https://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC XXXX
+     (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
+     for full legal notices.
+
+     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
+     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
+     'MAY', and 'OPTIONAL' in this document are to be interpreted as
+     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
+     they appear in all capitals, as shown here.";
+
+  revision "2021-01-29" {
+    description
+      "Initial Version";
+    reference
+      "RFC XXXX, QUIC-LB: Generating Routable QUIC Connection IDs";
+  }
+
+  container quic-lb {
+    presence "The container for QUIC-LB configuration.";
+
+    description
+      "QUIC-LB container.";
+
+    typedef quic-lb-key {
+      type yang:hex-string {
+        length 47;
+      }
+      description
+        "This is a 16-byte key, represented with 47 bytes";
+    }
+
+    list cid-configs {
+      key "config-rotation-bits";
+      description
+        "List up to three load balancer configurations";
+
+      leaf config-rotation-bits {
+        type uint8 {
+          range "0..2";
+        }
+        mandatory true;
+        description
+          "Identifier for this CID configuration.";
+      }
+
+      leaf first-octet-encodes-cid-length {
+        type boolean;
+        default false;
+        description
+          "If true, the six least significant bits of the first CID
+           octet encode the CID length minus one.";
+      }
+
+      leaf cid-key {
+        type quic-lb-key;
+        description
+          "Key for encrypting the connection ID. If absent, the
+           configuration uses the Plaintext algorithm.";
+      }
+
+      leaf nonce-length {
+        type uint8 {
+          range "8..16";
+        }
+        must '(../cid-key)' {
+          error-message "nonce-length only valid if cid-key is set";
+        }
+        description
+          "Length, in octets, of the nonce. If absent when cid-key is
+           present, the configuration uses the Block Cipher Algorithm.
+           If present along with cid-key, the configurationuses the
+           Stream Cipher Algorithm.";
+      }
+
+      leaf lb-timeout {
+        type uint32;
+        description
+          "Existence means the configuration uses dynamic Server ID allocation.
+           Time (in seconds) to keep a server ID allocation if no packets with
+           that server ID arrive.";
+      }
+
+      leaf server-id-length {
+        type uint8 {
+          range "1..18";
+        }
+        must '(../lb-timeout and . <= 7) or
+               (not(../lb-timeout) and
+                (not(../cid-key) and . <= 16) or
+                ((../nonce-length) and . <= (19 - ../nonce-length)) or
+                ((../cid-key) and not(../nonce-length) and . <= 12))' {
+          error-message
+            "Server ID length too long for routing algorithm and server ID
+             allocation method";
+        }
+        mandatory true;
+        description
+          "Length (in octets) of a server ID. Further range-limited
+           by sid-allocation, cid-key, and nonce-length.";
+      }
+
+      list server-id-mappings {
+        when "not(../lb-timeout)";
+        key "server-id";
+        description "Statically allocated Server IDs";
+
+        leaf server-id {
+          type yang:hex-string;
+          must "string-length(.) = 3 * ../../server-id-length - 1";
+          mandatory true;
+          description
+            "An allocated server ID";
+        }
+
+        leaf server-address {
+          type inet:ip-address;
+          mandatory true;
+          description
+            "Destination address corresponding to the server ID";
+        }
+      }
+    }
+
+    container retry-service-config {
+      description
+        "Configuration of Retry Service. If supported-versions is empty, there
+         is no retry service. If token-keys is empty, it uses the non-shared-
+         state service. If present, it uses shared-state tokens.";
+
+      leaf-list supported-versions {
+        type uint32;
+        description
+          "QUIC versions that the retry service supports. If empty, there
+           is no retry service.";
+      }
+
+      leaf unsupported-version-default {
+        type enumeration {
+          enum allow {
+            description "Unsupported versions admitted by default";
+          }
+          enum deny {
+            description "Unsupported versions denied by default";
+          }
+        }
+        default allow;
+        description
+          "Are unsupported versions not in version-exceptions allowed
+           or denied?";
+      }
+
+      leaf-list version-exceptions {
+        type uint32;
+        description
+          "Exceptions to the default-deny or default-allow rule.";
+      }
+
+      list token-keys {
+        key "key-sequence-number";
+        description
+          "list of active keys, for key rotation purposes. Existence implies
+           shared-state format";
+
+        leaf key-sequence-number {
+          type uint8;
+          mandatory true;
+          description
+            "Identifies the key used to encrypt the token";
+        }
+
+        leaf token-key {
+          type quic-lb-key;
+          mandatory true;
+          description
+            "16-byte key to encrypt the token";
+        }
+
+        leaf token-iv {
+          type yang:hex-string {
+            length 23;
+          }
+          mandatory true;
+          description
+            "8-byte IV to encrypt the token, encoded in 23 bytes";
+        }
+      }
+    }
+  }
+}
+
¶ +
+
+
+

+A.1. Tree Diagram +

+

This summary of the YANG model uses the notation in [RFC8340].¶

+
+
+module: ietf-quic-lb
+  +--rw quic-lb
+     +--rw cid-configs*
+     |       [config-rotation-bits]
+     |  +--rw config-rotation-bits             uint8
+     |  +--rw first-octet-encodes-cid-length?  boolean
+     |  +--rw cid-key?                         yang:hex-string
+     |  +--rw nonce-length?                    uint8
+     |  +--rw lb-timeout?                      uint32
+     |  +--rw server-id-length                 uint8
+     |  +--rw server-id-mappings*?
+     |  |       [server-id]
+     |  |  +--rw server-id                     yang:hex-string
+     |  |  +--rw server-address                inet:ip-address
+     +--ro retry-service-config
+     |  +--rw supported-versions*
+     |  |  +--rw version                       uint32
+     |  +--rw unsupported-version-default      enumeration {allow deny}
+     |  +--rw version-exceptions*
+     |  |  +--rw version                       uint32
+     |  +--rw token-keys*?
+     |  |       [key-sequence-number]
+     |  |  +--rw key-sequence-number           uint8
+     |  |  +--rw token-key                     yang:hex-string
+     |  |  +--rw token-iv                      yang:hex-string
+
¶ +
+
+
+
+
+
+
+

+Appendix B. Load Balancer Test Vectors +

+

Each section of this draft includes multiple sets of load balancer +configuration, each of which has five examples of server ID and server use +bytes and how they are encoded in a CID.¶

+

In some cases, there are no server use bytes. Note that, for simplicity, the +first octet bits used for neither config rotation nor length self-encoding are +random, rather than listed in the server use field. Therefore, a server +implementation using these parameters may generate CIDs with a slightly different +first octet.¶

+

This section uses the following abbreviations:¶

+
+
+cid      Connection ID
+cr_bits  Config Rotation Bits
+LB       Load Balancer
+sid      Server ID
+sid_len  Server ID length
+su       Server Use Bytes
+
¶ +
+

All values except length_self_encoding and sid_len are expressed in hexidecimal +format.¶

+
+
+

+B.1. Plaintext Connection ID Algorithm +

+
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1
+
+cid 01be sid be su
+cid 0221b7 sid 21 su b7
+cid 03cadfd8 sid ca su dfd8
+cid 041e0c9328 sid 1e su 0c9328
+cid 050c8f6d9129 sid 0c su 8f6d9129
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2
+
+cid 02aab0 sid aab0 su
+cid 3ac4b106 sid c4b1 su 06
+cid 08bd3cf4a0 sid bd3c su f4a0
+cid 3771d59502d6 sid 71d5 su 9502d6
+cid 1d57dee8b888f3 sid 57de su e8b888f3
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3
+
+cid 0336c976 sid 36c976 su
+cid 04aa291806 sid aa2918 su 06
+cid 0586897bd8b6 sid 86897b su d8b6
+cid 063625bcae4de0 sid 3625bc su ae4de0
+cid 07966fb1f3cb535f sid 966fb1 su f3cb535f
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4
+
+cid 185172fab8 sid 5172fab8 su
+cid 2eb7ff2c9297 sid b7ff2c92 su 97
+cid 14f3eb3dd3edbe sid f3eb3dd3 su edbe
+cid 3feb31cece744b74 sid eb31cece su 744b74
+cid 06b9f34c353ce23bb5 sid b9f34c35 su 3ce23bb5
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5
+
+cid 05bdcd8d0b1d sid bdcd8d0b1d su
+cid 06aee673725a63 sid aee673725a su 63
+cid 07bbf338ddbf37f4 sid bbf338ddbf su 37f4
+cid 08fbbca64c26756840 sid fbbca64c26 su 756840
+cid 09e7737c495b93894e34 sid e7737c495b su 93894e34
+
¶ +
+
+
+
+
+

+B.2. Stream Cipher Connection ID Algorithm +

+

In each case below, the server is using a plain text nonce value of zero.¶

+
+
+LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 12 sid_len 1
+    key 4d9d0fd25a25e7f321ef464e13f9fa3d
+
+cid 0d69fe8ab8293680395ae256e89c sid c5 su
+cid 0e420d74ed99b985e10f5073f43027 sid d5 su 27
+cid 0f380f440c6eefd3142ee776f6c16027 sid 10 su 6027
+cid 1020607efbe82049ddbf3a7c3d9d32604d sid 3c su 32604d
+cid 11e132d12606a1bb0fa17e1caef00ec54c10 sid e3 su 0ec54c10
+
+LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 2
+    key 49e1cec7fd264b1f4af37413baf8ada9
+
+cid 3d3a5e1126414271cc8dc2ec7c8c15 sid f7fe su
+cid 007042539e7c5f139ac2adfbf54ba748 sid eaf4 su 48
+cid 2bc125dd2aed2aafacf59855d99e029217 sid e880 su 9217
+cid 3be6728dc082802d9862c6c8e4dda3d984d8 sid 62c6 su d984d8
+cid 1afe9c6259ad350fc7bad28e0aeb2e8d4d4742 sid 8502 su 8d4d4742
+
+LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 14 sid_len 3
+    key 2c70df0b399bd33a7335523dcdb884ad
+
+cid 11d62e8670565cd30b552edff6782ff5a740 sid d794bb su
+cid 12c70e481f49363cabd9370d1fd5012c12bca5 sid 2cbd5d su a5
+cid 133b95dfd8ad93566782f8424df82458069fc9e9 sid d126cd su c9e9
+cid 13ac6ffcd635532ab60370306c7ee572d6b6e795 sid 539e42 su e795
+cid 1383ed07a9700777ff450bb39bb9c1981266805c sid 9094dd su 805c
+
+LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 4
+    key 2297b8a95c776cf9c048b76d9dc27019
+
+cid 32873890c3059ca62628089439c44c1f84 sid 7398d8ca su
+cid 1ff7c7d7b9823954b178636c99a7dc93ac83 sid 9655f091 su 83
+cid 31044000a5ebb3bf2fa7629a17f2c78b077c17 sid 8b035fc6 su 7c17
+cid 1791bd28c66721e8fea0c6f34fd2d8e663a6ef70 sid 6672e0e2 su a6ef70
+cid 3df1d90ad5ccd5f8f475f040e90aeca09ec9839d sid b98b1fff su c9839d
+
+LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 8 sid_len 5
+    key 484b2ed942d9f4765e45035da3340423
+
+cid 0da995b7537db605bfd3a38881ae sid 391a7840dc su
+cid 0ed8d02d55b91d06443540d1bf6e98 sid 10f7f7b284 su 98
+cid 0f3f74be6d46a84ccb1fd1ee92cdeaf2 sid 0606918fc0 su eaf2
+cid 1045626dbf20e03050837633cc5650f97c sid e505eea637 su 50f97c
+cid 11bb9a17f691ab446a938427febbeb593eaa sid 99343a2a96 su eb593eaa
+
¶ +
+
+
+
+
+

+B.3. Block Cipher Connection ID Algorithm +

+
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1
+    key 411592e4160268398386af84ea7505d4
+
+cid 10564f7c0df399f6d93bdddb1a03886f25 sid 23 su 05231748a80884ed58007847eb9fd0
+cid 10d5c03f9dd765d73b3d8610b244f74d02 sid 15 su 76cd6b6f0d3f0b20fc8e633e3a05f3
+cid 108ca55228ab23b92845341344a2f956f2 sid 64 su 65c0ce170a9548717498b537cb8790
+cid 10e73f3d034aef2f6f501e3a7693d6270a sid 07 su f9ad10c84cc1e89a2492221d74e707
+cid 101a6ce13d48b14a77ecfd365595ad2582 sid 6c su 76ce4689b0745b956ef71c2608045d
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2
+    key 92ce44aecd636aeeff78da691ef48f77
+
+cid 20aa09bc65ed52b1ccd29feb7ef995d318 sid a52f su 99278b92a86694ff0ecd64bc2f73
+cid 30b8dbef657bd78a2f870e93f9485d5211 sid 6c49 su 7381c8657a388b4e9594297afe96
+cid 043a8137331eacd2e78383279b202b9a6d sid 4188 su 5ac4b0e0b95f4e7473b49ee2d0dd
+cid 3ba71ea2bcf0ab95719ab59d3d7fde770d sid 8ccc su 08728807605db25f2ca88be08e0f
+cid 37ef1956b4ec354f40dc68336a23d42b31 sid c89d su 5a3ccd1471caa0de221ad6c185c0
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3
+    key 5c49cb9265efe8ae7b1d3886948b0a34
+
+cid 10efcffc161d232d113998a49b1dbc4aa0 sid 0690b3 su 958fc9f38fe61b83881b2c5780
+cid 10fc13bdbcb414ba90e391833400c19505 sid 031ac3 su 9a55e1e1904e780346fcc32c3c
+cid 10d3cc1efaf5dc52c7a0f6da2746a8c714 sid 572d3a su ff2ec9712664e7174dc03ca3f8
+cid 107edf37f6788e33c0ec7758a485215f2b sid 562c25 su 02c5a5dcbea629c3840da5f567
+cid 10bc28da122582b7312e65aa096e9724fc sid 2fa4f0 su 8ae8c666bfc0fc364ebfd06b9a
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4
+    key e787a3a491551fb2b4901a3fa15974f3
+
+cid 26125351da12435615e3be6b16fad35560 sid 0cb227d3 su 65b40b1ab54e05bff55db046
+cid 14de05fc84e41b611dfbe99ed5b1c9d563 sid 6a0f23ad su d73bee2f3a7e72b3ffea52d9
+cid 1306052c3f973db87de6d7904914840ff1 sid ca21402d su 5829465f7418b56ee6ada431
+cid 1d202b5811af3e1dba9ea2950d27879a92 sid b14e1307 su 4902aba8b23a5f24616df3cf
+cid 26538b78efc2d418539ad1de13ab73e477 sid a75e0148 su 0040323f1854e75aeb449b9f
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5
+    key d5a6d7824336fbe0f25d28487cdda57c
+
+cid 10a2794871aadb20ddf274a95249e57fde sid 82d3b0b1a1 su 0935471478c2edb8120e60
+cid 108122fe80a6e546a285c475a3b8613ec9 sid fbcc902c9d su 59c47946882a9a93981c15
+cid 104d227ad9dd0fef4c8cb6eb75887b6ccc sid 2808e22642 su 2a7ef40e2c7e17ae40b3fb
+cid 10b3f367d8627b36990a28d67f50b97846 sid 5e018f0197 su 2289cae06a566e5cb6cfa4
+cid 1024412bfe25f4547510204bdda6143814 sid 8a8dd3d036 su 4b12933a135e5eaaebc6fd
+
¶ +
+
+
+
+
+
+
+

+Appendix C. Interoperability with DTLS over UDP +

+

Some environments may contain DTLS traffic as well as QUIC operating over UDP, +which may be hard to distinguish.¶

+

In most cases, the packet parsing rules above will cause a QUIC-LB load +balancer to route DTLS traffic in an appropriate way. DTLS 1.3 implementations +that use the connection_id extension [?I-D.ietf-tls-dtls-connection-id] might +use the techniques in this document to generate connection IDs and achieve +robust routability for DTLS associations if they meet a few additional +requirements. This non-normative appendix describes this interaction.¶

+
+
+

+C.1. DTLS 1.0 and 1.2 +

+

DTLS 1.0 [?RFC4347] and 1.2 [?RFC6347] use packet formats that a QUIC-LB router +will interpret as short header packets with CIDs that request 4-tuple routing. +As such, they will route such packets consistently as long as the 4-tuple does +not change. Note that DTLS 1.0 has been deprecated by the IETF.¶

+

The first octet of every DTLS 1.0 or 1.2 datagram contains the content type. +A QUIC-LB load balancer will interpret any content type less than 128 as a short +header packet, meaning that the subsequent octets should contain a connection +ID.¶

+

Existing TLS content types comfortably fit in the range below 128. Assignment of +codepoints greater than 64 would require coordination in accordance with +[?RFC7983], and anyway would likely create problems demultiplexing DTLS and +version 1 of QUIC. Therefore, this document believes it is extremely unlikely +that TLS content types of 128 or greater will be assigned. Nevertheless, such +an assignment would cause a QUIC-LB load balancer to interpret the packet as a +QUIC long header with an essentially random connection ID, which is likely to be +routed irregularly.¶

+

The second octet of every DTLS 1.0 or 1.2 datagram is the bitwise complement +of the DTLS Major version (i.e. version 1.x = 0xfe). A QUIC-LB load balancer +will interpret this as a connection ID that requires 4-tuple based load +balancing, meaning that the routing will be consistent as long as the 4-tuple +remains the same.¶

+

[?I-D.ietf-tls-dtls-connection-id] defines an extension to add connection IDs +to DTLS 1.2. Unfortunately, a QUIC-LB load balancer will not correctly parse +the connection ID and will continue 4-tuple routing. An modified QUIC-LB load +balancer that correctly identifies DTLS and parses a DTLS 1.2 datagram for +the connection ID is outside the scope of this document.¶

+
+
+
+
+

+C.2. DTLS 1.3 +

+

DTLS 1.3 [?I-D.draft-ietf-tls-dtls13] changes the structure of datagram headers +in relevant ways.¶

+

Handshake packets continue to have a TLS content type in the first octet and +0xfe in the second octet, so they will be 4-tuple routed, which should not +present problems for likely NAT rebinding or address change events.¶

+

Non-handshake packets always have zero in their most significant bit and will +therefore always be treated as QUIC short headers. If the connection ID is +present, it follows in the succeeding octets. Therefore, a DTLS 1.3 association +where the server utilizes Connection IDs and the encodings in this document +will be routed correctly in the presence of client address and port changes.¶

+

However, if the client does not include the connection_id extension in its +ClientHello, the server is unable to use connection IDs. In this case, non- +handshake packets will appear to contain random connection IDs and be routed +randomly. Thus, unmodified QUIC-LB load balancers will not work with DTLS 1.3 +if the client does not advertise support for connection IDs, or the server does +not request the use of a compliant connection ID.¶

+

A QUIC-LB load balancer might be modified to identify DTLS 1.3 packets and +correctly parse the fields to identify when there is no connection ID and +revert to 4-tuple routing, removing the server requirement above. However, such +a modification is outside the scope of this document, and classifying some +packets as DTLS might be incompatible with future versions of QUIC.¶

+
+
+
+
+

+C.3. Future Versions of DTLS +

+

As DTLS does not have an IETF consensus document that defines what parts of +DTLS will be invariant in future versions, it is difficult to speculate about +the applicability of this section to future versions of DTLS.¶

+
+
+
+
+
+
+

+Appendix D. Acknowledgments +

+

The authors would like to thank Christian Huitema and Ian Swett for their major +design contributions.¶

+

Manasi Deval, Erik Fuller, Toma Gavrichenkov, Jana Iyengar, Subodh Iyengar, +Ladislav Lhotka, Jan Lindblad, Ling Tao Nju, Kazuho Oku, Udip Pant, Martin +Thomson, Dmitri Tikhonov, Victor Vasiliev, and William Zeng Ke all provided +useful input to this document.¶

+
+
+
+
+

+Appendix E. Change Log +

+
    +
  • + RFC Editor's Note: Please remove this section prior to +publication of a final version of this document.¶ +
  • +
+
+
+

+E.1. since draft-ietf-quic-load-balancers-06 +

+
    +
  • Added interoperability with DTLS¶ +
  • +
  • Changed "non-compliant" to "unroutable"¶ +
  • +
  • Changed "arbitrary" algorithm to "fallback"¶ +
  • +
  • Revised security considerations for mistrustful tenants¶ +
  • +
+
+
+
+
+

+E.2. since draft-ietf-quic-load-balancers-05 +

+
    +
  • Added low-config CID for further discussion¶ +
  • +
  • Complete revision of shared-state Retry Token¶ +
  • +
  • Added YANG model¶ +
  • +
  • Updated configuration limits to ensure CID entropy¶ +
  • +
  • Switched to notation from quic-transport¶ +
  • +
+
+
+
+
+

+E.3. since draft-ietf-quic-load-balancers-04 +

+
    +
  • Rearranged the shared-state retry token to simplify token processing¶ +
  • +
  • More compact timestamp in shared-state retry token¶ +
  • +
  • Revised server requirements for shared-state retries¶ +
  • +
  • Eliminated zero padding from the test vectors¶ +
  • +
  • Added server use bytes to the test vectors¶ +
  • +
  • Additional compliant DCID criteria¶ +
  • +
+
+
+
+
+

+E.4. since-draft-ietf-quic-load-balancers-03 +

+
    +
  • Improved Config Rotation text¶ +
  • +
  • Added stream cipher test vectors¶ +
  • +
  • Deleted the Obfuscated CID algorithm¶ +
  • +
+
+
+
+
+

+E.5. since-draft-ietf-quic-load-balancers-02 +

+
    +
  • Replaced stream cipher algorithm with three-pass version¶ +
  • +
  • Updated Retry format to encode info for required TPs¶ +
  • +
  • Added discussion of version invariance¶ +
  • +
  • Cleaned up text about config rotation¶ +
  • +
  • Added Reset Oracle and limited configuration considerations¶ +
  • +
  • Allow dropped long-header packets for known QUIC versions¶ +
  • +
+
+
+
+
+

+E.6. since-draft-ietf-quic-load-balancers-01 +

+
    +
  • Test vectors for load balancer decoding¶ +
  • +
  • Deleted remnants of in-band protocol¶ +
  • +
  • Light edit of Retry Services section¶ +
  • +
  • Discussed load balancer chains¶ +
  • +
+
+
+
+
+

+E.7. since-draft-ietf-quic-load-balancers-00 +

+
    +
  • Removed in-band protocol from the document¶ +
  • +
+
+
+
+
+

+E.8. Since draft-duke-quic-load-balancers-06 +

+
    +
  • Switch to IETF WG draft.¶ +
  • +
+
+
+
+
+

+E.9. Since draft-duke-quic-load-balancers-05 +

+
    +
  • Editorial changes¶ +
  • +
  • Made load balancer behavior independent of QUIC version¶ +
  • +
  • Got rid of token in stream cipher encoding, because server might not have it¶ +
  • +
  • Defined "non-compliant DCID" and specified rules for handling them.¶ +
  • +
  • Added psuedocode for config schema¶ +
  • +
+
+
+
+
+

+E.10. Since draft-duke-quic-load-balancers-04 +

+
    +
  • Added standard for retry services¶ +
  • +
+
+
+
+
+

+E.11. Since draft-duke-quic-load-balancers-03 +

+
    +
  • Renamed Plaintext CID algorithm as Obfuscated CID¶ +
  • +
  • Added new Plaintext CID algorithm¶ +
  • +
  • Updated to allow 20B CIDs¶ +
  • +
  • Added self-encoding of CID length¶ +
  • +
+
+
+
+
+

+E.12. Since draft-duke-quic-load-balancers-02 +

+
    +
  • Added Config Rotation¶ +
  • +
  • Added failover mode¶ +
  • +
  • Tweaks to existing CID algorithms¶ +
  • +
  • Added Block Cipher CID algorithm¶ +
  • +
  • Reformatted QUIC-LB packets¶ +
  • +
+
+
+
+
+

+E.13. Since draft-duke-quic-load-balancers-01 +

+
    +
  • Complete rewrite¶ +
  • +
  • Supports multiple security levels¶ +
  • +
  • Lightweight messages¶ +
  • +
+
+
+
+
+

+E.14. Since draft-duke-quic-load-balancers-00 +

+
    +
  • Converted to markdown¶ +
  • +
  • Added variable length connection IDs¶ +
  • +
+
+
+
+
+
+
+

+Authors' Addresses +

+
+
Martin Duke
+
F5 Networks, Inc.
+ +
+
+
Nick Banks
+
Microsoft
+ +
+
+
+ + + diff --git a/dtls/draft-ietf-quic-load-balancers.txt b/dtls/draft-ietf-quic-load-balancers.txt new file mode 100644 index 0000000..0b4520a --- /dev/null +++ b/dtls/draft-ietf-quic-load-balancers.txt @@ -0,0 +1,2856 @@ + + + + +QUIC M. Duke +Internet-Draft F5 Networks, Inc. +Intended status: Standards Track N. Banks +Expires: 6 November 2021 Microsoft + 5 May 2021 + + + QUIC-LB: Generating Routable QUIC Connection IDs + draft-ietf-quic-load-balancers-07 + +Abstract + + The QUIC protocol design is resistant to transparent packet + inspection, injection, and modification by intermediaries. However, + the server can explicitly cooperate with network services by agreeing + to certain conventions and/or sharing state with those services. + This specification provides a standardized means of solving three + problems: (1) maintaining routability to servers via a low-state load + balancer even when the connection IDs in use change; (2) explicit + encoding of the connection ID length in all packets to assist + hardware accelerators; and (3) injection of QUIC Retry packets by an + anti-Denial-of-Service agent on behalf of the server. + +Note to Readers + + Discussion of this document takes place on the QUIC Working Group + mailing list (quic@ietf.org), which is archived at + https://mailarchive.ietf.org/arch/browse/quic/ + (https://mailarchive.ietf.org/arch/browse/quic/). + + Source for this draft and an issue tracker can be found at + https://github.com/quicwg/load-balancers (https://github.com/quicwg/ + load-balancers). + +Status of This Memo + + This Internet-Draft is submitted in full conformance with the + provisions of BCP 78 and BCP 79. + + Internet-Drafts are working documents of the Internet Engineering + Task Force (IETF). Note that other groups may also distribute + working documents as Internet-Drafts. The list of current Internet- + Drafts is at https://datatracker.ietf.org/drafts/current/. + + Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as "work in progress." + + + +Duke & Banks Expires 6 November 2021 [Page 1] + +Internet-Draft QUIC-LB May 2021 + + + This Internet-Draft will expire on 6 November 2021. + +Copyright Notice + + Copyright (c) 2021 IETF Trust and the persons identified as the + document authors. All rights reserved. + + This document is subject to BCP 78 and the IETF Trust's Legal + Provisions Relating to IETF Documents (https://trustee.ietf.org/ + license-info) in effect on the date of publication of this document. + Please review these documents carefully, as they describe your rights + and restrictions with respect to this document. Code Components + extracted from this document must include Simplified BSD License text + as described in Section 4.e of the Trust Legal Provisions and are + provided without warranty as described in the Simplified BSD License. + +Table of Contents + + 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 + 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 + 1.2. Notation . . . . . . . . . . . . . . . . . . . . . . . . 5 + 2. Protocol Objectives . . . . . . . . . . . . . . . . . . . . . 6 + 2.1. Simplicity . . . . . . . . . . . . . . . . . . . . . . . 6 + 2.2. Security . . . . . . . . . . . . . . . . . . . . . . . . 6 + 3. First CID octet . . . . . . . . . . . . . . . . . . . . . . . 7 + 3.1. Config Rotation . . . . . . . . . . . . . . . . . . . . . 7 + 3.2. Configuration Failover . . . . . . . . . . . . . . . . . 8 + 3.3. Length Self-Description . . . . . . . . . . . . . . . . . 8 + 3.4. Format . . . . . . . . . . . . . . . . . . . . . . . . . 8 + 4. Load Balancing Preliminaries . . . . . . . . . . . . . . . . 9 + 4.1. Unroutable Connection IDs . . . . . . . . . . . . . . . . 9 + 4.2. Fallback Algorithms . . . . . . . . . . . . . . . . . . . 10 + 4.3. Server ID Allocation . . . . . . . . . . . . . . . . . . 11 + 4.3.1. Static Allocation . . . . . . . . . . . . . . . . . . 11 + 4.3.2. Dynamic Allocation . . . . . . . . . . . . . . . . . 12 + 5. Routing Algorithms . . . . . . . . . . . . . . . . . . . . . 14 + 5.1. Plaintext CID Algorithm . . . . . . . . . . . . . . . . . 14 + 5.1.1. Configuration Agent Actions . . . . . . . . . . . . . 14 + 5.1.2. Load Balancer Actions . . . . . . . . . . . . . . . . 14 + 5.1.3. Server Actions . . . . . . . . . . . . . . . . . . . 14 + 5.2. Stream Cipher CID Algorithm . . . . . . . . . . . . . . . 15 + 5.2.1. Configuration Agent Actions . . . . . . . . . . . . . 15 + 5.2.2. Load Balancer Actions . . . . . . . . . . . . . . . . 15 + 5.2.3. Server Actions . . . . . . . . . . . . . . . . . . . 17 + 5.3. Block Cipher CID Algorithm . . . . . . . . . . . . . . . 17 + 5.3.1. Configuration Agent Actions . . . . . . . . . . . . . 17 + 5.3.2. Load Balancer Actions . . . . . . . . . . . . . . . . 17 + 5.3.3. Server Actions . . . . . . . . . . . . . . . . . . . 18 + + + +Duke & Banks Expires 6 November 2021 [Page 2] + +Internet-Draft QUIC-LB May 2021 + + + 6. ICMP Processing . . . . . . . . . . . . . . . . . . . . . . . 18 + 7. Retry Service . . . . . . . . . . . . . . . . . . . . . . . . 18 + 7.1. Common Requirements . . . . . . . . . . . . . . . . . . . 19 + 7.1.1. Considerations for Non-Initial Packets . . . . . . . 20 + 7.2. No-Shared-State Retry Service . . . . . . . . . . . . . . 21 + 7.2.1. Configuration Agent Actions . . . . . . . . . . . . . 21 + 7.2.2. Service Requirements . . . . . . . . . . . . . . . . 21 + 7.2.3. Server Requirements . . . . . . . . . . . . . . . . . 23 + 7.3. Shared-State Retry Service . . . . . . . . . . . . . . . 23 + 7.3.1. Token Protection with AEAD . . . . . . . . . . . . . 25 + 7.3.2. Configuration Agent Actions . . . . . . . . . . . . . 26 + 7.3.3. Service Requirements . . . . . . . . . . . . . . . . 26 + 7.3.4. Server Requirements . . . . . . . . . . . . . . . . . 27 + 8. Configuration Requirements . . . . . . . . . . . . . . . . . 28 + 9. Additional Use Cases . . . . . . . . . . . . . . . . . . . . 28 + 9.1. Load balancer chains . . . . . . . . . . . . . . . . . . 29 + 9.2. Moving connections between servers . . . . . . . . . . . 29 + 10. Version Invariance of QUIC-LB . . . . . . . . . . . . . . . . 29 + 11. Security Considerations . . . . . . . . . . . . . . . . . . . 30 + 11.1. Attackers not between the load balancer and server . . . 31 + 11.2. Attackers between the load balancer and server . . . . . 31 + 11.3. Multiple Configuration IDs . . . . . . . . . . . . . . . 31 + 11.4. Limited configuration scope . . . . . . . . . . . . . . 32 + 11.5. Stateless Reset Oracle . . . . . . . . . . . . . . . . . 33 + 11.6. Connection ID Entropy . . . . . . . . . . . . . . . . . 33 + 11.7. Shared-State Retry Keys . . . . . . . . . . . . . . . . 33 + 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 + 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 34 + 13.1. Normative References . . . . . . . . . . . . . . . . . . 34 + 13.2. Informative References . . . . . . . . . . . . . . . . . 35 + Appendix A. QUIC-LB YANG Model . . . . . . . . . . . . . . . . . 36 + A.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 41 + Appendix B. Load Balancer Test Vectors . . . . . . . . . . . . . 41 + B.1. Plaintext Connection ID Algorithm . . . . . . . . . . . . 42 + B.2. Stream Cipher Connection ID Algorithm . . . . . . . . . . 43 + B.3. Block Cipher Connection ID Algorithm . . . . . . . . . . 44 + Appendix C. Interoperability with DTLS over UDP . . . . . . . . 46 + C.1. DTLS 1.0 and 1.2 . . . . . . . . . . . . . . . . . . . . 46 + C.2. DTLS 1.3 . . . . . . . . . . . . . . . . . . . . . . . . 47 + C.3. Future Versions of DTLS . . . . . . . . . . . . . . . . . 47 + Appendix D. Acknowledgments . . . . . . . . . . . . . . . . . . 47 + Appendix E. Change Log . . . . . . . . . . . . . . . . . . . . . 48 + E.1. since draft-ietf-quic-load-balancers-06 . . . . . . . . . 48 + E.2. since draft-ietf-quic-load-balancers-05 . . . . . . . . . 48 + E.3. since draft-ietf-quic-load-balancers-04 . . . . . . . . . 48 + E.4. since-draft-ietf-quic-load-balancers-03 . . . . . . . . . 48 + E.5. since-draft-ietf-quic-load-balancers-02 . . . . . . . . . 49 + E.6. since-draft-ietf-quic-load-balancers-01 . . . . . . . . . 49 + + + +Duke & Banks Expires 6 November 2021 [Page 3] + +Internet-Draft QUIC-LB May 2021 + + + E.7. since-draft-ietf-quic-load-balancers-00 . . . . . . . . . 49 + E.8. Since draft-duke-quic-load-balancers-06 . . . . . . . . . 49 + E.9. Since draft-duke-quic-load-balancers-05 . . . . . . . . . 49 + E.10. Since draft-duke-quic-load-balancers-04 . . . . . . . . . 50 + E.11. Since draft-duke-quic-load-balancers-03 . . . . . . . . . 50 + E.12. Since draft-duke-quic-load-balancers-02 . . . . . . . . . 50 + E.13. Since draft-duke-quic-load-balancers-01 . . . . . . . . . 50 + E.14. Since draft-duke-quic-load-balancers-00 . . . . . . . . . 50 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 50 + +1. Introduction + + QUIC packets [QUIC-TRANSPORT] usually contain a connection ID to + allow endpoints to associate packets with different address/ port + 4-tuples to the same connection context. This feature makes + connections robust in the event of NAT rebinding. QUIC endpoints + usually designate the connection ID which peers use to address + packets. Server-generated connection IDs create a potential need for + out-of-band communication to support QUIC. + + QUIC allows servers (or load balancers) to designate an initial + connection ID to encode useful routing information for load + balancers. It also encourages servers, in packets protected by + cryptography, to provide additional connection IDs to the client. + This allows clients that know they are going to change IP address or + port to use a separate connection ID on the new path, thus reducing + linkability as clients move through the world. + + There is a tension between the requirements to provide routing + information and mitigate linkability. Ultimately, because new + connection IDs are in protected packets, they must be generated at + the server if the load balancer does not have access to the + connection keys. However, it is the load balancer that has the + context necessary to generate a connection ID that encodes useful + routing information. In the absence of any shared state between load + balancer and server, the load balancer must maintain a relatively + expensive table of server-generated connection IDs, and will not + route packets correctly if they use a connection ID that was + originally communicated in a protected NEW_CONNECTION_ID frame. + + This specification provides common algorithms for encoding the server + mapping in a connection ID given some shared parameters. The mapping + is generally only discoverable by observers that have the parameters, + preserving unlinkability as much as possible. + + Aside from load balancing, a QUIC server may also desire to offload + other protocol functions to trusted intermediaries. These + intermediaries might include hardware assist on the server host + + + +Duke & Banks Expires 6 November 2021 [Page 4] + +Internet-Draft QUIC-LB May 2021 + + + itself, without access to fully decrypted QUIC packets. For example, + this document specifies a means of offloading stateless retry to + counter Denial of Service attacks. It also proposes a system for + self-encoding connection ID length in all packets, so that crypto + 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 + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + document are to be interpreted as described in RFC 2119 [RFC2119]. + + 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 + interpreted as carrying significance described in RFC 2119. + + In this document, "client" and "server" refer to the endpoints of a + QUIC connection unless otherwise indicated. A "load balancer" is an + intermediary for that connection that does not possess QUIC + connection keys, but it may rewrite IP addresses or conduct other IP + or UDP processing. A "configuration agent" is the entity that + determines the QUIC-LB configuration parameters for the network and + leverages some system to distribute that configuration. + + Note that stateful load balancers that act as proxies, by terminating + a QUIC connection with the client and then retrieving data from the + server using QUIC or another protocol, are treated as a server with + respect to this specification. + + For brevity, "Connection ID" will often be abbreviated as "CID". + +1.2. Notation + + All wire formats will be depicted using the notation defined in + Section 1.3 of [QUIC-TRANSPORT]. There is one addition: the function + len() refers to the length of a field which can serve as a limit on a + different field, so that the lengths of two fields can be concisely + defined as limited to a sum, for example: + + x(A..B) y(C..B-len(x)) + + + + + +Duke & Banks Expires 6 November 2021 [Page 5] + +Internet-Draft QUIC-LB May 2021 + + + indicates that x can be of any length between A and B, and y can be + of any length between C and B provided that (len(x) + len(y)) does + not exceed B. + + The example below illustrates the basic framework: + +Example Structure { + One-bit Field (1), + 7-bit Field with Fixed Value (7) = 61, + Field with Variable-Length Integer (i), + Arbitrary-Length Field (..), + Variable-Length Field (8..24), + Variable-Length Field with Dynamic Limit (8..24-len(Variable-Length Field)), + Field With Minimum Length (16..), + Field With Maximum Length (..128), + [Optional Field (64)], + Repeated Field (8) ..., +} + + Figure 1: Example Format + +2. Protocol Objectives + +2.1. Simplicity + + QUIC is intended to provide unlinkability across connection + migration, but servers are not required to provide additional + connection IDs that effectively prevent linkability. If the + coordination scheme is too difficult to implement, servers behind + load balancers using connection IDs for routing will use trivially + linkable connection IDs. Clients will therefore be forced to choose + between terminating the connection during migration or remaining + linkable, subverting a design objective of QUIC. + + The solution should be both simple to implement and require little + additional infrastructure for cryptographic keys, etc. + +2.2. Security + + In the limit where there are very few connections to a pool of + servers, no scheme can prevent the linking of two connection IDs with + high probability. In the opposite limit, where all servers have many + connections that start and end frequently, it will be difficult to + associate two connection IDs even if they are known to map to the + same server. + + + + + + +Duke & Banks Expires 6 November 2021 [Page 6] + +Internet-Draft QUIC-LB May 2021 + + + QUIC-LB is relevant in the region between these extremes: when the + information that two connection IDs map to the same server is helpful + to linking two connection IDs. Obviously, any scheme that + transparently communicates this mapping to outside observers + compromises QUIC's defenses against linkability. + + Though not an explicit goal of the QUIC-LB design, concealing the + server mapping also complicates attempts to focus attacks on a + specific server in the pool. + +3. First CID octet + + The first octet of a Connection ID is reserved for two special + purposes, one mandatory (config rotation) and one optional (length + self-description). + + Subsequent sections of this document refer to the contents of this + octet as the "first octet." + +3.1. Config Rotation + + The first two bits of any connection ID MUST encode an identifier for + the configuration that the connection ID uses. This enables + incremental deployment of new QUIC-LB settings (e.g., keys). + + When new configuration is distributed to servers, there will be a + transition period when connection IDs reflecting old and new + configuration coexist in the network. The rotation bits allow load + balancers to apply the correct routing algorithm and parameters to + incoming packets. + + Configuration Agents SHOULD deliver new configurations to load + balancers before doing so to servers, so that load balancers are + ready to process CIDs using the new parameters when they arrive. + + A Configuration Agent SHOULD NOT use a codepoint to represent a new + configuration until it takes precautions to make sure that all + connections using CIDs with an old configuration at that codepoint + have closed or transitioned. + + Servers MUST NOT generate new connection IDs using an old + configuration after receiving a new one from the configuration agent. + Servers MUST send NEW_CONNECTION_ID frames that provide CIDs using + the new configuration, and retire CIDs using the old configuration + using the "Retire Prior To" field of that frame. + + + + + + +Duke & Banks Expires 6 November 2021 [Page 7] + +Internet-Draft QUIC-LB May 2021 + + + It also possible to use these bits for more long-lived distinction of + different configurations, but this has privacy implications (see + Section 11.3). + +3.2. Configuration Failover + + If a server has not received a valid QUIC-LB configuration, and + believes that low-state, Connection-ID aware load balancers are in + the path, it SHOULD generate connection IDs with the config rotation + bits set to '11' and SHOULD use the "disable_active_migration" + transport parameter in all new QUIC connections. It SHOULD NOT send + NEW_CONNECTION_ID frames with new values. + + A load balancer that sees a connection ID with config rotation bits + set to '11' MUST revert to 5-tuple routing. + +3.3. Length Self-Description + + Local hardware cryptographic offload devices may accelerate QUIC + servers by receiving keys from the QUIC implementation indexed to the + connection ID. However, on physical devices operating multiple QUIC + servers, it is impractical to efficiently lookup these keys if the + connection ID does not self-encode its own length. + + Note that this is a function of particular server devices and is + irrelevant to load balancers. As such, load balancers MAY omit this + from their configuration. However, the remaining 6 bits in the first + octet of the Connection ID are reserved to express the length of the + following connection ID, not including the first octet. + + A server not using this functionality SHOULD make the six bits appear + to be random. + +3.4. Format + + First Octet { + Config Rotation (2), + CID Len or Random Bits (6), + } + + Figure 2: First Octet Format + + The first octet has the following fields: + + Config Rotation: Indicates the configuration used to interpret the + CID. + + + + + +Duke & Banks Expires 6 November 2021 [Page 8] + +Internet-Draft QUIC-LB May 2021 + + + CID Len or Random Bits: Length Self-Description (if applicable), or + random bits otherwise. Encodes the length of the Connection ID + following the First Octet. + +4. Load Balancing Preliminaries + + In QUIC-LB, load balancers do not generate individual connection IDs + for servers. Instead, they communicate the parameters of an + algorithm to generate routable connection IDs. + + The algorithms differ in the complexity of configuration at both load + balancer and server. Increasing complexity improves obfuscation of + the server mapping. + + This section describes three participants: the configuration agent, + the load balancer, and the server. For any given QUIC-LB + configuration that enables connection-ID-aware load balancing, there + must be a choice of (1) routing algorithm, (2) server ID allocation + strategy, and (3) algorithm parameters. + + Fundamentally, servers generate connection IDs that encode their + server ID. Load balancers decode the server ID from the CID in + incoming packets to route to the correct server. + + There are situations where a server pool might be operating two or + more routing algorithms or parameter sets simultaneously. The load + balancer uses the first two bits of the connection ID to multiplex + incoming DCIDs over these schemes (see Section 3.1). + +4.1. Unroutable Connection IDs + + QUIC-LB servers will generate Connection IDs that are decodable to + extract a server ID in accordance with a specified algorithm and + parameters. However, QUIC often uses client-generated Connection IDs + prior to receiving a packet from the server. + + These client-generated CIDs might not conform to the expectations of + the routing algorithm and therefore not be routable by the load + balancer. Those that are not routable are "unroutable DCIDs" and + receive similar treatment regardless of why they're unroutable: + + * The config rotation bits (Section 3.1) may not correspond to an + active configuration. Note: a packet with a DCID that indicates + 5-tuple routing (see Section 3.2) is always routable. + + * The DCID might not be long enough for the decoder to process. + + + + + +Duke & Banks Expires 6 November 2021 [Page 9] + +Internet-Draft QUIC-LB May 2021 + + + * The extracted server mapping might not correspond to an active + server. + + All other DCIDs are routable. + + Load balancers MUST forward packets with routable DCIDs to a server + in accordance with the chosen routing algorithm. + + Load balancers SHOULD drop short header packets with unroutable + DCIDs. + + The routing of long headers with unroutable DCIDs depends on the + server ID allocation strategy, described in Section 4.3. However, + the load balancer MUST NOT drop these packets, with one exception. + + Load balancers MAY drop packets with long headers and unroutable + DCIDs if and only if it knows that the encoded QUIC version does not + allow an unroutable DCID in a packet with that signature. For + example, a load balancer can safely drop a QUIC version 1 Handshake + packet with an unroutable DCID, as a version 1 Handshake packet sent + to a QUIC-LB routable server will always have a server-generated + routable CID. The prohibition against dropping packets with long + headers remains for unknown QUIC versions. + + Furthermore, while the load balancer function MUST NOT drop packets, + the device might implement other security policies, outside the scope + of this specification, that might force a drop. + + Servers that receive packets with unroutable CIDs MUST use the + available mechanisms to induce the client to use a routable CID in + future packets. In QUIC version 1, this requires using a routable + CID in the Source CID field of server-generated long headers. + +4.2. Fallback Algorithms + + There are conditions described below where a load balancer routes a + packet using a "fallback algorithm." It can choose any algorithm, + without coordination with the servers, but the algorithm SHOULD be + deterministic over short time scales so that related packets go to + the same server. The design of this algorithm SHOULD consider the + version-invariant properties of QUIC described in [QUIC-INVARIANTS] + to maximize its robustness to future versions of QUIC. + + A fallback algorithm MUST NOT make the routing behavior dependent on + any 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-dependent and intermediaries SHOULD NOT base their design on + version-specific templates. + + + +Duke & Banks Expires 6 November 2021 [Page 10] + +Internet-Draft QUIC-LB May 2021 + + + For example, one fallback algorithm might convert a unroutable DCID + to an integer and divided by the number of servers, with the modulus + used to forward the packet. The number of servers is usually + consistent on the time scale of a QUIC connection handshake. Another + might simply hash the address/port 4-tuple. See also Section 10. + +4.3. Server ID Allocation + + For any given configuration, the configuration agent must specify if + server IDs will be statically or dynamically allocated. Load + Balancer configurations with statically allocated server IDs + explicitly include a mapping of server IDs to forwarding addresses. + The corresponding server configurations contain one or more unique + server IDs. + + A dynamically allocated configuration does not have a pre-defined + assignment, reducing configuration complexity. However, it places + limits on the maximum server ID length and requires more state at the + load balancer. In certain edge cases, it can force parts of the + system to fail over to 5-tuple routing for a short time. + + In either case, the configuration agent chooses a server ID length + for each configuration that MUST be at least one octet. For Static + Allocation, the maximum length depends on the algorithm. For dynamic + allocation, the maximum length is 7 octets. + + A QUIC-LB configuration MAY significantly over-provision the server + ID space (i.e., provide far more codepoints than there are servers) + to increase the probability that a randomly generated Destination + Connection ID is unroutable. + + Conceptually, each configuration has its own set of server ID + allocations, though two static configurations with identical server + ID lengths MAY use a common allocation between them. + + A server encodes one of its assigned server IDs in any CID it + generates using the relevant configuration. + +4.3.1. Static Allocation + + In the static allocation method, the configuration agent assigns at + least one server ID to each server. + + When forwarding a packet with a long header and unroutable DCID, load + balancers MUST forward packets with long headers and unroutable DCIDs + using an fallback algorithm as specified in Section 4.2. + + + + + +Duke & Banks Expires 6 November 2021 [Page 11] + +Internet-Draft QUIC-LB May 2021 + + +4.3.2. Dynamic Allocation + + In the dynamic allocation method, the load balancer assigns server + IDs dynamically so that configuration does not require fixed server + ID assignment. This reduces linkability. However, it requires state + at the load balancer that roughly scales with the number of + connections, until the server ID codespace is exhausted. + +4.3.2.1. Configuration Agent Actions + + The configuration agent does not assign server IDs, but does + configure a server ID length and an "LB timeout". The server ID MUST + be at least one and no more than seven octets. + +4.3.2.2. Load Balancer Actions + + The load balancer maintains a table of all assigned server IDs and + corresponding routing information, which is initialized empty. These + tables are independent for each operating configuration. + + The load balancer MUST keep track of the most recent observation of + each server ID, in any sort of packet it forwards, in the table and + delete the entries when the time since that observation exceeds the + LB Timeout. + + Note that when the load balancer's table for a configuration is + empty, all incoming DCIDs corresponding to that configuration are + unroutable by definition. + + The handling of an unroutable long-header packet depends on the + reason for unroutability. The load balancer MUST applyt this logic: + + * If the config rotation bits do not match a known configuration, + the load balancer routes the packet using a fallback algorithm + (see Section 4.2). + + * If there is a matching configuration, but the CID is not long + enough to apply the algorithm, the load balancer skips the first + octet of the CID and then reads a server ID from the following + octets, up to the server ID length. If this server ID matches a + known server ID for that configuration, it forwards the packet + accordingly and takes no further action. If it does not match, it + routes using a fallback algorithm and adds the new server ID to + that server's table entry. + + + + + + + +Duke & Banks Expires 6 November 2021 [Page 12] + +Internet-Draft QUIC-LB May 2021 + + + * If the sole reason for unroutability is that the server ID is not + in the load balancer's table, the load balancer routes the packet + with a fallback algorithm. It adds the decoded server ID to table + entry for the server the algorithm chooses and forwards the packet + accordingly. + +4.3.2.3. Server actions + + Each server maintains a list of server IDs assigned to it, + initialized empty. For each SID, it records the last time it + received any packet with an CID that encoded that SID. + + Upon receipt of a packet with a client-generated DCID, the server + MUST follow these steps in order: + + * If the config rotation bits do not correspond to a known + configuration, do not attempt to extract a server ID. + + * If the DCID is not long enough to decode using the configured + algorithm, extract a number of octets equal to the server ID + length, beginning with the second octet. If the extracted value + does not match a server ID in the server's list, add it to the + list. + + * If the DCID is long enough to decode but the server ID is not in + the server's list, add it to the list. + + After any possible SID is extracted, the server processes the packet + normally. + + When a server needs a new connection ID, it uses one of the server + IDs in its list to populate the server ID field of that CID. It + SHOULD vary this selection to reduce linkability within a connection. + + After loading a new configuration or long periods of idleness, a + server may not have any available SIDs. This is because an incoming + packet may not the config rotation bits necessary to extract a server + ID in accordance with the algorithm above. When required to generate + a CID under these conditions, the server MUST generate CIDs using the + 5-tuple routing codepoint (see Section 3.2. Note that these + connections will not be robust to client address changes while they + use this connection ID. For this reason, a server SHOULD retire + these connection IDs and replace them with routable ones once it + receives a client-generated CID that allows it to acquire a server + ID. As, statistically, one in every four such CIDs can provide a + server ID, this is typically a short interval. + + + + + +Duke & Banks Expires 6 November 2021 [Page 13] + +Internet-Draft QUIC-LB May 2021 + + + If a server has not received a connection ID encoding a particular + server ID within the LB timeout, it MUST retire any outstanding CIDs + that use that server ID and cease generating any new ones. + + A server SHOULD have a mechanism to stop using some server IDs if the + list gets large relative to its share of the codepoint space, so that + these allocations time out and are freed for reuse by servers that + have recently joined the pool. + +5. Routing Algorithms + + Encryption in the algorithms below uses the AES-128-ECB cipher. + Future standards could add new algorithms that use other ciphers to + provide cryptographic agility in accordance with [RFC7696]. QUIC-LB + implementations SHOULD be extensible to support new algorithms. + +5.1. Plaintext CID Algorithm + + The Plaintext CID Algorithm makes no attempt to obscure the mapping + of connections to servers, significantly increasing linkability. The + format is depicted in the figure below. + + Plaintext CID { + First Octet (8), + Server ID (8..128), + For Server Use (8..152-len(Server ID)), + } + + Figure 3: Plaintext CID Format + +5.1.1. Configuration Agent Actions + + For static SID allocation, the server ID length is limited to 16 + octets. There are no parameters specific to this algorithm. + +5.1.2. Load Balancer Actions + + On each incoming packet, the load balancer extracts consecutive + octets, beginning with the second octet. These bytes represent the + server ID. + +5.1.3. Server Actions + + The server chooses how many octets to reserve for its own use, which + MUST be at least one octet. + + + + + + +Duke & Banks Expires 6 November 2021 [Page 14] + +Internet-Draft QUIC-LB May 2021 + + + When a server needs a new connection ID, it encodes one of its + assigned server IDs in consecutive octets beginning with the second. + All other 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. + +5.2. Stream Cipher CID Algorithm + + The Stream Cipher CID algorithm provides cryptographic protection at + the cost of additional per-packet processing at the load balancer to + decrypt every incoming connection ID. The CID format is depicted + below. + + Stream Cipher CID { + First Octet (8), + Nonce (64..120), + Encrypted Server ID (8..128-len(Nonce)), + For Server Use (0..152-len(Nonce)-len(Encrypted Server ID)), + } + + Figure 4: Stream Cipher CID Format + +5.2.1. Configuration Agent Actions + + The configuration agent assigns a server ID to every server in its + pool, and determines a server ID length (in octets) sufficiently + large to encode all server IDs, including potential future servers. + + The configuration agent also selects a nonce length and an 16-octet + AES-ECB key to use for connection ID decryption. The nonce length + MUST be at least 8 octets and no more than 16 octets. The nonce + length and server ID length MUST sum to 19 or fewer octets, but + SHOULD sum to 15 or fewer to allow space for server use. + +5.2.2. Load Balancer Actions + + Upon receipt of a QUIC packet, the load balancer extracts as many of + the earliest octets from the destination connection ID as necessary + to match the nonce length. The server ID immediately follows. + + The load balancer decrypts the nonce and the server ID using the + following three pass algorithm: + + + + + + + + + +Duke & Banks Expires 6 November 2021 [Page 15] + +Internet-Draft QUIC-LB May 2021 + + + * Pass 1: The load balancer decrypts the server ID using 128-bit AES + Electronic Codebook (ECB) mode, much like QUIC header protection. + The encrypted nonce octets are zero-padded to 16 octets. AES-ECB + encrypts this encrypted nonce using its key to generate a mask + which it applies to the encrypted server id. This provides an + intermediate value of the server ID, referred to as server-id + intermediate. + + server_id_intermediate = encrypted_server_id ^ AES-ECB(key, padded- + encrypted-nonce) + + * Pass 2: The load balancer decrypts the nonce octets using 128-bit + AES ECB mode, using the server-id intermediate as "nonce" for this + pass. The server-id intermediate octets are zero-padded to 16 + octets. AES-ECB encrypts this padded server-id intermediate using + its key to generate a mask which it applies to the encrypted + nonce. This provides the decrypted nonce value. + + nonce = encrypted_nonce ^ AES-ECB(key, padded-server_id_intermediate) + + * Pass 3: The load balancer decrypts the server ID using 128-bit AES + ECB mode. The 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 intermediate server id. This provides the + decrypted server ID. + + server_id = server_id_intermediate ^ AES-ECB(key, padded-nonce) + + 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. + The load balancer uses the the second through eleventh octets of the + connection ID for the nonce, zero-pads it to 16 octets, uses xors the + result with the twelfth and thirteenth octet. The result is padded + with 14 octets of zeros and encrypted to obtain a mask that is xored + with the nonce octets. Finally, the nonce octets are padded with six + octets of zeros, encrypted, and the first two octets xored with the + server ID octets to obtain the actual server ID. + + This three-pass algorithm is a simplified version of the FFX + algorithm, with the property that each encrypted nonce value depends + on all server ID bits, and each encrypted server ID bit depends on + all nonce bits and all server ID bits. This mitigates attacks + against stream ciphers in which attackers simply flip encrypted + server-ID bits. + + The output of the decryption is the server ID that the load balancer + uses for routing. + + + + +Duke & Banks Expires 6 November 2021 [Page 16] + +Internet-Draft QUIC-LB May 2021 + + +5.2.3. Server Actions + + When generating a routable connection ID, the server writes arbitrary + bits into its nonce octets, and its provided server ID into the + server ID octets. Servers MAY opt to have a longer connection ID + beyond the nonce and server ID. The additional bits MAY encode + additional information, but SHOULD appear essentially random to + observers. + + If the decrypted nonce bits increase monotonically, that guarantees + that nonces are not reused between connection IDs from the same + server. + + The server encrypts the server ID using exactly the algorithm as + described in Section 5.2.2, performing the three passes in reverse + order. + +5.3. Block Cipher CID Algorithm + + The Block Cipher CID Algorithm, by using a full 16 octets of + plaintext and a 128-bit cipher, provides higher cryptographic + protection and detection of unroutable connection IDs. However, it + also requires connection IDs of at least 17 octets, increasing + overhead of client-to-server packets. + + Block Cipher CID { + First Octet (8), + Encrypted Server ID (8..128), + Encrypted Bits for Server Use (128-len(Encrypted Server ID)), + Unencrypted Bits for Server Use (0..24), + } + + Figure 5: Block Cipher CID Format + +5.3.1. Configuration Agent Actions + + If server IDs are statically allocated, the server ID length MUST be + no more than 12 octets, to provide servers adequate entropy to + generate unique CIDs. + + The configuration agent also selects an 16-octet AES-ECB key to use + for connection ID decryption. + +5.3.2. Load Balancer Actions + + Upon receipt of a QUIC packet, the load balancer reads the first + octet to obtain the config rotation bits. It then decrypts the + subsequent 16 octets using AES-ECB decryption and the chosen key. + + + +Duke & Banks Expires 6 November 2021 [Page 17] + +Internet-Draft QUIC-LB May 2021 + + + The decrypted plaintext contains the server id and opaque server data + in that order. The load balancer uses the server ID octets for + routing. + +5.3.3. Server Actions + + When generating a routable connection ID, the server MUST choose a + connection ID length between 17 and 20 octets. The server writes its + server ID into the server ID octets and arbitrary bits into the + remaining bits. These arbitrary bits MAY encode additional + information, and MUST differ between connection IDs. Bits in the + eighteenth, nineteenth, and twentieth octets SHOULD appear + essentially random to observers. The first octet is reserved as + described in Section 3. + + The server then encrypts the second through seventeenth octets using + the 128-bit AES-ECB cipher. + +6. ICMP Processing + + For protocols where 4-tuple load balancing is sufficient, it is + straightforward to deliver ICMP packets from the network to the + correct server, by reading the echoed IP and transport-layer headers + to obtain the 4-tuple. When routing is based on connection ID, + further measures are required, as most QUIC packets that trigger ICMP + responses will only contain a client-generated connection ID that + contains no routing information. + + To solve this problem, load balancers MAY maintain a mapping of + Client IP and port to server ID based on recently observed packets. + + Alternatively, servers MAY implement the technique described in + Section 14.4.1 of [QUIC-TRANSPORT] to increase the likelihood a + Source Connection ID is included in ICMP responses to Path Maximum + Transmission Unit (PMTU) probes. Load balancers MAY parse the echoed + packet to extract the Source Connection ID, if it contains a QUIC + long header, and extract the Server ID as if it were in a Destination + CID. + +7. Retry Service + + When a server is under load, QUICv1 allows it to defer storage of + connection state until the client proves it can receive packets at + its advertised IP address. Through the use of a Retry packet, a + token in subsequent client Initial packets, and transport parameters, + servers verify address ownership and clients verify that there is no + on-path attacker generating Retry packets. + + + + +Duke & Banks Expires 6 November 2021 [Page 18] + +Internet-Draft QUIC-LB May 2021 + + + A "Retry Service" detects potential Denial of Service attacks and + handles sending of Retry packets on behalf of the server. As it is, + by definition, literally an on-path entity, the service must + communicate some of the original connection IDs back to the server so + that it can pass client verification. It also must either verify the + address itself (with the server trusting this verification) or make + sure there is common context for the server to verify the address + using a service-generated token. + + There are two different mechanisms to allow offload of DoS mitigation + to a trusted network service. One requires no shared state; the + server need only be configured to trust a retry service, though this + imposes other operational constraints. The other requires a shared + key, but has no such constraints. + +7.1. Common Requirements + + Regardless of mechanism, a retry service has an active mode, where it + is generating Retry packets, and an inactive mode, where it is not, + based on its assessment of server load and the likelihood an attack + is underway. The choice of mode MAY be made on a per-packet or per- + connection basis, through a stochastic process or based on client + address. + + A configuration agent MUST distribute a list of QUIC versions the + Retry Service supports. It MAY also distribute either an "Allow- + List" or a "Deny-List" of other QUIC versions. It MUST NOT + distribute both an Allow-List and a Deny-List. + + The Allow-List or Deny-List MUST NOT include any versions included + for Retry Service Support. + + The Configuration Agent MUST provide a means for the entity that + controls the Retry Service to report its supported version(s) to the + configuration Agent. If the entity has not reported this + information, it MUST NOT activate the Retry Service and the + configuration agent MUST NOT distribute configuration that activates + it. + + The configuration agent MAY delete versions from the final supported + version list if policy does not require the Retry Service to operate + on those versions. + + The configuration Agent MUST provide a means for the entities that + control servers behind the Retry Service to report either an Allow- + List or a Deny-List. + + + + + +Duke & Banks Expires 6 November 2021 [Page 19] + +Internet-Draft QUIC-LB May 2021 + + + If all entities supply Allow-Lists, the consolidated list MUST be the + union of these sets. If all entities supply Deny-Lists, the + consolidated list MUST be the intersection of these sets. + + If entities provide a mixture of Allow-Lists and Deny-Lists, the + consolidated list MUST be a Deny-List that is the intersection of all + provided Deny-Lists and the inverses of all Allow-Lists. + + If no entities that control servers have reported Allow-Lists or + Deny-Lists, the default is a Deny-List with the null set (i.e., all + unsupported versions will be admitted). This preserves the future + extensibilty of QUIC. + + A retry service MUST forward all packets for a QUIC version it does + not support that are not on a Deny-List or absent from an Allow-List. + Note that if servers support versions the retry service does not, + this may increase load on the servers. + + Note that future versions of QUIC might not have Retry packets, + require different information in Retry, or use different packet type + indicators. + +7.1.1. Considerations for Non-Initial Packets + + Initial Packets are especially effective at consuming server + resources because they cause the server to create connection state. + Even when mitigating this load with Retry Packets, the act of + validating an Initial Token and sending a Retry Packet is more + expensive than the response to a non-Initial packet with an unknown + Connection ID: simply dropping it and/or sending a Stateless Reset. + + Nevertheless, a Retry Service in Active Mode might desire to shield + servers from non-Initial packets that do not correspond to a + previously admitted Initial Packet. This has a number of + considerations. + + * If a Retry Service maintains no per-flow state whatsoever, it + cannot distinguish between valid and invalid non_Initial packets + and MUST forward all non-Initial Packets to the server. + + * For QUIC versions the Retry Service does not support and are + present on the Allow-List (or absent from the Deny-List), the + Retry Service cannot distinguish Initial Packets from other long + headers and therefore MUST admit all long headers. + + * If a Retry Service keeps per-flow state, it can identify 4-tuples + that have been previously approved, admit non-Initial packets from + those flows, and drop all others. However, dropping short headers + + + +Duke & Banks Expires 6 November 2021 [Page 20] + +Internet-Draft QUIC-LB May 2021 + + + will effectively break Address Migration and NAT Rebinding when in + Active Mode, as post-migration packets will arrive with a + previously unknown 4-tuple. This policy will also break + connection attempts using any new QUIC versions that begin + connections with a short header. + + * If a Retry Service is integrated with a QUIC-LB routable load + balancer, it can verify that the Destination Connection ID is + routable, and only admit non-Initial packets with routable DCIDs. + As the Connection ID encoding is invariant across QUIC versions, + the Retry Service can do this for all short headers. + + Nothing in this section prevents Retry Services from making basic + syntax correctness checks on packets with QUIC versions that it + understands (e.g., enforcing the Initial Packet datagram size minimum + in version 1) and dropping packets that are not routable with the + QUIC specification. + +7.2. No-Shared-State Retry Service + + The no-shared-state retry service requires no coordination, except + that the server must be configured to accept this service and know + which QUIC versions the retry service supports. The scheme uses the + first bit of the token to distinguish between tokens from Retry + packets (codepoint '0') and tokens from NEW_TOKEN frames (codepoint + '1'). + +7.2.1. Configuration Agent Actions + + See Section 7.1. + +7.2.2. Service Requirements + + A no-shared-state retry service MUST be present on all paths from + potential clients to the server. These paths MUST fail to pass QUIC + traffic should the service fail for any reason. That is, if the + service is not operational, the server MUST NOT be exposed to client + traffic. Otherwise, servers that have already disabled their Retry + capability would be vulnerable to attack. + + The path between service and server MUST be free of any potential + attackers. Note that this and other requirements above severely + restrict the operational conditions in which a no-shared-state retry + service can safely operate. + + Retry tokens generated by the service MUST have the format below. + + + + + +Duke & Banks Expires 6 November 2021 [Page 21] + +Internet-Draft QUIC-LB May 2021 + + + Non-Shared-State Retry Service Token { + Token Type (1) = 0, + ODCIL (7) = 8..20, + RSCIL (8) = 0..20, + Original Destination Connection ID (64..160), + Retry Source Connection ID (0..160), + Opaque Data (..), + } + + Figure 6: Format of non-shared-state retry service tokens + + The first bit of retry tokens generated by the service MUST be zero. + The token has the following additional fields: + + ODCIL: The length of the original destination connection ID from the + triggering Initial packet. This is in cleartext to be readable for + the server, but authenticated later in the token. The Retry Service + SHOULD reject any token in which the value is less than 8. + + RSCIL: The retry source connection ID length. + + Original Destination Connection ID: This also in cleartext and + authenticated later. + + Retry Source Connection ID: This also in cleartext and authenticated + later. + + Opaque Data: This data MUST contain encrypted information that allows + the retry service to validate the client's IP address, in accordance + with the QUIC specification. It MUST also provide a + cryptographically secure means to validate the integrity of the + entire token. + + Upon receipt of an Initial packet with a token that begins with '0', + the retry service MUST validate the token in accordance with the QUIC + specification. + + In active mode, the service MUST issue Retry packets for all Client + initial packets that contain no token, or a token that has the first + bit set to '1'. It MUST NOT forward the packet to the server. The + service MUST validate all tokens with the first bit set to '0'. If + successful, the service MUST forward the packet with the token + intact. If unsuccessful, it MUST drop the packet. The Retry Service + MAY send an Initial Packet containing a CONNECTION_CLOSE frame with + the INVALID_TOKEN error code when dropping the packet. + + + + + + +Duke & Banks Expires 6 November 2021 [Page 22] + +Internet-Draft QUIC-LB May 2021 + + + Note that this scheme has a performance drawback. When the retry + service is in active mode, clients with a token from a NEW_TOKEN + frame will suffer a 1-RTT penalty even though its token provides + proof of address. + + In inactive mode, the service MUST forward all packets that have no + token or a token with the first bit set to '1'. It MUST validate all + tokens with the first bit set to '0'. If successful, the service + MUST forward the packet with the token intact. If unsuccessful, it + MUST either drop the packet or forward it with the token removed. + The latter requires decryption and re-encryption of the entire + Initial packet to avoid authentication failure. Forwarding the + packet causes the server to respond without the + original_destination_connection_id transport parameter, which + preserves the normal QUIC signal to the client that there is an on- + path attacker. + +7.2.3. Server Requirements + + A server behind a non-shared-state retry service MUST NOT send Retry + packets for a QUIC version the retry service understands. It MAY + send Retry for QUIC versions the Retry Service does not understand. + + Tokens sent in NEW_TOKEN frames MUST have the first bit set to '1'. + + If a server receives an Initial Packet with the first bit set to '1', + it could be from a server-generated NEW_TOKEN frame and should be + processed in accordance with the QUIC specification. If a server + receives an Initial Packet with the first bit to '0', it is a Retry + token and the server MUST NOT attempt to validate it. Instead, it + MUST assume the address is validated and MUST extract the Original + Destination Connection ID and Retry Source Connection ID, assuming + the format described in Section 7.2.2. + +7.3. Shared-State Retry Service + + A shared-state retry service uses a shared key, so that the server + can decode the service's retry tokens. It does not require that all + traffic pass through the Retry service, so servers MAY send Retry + packets in response to Initial packets that don't include a valid + token. + + Both server and service must have time synchronized with respect to + one another to prevent tokens being incorrectly marked as expired, + though tight synchronization is unnecessary. + + + + + + +Duke & Banks Expires 6 November 2021 [Page 23] + +Internet-Draft QUIC-LB May 2021 + + + The tokens are protected using AES128-GCM AEAD, as explained in + Section 7.3.1. All tokens, generated by either the server or retry + service, MUST use the following format, which includes: + + * A 96 bit unique token number transmitted in clear text, but + protected as part of the AEAD associated data. + + * An 8 bit token key identifier. + + * A token body, encoding the Original Destination Connection ID, the + Retry Source Connection ID, and the Timestamp, optionally followed + by server specific Opaque Data. + + The token protection uses an 128 bit representation of the source IP + address from the triggering Initial packet. The client IP address is + 16 octets. If an IPv4 address, the last 12 octets are zeroes. + + If there is a Network Address Translator (NAT) in the server + infrastructure that changes the client IP, the Retry Service MUST + either be positioned behind the NAT, or the NAT must have the token + key to rewrite the Retry token accordingly. Note also that a host + that obtains a token through a NAT and then attempts to connect over + a path that does not have an identically configured NAT will fail + address validation. + + The 96 bit unique token number is set to a random value using a + cryptography-grade random number generator. + + The token key identifier and the corresponding AEAD key and AEAD IV + are provisioned by the configuration agent. + + The token body is encoded as follows: + + Shared-State Retry Service Token Body { + ODCIL (8) = 0..20, + RSCIL (8) = 0..20, + [Port (16)], + Original Destination Connection ID (0..160), + Retry Source Connection ID (0..160), + Timestamp (64), + Opaque Data (..), + } + + Figure 7: Body of shared-state retry service tokens + + The token body has the following fields: + + + + + +Duke & Banks Expires 6 November 2021 [Page 24] + +Internet-Draft QUIC-LB May 2021 + + + ODCIL: The original destination connection ID length. Tokens in + NEW_TOKEN frames MUST set this field to zero. + + RSCIL: The retry source connection ID length. Tokens in NEW_TOKEN + frames MUST set this field to zero. + + Port: The Source Port of the UDP datagram that triggered the Retry + packet. This field MUST be present if and only if the ODCIL is + greater than zero. This field is therefore always absent in tokens + in NEW_TOKEN frames. + + Original Destination Connection ID: The server or Retry Service + copies this from the field in the client Initial packet. + + Retry Source Connection ID: The server or Retry service copies this + from the Source Connection ID of the Retry packet. + + Timestamp: The Timestamp is a 64-bit integer, in network order, that + expresses the expiration time of the token as a number of seconds in + POSIX time (see Sec. 4.16 of [TIME_T]). + + Opaque Data: The server may use this field to encode additional + information, such as congestion window, RTT, or MTU. The Retry + Service MUST have zero-length opaque data. + + Some implementations of QUIC encode in the token the Initial Packet + Number used by the client, in order to verify that the client sends + the retried Initial with a PN larger that the triggering Initial. + Such implementations will encode the Initial Packet Number as part of + the opaque data. As tokens may be generated by the Service, servers + MUST NOT reject tokens because they lack opaque data and therefore + the packet number. + +7.3.1. Token Protection with AEAD + + On the wire, the token is presented as: + + Shared-State Retry Service Token { + Unique Token Number (96), + Key Sequence (8), + Encrypted Shared-State Retry Service Token Body (80..), + AEAD Integrity Check Value (128), + } + + Figure 8: Wire image of shared-state retry service tokens + + The tokens are protected using AES128-GCM as follows: + + + + +Duke & Banks Expires 6 November 2021 [Page 25] + +Internet-Draft QUIC-LB May 2021 + + + * The token key and IV are retrieved using the Key Sequence. + + * The nonce, N, is formed by combining the IV with the 96 bit unique + token number. The 96 bits of the unique token number are left- + padded with zeros to the size of the IV. The exclusive OR of the + padded unique token number and the IV forms the AEAD nonce. + + * The associated data is a formatted as a pseudo header by combining + the cleartext part of the token with the IP address of the client. + + Shared-State Retry Service Token Pseudoheader { + IP Address (128), + Unique Token Number (96), + Key Sequence (8), + } + + Figure 9: Psuedoheader for shared-state retry service tokens + + * The input plaintext for the AEAD is the token body. The output + ciphertext of the AEAD is transmitted in place of the token body. + + * The AEAD Integrity Check Value(ICV), defined in Section 6 of + [RFC4106], is computed as part of the AEAD encryption process, and + is verified during decryption. + +7.3.2. Configuration Agent Actions + + The configuration agent generates and distributes a "token key", a + "token IV", a key sequence, and the information described in + Section 7.1. + +7.3.3. Service Requirements + + In inactive mode, the Retry service forwards all packets without + further inspection or processing. + + Retry services MUST NOT issue Retry packets except where explicitly + allowed below, to avoid sending a Retry packet in response to a Retry + token. + + When in active mode, the service MUST generate Retry tokens with the + format described above when it receives a client Initial packet with + no token. + + The service SHOULD decrypt incoming tokens. The service SHOULD drop + packets with unknown key sequence, or an AEAD ICV that does not match + the expected value. (By construction, the AEAD ICV will only match + if the client IP Address also matches.) + + + +Duke & Banks Expires 6 November 2021 [Page 26] + +Internet-Draft QUIC-LB May 2021 + + + If the token verification passes, and the ODCIL and RSCIL fields are + both zero, then this is a NEW_TOKEN token generated by the server. + Processing of NEW_TOKEN tokens is subtly different from Retry tokens, + as described below. + + The service SHOULD drop a packet containing a token where the ODCIL + is greater than zero and less than the minimum number of octets for a + client-generated CID (8 in QUIC version 1). The service also SHOULD + drop a packet containing a token where the ODCIL is zero and RSCIL is + nonzero. + + If the Timestamp of a token points to time in the past, the token has + expired; however, in order to allow for clock skew, it SHOULD NOT + consider tokens to be expired if the Timestamp encodes a few seconds + in the past. An active Retry service SHOULD drop packets with + expired tokens. If a NEW_TOKEN token, the service MUST generate a + Retry packet in response. It MUST NOT generate a Retry packet in + response to an expired Retry token. + + If a Retry token, the service SHOULD drop packets where the port + number encoded in the token does not match the source port in the + encapsulating UDP header. + + All other packets SHOULD be forwarded to the server. + +7.3.4. Server Requirements + + When issuing Retry or NEW_TOKEN tokens, the server MUST include the + client IP address in the authenticated data as specified in + Section 7.3.1. The ODCIL and RSCIL fields are zero for NEW_TOKEN + tokens, making them easily distinguishable from Retry tokens. + + The server MUST validate all tokens that arrive in Initial packets, + as they may have bypassed the Retry service. + + For Retry tokens that follow the format above, servers SHOULD use the + timestamp field to apply its expiration limits for tokens. This need + not be precisely synchronized with the retry service. However, + servers MAY allow retry tokens marked as being a few seconds in the + past, due to possible clock synchronization issues. + + After decrypting the token, the server uses the corresponding fields + to populate the original_destination_connection_id transport + parameter, with a length equal to ODCIL, and the + retry_source_connection_id transport parameter, with length equal to + RSCIL. + + + + + +Duke & Banks Expires 6 November 2021 [Page 27] + +Internet-Draft QUIC-LB May 2021 + + + For QUIC versions the service does not support, the server MAY use + any token format. + + As discussed in [QUIC-TRANSPORT], a server MUST NOT send a Retry + packet in response to an Initial packet that contains a retry token. + +8. Configuration Requirements + + QUIC-LB requires common configuration to synchronize understanding of + encodings and guarantee explicit consent of the server. + + The load balancer and server MUST agree on a routing algorithm, + server ID allocation method, and the relevant parameters for that + algorithm. + + All algorithms require a server ID length. If server IDs are + statically allocated, the load balancer MUST receive the full table + of mappings, and each server must receive its assigned SID(s), from + the configuration agent. + + For Stream Cipher CID Routing, the servers and load balancer also + MUST have a common understanding of the key and nonce length. + + For Block Cipher CID Routing, the servers and load balancer also MUST + have a common understanding of the key. + + Note that server IDs are opaque bytes, not integers, so there is no + notion of network order or host order. + + A server configuration MUST specify if the first octet encodes the + CID length. Note that a load balancer does not need the CID length, + as the required bytes are present in the QUIC packet. + + A full QUIC-LB server configuration MUST also specify the supported + QUIC versions of any Retry Service. If a shared-state service, the + server also must have the token key. + + A non-shared-state Retry Service need only be configured with the + QUIC versions it supports, and an Allow- or Deny-List. A shared- + state Retry Service also needs the token key, and to be aware if a + NAT sits between it and the servers. + + Appendix A provides a YANG Model of the a full QUIC-LB configuration. + +9. Additional Use Cases + + This section discusses considerations for some deployment scenarios + not implied by the specification above. + + + +Duke & Banks Expires 6 November 2021 [Page 28] + +Internet-Draft QUIC-LB May 2021 + + +9.1. Load balancer chains + + Some network architectures may have multiple tiers of low-state load + balancers, where a first tier of devices makes a routing decision to + the next tier, and so on, until packets reach the server. Although + QUIC-LB is not explicitly designed for this use case, it is possible + to support it. + + If each load balancer is assigned a range of server IDs that is a + subset of the range of IDs assigned to devices that are closer to the + client, then the first devices to process an incoming packet can + extract the server ID and then map it to the correct forwarding + address. Note that this solution is extensible to arbitrarily large + numbers of load-balancing tiers, as the maximum server ID space is + quite large. + +9.2. Moving connections between servers + + Some deployments may transparently move a connection from one server + to another. The means of transferring connection state between + servers is out of scope of this document. + + To support a handover, a server involved in the transition could + issue CIDs that map to the new server via a NEW_CONNECTION_ID frame, + and retire CIDs associated with the new server using the "Retire + Prior To" field in that frame. + + Alternately, if the old server is going offline, the load balancer + could simply map its server ID to the new server's address. + +10. Version Invariance of QUIC-LB + + Non-shared-state Retry Services are inherently dependent on the + format (and existence) of Retry Packets in each version of QUIC, and + so Retry Service configuration explicitly includes the supported QUIC + versions. + + The server ID encodings, and requirements for their handling, are + designed to be QUIC version independent (see [QUIC-INVARIANTS]). A + QUIC-LB load balancer will generally not require changes as servers + deploy new versions of QUIC. However, there are several unlikely + future design decisions that could impact the operation of QUIC-LB. + + The maximum Connection ID length could be below the minimum necessary + for one or more encoding algorithms. + + + + + + +Duke & Banks Expires 6 November 2021 [Page 29] + +Internet-Draft QUIC-LB May 2021 + + + Section 4.1 provides guidance about how load balancers should handle + unroutable DCIDs. This guidance, and the implementation of an + algorithm to handle these DCIDs, rests on some assumptions: + + * Incoming short headers do not contain DCIDs that are client- + generated. + + * The use of client-generated incoming DCIDs does not persist beyond + a few round trips in the connection. + + * While the client is using DCIDs it generated, some exposed fields + (IP address, UDP port, client-generated destination Connection ID) + remain constant for all packets sent on the same connection. + + * Dynamic server ID allocation is dependent on client-generated + Destination CIDs in Initial Packets being at least 8 octets in + length. If they are not, the load balancer may not be able to + extract a valid server ID to add to its table. Configuring a + shorter server ID length can increase robustness to a change. + + While this document does not update the commitments in + [QUIC-INVARIANTS], the additional assumptions are minimal and + narrowly scoped, and provide a likely set of constants that load + balancers can use with minimal risk of version- dependence. + + If these assumptions are invalid, this specification is likely to + lead to loss of packets that contain unroutable DCIDs, and in extreme + cases connection failure. + + Some load balancers might inspect elements of the Server Name + Indication (SNI) extension in the TLS Client Hello to make a routing + decision. Note that the format and cryptographic protection of this + information may change in future versions or extensions of TLS or + QUIC, and therefore this functionality is inherently not version- + invariant. + +11. Security Considerations + + QUIC-LB is intended to prevent linkability. Attacks would therefore + attempt to subvert this purpose. + + Note that the Plaintext CID algorithm makes no attempt to obscure the + server mapping, and therefore does not address these concerns. It + exists to allow consistent CID encoding for compatibility across a + network infrastructure, which makes QUIC robust to NAT rebinding. + Servers that are running the Plaintext CID algorithm SHOULD only use + it to generate new CIDs for the Server Initial Packet and SHOULD NOT + send CIDs in QUIC NEW_CONNECTION_ID frames, except that it sends one + + + +Duke & Banks Expires 6 November 2021 [Page 30] + +Internet-Draft QUIC-LB May 2021 + + + new Connection ID in the event of config rotation Section 3.1. Doing + so might falsely suggest to the client that said CIDs were generated + in a secure fashion. + + A linkability attack would find some means of determining that two + connection IDs route to the same server. As described above, there + is no scheme that strictly prevents linkability for all traffic + patterns, and therefore efforts to frustrate any analysis of server + ID encoding have diminishing returns. + +11.1. Attackers not between the load balancer and server + + Any attacker might open a connection to the server infrastructure and + aggressively simulate migration 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. + + The Stream and Block Cipher CID algorithms provide robust protection + against any sort of linkage. The Plaintext CID algorithm makes no + attempt to protect this encoding. + + Were this analysis to obtain the server encoding, then on-path + observers might apply this analysis to correlating different client + IP addresses. + +11.2. Attackers between the load balancer and server + + 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 + IDs for that connection. + +11.3. Multiple Configuration IDs + + During the period in which there are multiple deployed configuration + IDs (see Section 3.1), there is a slight increase in linkability. + The server space is effectively divided into segments with CIDs that + have different config rotation bits. Entities that manage servers + SHOULD strive to minimize these periods by quickly deploying new + configurations across the server pool. + + + + + + + + + + +Duke & Banks Expires 6 November 2021 [Page 31] + +Internet-Draft QUIC-LB May 2021 + + +11.4. Limited configuration scope + + A simple deployment of QUIC-LB in a cloud provider might use the same + global QUIC-LB configuration across all its load balancers that route + to customer servers. An attacker could then simply become a + customer, obtain the configuration, and then extract server IDs of + other customers' connections at will. + + To avoid this, the configuration agent SHOULD issue QUIC-LB + configurations to mutually distrustful servers that have different + keys for encryption algorithms. In many cases, the load balancers + can distinguish these configurations by external IP address. + + However, assigning multiple entities to an IP address is + complimentary with concealing DNS requests (e.g., DoH [RFC8484]) and + the TLS Server Name Indicator (SNI) ([I-D.ietf-tls-esni]) to obscure + the ultimate destination of traffic. While the load balancer's + fallback algorithm (Section 4.2) can use the SNI to make a routing + decision on the first packet, there are three ways to route + subsequent packets: + + * all co-tenants can use the same QUIC-LB configuration, leaking the + server mapping to each other as described above; + + * co-tenants can be issued one of up to three configurations + distinguished by the config rotation bits (Section 3.1), exposing + information about the target domain to the entire network; or + + * tenants can use 4-tuple routing in their CIDs (in which case they + SHOULD disable migration in their connections), which neutralizes + the value of QUIC-LB but preserves privacy. + + When configuring QUIC-LB, administrators must evaluate the privacy + tradeoff considering the relative value of each of these properties, + given the trust model between tenants, the presence of methods to + obscure the domain name, and value of address migration in the tenant + use cases. + + As the plaintext algorithm makes no attempt to conceal the server + mapping, these deployments SHOULD simply use a common configuration. + + + + + + + + + + + +Duke & Banks Expires 6 November 2021 [Page 32] + +Internet-Draft QUIC-LB May 2021 + + +11.5. Stateless Reset Oracle + + Section 21.9 of [QUIC-TRANSPORT] discusses the Stateless Reset Oracle + attack. For a server deployment to be vulnerable, an attacking + client must be able to cause two packets with the same Destination + CID to arrive at two different servers that share the same + cryptographic context for Stateless Reset tokens. As QUIC-LB + requires deterministic routing of DCIDs over the life of a + connection, it is a sufficient means of avoiding an Oracle without + additional measures. + +11.6. Connection ID Entropy + + The Stream Cipher and Block Cipher algorithms need to generate + different cipher text for each generated Connection ID instance to + protect the Server ID. To do so, at least four octets of the Block + Cipher CID and at least eight octets of the Stream Cipher CID are + reserved for a nonce that, if used only once, will result in unique + cipher text for each Connection ID. + + If servers simply increment the nonce by one with each generated + connection ID, then it is safe to use the existing keys until any + server's nonce counter exhausts the allocated space and rolls over to + zero. Whether or not it implements this method, the server MUST NOT + reuse a nonce until it switches to a configuration with new keys. + + Configuration agents SHOULD implement an out-of-band method to + discover when servers are in danger of exhausting their nonce space, + and SHOULD respond by issuing a new configuration. A server that has + exhausted its nonces MUST either switch to a different configuration, + or if none exists, use the 4-tuple routing config rotation codepoint. + +11.7. Shared-State Retry Keys + + The Shared-State Retry Service defined in Section 7.3 describes the + format of retry tokens or new tokens protected and encrypted using + AES128-GCM. Each token includes a 96 bit randomly generated unique + token number, and an 8 bit identifier of the AES-GCM encryption key. + There are three important security considerations for these tokens: + + * An attacker that obtains a copy of the encryption key will be able + to decrypt and forge tokens. + + * Attackers may be able to retrieve the key if they capture a + sufficently large number of retry tokens encrypted with a given + key. + + + + + +Duke & Banks Expires 6 November 2021 [Page 33] + +Internet-Draft QUIC-LB May 2021 + + + * Confidentiality of the token data will fail if separate tokens + reuse the same 96 bit unique token number and the same key. + + To protect against disclosure of keys to attackers, service and + servers MUST ensure that the keys are stored securely. To limit the + consequences of potential exposures, the time to live of any given + key should be limited. + + Section 6.6 of [QUIC-TLS] states that "Endpoints MUST count the + number of encrypted packets for each set of keys. If the total + number of encrypted packets with the same key exceeds the + confidentiality limit for the selected AEAD, the endpoint MUST stop + using those keys." It goes on with the specific limit: "For + AEAD_AES_128_GCM and AEAD_AES_256_GCM, the confidentiality limit is + 2^23 encrypted packets; see Appendix B.1." It is prudent to adopt + the same limit here, and configure the service in such a way that no + more than 2^23 tokens are generated with the same key. + + In order to protect against collisions, the 96 bit unique token + numbers should be generated using a cryptographically secure + pseudorandom number generator (CSPRNG), as specified in Appendix C.1 + of the TLS 1.3 specification [RFC8446]. With proper random numbers, + if fewer than 2^40 tokens are generated with a single key, the risk + of collisions is lower than 0.001%. + +12. IANA Considerations + + There are no IANA requirements. + +13. References + +13.1. Normative References + + [QUIC-INVARIANTS] + Thomson, M., "Version-Independent Properties of QUIC", + Work in Progress, Internet-Draft, draft-ietf-quic- + invariants-13, 14 January 2021, + . + + [QUIC-TRANSPORT] + Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed + and Secure Transport", Work in Progress, Internet-Draft, + draft-ietf-quic-transport-34, 14 January 2021, + . + + + + + +Duke & Banks Expires 6 November 2021 [Page 34] + +Internet-Draft QUIC-LB May 2021 + + + [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol + Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, + . + + [TIME_T] "Open Group Standard: Vol. 1: Base Definitions, Issue 7", + IEEE Std 1003.1 , 2018, + . + +13.2. Informative References + + [I-D.ietf-tls-esni] + Rescorla, E., Oku, K., Sullivan, N., and C. A. Wood, "TLS + Encrypted Client Hello", Work in Progress, Internet-Draft, + draft-ietf-tls-esni-10, 8 March 2021, + . + + [QUIC-TLS] Thomson, M. and S. Turner, "Using TLS to Secure QUIC", + Work in Progress, Internet-Draft, draft-ietf-quic-tls-34, + 14 January 2021, . + + [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate + Requirement Levels", BCP 14, RFC 2119, + DOI 10.17487/RFC2119, March 1997, + . + + [RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode + (GCM) in IPsec Encapsulating Security Payload (ESP)", + RFC 4106, DOI 10.17487/RFC4106, June 2005, + . + + [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for + the Network Configuration Protocol (NETCONF)", RFC 6020, + DOI 10.17487/RFC6020, October 2010, + . + + [RFC7696] Housley, R., "Guidelines for Cryptographic Algorithm + Agility and Selecting Mandatory-to-Implement Algorithms", + BCP 201, RFC 7696, DOI 10.17487/RFC7696, November 2015, + . + + [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", + BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, + . + + + + + +Duke & Banks Expires 6 November 2021 [Page 35] + +Internet-Draft QUIC-LB May 2021 + + + [RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS + (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, + . + +Appendix A. QUIC-LB YANG Model + + This YANG model conforms to [RFC6020] and expresses a complete QUIC- + LB configuration. + +module ietf-quic-lb { + yang-version "1.1"; + namespace "urn:ietf:params:xml:ns:yang:ietf-quic-lb"; + prefix "quic-lb"; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types."; + } + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types."; + } + + organization + "IETF QUIC Working Group"; + + contact + "WG Web: + WG List: + + Authors: Martin Duke (martin.h.duke at gmail dot com) + Nick Banks (nibanks at microsoft dot com)"; + + description + "This module enables the explicit cooperation of QUIC servers with + trusted intermediaries without breaking important protocol features. + + Copyright (c) 2021 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + + + +Duke & Banks Expires 6 November 2021 [Page 36] + +Internet-Draft QUIC-LB May 2021 + + + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX + (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself + for full legal notices. + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + 'MAY', and 'OPTIONAL' in this document are to be interpreted as + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, + they appear in all capitals, as shown here."; + + revision "2021-01-29" { + description + "Initial Version"; + reference + "RFC XXXX, QUIC-LB: Generating Routable QUIC Connection IDs"; + } + + container quic-lb { + presence "The container for QUIC-LB configuration."; + + description + "QUIC-LB container."; + + typedef quic-lb-key { + type yang:hex-string { + length 47; + } + description + "This is a 16-byte key, represented with 47 bytes"; + } + + list cid-configs { + key "config-rotation-bits"; + description + "List up to three load balancer configurations"; + + leaf config-rotation-bits { + type uint8 { + range "0..2"; + } + mandatory true; + description + "Identifier for this CID configuration."; + } + + leaf first-octet-encodes-cid-length { + + + +Duke & Banks Expires 6 November 2021 [Page 37] + +Internet-Draft QUIC-LB May 2021 + + + type boolean; + default false; + description + "If true, the six least significant bits of the first CID + octet encode the CID length minus one."; + } + + leaf cid-key { + type quic-lb-key; + description + "Key for encrypting the connection ID. If absent, the + configuration uses the Plaintext algorithm."; + } + + leaf nonce-length { + type uint8 { + range "8..16"; + } + must '(../cid-key)' { + error-message "nonce-length only valid if cid-key is set"; + } + description + "Length, in octets, of the nonce. If absent when cid-key is + present, the configuration uses the Block Cipher Algorithm. + If present along with cid-key, the configurationuses the + Stream Cipher Algorithm."; + } + + leaf lb-timeout { + type uint32; + description + "Existence means the configuration uses dynamic Server ID allocation. + Time (in seconds) to keep a server ID allocation if no packets with + that server ID arrive."; + } + + leaf server-id-length { + type uint8 { + range "1..18"; + } + must '(../lb-timeout and . <= 7) or + (not(../lb-timeout) and + (not(../cid-key) and . <= 16) or + ((../nonce-length) and . <= (19 - ../nonce-length)) or + ((../cid-key) and not(../nonce-length) and . <= 12))' { + error-message + "Server ID length too long for routing algorithm and server ID + allocation method"; + + + +Duke & Banks Expires 6 November 2021 [Page 38] + +Internet-Draft QUIC-LB May 2021 + + + } + mandatory true; + description + "Length (in octets) of a server ID. Further range-limited + by sid-allocation, cid-key, and nonce-length."; + } + + list server-id-mappings { + when "not(../lb-timeout)"; + key "server-id"; + description "Statically allocated Server IDs"; + + leaf server-id { + type yang:hex-string; + must "string-length(.) = 3 * ../../server-id-length - 1"; + mandatory true; + description + "An allocated server ID"; + } + + leaf server-address { + type inet:ip-address; + mandatory true; + description + "Destination address corresponding to the server ID"; + } + } + } + + container retry-service-config { + description + "Configuration of Retry Service. If supported-versions is empty, there + is no retry service. If token-keys is empty, it uses the non-shared- + state service. If present, it uses shared-state tokens."; + + leaf-list supported-versions { + type uint32; + description + "QUIC versions that the retry service supports. If empty, there + is no retry service."; + } + + leaf unsupported-version-default { + type enumeration { + enum allow { + description "Unsupported versions admitted by default"; + } + enum deny { + + + +Duke & Banks Expires 6 November 2021 [Page 39] + +Internet-Draft QUIC-LB May 2021 + + + description "Unsupported versions denied by default"; + } + } + default allow; + description + "Are unsupported versions not in version-exceptions allowed + or denied?"; + } + + leaf-list version-exceptions { + type uint32; + description + "Exceptions to the default-deny or default-allow rule."; + } + + list token-keys { + key "key-sequence-number"; + description + "list of active keys, for key rotation purposes. Existence implies + shared-state format"; + + leaf key-sequence-number { + type uint8; + mandatory true; + description + "Identifies the key used to encrypt the token"; + } + + leaf token-key { + type quic-lb-key; + mandatory true; + description + "16-byte key to encrypt the token"; + } + + leaf token-iv { + type yang:hex-string { + length 23; + } + mandatory true; + description + "8-byte IV to encrypt the token, encoded in 23 bytes"; + } + } + } + } +} + + + + +Duke & Banks Expires 6 November 2021 [Page 40] + +Internet-Draft QUIC-LB May 2021 + + +A.1. Tree Diagram + + This summary of the YANG model uses the notation in [RFC8340]. + + module: ietf-quic-lb + +--rw quic-lb + +--rw cid-configs* + | [config-rotation-bits] + | +--rw config-rotation-bits uint8 + | +--rw first-octet-encodes-cid-length? boolean + | +--rw cid-key? yang:hex-string + | +--rw nonce-length? uint8 + | +--rw lb-timeout? uint32 + | +--rw server-id-length uint8 + | +--rw server-id-mappings*? + | | [server-id] + | | +--rw server-id yang:hex-string + | | +--rw server-address inet:ip-address + +--ro retry-service-config + | +--rw supported-versions* + | | +--rw version uint32 + | +--rw unsupported-version-default enumeration {allow deny} + | +--rw version-exceptions* + | | +--rw version uint32 + | +--rw token-keys*? + | | [key-sequence-number] + | | +--rw key-sequence-number uint8 + | | +--rw token-key yang:hex-string + | | +--rw token-iv yang:hex-string + +Appendix B. Load Balancer Test Vectors + + Each section of this draft includes multiple sets of load balancer + configuration, each of which has five examples of server ID and + server use bytes and how they are encoded in a CID. + + In some cases, there are no server use bytes. Note that, for + simplicity, the first octet bits used for neither config rotation nor + length self-encoding are random, rather than listed in the server use + field. Therefore, a server implementation using these parameters may + generate CIDs with a slightly different first octet. + + This section uses the following abbreviations: + + + + + + + + +Duke & Banks Expires 6 November 2021 [Page 41] + +Internet-Draft QUIC-LB May 2021 + + + cid Connection ID + cr_bits Config Rotation Bits + LB Load Balancer + sid Server ID + sid_len Server ID length + su Server Use Bytes + + All values except length_self_encoding and sid_len are expressed in + hexidecimal format. + +B.1. Plaintext Connection ID Algorithm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Duke & Banks Expires 6 November 2021 [Page 42] + +Internet-Draft QUIC-LB May 2021 + + + LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1 + + cid 01be sid be su + cid 0221b7 sid 21 su b7 + cid 03cadfd8 sid ca su dfd8 + cid 041e0c9328 sid 1e su 0c9328 + cid 050c8f6d9129 sid 0c su 8f6d9129 + + LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2 + + cid 02aab0 sid aab0 su + cid 3ac4b106 sid c4b1 su 06 + cid 08bd3cf4a0 sid bd3c su f4a0 + cid 3771d59502d6 sid 71d5 su 9502d6 + cid 1d57dee8b888f3 sid 57de su e8b888f3 + + LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3 + + cid 0336c976 sid 36c976 su + cid 04aa291806 sid aa2918 su 06 + cid 0586897bd8b6 sid 86897b su d8b6 + cid 063625bcae4de0 sid 3625bc su ae4de0 + cid 07966fb1f3cb535f sid 966fb1 su f3cb535f + + LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4 + + cid 185172fab8 sid 5172fab8 su + cid 2eb7ff2c9297 sid b7ff2c92 su 97 + cid 14f3eb3dd3edbe sid f3eb3dd3 su edbe + cid 3feb31cece744b74 sid eb31cece su 744b74 + cid 06b9f34c353ce23bb5 sid b9f34c35 su 3ce23bb5 + + LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5 + + cid 05bdcd8d0b1d sid bdcd8d0b1d su + cid 06aee673725a63 sid aee673725a su 63 + cid 07bbf338ddbf37f4 sid bbf338ddbf su 37f4 + cid 08fbbca64c26756840 sid fbbca64c26 su 756840 + cid 09e7737c495b93894e34 sid e7737c495b su 93894e34 + +B.2. Stream Cipher Connection ID Algorithm + + In each case below, the server is using a plain text nonce value of + zero. + + + + + + + +Duke & Banks Expires 6 November 2021 [Page 43] + +Internet-Draft QUIC-LB May 2021 + + +LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 12 sid_len 1 + key 4d9d0fd25a25e7f321ef464e13f9fa3d + +cid 0d69fe8ab8293680395ae256e89c sid c5 su +cid 0e420d74ed99b985e10f5073f43027 sid d5 su 27 +cid 0f380f440c6eefd3142ee776f6c16027 sid 10 su 6027 +cid 1020607efbe82049ddbf3a7c3d9d32604d sid 3c su 32604d +cid 11e132d12606a1bb0fa17e1caef00ec54c10 sid e3 su 0ec54c10 + +LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 2 + key 49e1cec7fd264b1f4af37413baf8ada9 + +cid 3d3a5e1126414271cc8dc2ec7c8c15 sid f7fe su +cid 007042539e7c5f139ac2adfbf54ba748 sid eaf4 su 48 +cid 2bc125dd2aed2aafacf59855d99e029217 sid e880 su 9217 +cid 3be6728dc082802d9862c6c8e4dda3d984d8 sid 62c6 su d984d8 +cid 1afe9c6259ad350fc7bad28e0aeb2e8d4d4742 sid 8502 su 8d4d4742 + +LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 14 sid_len 3 + key 2c70df0b399bd33a7335523dcdb884ad + +cid 11d62e8670565cd30b552edff6782ff5a740 sid d794bb su +cid 12c70e481f49363cabd9370d1fd5012c12bca5 sid 2cbd5d su a5 +cid 133b95dfd8ad93566782f8424df82458069fc9e9 sid d126cd su c9e9 +cid 13ac6ffcd635532ab60370306c7ee572d6b6e795 sid 539e42 su e795 +cid 1383ed07a9700777ff450bb39bb9c1981266805c sid 9094dd su 805c + +LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 4 + key 2297b8a95c776cf9c048b76d9dc27019 + +cid 32873890c3059ca62628089439c44c1f84 sid 7398d8ca su +cid 1ff7c7d7b9823954b178636c99a7dc93ac83 sid 9655f091 su 83 +cid 31044000a5ebb3bf2fa7629a17f2c78b077c17 sid 8b035fc6 su 7c17 +cid 1791bd28c66721e8fea0c6f34fd2d8e663a6ef70 sid 6672e0e2 su a6ef70 +cid 3df1d90ad5ccd5f8f475f040e90aeca09ec9839d sid b98b1fff su c9839d + +LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 8 sid_len 5 + key 484b2ed942d9f4765e45035da3340423 + +cid 0da995b7537db605bfd3a38881ae sid 391a7840dc su +cid 0ed8d02d55b91d06443540d1bf6e98 sid 10f7f7b284 su 98 +cid 0f3f74be6d46a84ccb1fd1ee92cdeaf2 sid 0606918fc0 su eaf2 +cid 1045626dbf20e03050837633cc5650f97c sid e505eea637 su 50f97c +cid 11bb9a17f691ab446a938427febbeb593eaa sid 99343a2a96 su eb593eaa + +B.3. Block Cipher Connection ID Algorithm + + + + + +Duke & Banks Expires 6 November 2021 [Page 44] + +Internet-Draft QUIC-LB May 2021 + + +LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1 + key 411592e4160268398386af84ea7505d4 + +cid 10564f7c0df399f6d93bdddb1a03886f25 sid 23 su 05231748a80884ed58007847eb9fd0 +cid 10d5c03f9dd765d73b3d8610b244f74d02 sid 15 su 76cd6b6f0d3f0b20fc8e633e3a05f3 +cid 108ca55228ab23b92845341344a2f956f2 sid 64 su 65c0ce170a9548717498b537cb8790 +cid 10e73f3d034aef2f6f501e3a7693d6270a sid 07 su f9ad10c84cc1e89a2492221d74e707 +cid 101a6ce13d48b14a77ecfd365595ad2582 sid 6c su 76ce4689b0745b956ef71c2608045d + +LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2 + key 92ce44aecd636aeeff78da691ef48f77 + +cid 20aa09bc65ed52b1ccd29feb7ef995d318 sid a52f su 99278b92a86694ff0ecd64bc2f73 +cid 30b8dbef657bd78a2f870e93f9485d5211 sid 6c49 su 7381c8657a388b4e9594297afe96 +cid 043a8137331eacd2e78383279b202b9a6d sid 4188 su 5ac4b0e0b95f4e7473b49ee2d0dd +cid 3ba71ea2bcf0ab95719ab59d3d7fde770d sid 8ccc su 08728807605db25f2ca88be08e0f +cid 37ef1956b4ec354f40dc68336a23d42b31 sid c89d su 5a3ccd1471caa0de221ad6c185c0 + +LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3 + key 5c49cb9265efe8ae7b1d3886948b0a34 + +cid 10efcffc161d232d113998a49b1dbc4aa0 sid 0690b3 su 958fc9f38fe61b83881b2c5780 +cid 10fc13bdbcb414ba90e391833400c19505 sid 031ac3 su 9a55e1e1904e780346fcc32c3c +cid 10d3cc1efaf5dc52c7a0f6da2746a8c714 sid 572d3a su ff2ec9712664e7174dc03ca3f8 +cid 107edf37f6788e33c0ec7758a485215f2b sid 562c25 su 02c5a5dcbea629c3840da5f567 +cid 10bc28da122582b7312e65aa096e9724fc sid 2fa4f0 su 8ae8c666bfc0fc364ebfd06b9a + +LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4 + key e787a3a491551fb2b4901a3fa15974f3 + +cid 26125351da12435615e3be6b16fad35560 sid 0cb227d3 su 65b40b1ab54e05bff55db046 +cid 14de05fc84e41b611dfbe99ed5b1c9d563 sid 6a0f23ad su d73bee2f3a7e72b3ffea52d9 +cid 1306052c3f973db87de6d7904914840ff1 sid ca21402d su 5829465f7418b56ee6ada431 +cid 1d202b5811af3e1dba9ea2950d27879a92 sid b14e1307 su 4902aba8b23a5f24616df3cf +cid 26538b78efc2d418539ad1de13ab73e477 sid a75e0148 su 0040323f1854e75aeb449b9f + +LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5 + key d5a6d7824336fbe0f25d28487cdda57c + +cid 10a2794871aadb20ddf274a95249e57fde sid 82d3b0b1a1 su 0935471478c2edb8120e60 +cid 108122fe80a6e546a285c475a3b8613ec9 sid fbcc902c9d su 59c47946882a9a93981c15 +cid 104d227ad9dd0fef4c8cb6eb75887b6ccc sid 2808e22642 su 2a7ef40e2c7e17ae40b3fb +cid 10b3f367d8627b36990a28d67f50b97846 sid 5e018f0197 su 2289cae06a566e5cb6cfa4 +cid 1024412bfe25f4547510204bdda6143814 sid 8a8dd3d036 su 4b12933a135e5eaaebc6fd + + + + + + + +Duke & Banks Expires 6 November 2021 [Page 45] + +Internet-Draft QUIC-LB May 2021 + + +Appendix C. Interoperability with DTLS over UDP + + Some environments may contain DTLS traffic as well as QUIC operating + over UDP, which may be hard to distinguish. + + In most cases, the packet parsing rules above will cause a QUIC-LB + load balancer to route DTLS traffic in an appropriate way. DTLS 1.3 + implementations that use the connection_id extension [?I-D.ietf-tls- + dtls-connection-id] might use the techniques in this document to + generate connection IDs and achieve robust routability for DTLS + associations if they meet a few additional requirements. This non- + normative appendix describes this interaction. + +C.1. DTLS 1.0 and 1.2 + + DTLS 1.0 [?RFC4347] and 1.2 [?RFC6347] use packet formats that a + QUIC-LB router will interpret as short header packets with CIDs that + request 4-tuple routing. As such, they will route such packets + consistently as long as the 4-tuple does not change. Note that DTLS + 1.0 has been deprecated by the IETF. + + The first octet of every DTLS 1.0 or 1.2 datagram contains the + content type. A QUIC-LB load balancer will interpret any content + type less than 128 as a short header packet, meaning that the + subsequent octets should contain a connection ID. + + Existing TLS content types comfortably fit in the range below 128. + Assignment of codepoints greater than 64 would require coordination + in accordance with [?RFC7983], and anyway would likely create + problems demultiplexing DTLS and version 1 of QUIC. Therefore, this + document believes it is extremely unlikely that TLS content types of + 128 or greater will be assigned. Nevertheless, such an assignment + would cause a QUIC-LB load balancer to interpret the packet as a QUIC + long header with an essentially random connection ID, which is likely + to be routed irregularly. + + The second octet of every DTLS 1.0 or 1.2 datagram is the bitwise + complement of the DTLS Major version (i.e. version 1.x = 0xfe). A + QUIC-LB load balancer will interpret this as a connection ID that + requires 4-tuple based load balancing, meaning that the routing will + be consistent as long as the 4-tuple remains the same. + + [?I-D.ietf-tls-dtls-connection-id] defines an extension to add + connection IDs to DTLS 1.2. Unfortunately, a QUIC-LB load balancer + will not correctly parse the connection ID and will continue 4-tuple + routing. An modified QUIC-LB load balancer that correctly identifies + DTLS and parses a DTLS 1.2 datagram for the connection ID is outside + the scope of this document. + + + +Duke & Banks Expires 6 November 2021 [Page 46] + +Internet-Draft QUIC-LB May 2021 + + +C.2. DTLS 1.3 + + DTLS 1.3 [?I-D.draft-ietf-tls-dtls13] changes the structure of + datagram headers in relevant ways. + + Handshake packets continue to have a TLS content type in the first + octet and 0xfe in the second octet, so they will be 4-tuple routed, + which should not present problems for likely NAT rebinding or address + change events. + + Non-handshake packets always have zero in their most significant bit + and will therefore always be treated as QUIC short headers. If the + connection ID is present, it follows in the succeeding octets. + Therefore, a DTLS 1.3 association where the server utilizes + Connection IDs and the encodings in this document will be routed + correctly in the presence of client address and port changes. + + However, if the client does not include the connection_id extension + in its ClientHello, the server is unable to use connection IDs. In + this case, non- handshake packets will appear to contain random + connection IDs and be routed randomly. Thus, unmodified QUIC-LB load + balancers will not work with DTLS 1.3 if the client does not + advertise support for connection IDs, or the server does not request + the use of a compliant connection ID. + + A QUIC-LB load balancer might be modified to identify DTLS 1.3 + packets and correctly parse the fields to identify when there is no + connection ID and revert to 4-tuple routing, removing the server + requirement above. However, such a modification is outside the scope + of this document, and classifying some packets as DTLS might be + incompatible with future versions of QUIC. + +C.3. Future Versions of DTLS + + As DTLS does not have an IETF consensus document that defines what + parts of DTLS will be invariant in future versions, it is difficult + to speculate about the applicability of this section to future + versions of DTLS. + +Appendix D. Acknowledgments + + The authors would like to thank Christian Huitema and Ian Swett for + their major design contributions. + + Manasi Deval, Erik Fuller, Toma Gavrichenkov, Jana Iyengar, Subodh + Iyengar, Ladislav Lhotka, Jan Lindblad, Ling Tao Nju, Kazuho Oku, + Udip Pant, Martin Thomson, Dmitri Tikhonov, Victor Vasiliev, and + William Zeng Ke all provided useful input to this document. + + + +Duke & Banks Expires 6 November 2021 [Page 47] + +Internet-Draft QUIC-LB May 2021 + + +Appendix E. Change Log + + *RFC Editor's Note:* Please remove this section prior to + publication of a final version of this document. + +E.1. since draft-ietf-quic-load-balancers-06 + + * Added interoperability with DTLS + + * Changed "non-compliant" to "unroutable" + + * Changed "arbitrary" algorithm to "fallback" + + * Revised security considerations for mistrustful tenants + +E.2. since draft-ietf-quic-load-balancers-05 + + * Added low-config CID for further discussion + + * Complete revision of shared-state Retry Token + + * Added YANG model + + * Updated configuration limits to ensure CID entropy + + * Switched to notation from quic-transport + +E.3. since draft-ietf-quic-load-balancers-04 + + * Rearranged the shared-state retry token to simplify token + processing + + * More compact timestamp in shared-state retry token + + * Revised server requirements for shared-state retries + + * Eliminated zero padding from the test vectors + + * Added server use bytes to the test vectors + + * Additional compliant DCID criteria + +E.4. since-draft-ietf-quic-load-balancers-03 + + * Improved Config Rotation text + + * Added stream cipher test vectors + + + + +Duke & Banks Expires 6 November 2021 [Page 48] + +Internet-Draft QUIC-LB May 2021 + + + * Deleted the Obfuscated CID algorithm + +E.5. since-draft-ietf-quic-load-balancers-02 + + * Replaced stream cipher algorithm with three-pass version + + * Updated Retry format to encode info for required TPs + + * Added discussion of version invariance + + * Cleaned up text about config rotation + + * Added Reset Oracle and limited configuration considerations + + * Allow dropped long-header packets for known QUIC versions + +E.6. since-draft-ietf-quic-load-balancers-01 + + * Test vectors for load balancer decoding + + * Deleted remnants of in-band protocol + + * Light edit of Retry Services section + + * Discussed load balancer chains + +E.7. since-draft-ietf-quic-load-balancers-00 + + * Removed in-band protocol from the document + +E.8. Since draft-duke-quic-load-balancers-06 + + * Switch to IETF WG draft. + +E.9. Since draft-duke-quic-load-balancers-05 + + * Editorial changes + + * Made load balancer behavior independent of QUIC version + + * Got rid of token in stream cipher encoding, because server might + not have it + + * Defined "non-compliant DCID" and specified rules for handling + them. + + * Added psuedocode for config schema + + + + +Duke & Banks Expires 6 November 2021 [Page 49] + +Internet-Draft QUIC-LB May 2021 + + +E.10. Since draft-duke-quic-load-balancers-04 + + * Added standard for retry services + +E.11. Since draft-duke-quic-load-balancers-03 + + * Renamed Plaintext CID algorithm as Obfuscated CID + + * Added new Plaintext CID algorithm + + * Updated to allow 20B CIDs + + * Added self-encoding of CID length + +E.12. Since draft-duke-quic-load-balancers-02 + + * Added Config Rotation + + * Added failover mode + + * Tweaks to existing CID algorithms + + * Added Block Cipher CID algorithm + + * Reformatted QUIC-LB packets + +E.13. Since draft-duke-quic-load-balancers-01 + + * Complete rewrite + + * Supports multiple security levels + + * Lightweight messages + +E.14. Since draft-duke-quic-load-balancers-00 + + * Converted to markdown + + * Added variable length connection IDs + +Authors' Addresses + + Martin Duke + F5 Networks, Inc. + + Email: martin.h.duke@gmail.com + + + + + +Duke & Banks Expires 6 November 2021 [Page 50] + +Internet-Draft QUIC-LB May 2021 + + + Nick Banks + Microsoft + + Email: nibanks@microsoft.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Duke & Banks Expires 6 November 2021 [Page 51] diff --git a/dtls/index.html b/dtls/index.html new file mode 100644 index 0000000..d3401f9 --- /dev/null +++ b/dtls/index.html @@ -0,0 +1,57 @@ + + + + quicwg/load-balancers dtls preview + + + + +

Editor's drafts for dtls branch of quicwg/load-balancers

+

View saved issues, + or the latest GitHub issues + and pull requests.

+ + + + + + + + +
draft-ietf-quic-load-balancershtmlplain textdiff with master + diff with last submission
+ + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..30fc936 --- /dev/null +++ b/index.html @@ -0,0 +1,95 @@ + + + + quicwg/load-balancers master preview + + + + +

Editor's drafts for master branch of quicwg/load-balancers

+

View saved issues, + or the latest GitHub issues + and pull requests.

+ + + + + + + +
draft-ietf-quic-load-balancershtmlplain text + diff with last submission
+

Preview for branch dtls

+ + + + + + + + +
draft-ietf-quic-load-balancershtmlplain textdiff with master + diff with last submission
+

Preview for branch shared-ip

+ + + + + + + + +
draft-ietf-quic-load-balancershtmlplain textdiff with master + diff with last submission
+

Preview for branch smaller-tables

+ + + + + + + + +
draft-ietf-quic-load-balancershtmlplain textdiff with master + diff with last submission
+ + + diff --git a/issues.html b/issues.html new file mode 100644 index 0000000..7afaf98 --- /dev/null +++ b/issues.html @@ -0,0 +1,103 @@ + + + + + Issue Viewer + + + + +
+ + + records +
+
+ + + + + + + + + + + + + +
IDTitleStateAuthorAssigneeLabels
+
+
+
+

This page shows GitHub issues in a simple form.

+

The filter box above accepts a set of filters, each separated by space.

+
    +
+

You can /sort on id, recent, or closed.

+

Pressing enter saves the current search. + Pressing esc leaves the text input area.

+

Outside the search box

+

Clicking an issue title displays details for the issue including comments. + Pressing n or j moves to the next issue, + and p or k move to the previous one.

+

Pressing esc closes the issue view, ' focuses search, and + c clears the search.

+
+
+ + diff --git a/issues.js b/issues.js new file mode 100644 index 0000000..3118653 --- /dev/null +++ b/issues.js @@ -0,0 +1,1048 @@ +function setStatus(msg) { + let status = document.getElementById('status'); + status.innerText = msg; +} + +function date(s) { + const d = Date.parse(s); + if (isNaN(d)) { + return 0; + } + return d; +} + +function stateString(issue) { + let str; + if (issue.pr) { + switch (issue.state) { + case 'MERGED': + str = 'merged'; + break; + case 'CLOSED': + str = 'discarded'; + break; + default: + str = 'pr'; + break; + } + } else { + str = issue.state.toLowerCase(); + } + return str; +} + +function stateOrder(issue) { + return ['open', 'pr', 'closed', 'merged', 'discarded'].indexOf(stateString(issue)); +} + +var sortKey = 'id'; +var sortInvert = false; +function invert(x) { + return x * (sortInvert ? -1 : 1); +} +function sort(k) { + sortInvert = (k === sortKey) ? !sortInvert : false; + k = k || sortKey; + let message = k; + switch (k) { + case 'id': + subset.sort((x, y) => invert(x.number - y.number)); + message = 'ID'; + break; + case 'recent': + subset.sort((x, y) => invert(date(y.updatedAt) - date(x.updatedAt))); + message = 'last modified'; + break; + case 'closed': + subset.sort((x, y) => invert(date(y.closedAt) - date(x.closedAt))); + message = 'time of closure'; + break; + case 'title': + subset.sort((x, y) => invert(x.title.localeCompare(y.title))); + break; + case 'state': + subset.sort((x, y) => invert(stateOrder(x) - stateOrder(y))); + break; + case 'author': + subset.sort((x, y) => invert(x.author.localeCompare(y.author))); + break; + default: + setStatus('no idea how to sort like that'); + return; + } + setStatus(`sorted by ${message}${(sortInvert) ? ' (reversed)' : ''}`); + sortKey = k; + list(subset); +} + +function sortSetup() { + ['id', 'title', 'state', 'author'].forEach(k => { + let el = document.getElementById(`sort-${k}`); + el.addEventListener('click', _ => sort(k)); + el.style.cursor = 'pointer'; + el.title = `Sort by ${el.innerText}`; + }); +} + +var db; +async function get() { + db = null; + const response = await fetch('archive.json'); + if (Math.floor(response.status / 100) !== 2) { + throw new Error(`Error loading <${url}>: ${response.status}`); + } + db = await response.json(); + db.pulls.forEach(pr => pr.pr = true); + subset = db.all = db.issues.concat(db.pulls); + db.labels = db.labels.reduce((all, l) => { + all[l.name] = l; + return all; + }, {}); + sort(); + document.title = `${db.repo} Issues`; + console.log(`Loaded ${db.all.length} issues for ${db.repo}.`); + console.log('Raw data for issues can be found in:'); + console.log(' db.all = all issues and pull requests'); + console.log(' subset = just the subset of issues that are shown'); + console.log('format(subset[, formatter]) to dump the current subset to the console'); +} + +var issueFilters = { + assigned: { + args: ['string'], + h: 'assigned to this user', + f: login => issue => { + if (login === '') { + return issue.assignees.length > 0; + } else { + return issue.assignees.some(assignee => assignee === login); + } + }, + }, + + author: { + args: ['string'], + h: 'created by this user', + f: login => issue => issue.author === login, + }, + + commenter: { + args: ['string'], + h: 'commented on by this user', + f: login => issue => { + return issue.author === login || + issue.comments.some(comment => comment.author === login) || + (issue.reviews || []).some(review => review.author === login); + }, + }, + + reviewer: { + args: ['string'], + h: 'reviewed by this user', + f: login => issue => { + return issue.reviews && + issue.reviews.some(review => review.author === login); + }, + }, + + user: { + args: ['string'], + h: 'mentions this user', + f: login => issue => { + return issue.author === login || + issue.assignees.some(assignee => assignee === login) || + issue.comments.some(comment => comment.author === login) || + (issue.reviews || []).some(review => review.author === login); + }, + }, + + closed: { + args: [], + h: 'is closed', + f: issue => issue.state === 'CLOSED', + }, + + open: { + args: [], + h: 'is open', + f: issue => issue.state === 'OPEN', + }, + + merged: { + args: [], + h: 'a merged pull request', + f: issue => issue.state == 'MERGED', + }, + + discarded: { + args: [], + h: 'a discarded pull request', + f: issue => issue.pr && issue.state === 'CLOSED' + }, + + n: { + args: ['integer'], + h: 'issue by number', + f: i => issue => issue.number === i, + }, + + label: { + args: ['string'], + h: 'has a specific label', + f: name => issue => issue.labels.some(label => label === name), + }, + + labelled: { + args: [], + h: 'has any label', + f: issue => issue.labels.length > 0, + }, + + title: { + args: ['string'], + h: 'search title with a regular expression', + f: function(re) { + re = new RegExp(re); + return issue => issue.title.match(re); + } + }, + + body: { + args: ['string'], + h: 'search body with a regular expression', + f: function(re) { + re = new RegExp(re); + return issue => issue.body.match(re); + } + }, + + text: { + args: ['string'], + h: 'search title and body with a regular expression', + f: function(re) { + re = new RegExp(re); + return issue => issue.title.match(re) || issue.body.match(re); + } + }, + + pr: { + args: [], + h: 'is a pull request', + f: issue => issue.pr, + }, + + issue: { + args: [], + h: 'is a plain issue, i.e., not(pr)', + f: function(issue) { + return !issue.pr; + } + }, + + or: { + args: ['filter', '...filter'], + h: 'union', + f: (...filters) => x => filters.some(filter => filter(x)), + }, + + and: { + args: ['filter', '...filter'], + h: 'intersection', + f: (...filters) => x => filters.every(filter => filter(x)), + }, + + + xor: { + args: ['filter', '...filter'], + h: 'for the insane', + f: (...filters) => + x => filters.slice(1).reduce((a, filter) => a ^ filter(x), filters[0](x)), + }, + + not: { + args: ['filter'], + h: 'exclusion', + f: a => issue => !a(issue), + }, + + closed_since: { + args: ['date'], + h: 'issues closed since the date and time', + f: since => issue => date(issue.closedAt) >= since, + }, + + updated_since: { + args: ['date'], + h: 'issues updated since the date and time', + f: since => issue => date(issue.updatedAt) >= since, + } +}; + +class Parser { + constructor(s) { + this.str = s; + this.skipws(); + } + + skipws() { + this.str = this.str.trimLeft(); + } + + jump(idx) { + this.str = this.str.slice(idx); + this.skipws(); + } + + get next() { + return this.str.charAt(0); + } + + parseName() { + let m = this.str.match(/^[a-zA-Z](?:[a-zA-Z0-9_-]*[a-zA-Z0-9])?/); + if (!m) { + return; + } + + this.jump(m[0].length); + return m[0]; + } + + parseSeparator(separator) { + if (this.next !== separator) { + throw new Error(`Expecting separator ${separator}`); + } + this.jump(1); + } + + parseString() { + let end = -1; + for (let i = 0; i < this.str.length; ++i) { + let v = this.str.charAt(i); + if (v === ')' || v === ',') { + end = i; + break; + } + } + if (end < 0) { + throw new Error(`Unterminated string`); + } + let s = this.str.slice(0, end).trim(); + this.jump(end); + return s; + } + + parseDate() { + let str = this.parseString(); + let time = Date.parse(str); + if (isNaN(time)) { + throw new Error(`not a valid date: ${str}`); + } + return time; + } + + parseNumber() { + let m = this.str.match(/^\d+/); + if (!m) { + return; + } + this.jump(m[0].length); + return parseInt(m[0], 10); + } + + parseFilter() { + if (this.next === '-') { + this.parseSeparator('-'); + return issueFilters.not.f.call(null, this.parseFilter()); + } + let name = this.parseName(); + if (!name) { + let n = this.parseNumber(); + if (!isNaN(n)) { + return issueFilters.n.f.call(null, n); + } + return; + } + let f = issueFilters[name]; + if (!f) { + throw new Error(`Unknown filter: ${name}`); + } + if (f.args.length === 0) { + return f.f; + } + let args = []; + for (let i = 0; i < f.args.length; ++i) { + let arg = f.args[i]; + let ellipsis = arg.slice(0, 3) === '...'; + if (ellipsis) { + arg = arg.slice(3); + } + + this.parseSeparator((i === 0) ? '(' : ','); + if (arg === 'string') { + args.push(this.parseString()); + } else if (arg === 'date') { + args.push(this.parseDate()); + } else if (arg === 'integer') { + args.push(this.parseNumber()); + } else if (arg === 'filter') { + args.push(this.parseFilter()); + } else { + throw new Error(`Error in filter ${name} definition`); + } + if (ellipsis && this.next === ',') { + --i; + } + } + this.parseSeparator(')'); + return f.f.apply(null, args); + } +} + +var subset = []; +function filterIssues(str) { + subset = db.all; + let parser = new Parser(str); + let f = parser.parseFilter(); + while (f) { + subset = subset.filter(f); + f = parser.parseFilter(); + } +} + +var formatter = { + brief: x => `* ${x.title} (#${x.number})`, + md: x => `* [#${x.number}](${x.url}): ${x.title}`, +}; + +function format(set, f) { + return (set || subset).map(f || formatter.brief).join('\n'); +} + +var debounces = {}; +var debounceSlowdown = 100; +function measureSlowdown() { + let start = Date.now(); + window.setTimeout(_ => { + let diff = Date.now() - start; + if (diff > debounceSlowdown) { + console.log(`slowed to ${diff} ms`); + debounceSlowdown = Math.min(1000, diff + debounceSlowdown / 2); + } + }, 0); +} +function debounce(f) { + let r = now => { + measureSlowdown(); + f(now); + }; + return e => { + if (debounces[f.name]) { + window.clearTimeout(debounces[f.name]); + delete debounces[f.name]; + } + if (e.key === 'Enter') { + r(true); + } else { + debounces[f.name] = window.setTimeout(_ => { + delete debounces[f.name]; + r(false) + }, 10 + debounceSlowdown); + } + } +} + +function cell(row, children, cellClass) { + let td = document.createElement('td'); + if (cellClass) { + td.className = cellClass; + } + if (Array.isArray(children)) { + children.forEach(c => { + td.appendChild(c); + td.appendChild(document.createTextNode(' ')); + }); + } else { + td.appendChild(children); + } + row.appendChild(td); +} + + +function loadAvatars(elements) { + elements.forEach(e => { + let avatar = new Image(16, 16); + avatar.addEventListener('load', _ => e.target.replaceWith(avatar)); + let user = e.target.dataset.user; + avatar.src = `https://github.com/${user}.png?size=16`; + }); +} +var intersection = new IntersectionObserver(loadAvatars, { rootMargin: '50px 0px 100px 0px' }); + +function author(x, click, userSearch) { + let user = x.author || x; + let sp = document.createElement('span'); + sp.classList.add('item', 'user'); + let ai = document.createElement('a'); + ai.href = `https://github.com/${user}`; + ai.className = 'avatar'; + let placeholder = document.createElement('span'); + placeholder.className = 'swatch'; + placeholder.innerText = '\uD83E\uDDD0'; + placeholder.dataset.user = user; + intersection.observe(placeholder); + ai.appendChild(placeholder); + sp.appendChild(ai); + + let au = document.createElement('a'); + au.href = `#${userSearch || 'user'}(${user})`; + au.innerText = user; + au.addEventListener('click', click); + sp.appendChild(au); + return sp; +} + +function issueState(issue, click) { + let st = document.createElement('span'); + st.classList.add('item', 'state'); + let a = document.createElement('a'); + a.innerText = stateString(issue); + a.href = `#${stateString(issue)}`; + if (click) { + a.addEventListener('click', click); + } + st.appendChild(a); + return st; +} + +function showBody(item) { + let div = document.createElement('div'); + div.className = 'body'; + let body = item.body.trim().replace(/\r\n?/g, '\n'); + + let list = null; + let el = null; + let pre = null; + function closeElement() { + if (el) { + if (list) { + list.appendChild(el); + } else { + div.appendChild(el); + } + } + el = null; + pre = null; + } + function closeBoth() { + closeElement(); + if (list) { + div.appendChild(list); + list = null; + } + } + function addText(t) { + if (pre) { + el.appendChild(document.createTextNode(t + '\n')); + return; + } + if (el.innerText !== '') { + el.appendChild(document.createElement('br')); + } + if (t !== '') { + el.appendChild(document.createTextNode(t)); + } + } + + body.split('\n').forEach(t => { + if (t.charAt(0) === ' ') { + t = t.substring(1); // This fixes lots of problems. + } + if (t.indexOf('```') === 0) { + let needNew = !el || !pre; + closeBoth(); + if (needNew) { + el = document.createElement('pre'); + pre = 'q'; + let language = t.substring(3).trim(); + if (language) { + el.dataset.language = language; + } + } + } else if (pre === 'q') { + addText(t); + } else if (!el && t.indexOf(' ') === 0) { + if (!pre) { + closeBoth(); + el = document.createElement('pre'); + pre = 's'; + } + addText(t.substring(3)); + } else if (t.trim() === '') { + closeElement(); + } else if (t.indexOf('# ') === 0) { + closeBoth(); + el = document.createElement('h2'); + addText(t.substring(2).trimLeft()); + closeElement(); + } else if (t.indexOf('## ') === 0) { + closeBoth(); + el = document.createElement('h3'); + addText(t.substring(3).trimLeft()); + closeElement(); + } else if (t.indexOf('### ') === 0) { + closeBoth(); + el = document.createElement('h4'); + addText(t.substring(4).trimLeft()); + closeElement(); + } else if (t.charAt(0) === '>') { + if (!el || el.tagName !== 'BLOCKQUOTE') { + closeElement(); + el = document.createElement('blockquote'); + } + addText(t.substring(1).trimLeft()); + } else if (t.indexOf('* ') === 0 || t.indexOf('- ') === 0) { + if (list && list.tagName !== 'UL') { + closeBoth(); + } else { + closeElement(); + } + if (!list) { + list = document.createElement('ul'); + } + el = document.createElement('li'); + addText(t.substring(2).trimLeft()); + } else if (t.match(/^(?:\(?\d+\)|\d+\.)/)) { + if (list && list.tagName !== 'OL') { + closeBoth(); + } else { + closeElement(); + } + if (!list) { + list = document.createElement('ol'); + } + el = document.createElement('li'); + let sep = t.match(/^(?:\(?\d+\)|\d+\.)/)[0].length; + addText(t.substring(sep).trimLeft()); + } else { + if (list && !el) { + div.appendChild(list); + list = null; + } + if (!el) { + el = document.createElement('p'); + } + addText(t); + } + }); + closeBoth(); + return div; +} + +function showDate(d, reference) { + let de = document.createElement('span'); + de.classList.add('item', 'date'); + const full = d.toISOString(); + const parts = full.split(/[TZ\.]/); + if (reference && parts[0] === reference.toISOString().split('T')[0]) { + de.innerText = parts[1]; + } else { + de.innerText = parts[0] + ' ' + parts[1]; + } + de.title = full; + return de; +} + +function narrow(e, extra) { + e.preventDefault(); + hideIssue(); + let cmd = document.getElementById('cmd'); + let v = `${cmd.value} ${extra}`; + cmd.value = v.trim(); + redraw(true); +} + +function narrowLabel(e) { + narrow(e, `label(${e.target.innerText})`); +} + +function narrowState(e) { + narrow(e, e.target.innerText); +} + +function narrowUser(userType) { + return function narrowUserInner(e) { + narrow(e, `${userType}(${e.target.innerText})`); + }; +} + +function showLabels(labels, click) { + return labels.map(label => { + let item = document.createElement('span'); + item.className = 'item'; + let sp = document.createElement('span'); + sp.className = 'swatch'; + item.appendChild(sp); + let a = document.createElement('a'); + a.innerText = label; + a.href = `#label(${label})`; + if (click) { + a.addEventListener('click', click); + } + if (db.labels.hasOwnProperty(label)) { + sp.style.backgroundColor = '#' + db.labels[label].color; + if (db.labels[label].description) { + item.title = db.labels[label].description; + } + } + item.appendChild(a); + return item; + }); +} + +// Make a fresh replacement element for the identified element. +function freshReplacement(id) { + let e = document.getElementById(id); + let r = document.createElement(e.tagName); + r.id = id; + e.replaceWith(r); + return r; +} + +var displayed = null; + +function show(index) { + if (index < 0 || index >= subset.length) { + hideIssue(); + return; + } + displayed = index; + const issue = subset[index]; + + document.getElementById('overlay').classList.add('active'); + let frame = freshReplacement('issue'); + frame.classList.add('active'); + + function showTitle() { + let title = document.createElement('h2'); + title.className = 'title'; + let number = document.createElement('a'); + number.className = 'number'; + number.href = issue.url; + number.innerText = `#${issue.number}`; + title.appendChild(number); + title.appendChild(document.createTextNode(': ')); + let name = document.createElement('a'); + name.href = issue.url; + name.innerText = issue.title; + title.appendChild(name); + return title; + } + + function showIssueLabels() { + let meta = document.createElement('div'); + meta.className = 'meta'; + showLabels(issue.labels, hideIssue).forEach(el => { + meta.appendChild(el); + meta.appendChild(document.createTextNode(' ')); + }); + return meta; + } + + function showIssueUsers() { + let meta = document.createElement('div'); + meta.className = 'meta'; + meta.appendChild(author(issue, hideIssue, 'author')); + if (issue.assignees && issue.assignees.length > 0) { + let arrow = document.createElement('span'); + arrow.innerText = ' \u279c'; + arrow.title = 'Assigned to'; + meta.appendChild(arrow); + issue.assignees.map(u => author(u, hideIssue, 'assigned')).forEach(el => { + meta.appendChild(document.createTextNode(' ')); + meta.appendChild(el); + }); + } + return meta; + } + + function showIssueDates() { + let meta = document.createElement('div'); + meta.className = 'meta'; + let created = new Date(issue.createdAt); + meta.appendChild(showDate(created)); + meta.appendChild(issueState(issue, hideIssue)); + if (issue.closedAt) { + meta.appendChild(showDate(new Date(issue.closedAt), created)); + } + return meta; + } + + let refdate = null; + function showComment(c) { + let row = document.createElement('tr'); + let cdate = new Date(c.createdAt); + cell(row, showDate(cdate, refdate), 'date'); + refdate = cdate; + cell(row, author(c, hideIssue, (c.commit) ? 'reviewer' : 'commenter'), 'user'); + + if (issue.pr) { + let icon = document.createElement('span'); + switch (c.state) { + case 'APPROVED': + icon.innerText = '\u2714'; + icon.title = 'Approved'; + break; + case 'CHANGES_REQUESTED': + icon.innerText = '\u2718'; + icon.title = 'Changes Requested'; + break; + default: + icon.innerText = '\uD83D\uDCAC'; + icon.title = 'Comment'; + break; + } + cell(row, icon); + } + + let body = showBody(c); + if (c.comments && c.comments.length > 0) { + let codeComments = document.createElement('div'); + codeComments.className = 'item'; + const s = (c.comments.length === 1) ? '' : 's'; + codeComments.innerText = `... ${c.comments.length} comment${s} on changes`; + body.appendChild(codeComments); + } + cell(row, body); + return row; + } + + frame.appendChild(showTitle()); + frame.appendChild(showIssueLabels()); + frame.appendChild(showIssueUsers()); + frame.appendChild(showIssueDates()); + frame.appendChild(showBody(issue)); + + let allcomments = (issue.comments || []).concat(issue.reviews || []); + allcomments.sort((a, b) => date(a.createdAt) - date(b.createdAt)); + let comments = document.createElement('table'); + comments.className = 'comments'; + allcomments.map(showComment).forEach(row => comments.appendChild(row)); + frame.appendChild(comments); + + frame.scroll(0, 0); +} + +function hideIssue() { + document.getElementById('help').classList.remove('active'); + document.getElementById('issue').classList.remove('active'); + document.getElementById('overlay').classList.remove('active'); + displayed = null; +} + +function step(n) { + if (displayed === null) { + if (n > 0) { + show(n - 1); + } else { + show(subset.length + n); + } + } else { + show(displayed + n); + } +} + +function makeRow(issue, index) { + function cellID() { + let a = document.createElement('a'); + a.innerText = issue.number; + a.href = issue.url; + a.onclick = e => { + e.preventDefault(); + show(index); + }; + return a; + } + + function cellTitle() { + let a = document.createElement('a'); + a.innerText = issue.title; + a.href = issue.url; + a.onclick = e => { + e.preventDefault(); + show(index); + }; + return a; + } + + let tr = document.createElement('tr'); + cell(tr, cellID(), 'id'); + cell(tr, cellTitle(), 'title'); + cell(tr, issueState(issue, narrowState), 'state'); + cell(tr, author(issue, narrowUser('author'), 'author'), 'user'); + cell(tr, (issue.assignees || []) + .map(u => author(u, narrowUser('assigned'), 'assigned')), 'assignees'); + cell(tr, showLabels(issue.labels, narrowLabel), 'labels'); + return tr; +} + +function list(issues) { + if (!issues) { + return; + } + + let body = freshReplacement('issuelist'); + body.innerHTML = ''; + issues.forEach((issue, index) => { + body.appendChild(makeRow(issue, index)); + }); +} + +var currentFilter = ''; +function filter(str, now) { + try { + filterIssues(str); + setStatus(`${subset.length} records selected`); + if (now) { + window.location.hash = str; + currentFilter = str; + } + } catch (e) { + if (now) { // Only show errors when someone hits enter. + setStatus(`Error: ${e.message}`); + console.log(e); + } + } +} + +function showHelp() { + setStatus('help shown'); + let h = document.getElementById('help'); + h.classList.add('active'); + h.scroll(0, 0); + document.getElementById('overlay').classList.add('active'); +} + +function slashCmd(cmd) { + if (cmd[0] === 'help') { + document.getElementById('cmd').blur(); + showHelp(); + } else { + setStatus('unknown command: /' + cmd.join(' ')); + } +} + +function redraw(now) { + let cmd = document.getElementById('cmd'); + if (cmd.value.charAt(0) == '/') { + if (now) { + slashCmd(cmd.value.slice(1).split(' ').map(x => x.trim())); + cmd.value = currentFilter; + } + return; + } + + if (!db) { + if (now) { + showStatus('Still loading...'); + } + return; + } + + document.getElementById('help').classList.remove('active'); + filter(cmd.value, now); + list(subset); +} + +function generateHelp() { + let functionhelp = document.getElementById('functions'); + Object.keys(issueFilters).forEach(k => { + let li = document.createElement('li'); + let arglist = ''; + if (issueFilters[k].args.length > 0) { + arglist = '(' + issueFilters[k].args.map(x => '<' + x + '>').join(', ') + ')'; + } + let fn = document.createElement('tt'); + fn.innerText = k + arglist; + li.appendChild(fn); + let help = ''; + if (issueFilters[k].h) { + help = ' - ' + issueFilters[k].h; + } + li.appendChild(document.createTextNode(help)); + functionhelp.appendChild(li); + }); +} + +function addFileHelp() { + setStatus('error loading file'); + if (window.location.protocol !== 'file:') { + return; + } + let p = document.createElement('p'); + p.className = 'warning'; + p.innerHTML = 'Important: Browsers display files inconsistently.' + + ' You can work around this by running an HTTP server,' + + ' such as python3 -m http.server,' + + ' then view this file using that server.'; + document.getElementById('help').insertBefore(p, h.firstChild); +} + +function issueOverlaySetup() { + let overlay = document.getElementById('overlay'); + overlay.addEventListener('click', hideIssue); + window.addEventListener('keyup', e => { + if (e.target.id === 'cmd') { + if (e.key === 'Escape') { + e.preventDefault(); + e.target.blur(); + } + return; + } + if (e.key === 'Escape') { + e.preventDefault(); + hideIssue(); + } + }); + window.addEventListener('keypress', e => { + if (e.target.closest('input')) { + return; + } + if (e.key === 'p' || e.key === 'k') { + e.preventDefault(); + step(-1); + } else if (e.key === 'n' || e.key === 'j') { + e.preventDefault(); + step(1); + } else if (e.key === '?') { + e.preventDefault(); + showHelp(); + } else if (e.key === '\'') { + e.preventDefault(); + hideIssue(); + document.getElementById('cmd').focus(); + } else if (e.key === 'c') { + e.preventDefault(); + hideIssue(); + document.getElementById('cmd').value = ''; + redraw(true); + } + }) +} + +window.onload = () => { + let cmd = document.getElementById('cmd'); + let redrawHandler = debounce(redraw); + cmd.addEventListener('input', redrawHandler); + cmd.addEventListener('keypress', redrawHandler); + window.addEventListener('hashchange', e => { + cmd.value = decodeURIComponent(window.location.hash.substring(1)); + redrawHandler(e); + }); + if (window.location.hash) { + cmd.value = decodeURIComponent(window.location.hash.substring(1)); + } + sortSetup(); + generateHelp(); + issueOverlaySetup(); + get().then(redraw).catch(addFileHelp); +} diff --git a/shared-ip/draft-ietf-quic-load-balancers.html b/shared-ip/draft-ietf-quic-load-balancers.html new file mode 100644 index 0000000..9406a33 --- /dev/null +++ b/shared-ip/draft-ietf-quic-load-balancers.html @@ -0,0 +1,3483 @@ + + + + + + +QUIC-LB: Generating Routable QUIC Connection IDs + + + + + + + + + + + + + + + + + + + + + + + +
Internet-DraftQUIC-LBApril 2021
Duke & BanksExpires 4 October 2021[Page]
+
+
+
+
Workgroup:
+
QUIC
+
Internet-Draft:
+
draft-ietf-quic-load-balancers-07
+
Published:
+
+ +
+
Intended Status:
+
Standards Track
+
Expires:
+
+
Authors:
+
+
+
M. Duke
+
F5 Networks, Inc.
+
+
+
N. Banks
+
Microsoft
+
+
+
+
+

QUIC-LB: Generating Routable QUIC Connection IDs

+
+

Abstract

+

The QUIC protocol design is resistant to transparent packet inspection, +injection, and modification by intermediaries. However, the server can +explicitly cooperate with network services by agreeing to certain conventions +and/or sharing state with those services. This specification provides a +standardized means of solving three problems: (1) maintaining routability to +servers via a low-state load balancer even when the connection IDs in use +change; (2) explicit encoding of the connection ID length in all packets to +assist hardware accelerators; and (3) injection of QUIC Retry packets by an +anti-Denial-of-Service agent on behalf of the server.¶

+
+
+

+Note to Readers +

+

Discussion of this document takes place on the + QUIC Working Group mailing list (quic@ietf.org), + which is archived at https://mailarchive.ietf.org/arch/browse/quic/.¶

+

Source for this draft and an issue tracker can be found at + https://github.com/quicwg/load-balancers.¶

+
+
+
+

+Status of This Memo +

+

+ This Internet-Draft is submitted in full conformance with the + provisions of BCP 78 and BCP 79.¶

+

+ Internet-Drafts are working documents of the Internet Engineering Task + Force (IETF). Note that other groups may also distribute working + documents as Internet-Drafts. The list of current Internet-Drafts is + at https://datatracker.ietf.org/drafts/current/.¶

+

+ Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as "work in progress."¶

+

+ This Internet-Draft will expire on 4 October 2021.¶

+
+
+ +
+
+ â–²

+Table of Contents +

+ +
+
+
+
+

+1. Introduction +

+

QUIC packets [QUIC-TRANSPORT] usually contain a +connection ID to allow endpoints to associate packets with different address/ +port 4-tuples to the same connection context. This feature makes connections +robust in the event of NAT rebinding. QUIC endpoints usually designate the +connection ID which peers use to address packets. Server-generated connection +IDs create a potential need for out-of-band communication to support QUIC.¶

+

QUIC allows servers (or load balancers) to designate an initial connection ID to +encode useful routing information for load balancers. It also encourages +servers, in packets protected by cryptography, to provide additional connection +IDs to the client. This allows clients that know they are going to change IP +address or port to use a separate connection ID on the new path, thus reducing +linkability as clients move through the world.¶

+

There is a tension between the requirements to provide routing information and +mitigate linkability. Ultimately, because new connection IDs are in protected +packets, they must be generated at the server if the load balancer does not have +access to the connection keys. However, it is the load balancer that has the +context necessary to generate a connection ID that encodes useful routing +information. In the absence of any shared state between load balancer and +server, the load balancer must maintain a relatively expensive table of +server-generated connection IDs, and will not route packets correctly if they +use a connection ID that was originally communicated in a protected +NEW_CONNECTION_ID frame.¶

+

This specification provides common algorithms for encoding the server mapping in +a connection ID given some shared parameters. The mapping is generally only +discoverable by observers that have the parameters, preserving unlinkability as +much as possible.¶

+

Aside from load balancing, a QUIC server may also desire to offload other +protocol functions to trusted intermediaries. These intermediaries might +include hardware assist on the server host itself, without access to fully +decrypted QUIC packets. For example, this document specifies a means of +offloading stateless retry to counter Denial of Service attacks. It also +proposes a system for self-encoding connection ID length in all packets, so that +crypto 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 +

+

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", +"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be +interpreted as described in RFC 2119 [RFC2119].¶

+

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 interpreted as carrying +significance described in RFC 2119.¶

+

In this document, "client" and "server" refer to the endpoints of a QUIC +connection unless otherwise indicated. A "load balancer" is an intermediary for +that connection that does not possess QUIC connection keys, but it may rewrite +IP addresses or conduct other IP or UDP processing. A "configuration agent" is +the entity that determines the QUIC-LB configuration parameters for the network +and leverages some system to distribute that configuration.¶

+

Note that stateful load balancers that act as proxies, by terminating a QUIC +connection with the client and then retrieving data from the server using QUIC +or another protocol, are treated as a server with respect to this specification.¶

+

For brevity, "Connection ID" will often be abbreviated as "CID".¶

+
+
+
+
+

+1.2. Notation +

+

All wire formats will be depicted using the notation defined in Section 1.3 of +[QUIC-TRANSPORT]. There is one addition: the function len() refers to the +length of a field which can serve as a limit on a different field, so that the +lengths of two fields can be concisely defined as limited to a sum, for example:¶

+

x(A..B) +y(C..B-len(x))¶

+

indicates that x can be of any length between A and B, and y can be of any +length between C and B provided that (len(x) + len(y)) does not exceed B.¶

+

The example below illustrates the basic framework:¶

+
+
+
+
+Example Structure {
+  One-bit Field (1),
+  7-bit Field with Fixed Value (7) = 61,
+  Field with Variable-Length Integer (i),
+  Arbitrary-Length Field (..),
+  Variable-Length Field (8..24),
+  Variable-Length Field with Dynamic Limit (8..24-len(Variable-Length Field)),
+  Field With Minimum Length (16..),
+  Field With Maximum Length (..128),
+  [Optional Field (64)],
+  Repeated Field (8) ...,
+}
+
+
+
Figure 1: +Example Format +
+
+
+
+
+
+
+
+

+2. Protocol Objectives +

+
+
+

+2.1. Simplicity +

+

QUIC is intended to provide unlinkability across connection migration, but +servers are not required to provide additional connection IDs that effectively +prevent linkability. If the coordination scheme is too difficult to implement, +servers behind load balancers using connection IDs for routing will use +trivially linkable connection IDs. Clients will therefore be forced to choose +between terminating the connection during migration or remaining linkable, +subverting a design objective of QUIC.¶

+

The solution should be both simple to implement and require little additional +infrastructure for cryptographic keys, etc.¶

+
+
+
+
+

+2.2. Security +

+

In the limit where there are very few connections to a pool of servers, no +scheme can prevent the linking of two connection IDs with high probability. In +the opposite limit, where all servers have many connections that start and end +frequently, it will be difficult to associate two connection IDs even if they +are known to map to the same server.¶

+

QUIC-LB is relevant in the region between these extremes: when the information +that two connection IDs map to the same server is helpful to linking two +connection IDs. Obviously, any scheme that transparently communicates this +mapping to outside observers compromises QUIC's defenses against linkability.¶

+

Though not an explicit goal of the QUIC-LB design, concealing the server mapping +also complicates attempts to focus attacks on a specific server in the pool.¶

+
+
+
+
+
+
+

+3. First CID octet +

+

The first octet of a Connection ID is reserved for two special purposes, one +mandatory (config rotation) and one optional (length self-description).¶

+

Subsequent sections of this document refer to the contents of this octet as the +"first octet."¶

+
+
+

+3.1. Config Rotation +

+

The first two bits of any connection ID MUST encode an identifier for the +configuration that the connection ID uses. This enables incremental deployment +of new QUIC-LB settings (e.g., keys).¶

+

When new configuration is distributed to servers, there will be a transition +period when connection IDs reflecting old and new configuration coexist in the +network. The rotation bits allow load balancers to apply the correct routing +algorithm and parameters to incoming packets.¶

+

Configuration Agents SHOULD deliver new configurations to load balancers before +doing so to servers, so that load balancers are ready to process CIDs using the +new parameters when they arrive.¶

+

A Configuration Agent SHOULD NOT use a codepoint to represent a new +configuration until it takes precautions to make sure that all connections using +CIDs with an old configuration at that codepoint have closed or transitioned.¶

+

Servers MUST NOT generate new connection IDs using an old configuration after +receiving a new one from the configuration agent. Servers MUST send +NEW_CONNECTION_ID frames that provide CIDs using the new configuration, and +retire CIDs using the old configuration using the "Retire Prior To" field of +that frame.¶

+

It also possible to use these bits for more long-lived distinction of different +configurations, but this has privacy implications (see Section 11.3).¶

+
+
+
+
+

+3.2. Configuration Failover +

+

If a server has not received a valid QUIC-LB configuration, and believes that +low-state, Connection-ID aware load balancers are in the path, it SHOULD +generate connection IDs with the config rotation bits set to '11' and SHOULD use +the "disable_active_migration" transport parameter in all new QUIC connections. +It SHOULD NOT send NEW_CONNECTION_ID frames with new values.¶

+

A load balancer that sees a connection ID with config rotation bits set to +'11' MUST revert to 5-tuple routing.¶

+
+
+
+
+

+3.3. Length Self-Description +

+

Local hardware cryptographic offload devices may accelerate QUIC servers by +receiving keys from the QUIC implementation indexed to the connection ID. +However, on physical devices operating multiple QUIC servers, it is impractical +to efficiently lookup these keys if the connection ID does not self-encode its +own length.¶

+

Note that this is a function of particular server devices and is irrelevant to +load balancers. As such, load balancers MAY omit this from their configuration. +However, the remaining 6 bits in the first octet of the Connection ID are +reserved to express the length of the following connection ID, not including +the first octet.¶

+

A server not using this functionality SHOULD make the six bits appear to be +random.¶

+
+
+
+
+

+3.4. Format +

+
+
+
+
+First Octet {
+  Config Rotation (2),
+  CID Len or Random Bits (6),
+}
+
+
+
Figure 2: +First Octet Format +
+
+

The first octet has the following fields:¶

+

Config Rotation: Indicates the configuration used to interpret the CID.¶

+

CID Len or Random Bits: Length Self-Description (if applicable), or random bits +otherwise. Encodes the length of the Connection ID following the First Octet.¶

+
+
+
+
+
+
+

+4. Load Balancing Preliminaries +

+

In QUIC-LB, load balancers do not generate individual connection IDs for +servers. Instead, they communicate the parameters of an algorithm to generate +routable connection IDs.¶

+

The algorithms differ in the complexity of configuration at both load balancer +and server. Increasing complexity improves obfuscation of the server mapping.¶

+

This section describes three participants: the configuration agent, the load +balancer, and the server. For any given QUIC-LB configuration that enables +connection-ID-aware load balancing, there must be a choice of (1) routing +algorithm, (2) server ID allocation strategy, and (3) algorithm parameters.¶

+

Fundamentally, servers generate connection IDs that encode their server ID. +Load balancers decode the server ID from the CID in incoming packets to route +to the correct server.¶

+

There are situations where a server pool might be operating two or more routing +algorithms or parameter sets simultaneously. The load balancer uses the first +two bits of the connection ID to multiplex incoming DCIDs over these schemes +(see Section 3.1).¶

+
+
+

+4.1. Non-Compliant Connection IDs +

+

QUIC-LB servers will generate Connection IDs that are decodable to extract a +server ID in accordance with a specified algorithm and parameters. However, +QUIC often uses client-generated Connection IDs prior to receiving a packet from +the server.¶

+

These client-generated CIDs might not conform to the expectations of the +routing algorithm and therefore not be routable by the load balancer. Those that +are not routable are "non-compliant DCIDs" and receive similar treatment +regardless of why they're non-compliant:¶

+
    +
  • The config rotation bits (Section 3.1) may not correspond to an active +configuration. Note: a packet with a DCID that indicates 5-tuple routing (see +Section 3.2) is always compliant.¶ +
  • +
  • The DCID might not be long enough for the decoder to process.¶ +
  • +
  • The extracted server mapping might not correspond to an active server.¶ +
  • +
+

All other DCIDs are compliant.¶

+

Load balancers MUST forward packets with compliant DCIDs to a server in +accordance with the chosen routing algorithm.¶

+

Load balancers SHOULD drop short header packets with non-compliant DCIDs.¶

+

The routing of long headers with non-compliant DCIDs depends on the server ID +allocation strategy, described in Section 4.3. However, the load balancer +MUST NOT drop these packets, with one exception.¶

+

Load balancers MAY drop packets with long headers and non-compliant DCIDs if +and only if it knows that the encoded QUIC version does not allow a non- +compliant DCID in a packet with that signature. For example, a load balancer can +safely drop a QUIC version 1 Handshake packet with a non-compliant DCID, as a +version 1 Handshake packet sent to a QUIC-LB compliant server will always have +a server-generated compliant CID. The prohibition against dropping packets with +long headers remains for unknown QUIC versions.¶

+

Furthermore, while the load balancer function MUST NOT drop packets, the device +might implement other security policies, outside the scope of this +specification, that might force a drop.¶

+

Servers that receive packets with noncompliant CIDs MUST use the available +mechanisms to induce the client to use a compliant CID in future packets. In +QUIC version 1, this requires using a compliant CID in the Source CID field of +server-generated long headers.¶

+
+
+
+
+

+4.2. Arbitrary Algorithms +

+

There are conditions described below where a load balancer routes a packet using +an "arbitrary algorithm." It can choose any algorithm, without coordination with +the servers, but the algorithm SHOULD be deterministic over short time scales so +that related packets go to the same server. The design of this algorithm SHOULD +consider the version-invariant properties of QUIC described in +[QUIC-INVARIANTS] to maximize its robustness to +future versions of QUIC.¶

+

An arbitrary algorithm MUST NOT make the routing behavior dependent on any 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-dependent and +intermediaries SHOULD NOT base their design on version-specific templates.¶

+

For example, one arbitrary algorithm might convert a non-compliant DCID to an +integer and divided by the number of servers, with the modulus used to forward +the packet. The number of servers is usually consistent on the time scale of a +QUIC connection handshake. Another might simply hash the address/port 4-tuple. +See also Section 10.¶

+
+
+
+
+

+4.3. Server ID Allocation +

+

For any given configuration, the configuration agent must specify if server IDs +will be statically or dynamically allocated. Load Balancer configurations with +statically allocated server IDs explicitly include a mapping of server IDs to +forwarding addresses. The corresponding server configurations contain one or +more unique server IDs.¶

+

A dynamically allocated configuration does not have a pre-defined assignment, +reducing configuration complexity. However, it places limits on the maximum +server ID length and requires more state at the load balancer. In certain edge +cases, it can force parts of the system to fail over to 5-tuple routing for a +short time.¶

+

In either case, the configuration agent chooses a server ID length for each +configuration that MUST be at least one octet. For Static Allocation, the +maximum length depends on the algorithm. For dynamic allocation, the maximum +length is 7 octets.¶

+

A QUIC-LB configuration MAY significantly over-provision the server ID space +(i.e., provide far more codepoints than there are servers) to increase the +probability that a randomly generated Destination Connection ID is non- +compliant.¶

+

Conceptually, each configuration has its own set of server ID allocations, +though two static configurations with identical server ID lengths MAY use a +common allocation between them.¶

+

A server encodes one of its assigned server IDs in any CID it generates using +the relevant configuration.¶

+
+
+

+4.3.1. Static Allocation +

+

In the static allocation method, the configuration agent assigns at least one +server ID to each server.¶

+

When forwarding a packet with a long header and non-compliant DCID, load +balancers MUST forward packets with long headers and non-compliant DCIDs +using an arbitrary algorithm as specified in Section 4.2.¶

+
+
+
+
+

+4.3.2. Dynamic Allocation +

+

In the dynamic allocation method, the load balancer assigns server IDs +dynamically so that configuration does not require fixed server ID assignment. +This reduces linkability. However, it requires state at the load balancer +that roughly scales with the number of connections, until the server ID +codespace is exhausted.¶

+
+
+
+4.3.2.1. Configuration Agent Actions +
+

The configuration agent does not assign server IDs, but does configure a server +ID length and an "LB timeout". The server ID MUST be at least one and no more +than seven octets.¶

+
+
+
+
+
+4.3.2.2. Load Balancer Actions +
+

The load balancer maintains a table of all assigned server IDs and +corresponding routing information, which is initialized empty. These tables are +independent for each operating configuration.¶

+

The load balancer MUST keep track of the most recent observation of each server +ID, in any sort of packet it forwards, in the table and delete the entries when +the time since that observation exceeds the LB Timeout.¶

+

Note that when the load balancer's table for a configuration is empty, all +incoming DCIDs corresponding to that configuration are non-compliant by +definition.¶

+

The handling of a non-compliant long-header packet depends on the reason for +non-compliance. The load balancer MUST applyt this logic:¶

+
    +
  • If the config rotation bits do not match a known configuration, the load +balancer routes the packet using an arbitrary algorithm (see +Section 4.2).¶ +
  • +
  • If there is a matching configuration, but the CID is not long enough to apply +the algorithm, the load balancer skips the first octet of the CID and then +reads a server ID from the following octets, up to the server ID length. If +this server ID matches a known server ID for that configuration, it forwards the +packet accordingly and takes no further action. If it does not match, it routes +using an arbitrary algorithm and adds the new server ID to that server's table +entry.¶ +
  • +
  • If the sole reason for non-compliance is that the server ID is not in the load +balancer's table, the load balancer routes the packet with an arbitrary +algorithm. It adds the decoded server ID to table entry for the server the +algorithm chooses and forwards the packet accordingly.¶ +
  • +
+
+
+
+
+
+4.3.2.3. Server actions +
+

Each server maintains a list of server IDs assigned to it, initialized empty. +For each SID, it records the last time it received any packet with an CID that +encoded that SID.¶

+

Upon receipt of a packet with a client-generated DCID, the server MUST follow +these steps in order:¶

+
    +
  • If the config rotation bits do not correspond to a known configuration, do not +attempt to extract a server ID.¶ +
  • +
  • If the DCID is not long enough to decode using the configured algorithm, +extract a number of octets equal to the server ID length, beginning with the +second octet. If the extracted value does not match a server ID in the server's +list, add it to the list.¶ +
  • +
  • If the DCID is long enough to decode but the server ID is not in the server's +list, add it to the list.¶ +
  • +
+

After any possible SID is extracted, the server processes the packet normally.¶

+

When a server needs a new connection ID, it uses one of the server IDs in its +list to populate the server ID field of that CID. It SHOULD vary this selection +to reduce linkability within a connection.¶

+

After loading a new configuration or long periods of idleness, a server may not +have any available SIDs. This is because an incoming packet may not the config +rotation bits necessary to extract a server ID in accordance with the +algorithm above. When required to generate a CID under these conditions, the +server MUST generate CIDs using the 5-tuple routing codepoint (see +Section 3.2. Note that these connections will not be robust to client +address changes while they use this connection ID. For this reason, a server +SHOULD retire these connection IDs and replace them with routable ones once +it receives a client-generated CID that allows it to acquire a server ID. As, +statistically, one in every four such CIDs can provide a server ID, this is +typically a short interval.¶

+

If a server has not received a connection ID encoding a particular server ID +within the LB timeout, it MUST retire any outstanding CIDs that use that server +ID and cease generating any new ones.¶

+

A server SHOULD have a mechanism to stop using some server IDs if the list +gets large relative to its share of the codepoint space, so that these +allocations time out and are freed for reuse by servers that have recently +joined the pool.¶

+
+
+
+
+
+
+
+
+
+
+

+5. Routing Algorithms +

+

Encryption in the algorithms below uses the AES-128-ECB cipher. Future standards +could add new algorithms that use other ciphers to provide cryptographic agility +in accordance with [RFC7696]. QUIC-LB implementations SHOULD be extensible to +support new algorithms.¶

+
+
+

+5.1. Plaintext CID Algorithm +

+

The Plaintext CID Algorithm makes no attempt to obscure the mapping of +connections to servers, significantly increasing linkability. The format is +depicted in the figure below.¶

+
+
+
+
+Plaintext CID {
+  First Octet (8),
+  Server ID (8..128),
+  For Server Use (8..152-len(Server ID)),
+}
+
+
+
Figure 3: +Plaintext CID Format +
+
+
+
+

+5.1.1. Configuration Agent Actions +

+

For static SID allocation, the server ID length is limited to 16 octets. There +are no parameters specific to this algorithm.¶

+
+
+
+
+

+5.1.2. Load Balancer Actions +

+

On each incoming packet, the load balancer extracts consecutive octets, +beginning with the second octet. These bytes represent the server ID.¶

+
+
+
+
+

+5.1.3. Server Actions +

+

The server chooses how many octets to reserve for its own use, which MUST be at +least one octet.¶

+

When a server needs a new connection ID, it encodes one of its assigned server +IDs in consecutive octets beginning with the second. All other 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.¶

+
+
+
+
+
+
+

+5.2. Stream Cipher CID Algorithm +

+

The Stream Cipher CID algorithm provides cryptographic protection at the cost of +additional per-packet processing at the load balancer to decrypt every incoming +connection ID. The CID format is depicted below.¶

+
+
+
+
+Stream Cipher CID {
+  First Octet (8),
+  Nonce (64..120),
+  Encrypted Server ID (8..128-len(Nonce)),
+  For Server Use (0..152-len(Nonce)-len(Encrypted Server ID)),
+}
+
+
+
Figure 4: +Stream Cipher CID Format +
+
+
+
+

+5.2.1. Configuration Agent Actions +

+

The configuration agent assigns a server ID to every server in its pool, and +determines a server ID length (in octets) sufficiently large to encode all +server IDs, including potential future servers.¶

+

The configuration agent also selects a nonce length and an 16-octet AES-ECB key +to use for connection ID decryption. The nonce length MUST be at least 8 octets +and no more than 16 octets. The nonce length and server ID length MUST sum to 19 +or fewer octets, but SHOULD sum to 15 or fewer to allow space for server use.¶

+
+
+
+
+

+5.2.2. Load Balancer Actions +

+

Upon receipt of a QUIC packet, the load balancer extracts as many of the +earliest octets from the destination connection ID as necessary to match the +nonce length. The server ID immediately follows.¶

+

The load balancer decrypts the nonce and the server ID using the following three +pass algorithm:¶

+
    +
  • Pass 1: The load balancer decrypts the server ID using 128-bit AES Electronic +Codebook (ECB) mode, much like QUIC header protection. The encrypted nonce +octets are zero-padded to 16 octets. AES-ECB encrypts this encrypted nonce +using its key to generate a mask which it applies to the encrypted server id. +This provides an intermediate value of the server ID, referred to as server-id +intermediate.¶ +
  • +
+

server_id_intermediate = encrypted_server_id ^ AES-ECB(key, padded-encrypted-nonce)¶

+
    +
  • Pass 2: The load balancer decrypts the nonce octets using 128-bit AES +ECB mode, using the server-id intermediate as "nonce" for this pass. The +server-id intermediate octets are zero-padded to 16 octets. AES-ECB encrypts +this padded server-id intermediate using its key to generate a mask which it +applies to the encrypted nonce. This provides the decrypted nonce value.¶ +
  • +
+

nonce = encrypted_nonce ^ AES-ECB(key, padded-server_id_intermediate)¶

+
    +
  • Pass 3: The load balancer decrypts the server ID using 128-bit AES ECB mode. +The 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 intermediate server id. +This provides the decrypted server ID.¶ +
  • +
+

server_id = server_id_intermediate ^ AES-ECB(key, padded-nonce)¶

+

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. The load balancer uses +the the second through eleventh octets of the connection ID for the nonce, +zero-pads it to 16 octets, uses xors the result with the twelfth and thirteenth +octet. The result is padded with 14 octets of zeros and encrypted to obtain a +mask that is xored with the nonce octets. Finally, the nonce octets are padded +with six octets of zeros, encrypted, and the first two octets xored with the +server ID octets to obtain the actual server ID.¶

+

This three-pass algorithm is a simplified version of the FFX algorithm, with +the property that each encrypted nonce value depends on all server ID bits, and +each encrypted server ID bit depends on all nonce bits and all server ID bits. +This mitigates attacks against stream ciphers in which attackers simply flip +encrypted server-ID bits.¶

+

The output of the decryption is the server ID that the load balancer uses for +routing.¶

+
+
+
+
+

+5.2.3. Server Actions +

+

When generating a routable connection ID, the server writes arbitrary bits into +its nonce octets, and its provided server ID into the server ID octets. Servers +MAY opt to have a longer connection ID beyond the nonce and server ID. The +additional bits MAY encode additional information, but SHOULD appear essentially +random to observers.¶

+

If the decrypted nonce bits increase monotonically, that guarantees that nonces +are not reused between connection IDs from the same server.¶

+

The server encrypts the server ID using exactly the algorithm as described in +Section 5.2.2, performing the three passes +in reverse order.¶

+
+
+
+
+
+
+

+5.3. Block Cipher CID Algorithm +

+

The Block Cipher CID Algorithm, by using a full 16 octets of plaintext and a +128-bit cipher, provides higher cryptographic protection and detection of +non-compliant connection IDs. However, it also requires connection IDs of at +least 17 octets, increasing overhead of client-to-server packets.¶

+
+
+
+
+Block Cipher CID {
+  First Octet (8),
+  Encrypted Server ID (8..128),
+  Encrypted Bits for Server Use (128-len(Encrypted Server ID)),
+  Unencrypted Bits for Server Use (0..24),
+}
+
+
+
Figure 5: +Block Cipher CID Format +
+
+
+
+

+5.3.1. Configuration Agent Actions +

+

If server IDs are statically allocated, the server ID length MUST be no more +than 12 octets, to provide servers adequate entropy to generate unique CIDs.¶

+

The configuration agent also selects an 16-octet AES-ECB key to use for +connection ID decryption.¶

+
+
+
+
+

+5.3.2. Load Balancer Actions +

+

Upon receipt of a QUIC packet, the load balancer reads the first octet to +obtain the config rotation bits. It then decrypts the subsequent 16 octets using +AES-ECB decryption and the chosen key.¶

+

The decrypted plaintext contains the server id and opaque server data in that +order. The load balancer uses the server ID octets for routing.¶

+
+
+
+
+

+5.3.3. Server Actions +

+

When generating a routable connection ID, the server MUST choose a connection ID +length between 17 and 20 octets. The server writes its server ID into the server +ID octets and arbitrary bits into the remaining bits. These arbitrary bits MAY +encode additional information, and MUST differ between connection IDs. Bits in +the eighteenth, nineteenth, and twentieth octets SHOULD appear essentially +random to observers. The first octet is reserved as described in Section 3.¶

+

The server then encrypts the second through seventeenth octets using the 128-bit +AES-ECB cipher.¶

+
+
+
+
+
+
+
+
+

+6. ICMP Processing +

+

For protocols where 4-tuple load balancing is sufficient, it is straightforward +to deliver ICMP packets from the network to the correct server, by reading the +echoed IP and transport-layer headers to obtain the 4-tuple. When routing is +based on connection ID, further measures are required, as most QUIC packets that +trigger ICMP responses will only contain a client-generated connection ID that +contains no routing information.¶

+

To solve this problem, load balancers MAY maintain a mapping of Client IP and +port to server ID based on recently observed packets.¶

+

Alternatively, servers MAY implement the technique described in Section 14.4.1 +of [QUIC-TRANSPORT] to increase the likelihood a Source Connection ID is +included in ICMP responses to Path Maximum Transmission Unit (PMTU) probes. Load +balancers MAY parse the echoed packet to extract the Source Connection ID, if +it contains a QUIC long header, and extract the Server ID as if it were in a +Destination CID.¶

+
+
+
+
+

+7. Retry Service +

+

When a server is under load, QUICv1 allows it to defer storage of connection +state until the client proves it can receive packets at its advertised IP +address. Through the use of a Retry packet, a token in subsequent client +Initial packets, and transport parameters, servers verify address ownership and +clients verify that there is no on-path attacker generating Retry packets.¶

+

A "Retry Service" detects potential Denial of Service attacks and handles +sending of Retry packets on behalf of the server. As it is, by definition, +literally an on-path entity, the service must communicate some of the original +connection IDs back to the server so that it can pass client verification. It +also must either verify the address itself (with the server trusting this +verification) or make sure there is common context for the server to verify the +address using a service-generated token.¶

+

There are two different mechanisms to allow offload of DoS mitigation to a +trusted network service. One requires no shared state; the server need only be +configured to trust a retry service, though this imposes other operational +constraints. The other requires a shared key, but has no such constraints.¶

+
+
+

+7.1. Common Requirements +

+

Regardless of mechanism, a retry service has an active mode, where it is +generating Retry packets, and an inactive mode, where it is not, based on its +assessment of server load and the likelihood an attack is underway. The choice +of mode MAY be made on a per-packet or per-connection basis, through a +stochastic process or based on client address.¶

+

A configuration agent MUST distribute a list of QUIC versions the Retry Service +supports. It MAY also distribute either an "Allow-List" or a "Deny-List" of +other QUIC versions. It MUST NOT distribute both an Allow-List and a Deny-List.¶

+

The Allow-List or Deny-List MUST NOT include any versions included for Retry +Service Support.¶

+

The Configuration Agent MUST provide a means for the entity that controls the +Retry Service to report its supported version(s) to the configuration Agent. If +the entity has not reported this information, it MUST NOT activate the Retry +Service and the configuration agent MUST NOT distribute configuration that +activates it.¶

+

The configuration agent MAY delete versions from the final supported version +list if policy does not require the Retry Service to operate on those versions.¶

+

The configuration Agent MUST provide a means for the entities that control +servers behind the Retry Service to report either an Allow-List or a Deny-List.¶

+

If all entities supply Allow-Lists, the consolidated list MUST be the union of +these sets. If all entities supply Deny-Lists, the consolidated list MUST be +the intersection of these sets.¶

+

If entities provide a mixture of Allow-Lists and Deny-Lists, the consolidated +list MUST be a Deny-List that is the intersection of all provided Deny-Lists and +the inverses of all Allow-Lists.¶

+

If no entities that control servers have reported Allow-Lists or Deny-Lists, +the default is a Deny-List with the null set (i.e., all unsupported versions +will be admitted). This preserves the future extensibilty of QUIC.¶

+

A retry service MUST forward all packets for a QUIC version it does not +support that are not on a Deny-List or absent from an Allow-List. Note that if +servers support versions the retry service does not, this may increase load on +the servers.¶

+

Note that future versions of QUIC might not have Retry packets, require +different information in Retry, or use different packet type indicators.¶

+
+
+

+7.1.1. Considerations for Non-Initial Packets +

+

Initial Packets are especially effective at consuming server resources +because they cause the server to create connection state. Even when mitigating +this load with Retry Packets, the act of validating an Initial Token and sending +a Retry Packet is more expensive than the response to a non-Initial packet with +an unknown Connection ID: simply dropping it and/or sending a Stateless Reset.¶

+

Nevertheless, a Retry Service in Active Mode might desire to shield servers +from non-Initial packets that do not correspond to a previously admitted +Initial Packet. This has a number of considerations.¶

+
    +
  • If a Retry Service maintains no per-flow state whatsoever, it cannot +distinguish between valid and invalid non_Initial packets and MUST forward all +non-Initial Packets to the server.¶ +
  • +
  • For QUIC versions the Retry Service does not support and are present on the +Allow-List (or absent from the Deny-List), the Retry Service cannot distinguish +Initial Packets from other long headers and therefore MUST admit all long +headers.¶ +
  • +
  • If a Retry Service keeps per-flow state, it can identify 4-tuples that have +been previously approved, admit non-Initial packets from those flows, and +drop all others. However, dropping short headers will effectively break Address +Migration and NAT Rebinding when in Active Mode, as post-migration packets will +arrive with a previously unknown 4-tuple. This policy will also break connection +attempts using any new QUIC versions that begin connections with a short header.¶ +
  • +
  • If a Retry Service is integrated with a QUIC-LB compliant load balancer, it +can verify that the Destination Connection ID is compliant, and only admit +non-Initial packets with compliant DCIDs. As the Connection ID encoding is +invariant across QUIC versions, the Retry Service can do this for all short +headers.¶ +
  • +
+

Nothing in this section prevents Retry Services from making basic syntax +correctness checks on packets with QUIC versions that it understands (e.g., +enforcing the Initial Packet datagram size minimum in version 1) and +dropping packets that are not compliant with the QUIC specification.¶

+
+
+
+
+
+
+

+7.2. No-Shared-State Retry Service +

+

The no-shared-state retry service requires no coordination, except that the +server must be configured to accept this service and know which QUIC versions +the retry service supports. The scheme uses the first bit of the token to +distinguish between tokens from Retry packets (codepoint '0') and tokens from +NEW_TOKEN frames (codepoint '1').¶

+ +
+
+

+7.2.2. Service Requirements +

+

A no-shared-state retry service MUST be present on all paths from potential +clients to the server. These paths MUST fail to pass QUIC traffic should the +service fail for any reason. That is, if the service is not operational, the +server MUST NOT be exposed to client traffic. Otherwise, servers that have +already disabled their Retry capability would be vulnerable to attack.¶

+

The path between service and server MUST be free of any potential attackers. +Note that this and other requirements above severely restrict the operational +conditions in which a no-shared-state retry service can safely operate.¶

+

Retry tokens generated by the service MUST have the format below.¶

+
+
+
+
+Non-Shared-State Retry Service Token {
+  Token Type (1) = 0,
+  ODCIL (7) = 8..20,
+  RSCIL (8) = 0..20,
+  Original Destination Connection ID (64..160),
+  Retry Source Connection ID (0..160),
+  Opaque Data (..),
+}
+
+
+
Figure 6: +Format of non-shared-state retry service tokens +
+
+

The first bit of retry tokens generated by the service MUST be zero. The token +has the following additional fields:¶

+

ODCIL: The length of the original destination connection ID from the triggering +Initial packet. This is in cleartext to be readable for the server, but +authenticated later in the token. The Retry Service SHOULD reject any token +in which the value is less than 8.¶

+

RSCIL: The retry source connection ID length.¶

+

Original Destination Connection ID: This also in cleartext and authenticated +later.¶

+

Retry Source Connection ID: This also in cleartext and authenticated +later.¶

+

Opaque Data: This data MUST contain encrypted information that allows the retry +service to validate the client's IP address, in accordance with the QUIC +specification. It MUST also provide a cryptographically secure means to +validate the integrity of the entire token.¶

+

Upon receipt of an Initial packet with a token that begins with '0', the retry +service MUST validate the token in accordance with the QUIC specification.¶

+

In active mode, the service MUST issue Retry packets for all Client initial +packets that contain no token, or a token that has the first bit set to '1'. It +MUST NOT forward the packet to the server. The service MUST validate all tokens +with the first bit set to '0'. If successful, the service MUST forward the +packet with the token intact. If unsuccessful, it MUST drop the packet. The +Retry Service MAY send an Initial Packet containing a CONNECTION_CLOSE frame +with the INVALID_TOKEN error code when dropping the packet.¶

+

Note that this scheme has a performance drawback. When the retry service is in +active mode, clients with a token from a NEW_TOKEN frame will suffer a 1-RTT +penalty even though its token provides proof of address.¶

+

In inactive mode, the service MUST forward all packets that have no token or a +token with the first bit set to '1'. It MUST validate all tokens with the first +bit set to '0'. If successful, the service MUST forward the packet with the +token intact. If unsuccessful, it MUST either drop the packet or forward it +with the token removed. The latter requires decryption and re-encryption of the +entire Initial packet to avoid authentication failure. Forwarding the packet +causes the server to respond without the original_destination_connection_id +transport parameter, which preserves the normal QUIC signal to the client that +there is an on-path attacker.¶

+
+
+
+
+

+7.2.3. Server Requirements +

+

A server behind a non-shared-state retry service MUST NOT send Retry packets +for a QUIC version the retry service understands. It MAY send Retry for QUIC +versions the Retry Service does not understand.¶

+

Tokens sent in NEW_TOKEN frames MUST have the first bit set to '1'.¶

+

If a server receives an Initial Packet with the first bit set to '1', it could +be from a server-generated NEW_TOKEN frame and should be processed in accordance +with the QUIC specification. If a server receives an Initial Packet with the +first bit to '0', it is a Retry token and the server MUST NOT attempt to +validate it. Instead, it MUST assume the address is validated and MUST extract +the Original Destination Connection ID and Retry Source Connection ID, assuming +the format described in Section 7.2.2.¶

+
+
+
+
+
+
+

+7.3. Shared-State Retry Service +

+

A shared-state retry service uses a shared key, so that the server can decode +the service's retry tokens. It does not require that all traffic pass through +the Retry service, so servers MAY send Retry packets in response to Initial +packets that don't include a valid token.¶

+

Both server and service must have time synchronized with respect to one another to prevent tokens +being incorrectly marked as expired, though tight synchronization is +unnecessary.¶

+

The tokens are protected using AES128-GCM AEAD, as explained in +Section 7.3.1. All tokens, generated by either the server or +retry service, MUST use the following format, which includes:¶

+
    +
  • A 96 bit unique token number transmitted in clear text, but protected as part +of the AEAD associated data.¶ +
  • +
  • An 8 bit token key identifier.¶ +
  • +
  • A token body, encoding the Original Destination Connection ID, the Retry +Source Connection ID, and the Timestamp, optionally followed by server specific +Opaque Data.¶ +
  • +
+

The token protection uses an 128 bit representation of the source IP address +from the triggering Initial packet. The client IP address is 16 octets. If an +IPv4 address, the last 12 octets are zeroes.¶

+

If there is a Network Address Translator (NAT) in the server infrastructure that +changes the client IP, the Retry Service MUST either be positioned behind the +NAT, or the NAT must have the token key to rewrite the Retry token accordingly. +Note also that a host that obtains a token through a NAT and then attempts to +connect over a path that does not have an identically configured NAT will fail +address validation.¶

+

The 96 bit unique token number is set to a random value using a cryptography- +grade random number generator.¶

+

The token key identifier and the corresponding AEAD key and AEAD IV are +provisioned by the configuration agent.¶

+

The token body is encoded as follows:¶

+
+
+
+
+Shared-State Retry Service Token Body {
+   ODCIL (8) = 0..20,
+   RSCIL (8) = 0..20,
+   [Port (16)],
+   Original Destination Connection ID (0..160),
+   Retry Source Connection ID (0..160),
+   Timestamp (64),
+   Opaque Data (..),
+}
+
+
+
Figure 7: +Body of shared-state retry service tokens +
+
+

The token body has the following fields:¶

+

ODCIL: The original destination connection ID length. Tokens in NEW_TOKEN frames +MUST set this field to zero.¶

+

RSCIL: The retry source connection ID length. Tokens in NEW_TOKEN frames MUST +set this field to zero.¶

+

Port: The Source Port of the UDP datagram that triggered the Retry packet. +This field MUST be present if and only if the ODCIL is greater than zero. This +field is therefore always absent in tokens in NEW_TOKEN frames.¶

+

Original Destination Connection ID: The server or Retry Service copies this +from the field in the client Initial packet.¶

+

Retry Source Connection ID: The server or Retry service copies this from the +Source Connection ID of the Retry packet.¶

+

Timestamp: The Timestamp is a 64-bit integer, in network order, that expresses +the expiration time of the token as a number of seconds in POSIX time (see Sec. +4.16 of [TIME_T]).¶

+

Opaque Data: The server may use this field to encode additional information, +such as congestion window, RTT, or MTU. The Retry Service MUST have zero-length +opaque data.¶

+

Some implementations of QUIC encode in the token the Initial Packet Number used +by the client, in order to verify that the client sends the retried Initial +with a PN larger that the triggering Initial. Such implementations will encode +the Initial Packet Number as part of the opaque data. As tokens may be +generated by the Service, servers MUST NOT reject tokens because they lack +opaque data and therefore the packet number.¶

+
+
+

+7.3.1. Token Protection with AEAD +

+

On the wire, the token is presented as:¶

+
+
+
+
+Shared-State Retry Service Token {
+  Unique Token Number (96),
+  Key Sequence (8),
+  Encrypted Shared-State Retry Service Token Body (80..),
+  AEAD Checksum (128),
+}
+
+
+
Figure 8: +Wire image of shared-state retry service tokens +
+
+

The tokens are protected using AES128-GCM as follows:¶

+
    +
  • The token key and IV are retrieved using the Key Sequence.¶ +
  • +
  • The nonce, N, is formed by combining the IV with the 96 bit unique token +number. The 96 bits of the unique token number are left-padded with zeros to the +size of the IV. The exclusive OR of the padded unique token number and the IV +forms the AEAD nonce.¶ +
  • +
  • The associated data is a formatted as a pseudo header by combining the +cleartext part of the token with the IP address of the client.¶ +
  • +
+
+
+
+
+Shared-State Retry Service Token Pseudoheader {
+  IP Address (128),
+  Unique Token Number (96),
+  Key Sequence (8),
+}
+
+
+
Figure 9: +Psuedoheader for shared-state retry service tokens +
+
+
    +
  • The input plaintext for the AEAD is the token body. The output ciphertext of +the AEAD is transmitted in place of the token body.¶ +
  • +
  • The AEAD Checksum is computed as part of the AEAD encryption process, and is +verified during decryption.¶ +
  • +
+
+
+
+
+

+7.3.2. Configuration Agent Actions +

+

The configuration agent generates and distributes a "token key", a "token IV", +a key sequence, and the information described in Section 7.1.¶

+
+
+
+
+

+7.3.3. Service Requirements +

+

In inactive mode, the Retry service forwards all packets without further +inspection or processing.¶

+

Retry services MUST NOT issue Retry packets except where explicitly allowed +below, to avoid sending a Retry packet in response to a Retry token.¶

+

When in active mode, the service MUST generate Retry tokens with the format +described above when it receives a client Initial packet with no token.¶

+

The service SHOULD decrypt incoming tokens. The service SHOULD drop packets +with unknown key sequence, or an AEAD checksum that does not match the expected +value. (By construction, the AEAD checksum will only match if the client IP +Address also matches.)¶

+

If the token checksum passes, and the ODCIL and RSCIL fields are both zero, +then this is a NEW_TOKEN token generated by the server. Processing of NEW_TOKEN +tokens is subtly different from Retry tokens, as described below.¶

+

The service SHOULD drop a packet containing a token where the ODCIL is greater +than zero and less than the minimum number of octets for a client-generated CID +(8 in QUIC version 1). The service also SHOULD drop a packet containing a token +where the ODCIL is zero and RSCIL is nonzero.¶

+

If the Timestamp of a token points to time in the past, the token has expired; +however, in order to allow for clock skew, it SHOULD NOT consider tokens to be +expired if the Timestamp encodes a few seconds in the past. An active Retry +service SHOULD drop packets with expired tokens. If a NEW_TOKEN token, the +service MUST generate a Retry packet in response. It MUST NOT generate a Retry +packet in response to an expired Retry token.¶

+

If a Retry token, the service SHOULD drop packets where the port number +encoded in the token does not match the source port in the encapsulating UDP +header.¶

+

All other packets SHOULD be forwarded to the server.¶

+
+
+
+
+

+7.3.4. Server Requirements +

+

When issuing Retry or NEW_TOKEN tokens, the server MUST include the client IP +address in the authenticated data as specified in +Section 7.3.1. The ODCIL and RSCIL fields are zero for +NEW_TOKEN tokens, making them easily distinguishable from Retry tokens.¶

+

The server MUST validate all tokens that arrive in Initial packets, as they may +have bypassed the Retry service.¶

+

For Retry tokens that follow the format above, servers SHOULD use the timestamp +field to apply its expiration limits for tokens. This need not be precisely +synchronized with the retry service. However, servers MAY allow retry tokens +marked as being a few seconds in the past, due to possible clock +synchronization issues.¶

+

After decrypting the token, the server uses the corresponding fields to +populate the original_destination_connection_id transport parameter, with a +length equal to ODCIL, and the retry_source_connection_id transport parameter, +with length equal to RSCIL.¶

+

For QUIC versions the service does not support, the server MAY use any token +format.¶

+

As discussed in [QUIC-TRANSPORT], a server MUST NOT send a Retry packet in +response to an Initial packet that contains a retry token.¶

+
+
+
+
+
+
+
+
+

+8. Configuration Requirements +

+

QUIC-LB requires common configuration to synchronize understanding of encodings +and guarantee explicit consent of the server.¶

+

The load balancer and server MUST agree on a routing algorithm, server ID +allocation method, and the relevant parameters for that algorithm.¶

+

All algorithms require a server ID length. If server IDs are statically +allocated, the load balancer MUST receive the full table of mappings, and +each server must receive its assigned SID(s), from the configuration agent.¶

+

For Stream Cipher CID Routing, the servers and load balancer also MUST have a +common understanding of the key and nonce length.¶

+

For Block Cipher CID Routing, the servers and load balancer also MUST have a +common understanding of the key.¶

+

Note that server IDs are opaque bytes, not integers, so there is no notion of +network order or host order.¶

+

A server configuration MUST specify if the first octet encodes the CID length. +Note that a load balancer does not need the CID length, as the required bytes +are present in the QUIC packet.¶

+

A full QUIC-LB server configuration MUST also specify the supported QUIC +versions of any Retry Service. If a shared-state service, the server also must +have the token key.¶

+

A non-shared-state Retry Service need only be configured with the QUIC versions +it supports, and an Allow- or Deny-List. A shared-state Retry Service also needs +the token key, and to be aware if a NAT sits between it and the servers.¶

+

Appendix A provides a YANG Model of the a full QUIC-LB configuration.¶

+
+
+
+
+

+9. Additional Use Cases +

+

This section discusses considerations for some deployment scenarios not implied +by the specification above.¶

+
+
+

+9.1. Load balancer chains +

+

Some network architectures may have multiple tiers of low-state load balancers, +where a first tier of devices makes a routing decision to the next tier, and so +on, until packets reach the server. Although QUIC-LB is not explicitly designed +for this use case, it is possible to support it.¶

+

If each load balancer is assigned a range of server IDs that is a subset of the +range of IDs assigned to devices that are closer to the client, then the first +devices to process an incoming packet can extract the server ID and then map it +to the correct forwarding address. Note that this solution is extensible to +arbitrarily large numbers of load-balancing tiers, as the maximum server ID +space is quite large.¶

+
+
+
+
+

+9.2. Moving connections between servers +

+

Some deployments may transparently move a connection from one server to another. +The means of transferring connection state between servers is out of scope of +this document.¶

+

To support a handover, a server involved in the transition could issue CIDs that +map to the new server via a NEW_CONNECTION_ID frame, and retire CIDs associated +with the new server using the "Retire Prior To" field in that frame.¶

+

Alternately, if the old server is going offline, the load balancer could simply +map its server ID to the new server's address.¶

+
+
+
+
+
+
+

+10. Version Invariance of QUIC-LB +

+

Non-shared-state Retry Services are inherently dependent on the format (and +existence) of Retry Packets in each version of QUIC, and so Retry Service +configuration explicitly includes the supported QUIC versions.¶

+

The server ID encodings, and requirements for their handling, are designed to be +QUIC version independent (see [QUIC-INVARIANTS]). A QUIC-LB load balancer will +generally not require changes as servers deploy new versions of QUIC. However, +there are several unlikely future design decisions that could impact the +operation of QUIC-LB.¶

+

The maximum Connection ID length could be below the minimum necessary for one or +more encoding algorithms.¶

+

Section 4.1 provides guidance about how load balancers should handle +non-compliant DCIDs. This guidance, and the implementation of an algorithm to +handle these DCIDs, rests on some assumptions:¶

+
    +
  • Incoming short headers do not contain DCIDs that are client-generated.¶ +
  • +
  • The use of client-generated incoming DCIDs does not persist beyond a few round +trips in the connection.¶ +
  • +
  • While the client is using DCIDs it generated, some exposed fields (IP address, +UDP port, client-generated destination Connection ID) remain constant for all +packets sent on the same connection.¶ +
  • +
  • Dynamic server ID allocation is dependent on client-generated Destination CIDs +in Initial Packets being at least 8 octets in length. If they are not, the load +balancer may not be able to extract a valid server ID to add to its table. +Configuring a shorter server ID length can increase robustness to a change.¶ +
  • +
+

While this document does not update the commitments in [QUIC-INVARIANTS], the +additional assumptions are minimal and narrowly scoped, and provide a likely +set of constants that load balancers can use with minimal risk of version- +dependence.¶

+

If these assumptions are invalid, this specification is likely to lead to loss +of packets that contain non-compliant DCIDs, and in extreme cases connection +failure.¶

+

Some load balancers might inspect elements of the Server Name Indication (SNI) +extension in the TLS Client Hello to make a routing decision. Note that the +format and cryptographic protection of this information may change in future +versions or extensions of TLS or QUIC, and therefore this functionality is +inherently not version-invariant.¶

+
+
+
+
+

+11. Security Considerations +

+

QUIC-LB is intended to prevent linkability. Attacks would therefore attempt to +subvert this purpose.¶

+

Note that the Plaintext CID algorithm makes no attempt to obscure the server +mapping, and therefore does not address these concerns. It exists to allow +consistent CID encoding for compatibility across a network infrastructure, which +makes QUIC robust to NAT rebinding. Servers that are running the Plaintext CID +algorithm SHOULD only use it to generate new CIDs for the Server Initial Packet +and SHOULD NOT send CIDs in QUIC NEW_CONNECTION_ID frames, except that it sends +one new Connection ID in the event of config rotation Section 3.1. +Doing so might falsely suggest to the client that said CIDs were generated in a +secure fashion.¶

+

A linkability attack would find some means of determining that two connection +IDs route to the same server. As described above, there is no scheme that +strictly prevents linkability for all traffic patterns, and therefore efforts to +frustrate any analysis of server ID encoding have diminishing returns.¶

+
+
+

+11.1. Attackers not between the load balancer and server +

+

Any attacker might open a connection to the server infrastructure and +aggressively simulate migration 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.¶

+

The Stream and Block Cipher CID algorithms provide robust protection against +any sort of linkage. The Plaintext CID algorithm makes no attempt to protect +this encoding.¶

+

Were this analysis to obtain the server encoding, then on-path observers might +apply this analysis to correlating different client IP addresses.¶

+
+
+
+
+

+11.2. Attackers between the load balancer and server +

+

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 IDs for that connection.¶

+
+
+
+
+

+11.3. Multiple Configuration IDs +

+

During the period in which there are multiple deployed configuration IDs (see +Section 3.1), there is a slight increase in linkability. The server +space is effectively divided into segments with CIDs that have different config +rotation bits. Entities that manage servers SHOULD strive to minimize these +periods by quickly deploying new configurations across the server pool.¶

+
+
+
+
+

+11.4. Limited configuration scope +

+

A simple deployment of QUIC-LB in a cloud provider might use the same global +QUIC-LB configuration across all its load balancers that route to customer +servers. An attacker could then simply become a customer, obtain the +configuration, and then extract server IDs of other customers' connections at +will.¶

+

To avoid this, the configuration agent SHOULD issue QUIC-LB configurations to +mutually distrustful servers that have different keys for encryption +algorithms. The load balancers can distinguish these configurations by external +IP address, or by assigning different values to the config rotation bits +(Section 3.1). Note that either solution has a privacy impact; see +Section 11.3.¶

+

These techniques are not necessary for the plaintext algorithm, as it does not +attempt to conceal the server ID.¶

+
+
+
+
+

+11.5. Stateless Reset Oracle +

+

Section 21.9 of [QUIC-TRANSPORT] discusses the Stateless Reset Oracle attack. +For a server deployment to be vulnerable, an attacking client must be able to +cause two packets with the same Destination CID to arrive at two different +servers that share the same cryptographic context for Stateless Reset tokens. As +QUIC-LB requires deterministic routing of DCIDs over the life of a connection, +it is a sufficient means of avoiding an Oracle without additional measures.¶

+
+
+
+
+

+11.6. Connection ID Entropy +

+

The Stream Cipher and Block Cipher algorithms need to generate different cipher +text for each generated Connection ID instance to protect the Server ID. To +do so, at least four octets of the Block Cipher CID and at least eight octets +of the Stream Cipher CID are reserved for a nonce that, if used only once, will +result in unique cipher text for each Connection ID.¶

+

If servers simply increment the nonce by one with each generated connection ID, +then it is safe to use the existing keys until any server's nonce counter +exhausts the allocated space and rolls over to zero. Whether or not it +implements this method, the server MUST NOT reuse a nonce until it switches to a +configuration with new keys.¶

+

Configuration agents SHOULD implement an out-of-band method to discover when +servers are in danger of exhausting their nonce space, and SHOULD respond by +issuing a new configuration. A server that has exhausted its nonces MUST +either switch to a different configuration, or if none exists, use the 4-tuple +routing config rotation codepoint.¶

+
+
+
+
+

+11.7. Shared-State Retry Keys +

+

The Shared-State Retry Service defined in Section 7.3 describes the +format of retry tokens or new tokens protected and encrypted using AES128-GCM. +Each token includes a 96 bit randomly generated unique token number, and an 8 +bit identifier of the AES-GCM encryption key. There are three important security +considerations for these tokens:¶

+
    +
  • An attacker that obtains a copy of the encryption key will be able to decrypt +and forge tokens.¶ +
  • +
  • Attackers may be able to retrieve the key if they capture a sufficently large +number of retry tokens encrypted with a given key.¶ +
  • +
  • Confidentiality of the token data will fail if separate tokens reuse the +same 96 bit unique token number and the same key.¶ +
  • +
+

To protect against disclosure of keys to attackers, service and servers MUST +ensure that the keys are stored securely. To limit the consequences of potential +exposures, the time to live of any given key should be limited.¶

+

Section 6.6 of [QUIC-TLS] states that "Endpoints MUST count +the number of encrypted packets for each set of keys. If the total number of +encrypted packets with the same key exceeds the confidentiality limit for the +selected AEAD, the endpoint MUST stop using those keys." It goes on with the +specific limit: "For AEAD_AES_128_GCM and AEAD_AES_256_GCM, the confidentiality +limit is 2^23 encrypted packets; see Appendix B.1." It is prudent to adopt the +same limit here, and configure the service in such a way that no more than 2^23 +tokens are generated with the same key.¶

+

In order to protect against collisions, the 96 bit unique token numbers should +be generated using a cryptographically secure pseudorandom number generator +(CSPRNG), as specified in Appendix C.1 of the TLS 1.3 specification +[RFC8446]. With proper random numbers, if fewer than 2^40 tokens are +generated with a single key, the risk of collisions is lower than 0.001%.¶

+
+
+
+
+
+
+

+12. IANA Considerations +

+

There are no IANA requirements.¶

+
+
+
+

+13. References +

+
+

+13.1. Normative References +

+
+
[QUIC-INVARIANTS]
+
+Thomson, M., "Version-Independent Properties of QUIC", Work in Progress, Internet-Draft, draft-ietf-quic-invariants-13, , <https://www.ietf.org/archive/id/draft-ietf-quic-invariants-13.txt>.
+
+
[QUIC-TRANSPORT]
+
+Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed and Secure Transport", Work in Progress, Internet-Draft, draft-ietf-quic-transport-34, , <https://www.ietf.org/archive/id/draft-ietf-quic-transport-34.txt>.
+
+
[RFC8446]
+
+Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, , <https://www.rfc-editor.org/info/rfc8446>.
+
+
[TIME_T]
+
+"Open Group Standard: Vol. 1: Base Definitions, Issue 7", IEEE Std 1003.1 , , <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16>.
+
+
+
+
+

+13.2. Informative References +

+
+
[QUIC-TLS]
+
+Thomson, M. and S. Turner, "Using TLS to Secure QUIC", Work in Progress, Internet-Draft, draft-ietf-quic-tls-34, , <https://www.ietf.org/archive/id/draft-ietf-quic-tls-34.txt>.
+
+
[RFC2119]
+
+Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
+
+
[RFC6020]
+
+Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, , <https://www.rfc-editor.org/info/rfc6020>.
+
+
[RFC7696]
+
+Housley, R., "Guidelines for Cryptographic Algorithm Agility and Selecting Mandatory-to-Implement Algorithms", BCP 201, RFC 7696, DOI 10.17487/RFC7696, , <https://www.rfc-editor.org/info/rfc7696>.
+
+
[RFC8340]
+
+Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, , <https://www.rfc-editor.org/info/rfc8340>.
+
+
+
+
+
+
+

+Appendix A. QUIC-LB YANG Model +

+

This YANG model conforms to [RFC6020] and expresses a complete QUIC-LB +configuration.¶

+
+
+module ietf-quic-lb {
+  yang-version "1.1";
+  namespace "urn:ietf:params:xml:ns:yang:ietf-quic-lb";
+  prefix "quic-lb";
+
+  import ietf-yang-types {
+    prefix yang;
+    reference
+      "RFC 6991: Common YANG Data Types.";
+  }
+
+  import ietf-inet-types {
+    prefix inet;
+    reference
+      "RFC 6991: Common YANG Data Types.";
+  }
+
+  organization
+    "IETF QUIC Working Group";
+
+  contact
+    "WG Web:   <http://datatracker.ietf.org/wg/quic>
+     WG List:  <quic@ietf.org>
+
+     Authors: Martin Duke (martin.h.duke at gmail dot com)
+              Nick Banks (nibanks at microsoft dot com)";
+
+  description
+    "This module enables the explicit cooperation of QUIC servers with
+     trusted intermediaries without breaking important protocol features.
+
+     Copyright (c) 2021 IETF Trust and the persons identified as
+     authors of the code.  All rights reserved.
+
+     Redistribution and use in source and binary forms, with or
+     without modification, is permitted pursuant to, and subject to
+     the license terms contained in, the Simplified BSD License set
+     forth in Section 4.c of the IETF Trust's Legal Provisions
+     Relating to IETF Documents
+     (https://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC XXXX
+     (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
+     for full legal notices.
+
+     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
+     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
+     'MAY', and 'OPTIONAL' in this document are to be interpreted as
+     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
+     they appear in all capitals, as shown here.";
+
+  revision "2021-01-29" {
+    description
+      "Initial Version";
+    reference
+      "RFC XXXX, QUIC-LB: Generating Routable QUIC Connection IDs";
+  }
+
+  container quic-lb {
+    presence "The container for QUIC-LB configuration.";
+
+    description
+      "QUIC-LB container.";
+
+    typedef quic-lb-key {
+      type yang:hex-string {
+        length 47;
+      }
+      description
+        "This is a 16-byte key, represented with 47 bytes";
+    }
+
+    list cid-configs {
+      key "config-rotation-bits";
+      description
+        "List up to three load balancer configurations";
+
+      leaf config-rotation-bits {
+        type uint8 {
+          range "0..2";
+        }
+        mandatory true;
+        description
+          "Identifier for this CID configuration.";
+      }
+
+      leaf first-octet-encodes-cid-length {
+        type boolean;
+        default false;
+        description
+          "If true, the six least significant bits of the first CID
+           octet encode the CID length minus one.";
+      }
+
+      leaf cid-key {
+        type quic-lb-key;
+        description
+          "Key for encrypting the connection ID. If absent, the
+           configuration uses the Plaintext algorithm.";
+      }
+
+      leaf nonce-length {
+        type uint8 {
+          range "8..16";
+        }
+        must '(../cid-key)' {
+          error-message "nonce-length only valid if cid-key is set";
+        }
+        description
+          "Length, in octets, of the nonce. If absent when cid-key is
+           present, the configuration uses the Block Cipher Algorithm.
+           If present along with cid-key, the configurationuses the
+           Stream Cipher Algorithm.";
+      }
+
+      leaf lb-timeout {
+        type uint32;
+        description
+          "Existence means the configuration uses dynamic Server ID allocation.
+           Time (in seconds) to keep a server ID allocation if no packets with
+           that server ID arrive.";
+      }
+
+      leaf server-id-length {
+        type uint8 {
+          range "1..18";
+        }
+        must '(../lb-timeout and . <= 7) or
+               (not(../lb-timeout) and
+                (not(../cid-key) and . <= 16) or
+                ((../nonce-length) and . <= (19 - ../nonce-length)) or
+                ((../cid-key) and not(../nonce-length) and . <= 12))' {
+          error-message
+            "Server ID length too long for routing algorithm and server ID
+             allocation method";
+        }
+        mandatory true;
+        description
+          "Length (in octets) of a server ID. Further range-limited
+           by sid-allocation, cid-key, and nonce-length.";
+      }
+
+      list server-id-mappings {
+        when "not(../lb-timeout)";
+        key "server-id";
+        description "Statically allocated Server IDs";
+
+        leaf server-id {
+          type yang:hex-string;
+          must "string-length(.) = 3 * ../../server-id-length - 1";
+          mandatory true;
+          description
+            "An allocated server ID";
+        }
+
+        leaf server-address {
+          type inet:ip-address;
+          mandatory true;
+          description
+            "Destination address corresponding to the server ID";
+        }
+      }
+    }
+
+    container retry-service-config {
+      description
+        "Configuration of Retry Service. If supported-versions is empty, there
+         is no retry service. If token-keys is empty, it uses the non-shared-
+         state service. If present, it uses shared-state tokens.";
+
+      leaf-list supported-versions {
+        type uint32;
+        description
+          "QUIC versions that the retry service supports. If empty, there
+           is no retry service.";
+      }
+
+      leaf unsupported-version-default {
+        type enumeration {
+          enum allow {
+            description "Unsupported versions admitted by default";
+          }
+          enum deny {
+            description "Unsupported versions denied by default";
+          }
+        }
+        default allow;
+        description
+          "Are unsupported versions not in version-exceptions allowed
+           or denied?";
+      }
+
+      leaf-list version-exceptions {
+        type uint32;
+        description
+          "Exceptions to the default-deny or default-allow rule.";
+      }
+
+      list token-keys {
+        key "key-sequence-number";
+        description
+          "list of active keys, for key rotation purposes. Existence implies
+           shared-state format";
+
+        leaf key-sequence-number {
+          type uint8;
+          mandatory true;
+          description
+            "Identifies the key used to encrypt the token";
+        }
+
+        leaf token-key {
+          type quic-lb-key;
+          mandatory true;
+          description
+            "16-byte key to encrypt the token";
+        }
+
+        leaf token-iv {
+          type yang:hex-string {
+            length 23;
+          }
+          mandatory true;
+          description
+            "8-byte IV to encrypt the token, encoded in 23 bytes";
+        }
+      }
+    }
+  }
+}
+
¶ +
+
+
+

+A.1. Tree Diagram +

+

This summary of the YANG model uses the notation in [RFC8340].¶

+
+
+module: ietf-quic-lb
+  +--rw quic-lb
+     +--rw cid-configs*
+     |       [config-rotation-bits]
+     |  +--rw config-rotation-bits             uint8
+     |  +--rw first-octet-encodes-cid-length?  boolean
+     |  +--rw cid-key?                         yang:hex-string
+     |  +--rw nonce-length?                    uint8
+     |  +--rw lb-timeout?                      uint32
+     |  +--rw server-id-length                 uint8
+     |  +--rw server-id-mappings*?
+     |  |       [server-id]
+     |  |  +--rw server-id                     yang:hex-string
+     |  |  +--rw server-address                inet:ip-address
+     +--ro retry-service-config
+     |  +--rw supported-versions*
+     |  |  +--rw version                       uint32
+     |  +--rw unsupported-version-default      enumeration {allow deny}
+     |  +--rw version-exceptions*
+     |  |  +--rw version                       uint32
+     |  +--rw token-keys*?
+     |  |       [key-sequence-number]
+     |  |  +--rw key-sequence-number           uint8
+     |  |  +--rw token-key                     yang:hex-string
+     |  |  +--rw token-iv                      yang:hex-string
+
¶ +
+
+
+
+
+
+
+

+Appendix B. Load Balancer Test Vectors +

+

Each section of this draft includes multiple sets of load balancer +configuration, each of which has five examples of server ID and server use +bytes and how they are encoded in a CID.¶

+

In some cases, there are no server use bytes. Note that, for simplicity, the +first octet bits used for neither config rotation nor length self-encoding are +random, rather than listed in the server use field. Therefore, a server +implementation using these parameters may generate CIDs with a slightly different +first octet.¶

+

This section uses the following abbreviations:¶

+
+
+cid      Connection ID
+cr_bits  Config Rotation Bits
+LB       Load Balancer
+sid      Server ID
+sid_len  Server ID length
+su       Server Use Bytes
+
¶ +
+

All values except length_self_encoding and sid_len are expressed in hexidecimal +format.¶

+
+
+

+B.1. Plaintext Connection ID Algorithm +

+
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1
+
+cid 01be sid be su
+cid 0221b7 sid 21 su b7
+cid 03cadfd8 sid ca su dfd8
+cid 041e0c9328 sid 1e su 0c9328
+cid 050c8f6d9129 sid 0c su 8f6d9129
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2
+
+cid 02aab0 sid aab0 su
+cid 3ac4b106 sid c4b1 su 06
+cid 08bd3cf4a0 sid bd3c su f4a0
+cid 3771d59502d6 sid 71d5 su 9502d6
+cid 1d57dee8b888f3 sid 57de su e8b888f3
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3
+
+cid 0336c976 sid 36c976 su
+cid 04aa291806 sid aa2918 su 06
+cid 0586897bd8b6 sid 86897b su d8b6
+cid 063625bcae4de0 sid 3625bc su ae4de0
+cid 07966fb1f3cb535f sid 966fb1 su f3cb535f
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4
+
+cid 185172fab8 sid 5172fab8 su
+cid 2eb7ff2c9297 sid b7ff2c92 su 97
+cid 14f3eb3dd3edbe sid f3eb3dd3 su edbe
+cid 3feb31cece744b74 sid eb31cece su 744b74
+cid 06b9f34c353ce23bb5 sid b9f34c35 su 3ce23bb5
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5
+
+cid 05bdcd8d0b1d sid bdcd8d0b1d su
+cid 06aee673725a63 sid aee673725a su 63
+cid 07bbf338ddbf37f4 sid bbf338ddbf su 37f4
+cid 08fbbca64c26756840 sid fbbca64c26 su 756840
+cid 09e7737c495b93894e34 sid e7737c495b su 93894e34
+
¶ +
+
+
+
+
+

+B.2. Stream Cipher Connection ID Algorithm +

+

In each case below, the server is using a plain text nonce value of zero.¶

+
+
+LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 12 sid_len 1
+    key 4d9d0fd25a25e7f321ef464e13f9fa3d
+
+cid 0d69fe8ab8293680395ae256e89c sid c5 su
+cid 0e420d74ed99b985e10f5073f43027 sid d5 su 27
+cid 0f380f440c6eefd3142ee776f6c16027 sid 10 su 6027
+cid 1020607efbe82049ddbf3a7c3d9d32604d sid 3c su 32604d
+cid 11e132d12606a1bb0fa17e1caef00ec54c10 sid e3 su 0ec54c10
+
+LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 2
+    key 49e1cec7fd264b1f4af37413baf8ada9
+
+cid 3d3a5e1126414271cc8dc2ec7c8c15 sid f7fe su
+cid 007042539e7c5f139ac2adfbf54ba748 sid eaf4 su 48
+cid 2bc125dd2aed2aafacf59855d99e029217 sid e880 su 9217
+cid 3be6728dc082802d9862c6c8e4dda3d984d8 sid 62c6 su d984d8
+cid 1afe9c6259ad350fc7bad28e0aeb2e8d4d4742 sid 8502 su 8d4d4742
+
+LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 14 sid_len 3
+    key 2c70df0b399bd33a7335523dcdb884ad
+
+cid 11d62e8670565cd30b552edff6782ff5a740 sid d794bb su
+cid 12c70e481f49363cabd9370d1fd5012c12bca5 sid 2cbd5d su a5
+cid 133b95dfd8ad93566782f8424df82458069fc9e9 sid d126cd su c9e9
+cid 13ac6ffcd635532ab60370306c7ee572d6b6e795 sid 539e42 su e795
+cid 1383ed07a9700777ff450bb39bb9c1981266805c sid 9094dd su 805c
+
+LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 4
+    key 2297b8a95c776cf9c048b76d9dc27019
+
+cid 32873890c3059ca62628089439c44c1f84 sid 7398d8ca su
+cid 1ff7c7d7b9823954b178636c99a7dc93ac83 sid 9655f091 su 83
+cid 31044000a5ebb3bf2fa7629a17f2c78b077c17 sid 8b035fc6 su 7c17
+cid 1791bd28c66721e8fea0c6f34fd2d8e663a6ef70 sid 6672e0e2 su a6ef70
+cid 3df1d90ad5ccd5f8f475f040e90aeca09ec9839d sid b98b1fff su c9839d
+
+LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 8 sid_len 5
+    key 484b2ed942d9f4765e45035da3340423
+
+cid 0da995b7537db605bfd3a38881ae sid 391a7840dc su
+cid 0ed8d02d55b91d06443540d1bf6e98 sid 10f7f7b284 su 98
+cid 0f3f74be6d46a84ccb1fd1ee92cdeaf2 sid 0606918fc0 su eaf2
+cid 1045626dbf20e03050837633cc5650f97c sid e505eea637 su 50f97c
+cid 11bb9a17f691ab446a938427febbeb593eaa sid 99343a2a96 su eb593eaa
+
¶ +
+
+
+
+
+

+B.3. Block Cipher Connection ID Algorithm +

+
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1
+    key 411592e4160268398386af84ea7505d4
+
+cid 10564f7c0df399f6d93bdddb1a03886f25 sid 23 su 05231748a80884ed58007847eb9fd0
+cid 10d5c03f9dd765d73b3d8610b244f74d02 sid 15 su 76cd6b6f0d3f0b20fc8e633e3a05f3
+cid 108ca55228ab23b92845341344a2f956f2 sid 64 su 65c0ce170a9548717498b537cb8790
+cid 10e73f3d034aef2f6f501e3a7693d6270a sid 07 su f9ad10c84cc1e89a2492221d74e707
+cid 101a6ce13d48b14a77ecfd365595ad2582 sid 6c su 76ce4689b0745b956ef71c2608045d
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2
+    key 92ce44aecd636aeeff78da691ef48f77
+
+cid 20aa09bc65ed52b1ccd29feb7ef995d318 sid a52f su 99278b92a86694ff0ecd64bc2f73
+cid 30b8dbef657bd78a2f870e93f9485d5211 sid 6c49 su 7381c8657a388b4e9594297afe96
+cid 043a8137331eacd2e78383279b202b9a6d sid 4188 su 5ac4b0e0b95f4e7473b49ee2d0dd
+cid 3ba71ea2bcf0ab95719ab59d3d7fde770d sid 8ccc su 08728807605db25f2ca88be08e0f
+cid 37ef1956b4ec354f40dc68336a23d42b31 sid c89d su 5a3ccd1471caa0de221ad6c185c0
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3
+    key 5c49cb9265efe8ae7b1d3886948b0a34
+
+cid 10efcffc161d232d113998a49b1dbc4aa0 sid 0690b3 su 958fc9f38fe61b83881b2c5780
+cid 10fc13bdbcb414ba90e391833400c19505 sid 031ac3 su 9a55e1e1904e780346fcc32c3c
+cid 10d3cc1efaf5dc52c7a0f6da2746a8c714 sid 572d3a su ff2ec9712664e7174dc03ca3f8
+cid 107edf37f6788e33c0ec7758a485215f2b sid 562c25 su 02c5a5dcbea629c3840da5f567
+cid 10bc28da122582b7312e65aa096e9724fc sid 2fa4f0 su 8ae8c666bfc0fc364ebfd06b9a
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4
+    key e787a3a491551fb2b4901a3fa15974f3
+
+cid 26125351da12435615e3be6b16fad35560 sid 0cb227d3 su 65b40b1ab54e05bff55db046
+cid 14de05fc84e41b611dfbe99ed5b1c9d563 sid 6a0f23ad su d73bee2f3a7e72b3ffea52d9
+cid 1306052c3f973db87de6d7904914840ff1 sid ca21402d su 5829465f7418b56ee6ada431
+cid 1d202b5811af3e1dba9ea2950d27879a92 sid b14e1307 su 4902aba8b23a5f24616df3cf
+cid 26538b78efc2d418539ad1de13ab73e477 sid a75e0148 su 0040323f1854e75aeb449b9f
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5
+    key d5a6d7824336fbe0f25d28487cdda57c
+
+cid 10a2794871aadb20ddf274a95249e57fde sid 82d3b0b1a1 su 0935471478c2edb8120e60
+cid 108122fe80a6e546a285c475a3b8613ec9 sid fbcc902c9d su 59c47946882a9a93981c15
+cid 104d227ad9dd0fef4c8cb6eb75887b6ccc sid 2808e22642 su 2a7ef40e2c7e17ae40b3fb
+cid 10b3f367d8627b36990a28d67f50b97846 sid 5e018f0197 su 2289cae06a566e5cb6cfa4
+cid 1024412bfe25f4547510204bdda6143814 sid 8a8dd3d036 su 4b12933a135e5eaaebc6fd
+
¶ +
+
+
+
+
+
+
+

+Appendix C. Acknowledgments +

+

The authors would like to thank Christian Huitema and Ian Swett for their major +design contributions.¶

+

Manasi Deval, Erik Fuller, Toma Gavrichenkov, Jana Iyengar, Subodh Iyengar, +Ladislav Lhotka, Jan Lindblad, Ling Tao Nju, Kazuho Oku, Udip Pant, Martin +Thomson, Dmitri Tikhonov, Victor Vasiliev, and William Zeng Ke all provided +useful input to this document.¶

+
+
+
+
+

+Appendix D. Change Log +

+
    +
  • + RFC Editor's Note: Please remove this section prior to +publication of a final version of this document.¶ +
  • +
+ +
+
+

+D.2. since draft-ietf-quic-load-balancers-05 +

+
    +
  • Added low-config CID for further discussion¶ +
  • +
  • Complete revision of shared-state Retry Token¶ +
  • +
  • Added YANG model¶ +
  • +
  • Updated configuration limits to ensure CID entropy¶ +
  • +
  • Switched to notation from quic-transport¶ +
  • +
+
+
+
+
+

+D.3. since draft-ietf-quic-load-balancers-04 +

+
    +
  • Rearranged the shared-state retry token to simplify token processing¶ +
  • +
  • More compact timestamp in shared-state retry token¶ +
  • +
  • Revised server requirements for shared-state retries¶ +
  • +
  • Eliminated zero padding from the test vectors¶ +
  • +
  • Added server use bytes to the test vectors¶ +
  • +
  • Additional compliant DCID criteria¶ +
  • +
+
+
+
+
+

+D.4. since-draft-ietf-quic-load-balancers-03 +

+
    +
  • Improved Config Rotation text¶ +
  • +
  • Added stream cipher test vectors¶ +
  • +
  • Deleted the Obfuscated CID algorithm¶ +
  • +
+
+
+
+
+

+D.5. since-draft-ietf-quic-load-balancers-02 +

+
    +
  • Replaced stream cipher algorithm with three-pass version¶ +
  • +
  • Updated Retry format to encode info for required TPs¶ +
  • +
  • Added discussion of version invariance¶ +
  • +
  • Cleaned up text about config rotation¶ +
  • +
  • Added Reset Oracle and limited configuration considerations¶ +
  • +
  • Allow dropped long-header packets for known QUIC versions¶ +
  • +
+
+
+
+
+

+D.6. since-draft-ietf-quic-load-balancers-01 +

+
    +
  • Test vectors for load balancer decoding¶ +
  • +
  • Deleted remnants of in-band protocol¶ +
  • +
  • Light edit of Retry Services section¶ +
  • +
  • Discussed load balancer chains¶ +
  • +
+
+
+
+
+

+D.7. since-draft-ietf-quic-load-balancers-00 +

+
    +
  • Removed in-band protocol from the document¶ +
  • +
+
+
+
+
+

+D.8. Since draft-duke-quic-load-balancers-06 +

+
    +
  • Switch to IETF WG draft.¶ +
  • +
+
+
+
+
+

+D.9. Since draft-duke-quic-load-balancers-05 +

+
    +
  • Editorial changes¶ +
  • +
  • Made load balancer behavior independent of QUIC version¶ +
  • +
  • Got rid of token in stream cipher encoding, because server might not have it¶ +
  • +
  • Defined "non-compliant DCID" and specified rules for handling them.¶ +
  • +
  • Added psuedocode for config schema¶ +
  • +
+
+
+
+
+

+D.10. Since draft-duke-quic-load-balancers-04 +

+
    +
  • Added standard for retry services¶ +
  • +
+
+
+
+
+

+D.11. Since draft-duke-quic-load-balancers-03 +

+
    +
  • Renamed Plaintext CID algorithm as Obfuscated CID¶ +
  • +
  • Added new Plaintext CID algorithm¶ +
  • +
  • Updated to allow 20B CIDs¶ +
  • +
  • Added self-encoding of CID length¶ +
  • +
+
+
+
+
+

+D.12. Since draft-duke-quic-load-balancers-02 +

+
    +
  • Added Config Rotation¶ +
  • +
  • Added failover mode¶ +
  • +
  • Tweaks to existing CID algorithms¶ +
  • +
  • Added Block Cipher CID algorithm¶ +
  • +
  • Reformatted QUIC-LB packets¶ +
  • +
+
+
+
+
+

+D.13. Since draft-duke-quic-load-balancers-01 +

+
    +
  • Complete rewrite¶ +
  • +
  • Supports multiple security levels¶ +
  • +
  • Lightweight messages¶ +
  • +
+
+
+
+
+

+D.14. Since draft-duke-quic-load-balancers-00 +

+
    +
  • Converted to markdown¶ +
  • +
  • Added variable length connection IDs¶ +
  • +
+
+
+
+
+
+
+

+Authors' Addresses +

+
+
Martin Duke
+
F5 Networks, Inc.
+ +
+
+
Nick Banks
+
Microsoft
+ +
+
+
+ + + diff --git a/shared-ip/draft-ietf-quic-load-balancers.txt b/shared-ip/draft-ietf-quic-load-balancers.txt new file mode 100644 index 0000000..4d7f5b4 --- /dev/null +++ b/shared-ip/draft-ietf-quic-load-balancers.txt @@ -0,0 +1,2688 @@ + + + + +QUIC M. Duke +Internet-Draft F5 Networks, Inc. +Intended status: Standards Track N. Banks +Expires: 4 October 2021 Microsoft + 2 April 2021 + + + QUIC-LB: Generating Routable QUIC Connection IDs + draft-ietf-quic-load-balancers-07 + +Abstract + + The QUIC protocol design is resistant to transparent packet + inspection, injection, and modification by intermediaries. However, + the server can explicitly cooperate with network services by agreeing + to certain conventions and/or sharing state with those services. + This specification provides a standardized means of solving three + problems: (1) maintaining routability to servers via a low-state load + balancer even when the connection IDs in use change; (2) explicit + encoding of the connection ID length in all packets to assist + hardware accelerators; and (3) injection of QUIC Retry packets by an + anti-Denial-of-Service agent on behalf of the server. + +Note to Readers + + Discussion of this document takes place on the QUIC Working Group + mailing list (quic@ietf.org), which is archived at + https://mailarchive.ietf.org/arch/browse/quic/ + (https://mailarchive.ietf.org/arch/browse/quic/). + + Source for this draft and an issue tracker can be found at + https://github.com/quicwg/load-balancers (https://github.com/quicwg/ + load-balancers). + +Status of This Memo + + This Internet-Draft is submitted in full conformance with the + provisions of BCP 78 and BCP 79. + + Internet-Drafts are working documents of the Internet Engineering + Task Force (IETF). Note that other groups may also distribute + working documents as Internet-Drafts. The list of current Internet- + Drafts is at https://datatracker.ietf.org/drafts/current/. + + Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as "work in progress." + + + +Duke & Banks Expires 4 October 2021 [Page 1] + +Internet-Draft QUIC-LB April 2021 + + + This Internet-Draft will expire on 4 October 2021. + +Copyright Notice + + Copyright (c) 2021 IETF Trust and the persons identified as the + document authors. All rights reserved. + + This document is subject to BCP 78 and the IETF Trust's Legal + Provisions Relating to IETF Documents (https://trustee.ietf.org/ + license-info) in effect on the date of publication of this document. + Please review these documents carefully, as they describe your rights + and restrictions with respect to this document. Code Components + extracted from this document must include Simplified BSD License text + as described in Section 4.e of the Trust Legal Provisions and are + provided without warranty as described in the Simplified BSD License. + +Table of Contents + + 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 + 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 + 1.2. Notation . . . . . . . . . . . . . . . . . . . . . . . . 5 + 2. Protocol Objectives . . . . . . . . . . . . . . . . . . . . . 6 + 2.1. Simplicity . . . . . . . . . . . . . . . . . . . . . . . 6 + 2.2. Security . . . . . . . . . . . . . . . . . . . . . . . . 6 + 3. First CID octet . . . . . . . . . . . . . . . . . . . . . . . 7 + 3.1. Config Rotation . . . . . . . . . . . . . . . . . . . . . 7 + 3.2. Configuration Failover . . . . . . . . . . . . . . . . . 8 + 3.3. Length Self-Description . . . . . . . . . . . . . . . . . 8 + 3.4. Format . . . . . . . . . . . . . . . . . . . . . . . . . 8 + 4. Load Balancing Preliminaries . . . . . . . . . . . . . . . . 9 + 4.1. Non-Compliant Connection IDs . . . . . . . . . . . . . . 9 + 4.2. Arbitrary Algorithms . . . . . . . . . . . . . . . . . . 10 + 4.3. Server ID Allocation . . . . . . . . . . . . . . . . . . 11 + 4.3.1. Static Allocation . . . . . . . . . . . . . . . . . . 11 + 4.3.2. Dynamic Allocation . . . . . . . . . . . . . . . . . 12 + 5. Routing Algorithms . . . . . . . . . . . . . . . . . . . . . 14 + 5.1. Plaintext CID Algorithm . . . . . . . . . . . . . . . . . 14 + 5.1.1. Configuration Agent Actions . . . . . . . . . . . . . 14 + 5.1.2. Load Balancer Actions . . . . . . . . . . . . . . . . 14 + 5.1.3. Server Actions . . . . . . . . . . . . . . . . . . . 14 + 5.2. Stream Cipher CID Algorithm . . . . . . . . . . . . . . . 15 + 5.2.1. Configuration Agent Actions . . . . . . . . . . . . . 15 + 5.2.2. Load Balancer Actions . . . . . . . . . . . . . . . . 15 + 5.2.3. Server Actions . . . . . . . . . . . . . . . . . . . 17 + 5.3. Block Cipher CID Algorithm . . . . . . . . . . . . . . . 17 + 5.3.1. Configuration Agent Actions . . . . . . . . . . . . . 17 + 5.3.2. Load Balancer Actions . . . . . . . . . . . . . . . . 17 + 5.3.3. Server Actions . . . . . . . . . . . . . . . . . . . 18 + + + +Duke & Banks Expires 4 October 2021 [Page 2] + +Internet-Draft QUIC-LB April 2021 + + + 6. ICMP Processing . . . . . . . . . . . . . . . . . . . . . . . 18 + 7. Retry Service . . . . . . . . . . . . . . . . . . . . . . . . 18 + 7.1. Common Requirements . . . . . . . . . . . . . . . . . . . 19 + 7.1.1. Considerations for Non-Initial Packets . . . . . . . 20 + 7.2. No-Shared-State Retry Service . . . . . . . . . . . . . . 21 + 7.2.1. Configuration Agent Actions . . . . . . . . . . . . . 21 + 7.2.2. Service Requirements . . . . . . . . . . . . . . . . 21 + 7.2.3. Server Requirements . . . . . . . . . . . . . . . . . 23 + 7.3. Shared-State Retry Service . . . . . . . . . . . . . . . 23 + 7.3.1. Token Protection with AEAD . . . . . . . . . . . . . 25 + 7.3.2. Configuration Agent Actions . . . . . . . . . . . . . 26 + 7.3.3. Service Requirements . . . . . . . . . . . . . . . . 26 + 7.3.4. Server Requirements . . . . . . . . . . . . . . . . . 27 + 8. Configuration Requirements . . . . . . . . . . . . . . . . . 28 + 9. Additional Use Cases . . . . . . . . . . . . . . . . . . . . 28 + 9.1. Load balancer chains . . . . . . . . . . . . . . . . . . 29 + 9.2. Moving connections between servers . . . . . . . . . . . 29 + 10. Version Invariance of QUIC-LB . . . . . . . . . . . . . . . . 29 + 11. Security Considerations . . . . . . . . . . . . . . . . . . . 30 + 11.1. Attackers not between the load balancer and server . . . 31 + 11.2. Attackers between the load balancer and server . . . . . 31 + 11.3. Multiple Configuration IDs . . . . . . . . . . . . . . . 31 + 11.4. Limited configuration scope . . . . . . . . . . . . . . 32 + 11.5. Stateless Reset Oracle . . . . . . . . . . . . . . . . . 32 + 11.6. Connection ID Entropy . . . . . . . . . . . . . . . . . 32 + 11.7. Shared-State Retry Keys . . . . . . . . . . . . . . . . 33 + 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 + 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 34 + 13.1. Normative References . . . . . . . . . . . . . . . . . . 34 + 13.2. Informative References . . . . . . . . . . . . . . . . . 34 + Appendix A. QUIC-LB YANG Model . . . . . . . . . . . . . . . . . 35 + A.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 40 + Appendix B. Load Balancer Test Vectors . . . . . . . . . . . . . 40 + B.1. Plaintext Connection ID Algorithm . . . . . . . . . . . . 41 + B.2. Stream Cipher Connection ID Algorithm . . . . . . . . . . 42 + B.3. Block Cipher Connection ID Algorithm . . . . . . . . . . 43 + Appendix C. Acknowledgments . . . . . . . . . . . . . . . . . . 45 + Appendix D. Change Log . . . . . . . . . . . . . . . . . . . . . 45 + D.1. since draft-ietf-quic-load-balancers-06 . . . . . . . . . 45 + D.2. since draft-ietf-quic-load-balancers-05 . . . . . . . . . 45 + D.3. since draft-ietf-quic-load-balancers-04 . . . . . . . . . 45 + D.4. since-draft-ietf-quic-load-balancers-03 . . . . . . . . . 45 + D.5. since-draft-ietf-quic-load-balancers-02 . . . . . . . . . 46 + D.6. since-draft-ietf-quic-load-balancers-01 . . . . . . . . . 46 + D.7. since-draft-ietf-quic-load-balancers-00 . . . . . . . . . 46 + D.8. Since draft-duke-quic-load-balancers-06 . . . . . . . . . 46 + D.9. Since draft-duke-quic-load-balancers-05 . . . . . . . . . 46 + D.10. Since draft-duke-quic-load-balancers-04 . . . . . . . . . 47 + + + +Duke & Banks Expires 4 October 2021 [Page 3] + +Internet-Draft QUIC-LB April 2021 + + + D.11. Since draft-duke-quic-load-balancers-03 . . . . . . . . . 47 + D.12. Since draft-duke-quic-load-balancers-02 . . . . . . . . . 47 + D.13. Since draft-duke-quic-load-balancers-01 . . . . . . . . . 47 + D.14. Since draft-duke-quic-load-balancers-00 . . . . . . . . . 47 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 47 + +1. Introduction + + QUIC packets [QUIC-TRANSPORT] usually contain a connection ID to + allow endpoints to associate packets with different address/ port + 4-tuples to the same connection context. This feature makes + connections robust in the event of NAT rebinding. QUIC endpoints + usually designate the connection ID which peers use to address + packets. Server-generated connection IDs create a potential need for + out-of-band communication to support QUIC. + + QUIC allows servers (or load balancers) to designate an initial + connection ID to encode useful routing information for load + balancers. It also encourages servers, in packets protected by + cryptography, to provide additional connection IDs to the client. + This allows clients that know they are going to change IP address or + port to use a separate connection ID on the new path, thus reducing + linkability as clients move through the world. + + There is a tension between the requirements to provide routing + information and mitigate linkability. Ultimately, because new + connection IDs are in protected packets, they must be generated at + the server if the load balancer does not have access to the + connection keys. However, it is the load balancer that has the + context necessary to generate a connection ID that encodes useful + routing information. In the absence of any shared state between load + balancer and server, the load balancer must maintain a relatively + expensive table of server-generated connection IDs, and will not + route packets correctly if they use a connection ID that was + originally communicated in a protected NEW_CONNECTION_ID frame. + + This specification provides common algorithms for encoding the server + mapping in a connection ID given some shared parameters. The mapping + is generally only discoverable by observers that have the parameters, + preserving unlinkability as much as possible. + + + + + + + + + + + +Duke & Banks Expires 4 October 2021 [Page 4] + +Internet-Draft QUIC-LB April 2021 + + + Aside from load balancing, a QUIC server may also desire to offload + other protocol functions to trusted intermediaries. These + intermediaries might include hardware assist on the server host + itself, without access to fully decrypted QUIC packets. For example, + this document specifies a means of offloading stateless retry to + counter Denial of Service attacks. It also proposes a system for + self-encoding connection ID length in all packets, so that crypto + 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 + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + document are to be interpreted as described in RFC 2119 [RFC2119]. + + 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 + interpreted as carrying significance described in RFC 2119. + + In this document, "client" and "server" refer to the endpoints of a + QUIC connection unless otherwise indicated. A "load balancer" is an + intermediary for that connection that does not possess QUIC + connection keys, but it may rewrite IP addresses or conduct other IP + or UDP processing. A "configuration agent" is the entity that + determines the QUIC-LB configuration parameters for the network and + leverages some system to distribute that configuration. + + Note that stateful load balancers that act as proxies, by terminating + a QUIC connection with the client and then retrieving data from the + server using QUIC or another protocol, are treated as a server with + respect to this specification. + + For brevity, "Connection ID" will often be abbreviated as "CID". + +1.2. Notation + + All wire formats will be depicted using the notation defined in + Section 1.3 of [QUIC-TRANSPORT]. There is one addition: the function + len() refers to the length of a field which can serve as a limit on a + different field, so that the lengths of two fields can be concisely + defined as limited to a sum, for example: + + + + +Duke & Banks Expires 4 October 2021 [Page 5] + +Internet-Draft QUIC-LB April 2021 + + + x(A..B) y(C..B-len(x)) + + indicates that x can be of any length between A and B, and y can be + of any length between C and B provided that (len(x) + len(y)) does + not exceed B. + + The example below illustrates the basic framework: + +Example Structure { + One-bit Field (1), + 7-bit Field with Fixed Value (7) = 61, + Field with Variable-Length Integer (i), + Arbitrary-Length Field (..), + Variable-Length Field (8..24), + Variable-Length Field with Dynamic Limit (8..24-len(Variable-Length Field)), + Field With Minimum Length (16..), + Field With Maximum Length (..128), + [Optional Field (64)], + Repeated Field (8) ..., +} + + Figure 1: Example Format + +2. Protocol Objectives + +2.1. Simplicity + + QUIC is intended to provide unlinkability across connection + migration, but servers are not required to provide additional + connection IDs that effectively prevent linkability. If the + coordination scheme is too difficult to implement, servers behind + load balancers using connection IDs for routing will use trivially + linkable connection IDs. Clients will therefore be forced to choose + between terminating the connection during migration or remaining + linkable, subverting a design objective of QUIC. + + The solution should be both simple to implement and require little + additional infrastructure for cryptographic keys, etc. + +2.2. Security + + In the limit where there are very few connections to a pool of + servers, no scheme can prevent the linking of two connection IDs with + high probability. In the opposite limit, where all servers have many + connections that start and end frequently, it will be difficult to + associate two connection IDs even if they are known to map to the + same server. + + + + +Duke & Banks Expires 4 October 2021 [Page 6] + +Internet-Draft QUIC-LB April 2021 + + + QUIC-LB is relevant in the region between these extremes: when the + information that two connection IDs map to the same server is helpful + to linking two connection IDs. Obviously, any scheme that + transparently communicates this mapping to outside observers + compromises QUIC's defenses against linkability. + + Though not an explicit goal of the QUIC-LB design, concealing the + server mapping also complicates attempts to focus attacks on a + specific server in the pool. + +3. First CID octet + + The first octet of a Connection ID is reserved for two special + purposes, one mandatory (config rotation) and one optional (length + self-description). + + Subsequent sections of this document refer to the contents of this + octet as the "first octet." + +3.1. Config Rotation + + The first two bits of any connection ID MUST encode an identifier for + the configuration that the connection ID uses. This enables + incremental deployment of new QUIC-LB settings (e.g., keys). + + When new configuration is distributed to servers, there will be a + transition period when connection IDs reflecting old and new + configuration coexist in the network. The rotation bits allow load + balancers to apply the correct routing algorithm and parameters to + incoming packets. + + Configuration Agents SHOULD deliver new configurations to load + balancers before doing so to servers, so that load balancers are + ready to process CIDs using the new parameters when they arrive. + + A Configuration Agent SHOULD NOT use a codepoint to represent a new + configuration until it takes precautions to make sure that all + connections using CIDs with an old configuration at that codepoint + have closed or transitioned. + + Servers MUST NOT generate new connection IDs using an old + configuration after receiving a new one from the configuration agent. + Servers MUST send NEW_CONNECTION_ID frames that provide CIDs using + the new configuration, and retire CIDs using the old configuration + using the "Retire Prior To" field of that frame. + + + + + + +Duke & Banks Expires 4 October 2021 [Page 7] + +Internet-Draft QUIC-LB April 2021 + + + It also possible to use these bits for more long-lived distinction of + different configurations, but this has privacy implications (see + Section 11.3). + +3.2. Configuration Failover + + If a server has not received a valid QUIC-LB configuration, and + believes that low-state, Connection-ID aware load balancers are in + the path, it SHOULD generate connection IDs with the config rotation + bits set to '11' and SHOULD use the "disable_active_migration" + transport parameter in all new QUIC connections. It SHOULD NOT send + NEW_CONNECTION_ID frames with new values. + + A load balancer that sees a connection ID with config rotation bits + set to '11' MUST revert to 5-tuple routing. + +3.3. Length Self-Description + + Local hardware cryptographic offload devices may accelerate QUIC + servers by receiving keys from the QUIC implementation indexed to the + connection ID. However, on physical devices operating multiple QUIC + servers, it is impractical to efficiently lookup these keys if the + connection ID does not self-encode its own length. + + Note that this is a function of particular server devices and is + irrelevant to load balancers. As such, load balancers MAY omit this + from their configuration. However, the remaining 6 bits in the first + octet of the Connection ID are reserved to express the length of the + following connection ID, not including the first octet. + + A server not using this functionality SHOULD make the six bits appear + to be random. + +3.4. Format + + First Octet { + Config Rotation (2), + CID Len or Random Bits (6), + } + + Figure 2: First Octet Format + + The first octet has the following fields: + + Config Rotation: Indicates the configuration used to interpret the + CID. + + + + + +Duke & Banks Expires 4 October 2021 [Page 8] + +Internet-Draft QUIC-LB April 2021 + + + CID Len or Random Bits: Length Self-Description (if applicable), or + random bits otherwise. Encodes the length of the Connection ID + following the First Octet. + +4. Load Balancing Preliminaries + + In QUIC-LB, load balancers do not generate individual connection IDs + for servers. Instead, they communicate the parameters of an + algorithm to generate routable connection IDs. + + The algorithms differ in the complexity of configuration at both load + balancer and server. Increasing complexity improves obfuscation of + the server mapping. + + This section describes three participants: the configuration agent, + the load balancer, and the server. For any given QUIC-LB + configuration that enables connection-ID-aware load balancing, there + must be a choice of (1) routing algorithm, (2) server ID allocation + strategy, and (3) algorithm parameters. + + Fundamentally, servers generate connection IDs that encode their + server ID. Load balancers decode the server ID from the CID in + incoming packets to route to the correct server. + + There are situations where a server pool might be operating two or + more routing algorithms or parameter sets simultaneously. The load + balancer uses the first two bits of the connection ID to multiplex + incoming DCIDs over these schemes (see Section 3.1). + +4.1. Non-Compliant Connection IDs + + QUIC-LB servers will generate Connection IDs that are decodable to + extract a server ID in accordance with a specified algorithm and + parameters. However, QUIC often uses client-generated Connection IDs + prior to receiving a packet from the server. + + These client-generated CIDs might not conform to the expectations of + the routing algorithm and therefore not be routable by the load + balancer. Those that are not routable are "non-compliant DCIDs" and + receive similar treatment regardless of why they're non-compliant: + + * The config rotation bits (Section 3.1) may not correspond to an + active configuration. Note: a packet with a DCID that indicates + 5-tuple routing (see Section 3.2) is always compliant. + + * The DCID might not be long enough for the decoder to process. + + + + + +Duke & Banks Expires 4 October 2021 [Page 9] + +Internet-Draft QUIC-LB April 2021 + + + * The extracted server mapping might not correspond to an active + server. + + All other DCIDs are compliant. + + Load balancers MUST forward packets with compliant DCIDs to a server + in accordance with the chosen routing algorithm. + + Load balancers SHOULD drop short header packets with non-compliant + DCIDs. + + The routing of long headers with non-compliant DCIDs depends on the + server ID allocation strategy, described in Section 4.3. However, + the load balancer MUST NOT drop these packets, with one exception. + + Load balancers MAY drop packets with long headers and non-compliant + DCIDs if and only if it knows that the encoded QUIC version does not + allow a non- compliant DCID in a packet with that signature. For + example, a load balancer can safely drop a QUIC version 1 Handshake + packet with a non-compliant DCID, as a version 1 Handshake packet + sent to a QUIC-LB compliant server will always have a server- + generated compliant CID. The prohibition against dropping packets + with long headers remains for unknown QUIC versions. + + Furthermore, while the load balancer function MUST NOT drop packets, + the device might implement other security policies, outside the scope + of this specification, that might force a drop. + + Servers that receive packets with noncompliant CIDs MUST use the + available mechanisms to induce the client to use a compliant CID in + future packets. In QUIC version 1, this requires using a compliant + CID in the Source CID field of server-generated long headers. + +4.2. Arbitrary Algorithms + + There are conditions described below where a load balancer routes a + packet using an "arbitrary algorithm." It can choose any algorithm, + without coordination with the servers, but the algorithm SHOULD be + deterministic over short time scales so that related packets go to + the same server. The design of this algorithm SHOULD consider the + version-invariant properties of QUIC described in [QUIC-INVARIANTS] + to maximize its robustness to future versions of QUIC. + + An arbitrary algorithm MUST NOT make the routing behavior dependent + on any 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-dependent and intermediaries SHOULD NOT base their design on + version-specific templates. + + + +Duke & Banks Expires 4 October 2021 [Page 10] + +Internet-Draft QUIC-LB April 2021 + + + For example, one arbitrary algorithm might convert a non-compliant + DCID to an integer and divided by the number of servers, with the + modulus used to forward the packet. The number of servers is usually + consistent on the time scale of a QUIC connection handshake. Another + might simply hash the address/port 4-tuple. See also Section 10. + +4.3. Server ID Allocation + + For any given configuration, the configuration agent must specify if + server IDs will be statically or dynamically allocated. Load + Balancer configurations with statically allocated server IDs + explicitly include a mapping of server IDs to forwarding addresses. + The corresponding server configurations contain one or more unique + server IDs. + + A dynamically allocated configuration does not have a pre-defined + assignment, reducing configuration complexity. However, it places + limits on the maximum server ID length and requires more state at the + load balancer. In certain edge cases, it can force parts of the + system to fail over to 5-tuple routing for a short time. + + In either case, the configuration agent chooses a server ID length + for each configuration that MUST be at least one octet. For Static + Allocation, the maximum length depends on the algorithm. For dynamic + allocation, the maximum length is 7 octets. + + A QUIC-LB configuration MAY significantly over-provision the server + ID space (i.e., provide far more codepoints than there are servers) + to increase the probability that a randomly generated Destination + Connection ID is non- compliant. + + Conceptually, each configuration has its own set of server ID + allocations, though two static configurations with identical server + ID lengths MAY use a common allocation between them. + + A server encodes one of its assigned server IDs in any CID it + generates using the relevant configuration. + +4.3.1. Static Allocation + + In the static allocation method, the configuration agent assigns at + least one server ID to each server. + + When forwarding a packet with a long header and non-compliant DCID, + load balancers MUST forward packets with long headers and non- + compliant DCIDs using an arbitrary algorithm as specified in + Section 4.2. + + + + +Duke & Banks Expires 4 October 2021 [Page 11] + +Internet-Draft QUIC-LB April 2021 + + +4.3.2. Dynamic Allocation + + In the dynamic allocation method, the load balancer assigns server + IDs dynamically so that configuration does not require fixed server + ID assignment. This reduces linkability. However, it requires state + at the load balancer that roughly scales with the number of + connections, until the server ID codespace is exhausted. + +4.3.2.1. Configuration Agent Actions + + The configuration agent does not assign server IDs, but does + configure a server ID length and an "LB timeout". The server ID MUST + be at least one and no more than seven octets. + +4.3.2.2. Load Balancer Actions + + The load balancer maintains a table of all assigned server IDs and + corresponding routing information, which is initialized empty. These + tables are independent for each operating configuration. + + The load balancer MUST keep track of the most recent observation of + each server ID, in any sort of packet it forwards, in the table and + delete the entries when the time since that observation exceeds the + LB Timeout. + + Note that when the load balancer's table for a configuration is + empty, all incoming DCIDs corresponding to that configuration are + non-compliant by definition. + + The handling of a non-compliant long-header packet depends on the + reason for non-compliance. The load balancer MUST applyt this logic: + + * If the config rotation bits do not match a known configuration, + the load balancer routes the packet using an arbitrary algorithm + (see Section 4.2). + + * If there is a matching configuration, but the CID is not long + enough to apply the algorithm, the load balancer skips the first + octet of the CID and then reads a server ID from the following + octets, up to the server ID length. If this server ID matches a + known server ID for that configuration, it forwards the packet + accordingly and takes no further action. If it does not match, it + routes using an arbitrary algorithm and adds the new server ID to + that server's table entry. + + + + + + + +Duke & Banks Expires 4 October 2021 [Page 12] + +Internet-Draft QUIC-LB April 2021 + + + * If the sole reason for non-compliance is that the server ID is not + in the load balancer's table, the load balancer routes the packet + with an arbitrary algorithm. It adds the decoded server ID to + table entry for the server the algorithm chooses and forwards the + packet accordingly. + +4.3.2.3. Server actions + + Each server maintains a list of server IDs assigned to it, + initialized empty. For each SID, it records the last time it + received any packet with an CID that encoded that SID. + + Upon receipt of a packet with a client-generated DCID, the server + MUST follow these steps in order: + + * If the config rotation bits do not correspond to a known + configuration, do not attempt to extract a server ID. + + * If the DCID is not long enough to decode using the configured + algorithm, extract a number of octets equal to the server ID + length, beginning with the second octet. If the extracted value + does not match a server ID in the server's list, add it to the + list. + + * If the DCID is long enough to decode but the server ID is not in + the server's list, add it to the list. + + After any possible SID is extracted, the server processes the packet + normally. + + When a server needs a new connection ID, it uses one of the server + IDs in its list to populate the server ID field of that CID. It + SHOULD vary this selection to reduce linkability within a connection. + + After loading a new configuration or long periods of idleness, a + server may not have any available SIDs. This is because an incoming + packet may not the config rotation bits necessary to extract a server + ID in accordance with the algorithm above. When required to generate + a CID under these conditions, the server MUST generate CIDs using the + 5-tuple routing codepoint (see Section 3.2. Note that these + connections will not be robust to client address changes while they + use this connection ID. For this reason, a server SHOULD retire + these connection IDs and replace them with routable ones once it + receives a client-generated CID that allows it to acquire a server + ID. As, statistically, one in every four such CIDs can provide a + server ID, this is typically a short interval. + + + + + +Duke & Banks Expires 4 October 2021 [Page 13] + +Internet-Draft QUIC-LB April 2021 + + + If a server has not received a connection ID encoding a particular + server ID within the LB timeout, it MUST retire any outstanding CIDs + that use that server ID and cease generating any new ones. + + A server SHOULD have a mechanism to stop using some server IDs if the + list gets large relative to its share of the codepoint space, so that + these allocations time out and are freed for reuse by servers that + have recently joined the pool. + +5. Routing Algorithms + + Encryption in the algorithms below uses the AES-128-ECB cipher. + Future standards could add new algorithms that use other ciphers to + provide cryptographic agility in accordance with [RFC7696]. QUIC-LB + implementations SHOULD be extensible to support new algorithms. + +5.1. Plaintext CID Algorithm + + The Plaintext CID Algorithm makes no attempt to obscure the mapping + of connections to servers, significantly increasing linkability. The + format is depicted in the figure below. + + Plaintext CID { + First Octet (8), + Server ID (8..128), + For Server Use (8..152-len(Server ID)), + } + + Figure 3: Plaintext CID Format + +5.1.1. Configuration Agent Actions + + For static SID allocation, the server ID length is limited to 16 + octets. There are no parameters specific to this algorithm. + +5.1.2. Load Balancer Actions + + On each incoming packet, the load balancer extracts consecutive + octets, beginning with the second octet. These bytes represent the + server ID. + +5.1.3. Server Actions + + The server chooses how many octets to reserve for its own use, which + MUST be at least one octet. + + + + + + +Duke & Banks Expires 4 October 2021 [Page 14] + +Internet-Draft QUIC-LB April 2021 + + + When a server needs a new connection ID, it encodes one of its + assigned server IDs in consecutive octets beginning with the second. + All other 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. + +5.2. Stream Cipher CID Algorithm + + The Stream Cipher CID algorithm provides cryptographic protection at + the cost of additional per-packet processing at the load balancer to + decrypt every incoming connection ID. The CID format is depicted + below. + + Stream Cipher CID { + First Octet (8), + Nonce (64..120), + Encrypted Server ID (8..128-len(Nonce)), + For Server Use (0..152-len(Nonce)-len(Encrypted Server ID)), + } + + Figure 4: Stream Cipher CID Format + +5.2.1. Configuration Agent Actions + + The configuration agent assigns a server ID to every server in its + pool, and determines a server ID length (in octets) sufficiently + large to encode all server IDs, including potential future servers. + + The configuration agent also selects a nonce length and an 16-octet + AES-ECB key to use for connection ID decryption. The nonce length + MUST be at least 8 octets and no more than 16 octets. The nonce + length and server ID length MUST sum to 19 or fewer octets, but + SHOULD sum to 15 or fewer to allow space for server use. + +5.2.2. Load Balancer Actions + + Upon receipt of a QUIC packet, the load balancer extracts as many of + the earliest octets from the destination connection ID as necessary + to match the nonce length. The server ID immediately follows. + + The load balancer decrypts the nonce and the server ID using the + following three pass algorithm: + + + + + + + + + +Duke & Banks Expires 4 October 2021 [Page 15] + +Internet-Draft QUIC-LB April 2021 + + + * Pass 1: The load balancer decrypts the server ID using 128-bit AES + Electronic Codebook (ECB) mode, much like QUIC header protection. + The encrypted nonce octets are zero-padded to 16 octets. AES-ECB + encrypts this encrypted nonce using its key to generate a mask + which it applies to the encrypted server id. This provides an + intermediate value of the server ID, referred to as server-id + intermediate. + + server_id_intermediate = encrypted_server_id ^ AES-ECB(key, padded- + encrypted-nonce) + + * Pass 2: The load balancer decrypts the nonce octets using 128-bit + AES ECB mode, using the server-id intermediate as "nonce" for this + pass. The server-id intermediate octets are zero-padded to 16 + octets. AES-ECB encrypts this padded server-id intermediate using + its key to generate a mask which it applies to the encrypted + nonce. This provides the decrypted nonce value. + + nonce = encrypted_nonce ^ AES-ECB(key, padded-server_id_intermediate) + + * Pass 3: The load balancer decrypts the server ID using 128-bit AES + ECB mode. The 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 intermediate server id. This provides the + decrypted server ID. + + server_id = server_id_intermediate ^ AES-ECB(key, padded-nonce) + + 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. + The load balancer uses the the second through eleventh octets of the + connection ID for the nonce, zero-pads it to 16 octets, uses xors the + result with the twelfth and thirteenth octet. The result is padded + with 14 octets of zeros and encrypted to obtain a mask that is xored + with the nonce octets. Finally, the nonce octets are padded with six + octets of zeros, encrypted, and the first two octets xored with the + server ID octets to obtain the actual server ID. + + This three-pass algorithm is a simplified version of the FFX + algorithm, with the property that each encrypted nonce value depends + on all server ID bits, and each encrypted server ID bit depends on + all nonce bits and all server ID bits. This mitigates attacks + against stream ciphers in which attackers simply flip encrypted + server-ID bits. + + The output of the decryption is the server ID that the load balancer + uses for routing. + + + + +Duke & Banks Expires 4 October 2021 [Page 16] + +Internet-Draft QUIC-LB April 2021 + + +5.2.3. Server Actions + + When generating a routable connection ID, the server writes arbitrary + bits into its nonce octets, and its provided server ID into the + server ID octets. Servers MAY opt to have a longer connection ID + beyond the nonce and server ID. The additional bits MAY encode + additional information, but SHOULD appear essentially random to + observers. + + If the decrypted nonce bits increase monotonically, that guarantees + that nonces are not reused between connection IDs from the same + server. + + The server encrypts the server ID using exactly the algorithm as + described in Section 5.2.2, performing the three passes in reverse + order. + +5.3. Block Cipher CID Algorithm + + The Block Cipher CID Algorithm, by using a full 16 octets of + plaintext and a 128-bit cipher, provides higher cryptographic + protection and detection of non-compliant connection IDs. However, + it also requires connection IDs of at least 17 octets, increasing + overhead of client-to-server packets. + + Block Cipher CID { + First Octet (8), + Encrypted Server ID (8..128), + Encrypted Bits for Server Use (128-len(Encrypted Server ID)), + Unencrypted Bits for Server Use (0..24), + } + + Figure 5: Block Cipher CID Format + +5.3.1. Configuration Agent Actions + + If server IDs are statically allocated, the server ID length MUST be + no more than 12 octets, to provide servers adequate entropy to + generate unique CIDs. + + The configuration agent also selects an 16-octet AES-ECB key to use + for connection ID decryption. + +5.3.2. Load Balancer Actions + + Upon receipt of a QUIC packet, the load balancer reads the first + octet to obtain the config rotation bits. It then decrypts the + subsequent 16 octets using AES-ECB decryption and the chosen key. + + + +Duke & Banks Expires 4 October 2021 [Page 17] + +Internet-Draft QUIC-LB April 2021 + + + The decrypted plaintext contains the server id and opaque server data + in that order. The load balancer uses the server ID octets for + routing. + +5.3.3. Server Actions + + When generating a routable connection ID, the server MUST choose a + connection ID length between 17 and 20 octets. The server writes its + server ID into the server ID octets and arbitrary bits into the + remaining bits. These arbitrary bits MAY encode additional + information, and MUST differ between connection IDs. Bits in the + eighteenth, nineteenth, and twentieth octets SHOULD appear + essentially random to observers. The first octet is reserved as + described in Section 3. + + The server then encrypts the second through seventeenth octets using + the 128-bit AES-ECB cipher. + +6. ICMP Processing + + For protocols where 4-tuple load balancing is sufficient, it is + straightforward to deliver ICMP packets from the network to the + correct server, by reading the echoed IP and transport-layer headers + to obtain the 4-tuple. When routing is based on connection ID, + further measures are required, as most QUIC packets that trigger ICMP + responses will only contain a client-generated connection ID that + contains no routing information. + + To solve this problem, load balancers MAY maintain a mapping of + Client IP and port to server ID based on recently observed packets. + + Alternatively, servers MAY implement the technique described in + Section 14.4.1 of [QUIC-TRANSPORT] to increase the likelihood a + Source Connection ID is included in ICMP responses to Path Maximum + Transmission Unit (PMTU) probes. Load balancers MAY parse the echoed + packet to extract the Source Connection ID, if it contains a QUIC + long header, and extract the Server ID as if it were in a Destination + CID. + +7. Retry Service + + When a server is under load, QUICv1 allows it to defer storage of + connection state until the client proves it can receive packets at + its advertised IP address. Through the use of a Retry packet, a + token in subsequent client Initial packets, and transport parameters, + servers verify address ownership and clients verify that there is no + on-path attacker generating Retry packets. + + + + +Duke & Banks Expires 4 October 2021 [Page 18] + +Internet-Draft QUIC-LB April 2021 + + + A "Retry Service" detects potential Denial of Service attacks and + handles sending of Retry packets on behalf of the server. As it is, + by definition, literally an on-path entity, the service must + communicate some of the original connection IDs back to the server so + that it can pass client verification. It also must either verify the + address itself (with the server trusting this verification) or make + sure there is common context for the server to verify the address + using a service-generated token. + + There are two different mechanisms to allow offload of DoS mitigation + to a trusted network service. One requires no shared state; the + server need only be configured to trust a retry service, though this + imposes other operational constraints. The other requires a shared + key, but has no such constraints. + +7.1. Common Requirements + + Regardless of mechanism, a retry service has an active mode, where it + is generating Retry packets, and an inactive mode, where it is not, + based on its assessment of server load and the likelihood an attack + is underway. The choice of mode MAY be made on a per-packet or per- + connection basis, through a stochastic process or based on client + address. + + A configuration agent MUST distribute a list of QUIC versions the + Retry Service supports. It MAY also distribute either an "Allow- + List" or a "Deny-List" of other QUIC versions. It MUST NOT + distribute both an Allow-List and a Deny-List. + + The Allow-List or Deny-List MUST NOT include any versions included + for Retry Service Support. + + The Configuration Agent MUST provide a means for the entity that + controls the Retry Service to report its supported version(s) to the + configuration Agent. If the entity has not reported this + information, it MUST NOT activate the Retry Service and the + configuration agent MUST NOT distribute configuration that activates + it. + + The configuration agent MAY delete versions from the final supported + version list if policy does not require the Retry Service to operate + on those versions. + + The configuration Agent MUST provide a means for the entities that + control servers behind the Retry Service to report either an Allow- + List or a Deny-List. + + + + + +Duke & Banks Expires 4 October 2021 [Page 19] + +Internet-Draft QUIC-LB April 2021 + + + If all entities supply Allow-Lists, the consolidated list MUST be the + union of these sets. If all entities supply Deny-Lists, the + consolidated list MUST be the intersection of these sets. + + If entities provide a mixture of Allow-Lists and Deny-Lists, the + consolidated list MUST be a Deny-List that is the intersection of all + provided Deny-Lists and the inverses of all Allow-Lists. + + If no entities that control servers have reported Allow-Lists or + Deny-Lists, the default is a Deny-List with the null set (i.e., all + unsupported versions will be admitted). This preserves the future + extensibilty of QUIC. + + A retry service MUST forward all packets for a QUIC version it does + not support that are not on a Deny-List or absent from an Allow-List. + Note that if servers support versions the retry service does not, + this may increase load on the servers. + + Note that future versions of QUIC might not have Retry packets, + require different information in Retry, or use different packet type + indicators. + +7.1.1. Considerations for Non-Initial Packets + + Initial Packets are especially effective at consuming server + resources because they cause the server to create connection state. + Even when mitigating this load with Retry Packets, the act of + validating an Initial Token and sending a Retry Packet is more + expensive than the response to a non-Initial packet with an unknown + Connection ID: simply dropping it and/or sending a Stateless Reset. + + Nevertheless, a Retry Service in Active Mode might desire to shield + servers from non-Initial packets that do not correspond to a + previously admitted Initial Packet. This has a number of + considerations. + + * If a Retry Service maintains no per-flow state whatsoever, it + cannot distinguish between valid and invalid non_Initial packets + and MUST forward all non-Initial Packets to the server. + + * For QUIC versions the Retry Service does not support and are + present on the Allow-List (or absent from the Deny-List), the + Retry Service cannot distinguish Initial Packets from other long + headers and therefore MUST admit all long headers. + + * If a Retry Service keeps per-flow state, it can identify 4-tuples + that have been previously approved, admit non-Initial packets from + those flows, and drop all others. However, dropping short headers + + + +Duke & Banks Expires 4 October 2021 [Page 20] + +Internet-Draft QUIC-LB April 2021 + + + will effectively break Address Migration and NAT Rebinding when in + Active Mode, as post-migration packets will arrive with a + previously unknown 4-tuple. This policy will also break + connection attempts using any new QUIC versions that begin + connections with a short header. + + * If a Retry Service is integrated with a QUIC-LB compliant load + balancer, it can verify that the Destination Connection ID is + compliant, and only admit non-Initial packets with compliant + DCIDs. As the Connection ID encoding is invariant across QUIC + versions, the Retry Service can do this for all short headers. + + Nothing in this section prevents Retry Services from making basic + syntax correctness checks on packets with QUIC versions that it + understands (e.g., enforcing the Initial Packet datagram size minimum + in version 1) and dropping packets that are not compliant with the + QUIC specification. + +7.2. No-Shared-State Retry Service + + The no-shared-state retry service requires no coordination, except + that the server must be configured to accept this service and know + which QUIC versions the retry service supports. The scheme uses the + first bit of the token to distinguish between tokens from Retry + packets (codepoint '0') and tokens from NEW_TOKEN frames (codepoint + '1'). + +7.2.1. Configuration Agent Actions + + See Section 7.1. + +7.2.2. Service Requirements + + A no-shared-state retry service MUST be present on all paths from + potential clients to the server. These paths MUST fail to pass QUIC + traffic should the service fail for any reason. That is, if the + service is not operational, the server MUST NOT be exposed to client + traffic. Otherwise, servers that have already disabled their Retry + capability would be vulnerable to attack. + + The path between service and server MUST be free of any potential + attackers. Note that this and other requirements above severely + restrict the operational conditions in which a no-shared-state retry + service can safely operate. + + Retry tokens generated by the service MUST have the format below. + + + + + +Duke & Banks Expires 4 October 2021 [Page 21] + +Internet-Draft QUIC-LB April 2021 + + + Non-Shared-State Retry Service Token { + Token Type (1) = 0, + ODCIL (7) = 8..20, + RSCIL (8) = 0..20, + Original Destination Connection ID (64..160), + Retry Source Connection ID (0..160), + Opaque Data (..), + } + + Figure 6: Format of non-shared-state retry service tokens + + The first bit of retry tokens generated by the service MUST be zero. + The token has the following additional fields: + + ODCIL: The length of the original destination connection ID from the + triggering Initial packet. This is in cleartext to be readable for + the server, but authenticated later in the token. The Retry Service + SHOULD reject any token in which the value is less than 8. + + RSCIL: The retry source connection ID length. + + Original Destination Connection ID: This also in cleartext and + authenticated later. + + Retry Source Connection ID: This also in cleartext and authenticated + later. + + Opaque Data: This data MUST contain encrypted information that allows + the retry service to validate the client's IP address, in accordance + with the QUIC specification. It MUST also provide a + cryptographically secure means to validate the integrity of the + entire token. + + Upon receipt of an Initial packet with a token that begins with '0', + the retry service MUST validate the token in accordance with the QUIC + specification. + + In active mode, the service MUST issue Retry packets for all Client + initial packets that contain no token, or a token that has the first + bit set to '1'. It MUST NOT forward the packet to the server. The + service MUST validate all tokens with the first bit set to '0'. If + successful, the service MUST forward the packet with the token + intact. If unsuccessful, it MUST drop the packet. The Retry Service + MAY send an Initial Packet containing a CONNECTION_CLOSE frame with + the INVALID_TOKEN error code when dropping the packet. + + + + + + +Duke & Banks Expires 4 October 2021 [Page 22] + +Internet-Draft QUIC-LB April 2021 + + + Note that this scheme has a performance drawback. When the retry + service is in active mode, clients with a token from a NEW_TOKEN + frame will suffer a 1-RTT penalty even though its token provides + proof of address. + + In inactive mode, the service MUST forward all packets that have no + token or a token with the first bit set to '1'. It MUST validate all + tokens with the first bit set to '0'. If successful, the service + MUST forward the packet with the token intact. If unsuccessful, it + MUST either drop the packet or forward it with the token removed. + The latter requires decryption and re-encryption of the entire + Initial packet to avoid authentication failure. Forwarding the + packet causes the server to respond without the + original_destination_connection_id transport parameter, which + preserves the normal QUIC signal to the client that there is an on- + path attacker. + +7.2.3. Server Requirements + + A server behind a non-shared-state retry service MUST NOT send Retry + packets for a QUIC version the retry service understands. It MAY + send Retry for QUIC versions the Retry Service does not understand. + + Tokens sent in NEW_TOKEN frames MUST have the first bit set to '1'. + + If a server receives an Initial Packet with the first bit set to '1', + it could be from a server-generated NEW_TOKEN frame and should be + processed in accordance with the QUIC specification. If a server + receives an Initial Packet with the first bit to '0', it is a Retry + token and the server MUST NOT attempt to validate it. Instead, it + MUST assume the address is validated and MUST extract the Original + Destination Connection ID and Retry Source Connection ID, assuming + the format described in Section 7.2.2. + +7.3. Shared-State Retry Service + + A shared-state retry service uses a shared key, so that the server + can decode the service's retry tokens. It does not require that all + traffic pass through the Retry service, so servers MAY send Retry + packets in response to Initial packets that don't include a valid + token. + + Both server and service must have time synchronized with respect to + one another to prevent tokens being incorrectly marked as expired, + though tight synchronization is unnecessary. + + + + + + +Duke & Banks Expires 4 October 2021 [Page 23] + +Internet-Draft QUIC-LB April 2021 + + + The tokens are protected using AES128-GCM AEAD, as explained in + Section 7.3.1. All tokens, generated by either the server or retry + service, MUST use the following format, which includes: + + * A 96 bit unique token number transmitted in clear text, but + protected as part of the AEAD associated data. + + * An 8 bit token key identifier. + + * A token body, encoding the Original Destination Connection ID, the + Retry Source Connection ID, and the Timestamp, optionally followed + by server specific Opaque Data. + + The token protection uses an 128 bit representation of the source IP + address from the triggering Initial packet. The client IP address is + 16 octets. If an IPv4 address, the last 12 octets are zeroes. + + If there is a Network Address Translator (NAT) in the server + infrastructure that changes the client IP, the Retry Service MUST + either be positioned behind the NAT, or the NAT must have the token + key to rewrite the Retry token accordingly. Note also that a host + that obtains a token through a NAT and then attempts to connect over + a path that does not have an identically configured NAT will fail + address validation. + + The 96 bit unique token number is set to a random value using a + cryptography- grade random number generator. + + The token key identifier and the corresponding AEAD key and AEAD IV + are provisioned by the configuration agent. + + The token body is encoded as follows: + + Shared-State Retry Service Token Body { + ODCIL (8) = 0..20, + RSCIL (8) = 0..20, + [Port (16)], + Original Destination Connection ID (0..160), + Retry Source Connection ID (0..160), + Timestamp (64), + Opaque Data (..), + } + + Figure 7: Body of shared-state retry service tokens + + The token body has the following fields: + + + + + +Duke & Banks Expires 4 October 2021 [Page 24] + +Internet-Draft QUIC-LB April 2021 + + + ODCIL: The original destination connection ID length. Tokens in + NEW_TOKEN frames MUST set this field to zero. + + RSCIL: The retry source connection ID length. Tokens in NEW_TOKEN + frames MUST set this field to zero. + + Port: The Source Port of the UDP datagram that triggered the Retry + packet. This field MUST be present if and only if the ODCIL is + greater than zero. This field is therefore always absent in tokens + in NEW_TOKEN frames. + + Original Destination Connection ID: The server or Retry Service + copies this from the field in the client Initial packet. + + Retry Source Connection ID: The server or Retry service copies this + from the Source Connection ID of the Retry packet. + + Timestamp: The Timestamp is a 64-bit integer, in network order, that + expresses the expiration time of the token as a number of seconds in + POSIX time (see Sec. 4.16 of [TIME_T]). + + Opaque Data: The server may use this field to encode additional + information, such as congestion window, RTT, or MTU. The Retry + Service MUST have zero-length opaque data. + + Some implementations of QUIC encode in the token the Initial Packet + Number used by the client, in order to verify that the client sends + the retried Initial with a PN larger that the triggering Initial. + Such implementations will encode the Initial Packet Number as part of + the opaque data. As tokens may be generated by the Service, servers + MUST NOT reject tokens because they lack opaque data and therefore + the packet number. + +7.3.1. Token Protection with AEAD + + On the wire, the token is presented as: + + Shared-State Retry Service Token { + Unique Token Number (96), + Key Sequence (8), + Encrypted Shared-State Retry Service Token Body (80..), + AEAD Checksum (128), + } + + Figure 8: Wire image of shared-state retry service tokens + + The tokens are protected using AES128-GCM as follows: + + + + +Duke & Banks Expires 4 October 2021 [Page 25] + +Internet-Draft QUIC-LB April 2021 + + + * The token key and IV are retrieved using the Key Sequence. + + * The nonce, N, is formed by combining the IV with the 96 bit unique + token number. The 96 bits of the unique token number are left- + padded with zeros to the size of the IV. The exclusive OR of the + padded unique token number and the IV forms the AEAD nonce. + + * The associated data is a formatted as a pseudo header by combining + the cleartext part of the token with the IP address of the client. + + Shared-State Retry Service Token Pseudoheader { + IP Address (128), + Unique Token Number (96), + Key Sequence (8), + } + + Figure 9: Psuedoheader for shared-state retry service tokens + + * The input plaintext for the AEAD is the token body. The output + ciphertext of the AEAD is transmitted in place of the token body. + + * The AEAD Checksum is computed as part of the AEAD encryption + process, and is verified during decryption. + +7.3.2. Configuration Agent Actions + + The configuration agent generates and distributes a "token key", a + "token IV", a key sequence, and the information described in + Section 7.1. + +7.3.3. Service Requirements + + In inactive mode, the Retry service forwards all packets without + further inspection or processing. + + Retry services MUST NOT issue Retry packets except where explicitly + allowed below, to avoid sending a Retry packet in response to a Retry + token. + + When in active mode, the service MUST generate Retry tokens with the + format described above when it receives a client Initial packet with + no token. + + The service SHOULD decrypt incoming tokens. The service SHOULD drop + packets with unknown key sequence, or an AEAD checksum that does not + match the expected value. (By construction, the AEAD checksum will + only match if the client IP Address also matches.) + + + + +Duke & Banks Expires 4 October 2021 [Page 26] + +Internet-Draft QUIC-LB April 2021 + + + If the token checksum passes, and the ODCIL and RSCIL fields are both + zero, then this is a NEW_TOKEN token generated by the server. + Processing of NEW_TOKEN tokens is subtly different from Retry tokens, + as described below. + + The service SHOULD drop a packet containing a token where the ODCIL + is greater than zero and less than the minimum number of octets for a + client-generated CID (8 in QUIC version 1). The service also SHOULD + drop a packet containing a token where the ODCIL is zero and RSCIL is + nonzero. + + If the Timestamp of a token points to time in the past, the token has + expired; however, in order to allow for clock skew, it SHOULD NOT + consider tokens to be expired if the Timestamp encodes a few seconds + in the past. An active Retry service SHOULD drop packets with + expired tokens. If a NEW_TOKEN token, the service MUST generate a + Retry packet in response. It MUST NOT generate a Retry packet in + response to an expired Retry token. + + If a Retry token, the service SHOULD drop packets where the port + number encoded in the token does not match the source port in the + encapsulating UDP header. + + All other packets SHOULD be forwarded to the server. + +7.3.4. Server Requirements + + When issuing Retry or NEW_TOKEN tokens, the server MUST include the + client IP address in the authenticated data as specified in + Section 7.3.1. The ODCIL and RSCIL fields are zero for NEW_TOKEN + tokens, making them easily distinguishable from Retry tokens. + + The server MUST validate all tokens that arrive in Initial packets, + as they may have bypassed the Retry service. + + For Retry tokens that follow the format above, servers SHOULD use the + timestamp field to apply its expiration limits for tokens. This need + not be precisely synchronized with the retry service. However, + servers MAY allow retry tokens marked as being a few seconds in the + past, due to possible clock synchronization issues. + + After decrypting the token, the server uses the corresponding fields + to populate the original_destination_connection_id transport + parameter, with a length equal to ODCIL, and the + retry_source_connection_id transport parameter, with length equal to + RSCIL. + + + + + +Duke & Banks Expires 4 October 2021 [Page 27] + +Internet-Draft QUIC-LB April 2021 + + + For QUIC versions the service does not support, the server MAY use + any token format. + + As discussed in [QUIC-TRANSPORT], a server MUST NOT send a Retry + packet in response to an Initial packet that contains a retry token. + +8. Configuration Requirements + + QUIC-LB requires common configuration to synchronize understanding of + encodings and guarantee explicit consent of the server. + + The load balancer and server MUST agree on a routing algorithm, + server ID allocation method, and the relevant parameters for that + algorithm. + + All algorithms require a server ID length. If server IDs are + statically allocated, the load balancer MUST receive the full table + of mappings, and each server must receive its assigned SID(s), from + the configuration agent. + + For Stream Cipher CID Routing, the servers and load balancer also + MUST have a common understanding of the key and nonce length. + + For Block Cipher CID Routing, the servers and load balancer also MUST + have a common understanding of the key. + + Note that server IDs are opaque bytes, not integers, so there is no + notion of network order or host order. + + A server configuration MUST specify if the first octet encodes the + CID length. Note that a load balancer does not need the CID length, + as the required bytes are present in the QUIC packet. + + A full QUIC-LB server configuration MUST also specify the supported + QUIC versions of any Retry Service. If a shared-state service, the + server also must have the token key. + + A non-shared-state Retry Service need only be configured with the + QUIC versions it supports, and an Allow- or Deny-List. A shared- + state Retry Service also needs the token key, and to be aware if a + NAT sits between it and the servers. + + Appendix A provides a YANG Model of the a full QUIC-LB configuration. + +9. Additional Use Cases + + This section discusses considerations for some deployment scenarios + not implied by the specification above. + + + +Duke & Banks Expires 4 October 2021 [Page 28] + +Internet-Draft QUIC-LB April 2021 + + +9.1. Load balancer chains + + Some network architectures may have multiple tiers of low-state load + balancers, where a first tier of devices makes a routing decision to + the next tier, and so on, until packets reach the server. Although + QUIC-LB is not explicitly designed for this use case, it is possible + to support it. + + If each load balancer is assigned a range of server IDs that is a + subset of the range of IDs assigned to devices that are closer to the + client, then the first devices to process an incoming packet can + extract the server ID and then map it to the correct forwarding + address. Note that this solution is extensible to arbitrarily large + numbers of load-balancing tiers, as the maximum server ID space is + quite large. + +9.2. Moving connections between servers + + Some deployments may transparently move a connection from one server + to another. The means of transferring connection state between + servers is out of scope of this document. + + To support a handover, a server involved in the transition could + issue CIDs that map to the new server via a NEW_CONNECTION_ID frame, + and retire CIDs associated with the new server using the "Retire + Prior To" field in that frame. + + Alternately, if the old server is going offline, the load balancer + could simply map its server ID to the new server's address. + +10. Version Invariance of QUIC-LB + + Non-shared-state Retry Services are inherently dependent on the + format (and existence) of Retry Packets in each version of QUIC, and + so Retry Service configuration explicitly includes the supported QUIC + versions. + + The server ID encodings, and requirements for their handling, are + designed to be QUIC version independent (see [QUIC-INVARIANTS]). A + QUIC-LB load balancer will generally not require changes as servers + deploy new versions of QUIC. However, there are several unlikely + future design decisions that could impact the operation of QUIC-LB. + + The maximum Connection ID length could be below the minimum necessary + for one or more encoding algorithms. + + + + + + +Duke & Banks Expires 4 October 2021 [Page 29] + +Internet-Draft QUIC-LB April 2021 + + + Section 4.1 provides guidance about how load balancers should handle + non-compliant DCIDs. This guidance, and the implementation of an + algorithm to handle these DCIDs, rests on some assumptions: + + * Incoming short headers do not contain DCIDs that are client- + generated. + + * The use of client-generated incoming DCIDs does not persist beyond + a few round trips in the connection. + + * While the client is using DCIDs it generated, some exposed fields + (IP address, UDP port, client-generated destination Connection ID) + remain constant for all packets sent on the same connection. + + * Dynamic server ID allocation is dependent on client-generated + Destination CIDs in Initial Packets being at least 8 octets in + length. If they are not, the load balancer may not be able to + extract a valid server ID to add to its table. Configuring a + shorter server ID length can increase robustness to a change. + + While this document does not update the commitments in + [QUIC-INVARIANTS], the additional assumptions are minimal and + narrowly scoped, and provide a likely set of constants that load + balancers can use with minimal risk of version- dependence. + + If these assumptions are invalid, this specification is likely to + lead to loss of packets that contain non-compliant DCIDs, and in + extreme cases connection failure. + + Some load balancers might inspect elements of the Server Name + Indication (SNI) extension in the TLS Client Hello to make a routing + decision. Note that the format and cryptographic protection of this + information may change in future versions or extensions of TLS or + QUIC, and therefore this functionality is inherently not version- + invariant. + +11. Security Considerations + + QUIC-LB is intended to prevent linkability. Attacks would therefore + attempt to subvert this purpose. + + Note that the Plaintext CID algorithm makes no attempt to obscure the + server mapping, and therefore does not address these concerns. It + exists to allow consistent CID encoding for compatibility across a + network infrastructure, which makes QUIC robust to NAT rebinding. + Servers that are running the Plaintext CID algorithm SHOULD only use + it to generate new CIDs for the Server Initial Packet and SHOULD NOT + send CIDs in QUIC NEW_CONNECTION_ID frames, except that it sends one + + + +Duke & Banks Expires 4 October 2021 [Page 30] + +Internet-Draft QUIC-LB April 2021 + + + new Connection ID in the event of config rotation Section 3.1. Doing + so might falsely suggest to the client that said CIDs were generated + in a secure fashion. + + A linkability attack would find some means of determining that two + connection IDs route to the same server. As described above, there + is no scheme that strictly prevents linkability for all traffic + patterns, and therefore efforts to frustrate any analysis of server + ID encoding have diminishing returns. + +11.1. Attackers not between the load balancer and server + + Any attacker might open a connection to the server infrastructure and + aggressively simulate migration 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. + + The Stream and Block Cipher CID algorithms provide robust protection + against any sort of linkage. The Plaintext CID algorithm makes no + attempt to protect this encoding. + + Were this analysis to obtain the server encoding, then on-path + observers might apply this analysis to correlating different client + IP addresses. + +11.2. Attackers between the load balancer and server + + 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 + IDs for that connection. + +11.3. Multiple Configuration IDs + + During the period in which there are multiple deployed configuration + IDs (see Section 3.1), there is a slight increase in linkability. + The server space is effectively divided into segments with CIDs that + have different config rotation bits. Entities that manage servers + SHOULD strive to minimize these periods by quickly deploying new + configurations across the server pool. + + + + + + + + + + +Duke & Banks Expires 4 October 2021 [Page 31] + +Internet-Draft QUIC-LB April 2021 + + +11.4. Limited configuration scope + + A simple deployment of QUIC-LB in a cloud provider might use the same + global QUIC-LB configuration across all its load balancers that route + to customer servers. An attacker could then simply become a + customer, obtain the configuration, and then extract server IDs of + other customers' connections at will. + + To avoid this, the configuration agent SHOULD issue QUIC-LB + configurations to mutually distrustful servers that have different + keys for encryption algorithms. The load balancers can distinguish + these configurations by external IP address, or by assigning + different values to the config rotation bits (Section 3.1). Note + that either solution has a privacy impact; see Section 11.3. + + These techniques are not necessary for the plaintext algorithm, as it + does not attempt to conceal the server ID. + +11.5. Stateless Reset Oracle + + Section 21.9 of [QUIC-TRANSPORT] discusses the Stateless Reset Oracle + attack. For a server deployment to be vulnerable, an attacking + client must be able to cause two packets with the same Destination + CID to arrive at two different servers that share the same + cryptographic context for Stateless Reset tokens. As QUIC-LB + requires deterministic routing of DCIDs over the life of a + connection, it is a sufficient means of avoiding an Oracle without + additional measures. + +11.6. Connection ID Entropy + + The Stream Cipher and Block Cipher algorithms need to generate + different cipher text for each generated Connection ID instance to + protect the Server ID. To do so, at least four octets of the Block + Cipher CID and at least eight octets of the Stream Cipher CID are + reserved for a nonce that, if used only once, will result in unique + cipher text for each Connection ID. + + If servers simply increment the nonce by one with each generated + connection ID, then it is safe to use the existing keys until any + server's nonce counter exhausts the allocated space and rolls over to + zero. Whether or not it implements this method, the server MUST NOT + reuse a nonce until it switches to a configuration with new keys. + + + + + + + + +Duke & Banks Expires 4 October 2021 [Page 32] + +Internet-Draft QUIC-LB April 2021 + + + Configuration agents SHOULD implement an out-of-band method to + discover when servers are in danger of exhausting their nonce space, + and SHOULD respond by issuing a new configuration. A server that has + exhausted its nonces MUST either switch to a different configuration, + or if none exists, use the 4-tuple routing config rotation codepoint. + +11.7. Shared-State Retry Keys + + The Shared-State Retry Service defined in Section 7.3 describes the + format of retry tokens or new tokens protected and encrypted using + AES128-GCM. Each token includes a 96 bit randomly generated unique + token number, and an 8 bit identifier of the AES-GCM encryption key. + There are three important security considerations for these tokens: + + * An attacker that obtains a copy of the encryption key will be able + to decrypt and forge tokens. + + * Attackers may be able to retrieve the key if they capture a + sufficently large number of retry tokens encrypted with a given + key. + + * Confidentiality of the token data will fail if separate tokens + reuse the same 96 bit unique token number and the same key. + + To protect against disclosure of keys to attackers, service and + servers MUST ensure that the keys are stored securely. To limit the + consequences of potential exposures, the time to live of any given + key should be limited. + + Section 6.6 of [QUIC-TLS] states that "Endpoints MUST count the + number of encrypted packets for each set of keys. If the total + number of encrypted packets with the same key exceeds the + confidentiality limit for the selected AEAD, the endpoint MUST stop + using those keys." It goes on with the specific limit: "For + AEAD_AES_128_GCM and AEAD_AES_256_GCM, the confidentiality limit is + 2^23 encrypted packets; see Appendix B.1." It is prudent to adopt + the same limit here, and configure the service in such a way that no + more than 2^23 tokens are generated with the same key. + + In order to protect against collisions, the 96 bit unique token + numbers should be generated using a cryptographically secure + pseudorandom number generator (CSPRNG), as specified in Appendix C.1 + of the TLS 1.3 specification [RFC8446]. With proper random numbers, + if fewer than 2^40 tokens are generated with a single key, the risk + of collisions is lower than 0.001%. + + + + + + +Duke & Banks Expires 4 October 2021 [Page 33] + +Internet-Draft QUIC-LB April 2021 + + +12. IANA Considerations + + There are no IANA requirements. + +13. References + +13.1. Normative References + + [QUIC-INVARIANTS] + Thomson, M., "Version-Independent Properties of QUIC", + Work in Progress, Internet-Draft, draft-ietf-quic- + invariants-13, 14 January 2021, + . + + [QUIC-TRANSPORT] + Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed + and Secure Transport", Work in Progress, Internet-Draft, + draft-ietf-quic-transport-34, 14 January 2021, + . + + [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol + Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, + . + + [TIME_T] "Open Group Standard: Vol. 1: Base Definitions, Issue 7", + IEEE Std 1003.1 , 2018, + . + +13.2. Informative References + + [QUIC-TLS] Thomson, M. and S. Turner, "Using TLS to Secure QUIC", + Work in Progress, Internet-Draft, draft-ietf-quic-tls-34, + 14 January 2021, . + + [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate + Requirement Levels", BCP 14, RFC 2119, + DOI 10.17487/RFC2119, March 1997, + . + + [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for + the Network Configuration Protocol (NETCONF)", RFC 6020, + DOI 10.17487/RFC6020, October 2010, + . + + + + +Duke & Banks Expires 4 October 2021 [Page 34] + +Internet-Draft QUIC-LB April 2021 + + + [RFC7696] Housley, R., "Guidelines for Cryptographic Algorithm + Agility and Selecting Mandatory-to-Implement Algorithms", + BCP 201, RFC 7696, DOI 10.17487/RFC7696, November 2015, + . + + [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", + BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, + . + +Appendix A. QUIC-LB YANG Model + + This YANG model conforms to [RFC6020] and expresses a complete QUIC- + LB configuration. + +module ietf-quic-lb { + yang-version "1.1"; + namespace "urn:ietf:params:xml:ns:yang:ietf-quic-lb"; + prefix "quic-lb"; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types."; + } + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types."; + } + + organization + "IETF QUIC Working Group"; + + contact + "WG Web: + WG List: + + Authors: Martin Duke (martin.h.duke at gmail dot com) + Nick Banks (nibanks at microsoft dot com)"; + + description + "This module enables the explicit cooperation of QUIC servers with + trusted intermediaries without breaking important protocol features. + + Copyright (c) 2021 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + + + +Duke & Banks Expires 4 October 2021 [Page 35] + +Internet-Draft QUIC-LB April 2021 + + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX + (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself + for full legal notices. + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + 'MAY', and 'OPTIONAL' in this document are to be interpreted as + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, + they appear in all capitals, as shown here."; + + revision "2021-01-29" { + description + "Initial Version"; + reference + "RFC XXXX, QUIC-LB: Generating Routable QUIC Connection IDs"; + } + + container quic-lb { + presence "The container for QUIC-LB configuration."; + + description + "QUIC-LB container."; + + typedef quic-lb-key { + type yang:hex-string { + length 47; + } + description + "This is a 16-byte key, represented with 47 bytes"; + } + + list cid-configs { + key "config-rotation-bits"; + description + "List up to three load balancer configurations"; + + leaf config-rotation-bits { + type uint8 { + range "0..2"; + } + mandatory true; + + + +Duke & Banks Expires 4 October 2021 [Page 36] + +Internet-Draft QUIC-LB April 2021 + + + description + "Identifier for this CID configuration."; + } + + leaf first-octet-encodes-cid-length { + type boolean; + default false; + description + "If true, the six least significant bits of the first CID + octet encode the CID length minus one."; + } + + leaf cid-key { + type quic-lb-key; + description + "Key for encrypting the connection ID. If absent, the + configuration uses the Plaintext algorithm."; + } + + leaf nonce-length { + type uint8 { + range "8..16"; + } + must '(../cid-key)' { + error-message "nonce-length only valid if cid-key is set"; + } + description + "Length, in octets, of the nonce. If absent when cid-key is + present, the configuration uses the Block Cipher Algorithm. + If present along with cid-key, the configurationuses the + Stream Cipher Algorithm."; + } + + leaf lb-timeout { + type uint32; + description + "Existence means the configuration uses dynamic Server ID allocation. + Time (in seconds) to keep a server ID allocation if no packets with + that server ID arrive."; + } + + leaf server-id-length { + type uint8 { + range "1..18"; + } + must '(../lb-timeout and . <= 7) or + (not(../lb-timeout) and + (not(../cid-key) and . <= 16) or + + + +Duke & Banks Expires 4 October 2021 [Page 37] + +Internet-Draft QUIC-LB April 2021 + + + ((../nonce-length) and . <= (19 - ../nonce-length)) or + ((../cid-key) and not(../nonce-length) and . <= 12))' { + error-message + "Server ID length too long for routing algorithm and server ID + allocation method"; + } + mandatory true; + description + "Length (in octets) of a server ID. Further range-limited + by sid-allocation, cid-key, and nonce-length."; + } + + list server-id-mappings { + when "not(../lb-timeout)"; + key "server-id"; + description "Statically allocated Server IDs"; + + leaf server-id { + type yang:hex-string; + must "string-length(.) = 3 * ../../server-id-length - 1"; + mandatory true; + description + "An allocated server ID"; + } + + leaf server-address { + type inet:ip-address; + mandatory true; + description + "Destination address corresponding to the server ID"; + } + } + } + + container retry-service-config { + description + "Configuration of Retry Service. If supported-versions is empty, there + is no retry service. If token-keys is empty, it uses the non-shared- + state service. If present, it uses shared-state tokens."; + + leaf-list supported-versions { + type uint32; + description + "QUIC versions that the retry service supports. If empty, there + is no retry service."; + } + + leaf unsupported-version-default { + + + +Duke & Banks Expires 4 October 2021 [Page 38] + +Internet-Draft QUIC-LB April 2021 + + + type enumeration { + enum allow { + description "Unsupported versions admitted by default"; + } + enum deny { + description "Unsupported versions denied by default"; + } + } + default allow; + description + "Are unsupported versions not in version-exceptions allowed + or denied?"; + } + + leaf-list version-exceptions { + type uint32; + description + "Exceptions to the default-deny or default-allow rule."; + } + + list token-keys { + key "key-sequence-number"; + description + "list of active keys, for key rotation purposes. Existence implies + shared-state format"; + + leaf key-sequence-number { + type uint8; + mandatory true; + description + "Identifies the key used to encrypt the token"; + } + + leaf token-key { + type quic-lb-key; + mandatory true; + description + "16-byte key to encrypt the token"; + } + + leaf token-iv { + type yang:hex-string { + length 23; + } + mandatory true; + description + "8-byte IV to encrypt the token, encoded in 23 bytes"; + } + + + +Duke & Banks Expires 4 October 2021 [Page 39] + +Internet-Draft QUIC-LB April 2021 + + + } + } + } +} + +A.1. Tree Diagram + + This summary of the YANG model uses the notation in [RFC8340]. + + module: ietf-quic-lb + +--rw quic-lb + +--rw cid-configs* + | [config-rotation-bits] + | +--rw config-rotation-bits uint8 + | +--rw first-octet-encodes-cid-length? boolean + | +--rw cid-key? yang:hex-string + | +--rw nonce-length? uint8 + | +--rw lb-timeout? uint32 + | +--rw server-id-length uint8 + | +--rw server-id-mappings*? + | | [server-id] + | | +--rw server-id yang:hex-string + | | +--rw server-address inet:ip-address + +--ro retry-service-config + | +--rw supported-versions* + | | +--rw version uint32 + | +--rw unsupported-version-default enumeration {allow deny} + | +--rw version-exceptions* + | | +--rw version uint32 + | +--rw token-keys*? + | | [key-sequence-number] + | | +--rw key-sequence-number uint8 + | | +--rw token-key yang:hex-string + | | +--rw token-iv yang:hex-string + +Appendix B. Load Balancer Test Vectors + + Each section of this draft includes multiple sets of load balancer + configuration, each of which has five examples of server ID and + server use bytes and how they are encoded in a CID. + + In some cases, there are no server use bytes. Note that, for + simplicity, the first octet bits used for neither config rotation nor + length self-encoding are random, rather than listed in the server use + field. Therefore, a server implementation using these parameters may + generate CIDs with a slightly different first octet. + + This section uses the following abbreviations: + + + +Duke & Banks Expires 4 October 2021 [Page 40] + +Internet-Draft QUIC-LB April 2021 + + + cid Connection ID + cr_bits Config Rotation Bits + LB Load Balancer + sid Server ID + sid_len Server ID length + su Server Use Bytes + + All values except length_self_encoding and sid_len are expressed in + hexidecimal format. + +B.1. Plaintext Connection ID Algorithm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Duke & Banks Expires 4 October 2021 [Page 41] + +Internet-Draft QUIC-LB April 2021 + + + LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1 + + cid 01be sid be su + cid 0221b7 sid 21 su b7 + cid 03cadfd8 sid ca su dfd8 + cid 041e0c9328 sid 1e su 0c9328 + cid 050c8f6d9129 sid 0c su 8f6d9129 + + LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2 + + cid 02aab0 sid aab0 su + cid 3ac4b106 sid c4b1 su 06 + cid 08bd3cf4a0 sid bd3c su f4a0 + cid 3771d59502d6 sid 71d5 su 9502d6 + cid 1d57dee8b888f3 sid 57de su e8b888f3 + + LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3 + + cid 0336c976 sid 36c976 su + cid 04aa291806 sid aa2918 su 06 + cid 0586897bd8b6 sid 86897b su d8b6 + cid 063625bcae4de0 sid 3625bc su ae4de0 + cid 07966fb1f3cb535f sid 966fb1 su f3cb535f + + LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4 + + cid 185172fab8 sid 5172fab8 su + cid 2eb7ff2c9297 sid b7ff2c92 su 97 + cid 14f3eb3dd3edbe sid f3eb3dd3 su edbe + cid 3feb31cece744b74 sid eb31cece su 744b74 + cid 06b9f34c353ce23bb5 sid b9f34c35 su 3ce23bb5 + + LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5 + + cid 05bdcd8d0b1d sid bdcd8d0b1d su + cid 06aee673725a63 sid aee673725a su 63 + cid 07bbf338ddbf37f4 sid bbf338ddbf su 37f4 + cid 08fbbca64c26756840 sid fbbca64c26 su 756840 + cid 09e7737c495b93894e34 sid e7737c495b su 93894e34 + +B.2. Stream Cipher Connection ID Algorithm + + In each case below, the server is using a plain text nonce value of + zero. + + + + + + + +Duke & Banks Expires 4 October 2021 [Page 42] + +Internet-Draft QUIC-LB April 2021 + + +LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 12 sid_len 1 + key 4d9d0fd25a25e7f321ef464e13f9fa3d + +cid 0d69fe8ab8293680395ae256e89c sid c5 su +cid 0e420d74ed99b985e10f5073f43027 sid d5 su 27 +cid 0f380f440c6eefd3142ee776f6c16027 sid 10 su 6027 +cid 1020607efbe82049ddbf3a7c3d9d32604d sid 3c su 32604d +cid 11e132d12606a1bb0fa17e1caef00ec54c10 sid e3 su 0ec54c10 + +LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 2 + key 49e1cec7fd264b1f4af37413baf8ada9 + +cid 3d3a5e1126414271cc8dc2ec7c8c15 sid f7fe su +cid 007042539e7c5f139ac2adfbf54ba748 sid eaf4 su 48 +cid 2bc125dd2aed2aafacf59855d99e029217 sid e880 su 9217 +cid 3be6728dc082802d9862c6c8e4dda3d984d8 sid 62c6 su d984d8 +cid 1afe9c6259ad350fc7bad28e0aeb2e8d4d4742 sid 8502 su 8d4d4742 + +LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 14 sid_len 3 + key 2c70df0b399bd33a7335523dcdb884ad + +cid 11d62e8670565cd30b552edff6782ff5a740 sid d794bb su +cid 12c70e481f49363cabd9370d1fd5012c12bca5 sid 2cbd5d su a5 +cid 133b95dfd8ad93566782f8424df82458069fc9e9 sid d126cd su c9e9 +cid 13ac6ffcd635532ab60370306c7ee572d6b6e795 sid 539e42 su e795 +cid 1383ed07a9700777ff450bb39bb9c1981266805c sid 9094dd su 805c + +LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 4 + key 2297b8a95c776cf9c048b76d9dc27019 + +cid 32873890c3059ca62628089439c44c1f84 sid 7398d8ca su +cid 1ff7c7d7b9823954b178636c99a7dc93ac83 sid 9655f091 su 83 +cid 31044000a5ebb3bf2fa7629a17f2c78b077c17 sid 8b035fc6 su 7c17 +cid 1791bd28c66721e8fea0c6f34fd2d8e663a6ef70 sid 6672e0e2 su a6ef70 +cid 3df1d90ad5ccd5f8f475f040e90aeca09ec9839d sid b98b1fff su c9839d + +LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 8 sid_len 5 + key 484b2ed942d9f4765e45035da3340423 + +cid 0da995b7537db605bfd3a38881ae sid 391a7840dc su +cid 0ed8d02d55b91d06443540d1bf6e98 sid 10f7f7b284 su 98 +cid 0f3f74be6d46a84ccb1fd1ee92cdeaf2 sid 0606918fc0 su eaf2 +cid 1045626dbf20e03050837633cc5650f97c sid e505eea637 su 50f97c +cid 11bb9a17f691ab446a938427febbeb593eaa sid 99343a2a96 su eb593eaa + +B.3. Block Cipher Connection ID Algorithm + + + + + +Duke & Banks Expires 4 October 2021 [Page 43] + +Internet-Draft QUIC-LB April 2021 + + +LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1 + key 411592e4160268398386af84ea7505d4 + +cid 10564f7c0df399f6d93bdddb1a03886f25 sid 23 su 05231748a80884ed58007847eb9fd0 +cid 10d5c03f9dd765d73b3d8610b244f74d02 sid 15 su 76cd6b6f0d3f0b20fc8e633e3a05f3 +cid 108ca55228ab23b92845341344a2f956f2 sid 64 su 65c0ce170a9548717498b537cb8790 +cid 10e73f3d034aef2f6f501e3a7693d6270a sid 07 su f9ad10c84cc1e89a2492221d74e707 +cid 101a6ce13d48b14a77ecfd365595ad2582 sid 6c su 76ce4689b0745b956ef71c2608045d + +LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2 + key 92ce44aecd636aeeff78da691ef48f77 + +cid 20aa09bc65ed52b1ccd29feb7ef995d318 sid a52f su 99278b92a86694ff0ecd64bc2f73 +cid 30b8dbef657bd78a2f870e93f9485d5211 sid 6c49 su 7381c8657a388b4e9594297afe96 +cid 043a8137331eacd2e78383279b202b9a6d sid 4188 su 5ac4b0e0b95f4e7473b49ee2d0dd +cid 3ba71ea2bcf0ab95719ab59d3d7fde770d sid 8ccc su 08728807605db25f2ca88be08e0f +cid 37ef1956b4ec354f40dc68336a23d42b31 sid c89d su 5a3ccd1471caa0de221ad6c185c0 + +LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3 + key 5c49cb9265efe8ae7b1d3886948b0a34 + +cid 10efcffc161d232d113998a49b1dbc4aa0 sid 0690b3 su 958fc9f38fe61b83881b2c5780 +cid 10fc13bdbcb414ba90e391833400c19505 sid 031ac3 su 9a55e1e1904e780346fcc32c3c +cid 10d3cc1efaf5dc52c7a0f6da2746a8c714 sid 572d3a su ff2ec9712664e7174dc03ca3f8 +cid 107edf37f6788e33c0ec7758a485215f2b sid 562c25 su 02c5a5dcbea629c3840da5f567 +cid 10bc28da122582b7312e65aa096e9724fc sid 2fa4f0 su 8ae8c666bfc0fc364ebfd06b9a + +LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4 + key e787a3a491551fb2b4901a3fa15974f3 + +cid 26125351da12435615e3be6b16fad35560 sid 0cb227d3 su 65b40b1ab54e05bff55db046 +cid 14de05fc84e41b611dfbe99ed5b1c9d563 sid 6a0f23ad su d73bee2f3a7e72b3ffea52d9 +cid 1306052c3f973db87de6d7904914840ff1 sid ca21402d su 5829465f7418b56ee6ada431 +cid 1d202b5811af3e1dba9ea2950d27879a92 sid b14e1307 su 4902aba8b23a5f24616df3cf +cid 26538b78efc2d418539ad1de13ab73e477 sid a75e0148 su 0040323f1854e75aeb449b9f + +LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5 + key d5a6d7824336fbe0f25d28487cdda57c + +cid 10a2794871aadb20ddf274a95249e57fde sid 82d3b0b1a1 su 0935471478c2edb8120e60 +cid 108122fe80a6e546a285c475a3b8613ec9 sid fbcc902c9d su 59c47946882a9a93981c15 +cid 104d227ad9dd0fef4c8cb6eb75887b6ccc sid 2808e22642 su 2a7ef40e2c7e17ae40b3fb +cid 10b3f367d8627b36990a28d67f50b97846 sid 5e018f0197 su 2289cae06a566e5cb6cfa4 +cid 1024412bfe25f4547510204bdda6143814 sid 8a8dd3d036 su 4b12933a135e5eaaebc6fd + + + + + + + +Duke & Banks Expires 4 October 2021 [Page 44] + +Internet-Draft QUIC-LB April 2021 + + +Appendix C. Acknowledgments + + The authors would like to thank Christian Huitema and Ian Swett for + their major design contributions. + + Manasi Deval, Erik Fuller, Toma Gavrichenkov, Jana Iyengar, Subodh + Iyengar, Ladislav Lhotka, Jan Lindblad, Ling Tao Nju, Kazuho Oku, + Udip Pant, Martin Thomson, Dmitri Tikhonov, Victor Vasiliev, and + William Zeng Ke all provided useful input to this document. + +Appendix D. Change Log + + *RFC Editor's Note:* Please remove this section prior to + publication of a final version of this document. + +D.1. since draft-ietf-quic-load-balancers-06 + +D.2. since draft-ietf-quic-load-balancers-05 + + * Added low-config CID for further discussion + + * Complete revision of shared-state Retry Token + + * Added YANG model + + * Updated configuration limits to ensure CID entropy + + * Switched to notation from quic-transport + +D.3. since draft-ietf-quic-load-balancers-04 + + * Rearranged the shared-state retry token to simplify token + processing + + * More compact timestamp in shared-state retry token + + * Revised server requirements for shared-state retries + + * Eliminated zero padding from the test vectors + + * Added server use bytes to the test vectors + + * Additional compliant DCID criteria + +D.4. since-draft-ietf-quic-load-balancers-03 + + * Improved Config Rotation text + + + + +Duke & Banks Expires 4 October 2021 [Page 45] + +Internet-Draft QUIC-LB April 2021 + + + * Added stream cipher test vectors + + * Deleted the Obfuscated CID algorithm + +D.5. since-draft-ietf-quic-load-balancers-02 + + * Replaced stream cipher algorithm with three-pass version + + * Updated Retry format to encode info for required TPs + + * Added discussion of version invariance + + * Cleaned up text about config rotation + + * Added Reset Oracle and limited configuration considerations + + * Allow dropped long-header packets for known QUIC versions + +D.6. since-draft-ietf-quic-load-balancers-01 + + * Test vectors for load balancer decoding + + * Deleted remnants of in-band protocol + + * Light edit of Retry Services section + + * Discussed load balancer chains + +D.7. since-draft-ietf-quic-load-balancers-00 + + * Removed in-band protocol from the document + +D.8. Since draft-duke-quic-load-balancers-06 + + * Switch to IETF WG draft. + +D.9. Since draft-duke-quic-load-balancers-05 + + * Editorial changes + + * Made load balancer behavior independent of QUIC version + + * Got rid of token in stream cipher encoding, because server might + not have it + + * Defined "non-compliant DCID" and specified rules for handling + them. + + + + +Duke & Banks Expires 4 October 2021 [Page 46] + +Internet-Draft QUIC-LB April 2021 + + + * Added psuedocode for config schema + +D.10. Since draft-duke-quic-load-balancers-04 + + * Added standard for retry services + +D.11. Since draft-duke-quic-load-balancers-03 + + * Renamed Plaintext CID algorithm as Obfuscated CID + + * Added new Plaintext CID algorithm + + * Updated to allow 20B CIDs + + * Added self-encoding of CID length + +D.12. Since draft-duke-quic-load-balancers-02 + + * Added Config Rotation + + * Added failover mode + + * Tweaks to existing CID algorithms + + * Added Block Cipher CID algorithm + + * Reformatted QUIC-LB packets + +D.13. Since draft-duke-quic-load-balancers-01 + + * Complete rewrite + + * Supports multiple security levels + + * Lightweight messages + +D.14. Since draft-duke-quic-load-balancers-00 + + * Converted to markdown + + * Added variable length connection IDs + +Authors' Addresses + + Martin Duke + F5 Networks, Inc. + + Email: martin.h.duke@gmail.com + + + +Duke & Banks Expires 4 October 2021 [Page 47] + +Internet-Draft QUIC-LB April 2021 + + + Nick Banks + Microsoft + + Email: nibanks@microsoft.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Duke & Banks Expires 4 October 2021 [Page 48] diff --git a/shared-ip/index.html b/shared-ip/index.html new file mode 100644 index 0000000..a1a5262 --- /dev/null +++ b/shared-ip/index.html @@ -0,0 +1,57 @@ + + + + quicwg/load-balancers shared-ip preview + + + + +

Editor's drafts for shared-ip branch of quicwg/load-balancers

+

View saved issues, + or the latest GitHub issues + and pull requests.

+ + + + + + + + +
draft-ietf-quic-load-balancershtmlplain textdiff with master + diff with last submission
+ + + diff --git a/smaller-tables/draft-ietf-quic-load-balancers.html b/smaller-tables/draft-ietf-quic-load-balancers.html new file mode 100644 index 0000000..c87418e --- /dev/null +++ b/smaller-tables/draft-ietf-quic-load-balancers.html @@ -0,0 +1,3531 @@ + + + + + + +QUIC-LB: Generating Routable QUIC Connection IDs + + + + + + + + + + + + + + + + + + + + + + + +
Internet-DraftQUIC-LBMarch 2021
Duke & BanksExpires 19 September 2021[Page]
+
+
+
+
Workgroup:
+
QUIC
+
Internet-Draft:
+
draft-ietf-quic-load-balancers-07
+
Published:
+
+ +
+
Intended Status:
+
Standards Track
+
Expires:
+
+
Authors:
+
+
+
M. Duke
+
F5 Networks, Inc.
+
+
+
N. Banks
+
Microsoft
+
+
+
+
+

QUIC-LB: Generating Routable QUIC Connection IDs

+
+

Abstract

+

The QUIC protocol design is resistant to transparent packet inspection, +injection, and modification by intermediaries. However, the server can +explicitly cooperate with network services by agreeing to certain conventions +and/or sharing state with those services. This specification provides a +standardized means of solving three problems: (1) maintaining routability to +servers via a low-state load balancer even when the connection IDs in use +change; (2) explicit encoding of the connection ID length in all packets to +assist hardware accelerators; and (3) injection of QUIC Retry packets by an +anti-Denial-of-Service agent on behalf of the server.¶

+
+
+

+Note to Readers +

+

Discussion of this document takes place on the + QUIC Working Group mailing list (quic@ietf.org), + which is archived at https://mailarchive.ietf.org/arch/browse/quic/.¶

+

Source for this draft and an issue tracker can be found at + https://github.com/quicwg/load-balancers.¶

+
+
+
+

+Status of This Memo +

+

+ This Internet-Draft is submitted in full conformance with the + provisions of BCP 78 and BCP 79.¶

+

+ Internet-Drafts are working documents of the Internet Engineering Task + Force (IETF). Note that other groups may also distribute working + documents as Internet-Drafts. The list of current Internet-Drafts is + at https://datatracker.ietf.org/drafts/current/.¶

+

+ Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as "work in progress."¶

+

+ This Internet-Draft will expire on 19 September 2021.¶

+
+
+ +
+
+ â–²

+Table of Contents +

+ +
+
+
+
+

+1. Introduction +

+

QUIC packets [QUIC-TRANSPORT] usually contain a +connection ID to allow endpoints to associate packets with different address/ +port 4-tuples to the same connection context. This feature makes connections +robust in the event of NAT rebinding. QUIC endpoints usually designate the +connection ID which peers use to address packets. Server-generated connection +IDs create a potential need for out-of-band communication to support QUIC.¶

+

QUIC allows servers (or load balancers) to designate an initial connection ID to +encode useful routing information for load balancers. It also encourages +servers, in packets protected by cryptography, to provide additional connection +IDs to the client. This allows clients that know they are going to change IP +address or port to use a separate connection ID on the new path, thus reducing +linkability as clients move through the world.¶

+

There is a tension between the requirements to provide routing information and +mitigate linkability. Ultimately, because new connection IDs are in protected +packets, they must be generated at the server if the load balancer does not have +access to the connection keys. However, it is the load balancer that has the +context necessary to generate a connection ID that encodes useful routing +information. In the absence of any shared state between load balancer and +server, the load balancer must maintain a relatively expensive table of +server-generated connection IDs, and will not route packets correctly if they +use a connection ID that was originally communicated in a protected +NEW_CONNECTION_ID frame.¶

+

This specification provides common algorithms for encoding the server mapping in +a connection ID given some shared parameters. The mapping is generally only +discoverable by observers that have the parameters, preserving unlinkability as +much as possible.¶

+

Aside from load balancing, a QUIC server may also desire to offload other +protocol functions to trusted intermediaries. These intermediaries might +include hardware assist on the server host itself, without access to fully +decrypted QUIC packets. For example, this document specifies a means of +offloading stateless retry to counter Denial of Service attacks. It also +proposes a system for self-encoding connection ID length in all packets, so that +crypto 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 +

+

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", +"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be +interpreted as described in RFC 2119 [RFC2119].¶

+

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 interpreted as carrying +significance described in RFC 2119.¶

+

In this document, "client" and "server" refer to the endpoints of a QUIC +connection unless otherwise indicated. A "load balancer" is an intermediary for +that connection that does not possess QUIC connection keys, but it may rewrite +IP addresses or conduct other IP or UDP processing. A "configuration agent" is +the entity that determines the QUIC-LB configuration parameters for the network +and leverages some system to distribute that configuration.¶

+

Note that stateful load balancers that act as proxies, by terminating a QUIC +connection with the client and then retrieving data from the server using QUIC +or another protocol, are treated as a server with respect to this specification.¶

+

For brevity, "Connection ID" will often be abbreviated as "CID".¶

+
+
+
+
+

+1.2. Notation +

+

All wire formats will be depicted using the notation defined in Section 1.3 of +[QUIC-TRANSPORT]. There is one addition: the function len() refers to the +length of a field which can serve as a limit on a different field, so that the +lengths of two fields can be concisely defined as limited to a sum, for example:¶

+

x(A..B) +y(C..B-len(x))¶

+

indicates that x can be of any length between A and B, and y can be of any +length between C and B provided that (len(x) + len(y)) does not exceed B.¶

+

The example below illustrates the basic framework:¶

+
+
+
+
+Example Structure {
+  One-bit Field (1),
+  7-bit Field with Fixed Value (7) = 61,
+  Field with Variable-Length Integer (i),
+  Arbitrary-Length Field (..),
+  Variable-Length Field (8..24),
+  Variable-Length Field with Dynamic Limit (8..24-len(Variable-Length Field)),
+  Field With Minimum Length (16..),
+  Field With Maximum Length (..128),
+  [Optional Field (64)],
+  Repeated Field (8) ...,
+}
+
+
+
Figure 1: +Example Format +
+
+
+
+
+
+
+
+

+2. Protocol Objectives +

+
+
+

+2.1. Simplicity +

+

QUIC is intended to provide unlinkability across connection migration, but +servers are not required to provide additional connection IDs that effectively +prevent linkability. If the coordination scheme is too difficult to implement, +servers behind load balancers using connection IDs for routing will use +trivially linkable connection IDs. Clients will therefore be forced to choose +between terminating the connection during migration or remaining linkable, +subverting a design objective of QUIC.¶

+

The solution should be both simple to implement and require little additional +infrastructure for cryptographic keys, etc.¶

+
+
+
+
+

+2.2. Security +

+

In the limit where there are very few connections to a pool of servers, no +scheme can prevent the linking of two connection IDs with high probability. In +the opposite limit, where all servers have many connections that start and end +frequently, it will be difficult to associate two connection IDs even if they +are known to map to the same server.¶

+

QUIC-LB is relevant in the region between these extremes: when the information +that two connection IDs map to the same server is helpful to linking two +connection IDs. Obviously, any scheme that transparently communicates this +mapping to outside observers compromises QUIC's defenses against linkability.¶

+

Though not an explicit goal of the QUIC-LB design, concealing the server mapping +also complicates attempts to focus attacks on a specific server in the pool.¶

+
+
+
+
+
+
+

+3. First CID octet +

+

The first octet of a Connection ID is reserved for two special purposes, one +mandatory (config rotation) and one optional (length self-description).¶

+

Subsequent sections of this document refer to the contents of this octet as the +"first octet."¶

+
+
+

+3.1. Config Rotation +

+

The first two bits of any connection ID MUST encode an identifier for the +configuration that the connection ID uses. This enables incremental deployment +of new QUIC-LB settings (e.g., keys).¶

+

When new configuration is distributed to servers, there will be a transition +period when connection IDs reflecting old and new configuration coexist in the +network. The rotation bits allow load balancers to apply the correct routing +algorithm and parameters to incoming packets.¶

+

Configuration Agents SHOULD deliver new configurations to load balancers before +doing so to servers, so that load balancers are ready to process CIDs using the +new parameters when they arrive.¶

+

A Configuration Agent SHOULD NOT use a codepoint to represent a new +configuration until it takes precautions to make sure that all connections using +CIDs with an old configuration at that codepoint have closed or transitioned.¶

+

Servers MUST NOT generate new connection IDs using an old configuration after +receiving a new one from the configuration agent. Servers MUST send +NEW_CONNECTION_ID frames that provide CIDs using the new configuration, and +retire CIDs using the old configuration using the "Retire Prior To" field of +that frame.¶

+

It also possible to use these bits for more long-lived distinction of different +configurations, but this has privacy implications (see Section 11.3).¶

+
+
+
+
+

+3.2. Configuration Failover +

+

If a server has not received a valid QUIC-LB configuration, and believes that +low-state, Connection-ID aware load balancers are in the path, it SHOULD +generate connection IDs with the config rotation bits set to '11' and SHOULD use +the "disable_active_migration" transport parameter in all new QUIC connections. +It SHOULD NOT send NEW_CONNECTION_ID frames with new values.¶

+

A load balancer that sees a connection ID with config rotation bits set to +'11' MUST revert to 5-tuple routing.¶

+
+
+
+
+

+3.3. Length Self-Description +

+

Local hardware cryptographic offload devices may accelerate QUIC servers by +receiving keys from the QUIC implementation indexed to the connection ID. +However, on physical devices operating multiple QUIC servers, it is impractical +to efficiently lookup these keys if the connection ID does not self-encode its +own length.¶

+

Note that this is a function of particular server devices and is irrelevant to +load balancers. As such, load balancers MAY omit this from their configuration. +However, the remaining 6 bits in the first octet of the Connection ID are +reserved to express the length of the following connection ID, not including +the first octet.¶

+

A server not using this functionality SHOULD make the six bits appear to be +random.¶

+
+
+
+
+

+3.4. Format +

+
+
+
+
+First Octet {
+  Config Rotation (2),
+  CID Len or Random Bits (6),
+}
+
+
+
Figure 2: +First Octet Format +
+
+

The first octet has the following fields:¶

+

Config Rotation: Indicates the configuration used to interpret the CID.¶

+

CID Len or Random Bits: Length Self-Description (if applicable), or random bits +otherwise. Encodes the length of the Connection ID following the First Octet.¶

+
+
+
+
+
+
+

+4. Load Balancing Preliminaries +

+

In QUIC-LB, load balancers do not generate individual connection IDs for +servers. Instead, they communicate the parameters of an algorithm to generate +routable connection IDs.¶

+

The algorithms differ in the complexity of configuration at both load balancer +and server. Increasing complexity improves obfuscation of the server mapping.¶

+

This section describes three participants: the configuration agent, the load +balancer, and the server. For any given QUIC-LB configuration that enables +connection-ID-aware load balancing, there must be a choice of (1) routing +algorithm, (2) server ID allocation strategy, and (3) algorithm parameters.¶

+

Fundamentally, servers generate connection IDs that encode their server ID. +Load balancers decode the server ID from the CID in incoming packets to route +to the correct server.¶

+

There are situations where a server pool might be operating two or more routing +algorithms or parameter sets simultaneously. The load balancer uses the first +two bits of the connection ID to multiplex incoming DCIDs over these schemes +(see Section 3.1).¶

+
+
+

+4.1. Non-Compliant Connection IDs +

+

QUIC-LB servers will generate Connection IDs that are decodable to extract a +server ID in accordance with a specified algorithm and parameters. However, +QUIC often uses client-generated Connection IDs prior to receiving a packet from +the server.¶

+

These client-generated CIDs might not conform to the expectations of the +routing algorithm and therefore not be routable by the load balancer. Those that +are not routable are "non-compliant DCIDs" and receive similar treatment +regardless of why they're non-compliant:¶

+
    +
  • The config rotation bits (Section 3.1) may not correspond to an active +configuration. Note: a packet with a DCID that indicates 5-tuple routing (see +Section 3.2) is always compliant.¶ +
  • +
  • The DCID might not be long enough for the decoder to process.¶ +
  • +
  • The extracted server mapping might not correspond to an active server.¶ +
  • +
+

All other DCIDs are compliant.¶

+

Load balancers MUST forward packets with compliant DCIDs to a server in +accordance with the chosen routing algorithm.¶

+

Load balancers SHOULD drop short header packets with non-compliant DCIDs.¶

+

The routing of long headers with non-compliant DCIDs depends on the server ID +allocation strategy, described in Section 4.3. However, the load balancer +MUST NOT drop these packets, with one exception.¶

+

Load balancers MAY drop packets with long headers and non-compliant DCIDs if +and only if it knows that the encoded QUIC version does not allow a non- +compliant DCID in a packet with that signature. For example, a load balancer can +safely drop a QUIC version 1 Handshake packet with a non-compliant DCID, as a +version 1 Handshake packet sent to a QUIC-LB compliant server will always have +a server-generated compliant CID. The prohibition against dropping packets with +long headers remains for unknown QUIC versions.¶

+

Furthermore, while the load balancer function MUST NOT drop packets, the device +might implement other security policies, outside the scope of this +specification, that might force a drop.¶

+

Servers that receive packets with noncompliant CIDs MUST use the available +mechanisms to induce the client to use a compliant CID in future packets. In +QUIC version 1, this requires using a compliant CID in the Source CID field of +server-generated long headers.¶

+
+
+
+
+

+4.2. Arbitrary Algorithms +

+

There are conditions described below where a load balancer routes a packet using +an "arbitrary algorithm." It can choose any algorithm, without coordination with +the servers, but the algorithm SHOULD be deterministic over short time scales so +that related packets go to the same server. The design of this algorithm SHOULD +consider the version-invariant properties of QUIC described in +[QUIC-INVARIANTS] to maximize its robustness to +future versions of QUIC.¶

+

An arbitrary algorithm MUST NOT make the routing behavior dependent on any 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-dependent and +intermediaries SHOULD NOT base their design on version-specific templates.¶

+

For example, one arbitrary algorithm might convert a non-compliant DCID to an +integer and divided by the number of servers, with the modulus used to forward +the packet. The number of servers is usually consistent on the time scale of a +QUIC connection handshake. Another might simply hash the address/port 4-tuple. +See also Section 10.¶

+
+
+
+
+

+4.3. Server ID Allocation +

+

For any given configuration, the configuration agent must specify if server IDs +will be statically or dynamically allocated. Load Balancer configurations with +statically allocated server IDs explicitly include a mapping of server IDs to +forwarding addresses. The corresponding server configurations contain one or +more unique server IDs.¶

+

A dynamically allocated configuration does not have a pre-defined assignment, +reducing configuration complexity. However, it places limits on the maximum +server ID length and requires more state at the load balancer. In certain edge +cases, it can force parts of the system to fail over to 5-tuple routing for a +short time.¶

+

In either case, the configuration agent chooses a server ID length for each +configuration that MUST be at least one octet. For Static Allocation, the +maximum length depends on the algorithm. For dynamic allocation, the maximum +length is 7 octets.¶

+

A QUIC-LB configuration MAY significantly over-provision the server ID space +(i.e., provide far more codepoints than there are servers) to increase the +probability that a randomly generated Destination Connection ID is non- +compliant.¶

+

Conceptually, each configuration has its own set of server ID allocations, +though two static configurations with identical server ID lengths MAY use a +common allocation between them.¶

+

A server encodes one of its assigned server IDs in any CID it generates using +the relevant configuration.¶

+
+
+

+4.3.1. Static Allocation +

+

In the static allocation method, the configuration agent assigns at least one +server ID to each server.¶

+

When forwarding a packet with a long header and non-compliant DCID, load +balancers MUST forward packets with long headers and non-compliant DCIDs +using an arbitrary algorithm as specified in Section 4.2.¶

+
+
+
+
+

+4.3.2. Dynamic Allocation +

+

In the dynamic allocation method, the load balancer assigns server IDs +dynamically so that configuration does not require fixed server ID assignment. +This reduces linkability and simplifies configuration.¶

+

To summarize, the load balancer forwards incoming Initial packets arbitrarily +and both load balancer and server are sometimes able to infer a potential +server ID allocation from the CID in the packet. The server can signal +acceptance of that allocation by using it immediately, in which case both +entities add it to their permanent table. Usually, however, the server will +reject the allocation by not using it, in which case it is not added to the +permanent assignment list.¶

+
+
+
+4.3.2.1. Configuration Agent Actions +
+

The configuration agent does not assign server IDs, but does configure a server +ID length. The server ID MUST be at least one and no more than seven octets. +See Section 11.8 for other considerations if also using the Plaintext CID +algorithm.¶

+
+
+
+
+
+4.3.2.2. Load Balancer Actions +
+

The load balancer maintains two tables of assigned server IDs: one for +permanent assignments and one for provisional ones. Both are initialized +empty. These tables are independent for each operating configuration.¶

+

The permanent table maps server IDs to the routing information for that server. +The provisional table has that information, but for provisional allocations, +and also a list of all 4-tuples for which the provisional allocation has been +made and the CIDs associated with each 4-tuple.¶

+

Note that when the load balancer's tables for a configuration are empty, all +incoming DCIDs corresponding to that configuration are non-compliant by +definition.¶

+

The load balancer processes a long header packet as follows:¶

+
    +
  • If the config rotation bits do not match a known configuration, the load +balancer routes the packet using an arbitrary algorithm (see +Section 4.2). It does not extract a server ID.¶ +
  • +
  • If there is a matching configuration, but the CID is not long enough to apply +the algorithm, the load balancer skips the first octet of the CID and then +reads a server ID from the following octets, up to the server ID length.¶ +
  • +
  • Otherwise, the load balancer extracts the server ID in accordance with the +configured algorithm and parameters.¶ +
  • +
+

If the load balancer extracted a server ID already in the permanent or +provisional table, it routes the packet accordingly. If the server ID is not +in either table, it routes the packet according to an arbitrary algorithm and +adds the server ID, the routing decision, 4-tuple, and CID to the provisional +table.¶

+

If a short header packet arrives on a 4-tuple in the provisional table, it can +take one of three actions depending on the CID:¶

+
    +
  1. If the CID does not encode the provisional server ID, the load balancer MUST +delete the 4-tuple from the provisional table. If there are no remaining 4-tuples +associated with the server ID, the load balancer SHOULD delete the server ID +from the provisional table.¶ +
  2. +
  3. If the SID is in the provisional table, but the CID for that 4-tuple is +different, it MUST delete the provisional table entry and add the SID to the +permanent table.¶ +
  4. +
  5. If both the SID and CID match the 4-tuple's entry, the load balancer makes no +changes to the table.¶ +
  6. +
+

If no short header packet ever arrives on the 4-tuple, the load-balancer SHOULD +eliminate the provisional table entry after a timeout longer than the maximum +conceivable length of a QUIC handshake.¶

+
+
+
+
+
+4.3.2.3. Server actions +
+

Each server maintains a list of server IDs assigned to it, initialized empty.¶

+

Upon receipt of a packet with a client-generated DCID, the server MUST follow +these steps in order:¶

+
    +
  • If the config rotation bits do not correspond to a known configuration, do not +attempt to extract a server ID.¶ +
  • +
  • If the DCID is not long enough to decode using the configured algorithm, +extract a number of octets equal to the server ID length, beginning with the +second octet.¶ +
  • +
  • If the DCID is long enough to decode, extract the server ID.¶ +
  • +
+

If the server ID is not already in its list, the server MUST decide whether or +not to immediately use it to encode a CID on the new connection. If it chooses +to use it, it adds the server ID to its list. If it does not, it MUST NOT use +the server ID in future CIDs.¶

+

The server then processes the packet normally.¶

+

When a server needs a new connection ID, it uses one of the server IDs in its +list to populate the server ID field of that CID. It MAY vary this selection +to reduce linkability within a connection.¶

+

To reduce state at the load balancer, the server SHOULD limit the number of SIDs +it adds to its list.¶

+

After loading a new configuration, a server may not have any available SIDs. +This is because an incoming packet may not contain the config rotation bits +necessary to extract a server ID in accordance with the algorithm above. When +required to generate a CID under these conditions, the server MUST generate +CIDs using the 5-tuple routing codepoint (see Section 3.2. Note that +these connections will not be robust to client address changes while they use +this connection ID. For this reason, a server SHOULD retire these connection IDs +and replace them with routable ones once it receives a client-generated CID that +allows it to acquire a server ID. As, statistically, one in every four such CIDs +can provide a server ID, this is typically a short interval.¶

+
+
+
+
+
+
+
+
+
+
+

+5. Routing Algorithms +

+

Encryption in the algorithms below uses the AES-128-ECB cipher. Future standards +could add new algorithms that use other ciphers to provide cryptographic agility +in accordance with [RFC7696]. QUIC-LB implementations SHOULD be extensible to +support new algorithms.¶

+
+
+

+5.1. Plaintext CID Algorithm +

+

The Plaintext CID Algorithm makes no attempt to obscure the mapping of +connections to servers, significantly increasing linkability. The format is +depicted in the figure below.¶

+
+
+
+
+Plaintext CID {
+  First Octet (8),
+  Server ID (8..128),
+  For Server Use (8..152-len(Server ID)),
+}
+
+
+
Figure 3: +Plaintext CID Format +
+
+
+
+

+5.1.1. Configuration Agent Actions +

+

For static SID allocation, the server ID length is limited to 16 octets. There +are no parameters specific to this algorithm.¶

+
+
+
+
+

+5.1.2. Load Balancer Actions +

+

On each incoming packet, the load balancer extracts consecutive octets, +beginning with the second octet. These bytes represent the server ID.¶

+
+
+
+
+

+5.1.3. Server Actions +

+

The server chooses how many octets to reserve for its own use, which MUST be at +least one octet.¶

+

When a server needs a new connection ID, it encodes one of its assigned server +IDs in consecutive octets beginning with the second. All other 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.¶

+
+
+
+
+
+
+

+5.2. Stream Cipher CID Algorithm +

+

The Stream Cipher CID algorithm provides cryptographic protection at the cost of +additional per-packet processing at the load balancer to decrypt every incoming +connection ID. The CID format is depicted below.¶

+
+
+
+
+Stream Cipher CID {
+  First Octet (8),
+  Nonce (64..120),
+  Encrypted Server ID (8..128-len(Nonce)),
+  For Server Use (0..152-len(Nonce)-len(Encrypted Server ID)),
+}
+
+
+
Figure 4: +Stream Cipher CID Format +
+
+
+
+

+5.2.1. Configuration Agent Actions +

+

The configuration agent assigns a server ID to every server in its pool, and +determines a server ID length (in octets) sufficiently large to encode all +server IDs, including potential future servers.¶

+

The configuration agent also selects a nonce length and an 16-octet AES-ECB key +to use for connection ID decryption. The nonce length MUST be at least 8 octets +and no more than 16 octets. The nonce length and server ID length MUST sum to 19 +or fewer octets, but SHOULD sum to 15 or fewer to allow space for server use.¶

+
+
+
+
+

+5.2.2. Load Balancer Actions +

+

Upon receipt of a QUIC packet, the load balancer extracts as many of the +earliest octets from the destination connection ID as necessary to match the +nonce length. The server ID immediately follows.¶

+

The load balancer decrypts the nonce and the server ID using the following three +pass algorithm:¶

+
    +
  • Pass 1: The load balancer decrypts the server ID using 128-bit AES Electronic +Codebook (ECB) mode, much like QUIC header protection. The encrypted nonce +octets are zero-padded to 16 octets. AES-ECB encrypts this encrypted nonce +using its key to generate a mask which it applies to the encrypted server id. +This provides an intermediate value of the server ID, referred to as server-id +intermediate.¶ +
  • +
+

server_id_intermediate = encrypted_server_id ^ AES-ECB(key, padded-encrypted-nonce)¶

+
    +
  • Pass 2: The load balancer decrypts the nonce octets using 128-bit AES +ECB mode, using the server-id intermediate as "nonce" for this pass. The +server-id intermediate octets are zero-padded to 16 octets. AES-ECB encrypts +this padded server-id intermediate using its key to generate a mask which it +applies to the encrypted nonce. This provides the decrypted nonce value.¶ +
  • +
+

nonce = encrypted_nonce ^ AES-ECB(key, padded-server_id_intermediate)¶

+
    +
  • Pass 3: The load balancer decrypts the server ID using 128-bit AES ECB mode. +The 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 intermediate server id. +This provides the decrypted server ID.¶ +
  • +
+

server_id = server_id_intermediate ^ AES-ECB(key, padded-nonce)¶

+

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. The load balancer uses +the the second through eleventh octets of the connection ID for the nonce, +zero-pads it to 16 octets, uses xors the result with the twelfth and thirteenth +octet. The result is padded with 14 octets of zeros and encrypted to obtain a +mask that is xored with the nonce octets. Finally, the nonce octets are padded +with six octets of zeros, encrypted, and the first two octets xored with the +server ID octets to obtain the actual server ID.¶

+

This three-pass algorithm is a simplified version of the FFX algorithm, with +the property that each encrypted nonce value depends on all server ID bits, and +each encrypted server ID bit depends on all nonce bits and all server ID bits. +This mitigates attacks against stream ciphers in which attackers simply flip +encrypted server-ID bits.¶

+

The output of the decryption is the server ID that the load balancer uses for +routing.¶

+
+
+
+
+

+5.2.3. Server Actions +

+

When generating a routable connection ID, the server writes arbitrary bits into +its nonce octets, and its provided server ID into the server ID octets. Servers +MAY opt to have a longer connection ID beyond the nonce and server ID. The +additional bits MAY encode additional information, but SHOULD appear essentially +random to observers.¶

+

If the decrypted nonce bits increase monotonically, that guarantees that nonces +are not reused between connection IDs from the same server.¶

+

The server encrypts the server ID using exactly the algorithm as described in +Section 5.2.2, performing the three passes +in reverse order.¶

+
+
+
+
+
+
+

+5.3. Block Cipher CID Algorithm +

+

The Block Cipher CID Algorithm, by using a full 16 octets of plaintext and a +128-bit cipher, provides higher cryptographic protection and detection of +non-compliant connection IDs. However, it also requires connection IDs of at +least 17 octets, increasing overhead of client-to-server packets.¶

+
+
+
+
+Block Cipher CID {
+  First Octet (8),
+  Encrypted Server ID (8..128),
+  Encrypted Bits for Server Use (128-len(Encrypted Server ID)),
+  Unencrypted Bits for Server Use (0..24),
+}
+
+
+
Figure 5: +Block Cipher CID Format +
+
+
+
+

+5.3.1. Configuration Agent Actions +

+

If server IDs are statically allocated, the server ID length MUST be no more +than 12 octets, to provide servers adequate entropy to generate unique CIDs.¶

+

The configuration agent also selects an 16-octet AES-ECB key to use for +connection ID decryption.¶

+
+
+
+
+

+5.3.2. Load Balancer Actions +

+

Upon receipt of a QUIC packet, the load balancer reads the first octet to +obtain the config rotation bits. It then decrypts the subsequent 16 octets using +AES-ECB decryption and the chosen key.¶

+

The decrypted plaintext contains the server id and opaque server data in that +order. The load balancer uses the server ID octets for routing.¶

+
+
+
+
+

+5.3.3. Server Actions +

+

When generating a routable connection ID, the server MUST choose a connection ID +length between 17 and 20 octets. The server writes its server ID into the server +ID octets and arbitrary bits into the remaining bits. These arbitrary bits MAY +encode additional information, and MUST differ between connection IDs. Bits in +the eighteenth, nineteenth, and twentieth octets SHOULD appear essentially +random to observers. The first octet is reserved as described in Section 3.¶

+

The server then encrypts the second through seventeenth octets using the 128-bit +AES-ECB cipher.¶

+
+
+
+
+
+
+
+
+

+6. ICMP Processing +

+

For protocols where 4-tuple load balancing is sufficient, it is straightforward +to deliver ICMP packets from the network to the correct server, by reading the +echoed IP and transport-layer headers to obtain the 4-tuple. When routing is +based on connection ID, further measures are required, as most QUIC packets that +trigger ICMP responses will only contain a client-generated connection ID that +contains no routing information.¶

+

To solve this problem, load balancers MAY maintain a mapping of Client IP and +port to server ID based on recently observed packets.¶

+

Alternatively, servers MAY implement the technique described in Section 14.4.1 +of [QUIC-TRANSPORT] to increase the likelihood a Source Connection ID is +included in ICMP responses to Path Maximum Transmission Unit (PMTU) probes. Load +balancers MAY parse the echoed packet to extract the Source Connection ID, if +it contains a QUIC long header, and extract the Server ID as if it were in a +Destination CID.¶

+
+
+
+
+

+7. Retry Service +

+

When a server is under load, QUICv1 allows it to defer storage of connection +state until the client proves it can receive packets at its advertised IP +address. Through the use of a Retry packet, a token in subsequent client +Initial packets, and transport parameters, servers verify address ownership and +clients verify that there is no on-path attacker generating Retry packets.¶

+

A "Retry Service" detects potential Denial of Service attacks and handles +sending of Retry packets on behalf of the server. As it is, by definition, +literally an on-path entity, the service must communicate some of the original +connection IDs back to the server so that it can pass client verification. It +also must either verify the address itself (with the server trusting this +verification) or make sure there is common context for the server to verify the +address using a service-generated token.¶

+

There are two different mechanisms to allow offload of DoS mitigation to a +trusted network service. One requires no shared state; the server need only be +configured to trust a retry service, though this imposes other operational +constraints. The other requires a shared key, but has no such constraints.¶

+
+
+

+7.1. Common Requirements +

+

Regardless of mechanism, a retry service has an active mode, where it is +generating Retry packets, and an inactive mode, where it is not, based on its +assessment of server load and the likelihood an attack is underway. The choice +of mode MAY be made on a per-packet or per-connection basis, through a +stochastic process or based on client address.¶

+

A configuration agent MUST distribute a list of QUIC versions the Retry Service +supports. It MAY also distribute either an "Allow-List" or a "Deny-List" of +other QUIC versions. It MUST NOT distribute both an Allow-List and a Deny-List.¶

+

The Allow-List or Deny-List MUST NOT include any versions included for Retry +Service Support.¶

+

The Configuration Agent MUST provide a means for the entity that controls the +Retry Service to report its supported version(s) to the configuration Agent. If +the entity has not reported this information, it MUST NOT activate the Retry +Service and the configuration agent MUST NOT distribute configuration that +activates it.¶

+

The configuration agent MAY delete versions from the final supported version +list if policy does not require the Retry Service to operate on those versions.¶

+

The configuration Agent MUST provide a means for the entities that control +servers behind the Retry Service to report either an Allow-List or a Deny-List.¶

+

If all entities supply Allow-Lists, the consolidated list MUST be the union of +these sets. If all entities supply Deny-Lists, the consolidated list MUST be +the intersection of these sets.¶

+

If entities provide a mixture of Allow-Lists and Deny-Lists, the consolidated +list MUST be a Deny-List that is the intersection of all provided Deny-Lists and +the inverses of all Allow-Lists.¶

+

If no entities that control servers have reported Allow-Lists or Deny-Lists, +the default is a Deny-List with the null set (i.e., all unsupported versions +will be admitted). This preserves the future extensibilty of QUIC.¶

+

A retry service MUST forward all packets for a QUIC version it does not +support that are not on a Deny-List or absent from an Allow-List. Note that if +servers support versions the retry service does not, this may increase load on +the servers.¶

+

Note that future versions of QUIC might not have Retry packets, require +different information in Retry, or use different packet type indicators.¶

+
+
+

+7.1.1. Considerations for Non-Initial Packets +

+

Initial Packets are especially effective at consuming server resources +because they cause the server to create connection state. Even when mitigating +this load with Retry Packets, the act of validating an Initial Token and sending +a Retry Packet is more expensive than the response to a non-Initial packet with +an unknown Connection ID: simply dropping it and/or sending a Stateless Reset.¶

+

Nevertheless, a Retry Service in Active Mode might desire to shield servers +from non-Initial packets that do not correspond to a previously admitted +Initial Packet. This has a number of considerations.¶

+
    +
  • If a Retry Service maintains no per-flow state whatsoever, it cannot +distinguish between valid and invalid non_Initial packets and MUST forward all +non-Initial Packets to the server.¶ +
  • +
  • For QUIC versions the Retry Service does not support and are present on the +Allow-List (or absent from the Deny-List), the Retry Service cannot distinguish +Initial Packets from other long headers and therefore MUST admit all long +headers.¶ +
  • +
  • If a Retry Service keeps per-flow state, it can identify 4-tuples that have +been previously approved, admit non-Initial packets from those flows, and +drop all others. However, dropping short headers will effectively break Address +Migration and NAT Rebinding when in Active Mode, as post-migration packets will +arrive with a previously unknown 4-tuple. This policy will also break connection +attempts using any new QUIC versions that begin connections with a short header.¶ +
  • +
  • If a Retry Service is integrated with a QUIC-LB compliant load balancer, it +can verify that the Destination Connection ID is compliant, and only admit +non-Initial packets with compliant DCIDs. As the Connection ID encoding is +invariant across QUIC versions, the Retry Service can do this for all short +headers.¶ +
  • +
+

Nothing in this section prevents Retry Services from making basic syntax +correctness checks on packets with QUIC versions that it understands (e.g., +enforcing the Initial Packet datagram size minimum in version 1) and +dropping packets that are not compliant with the QUIC specification.¶

+
+
+
+
+
+
+

+7.2. No-Shared-State Retry Service +

+

The no-shared-state retry service requires no coordination, except that the +server must be configured to accept this service and know which QUIC versions +the retry service supports. The scheme uses the first bit of the token to +distinguish between tokens from Retry packets (codepoint '0') and tokens from +NEW_TOKEN frames (codepoint '1').¶

+ +
+
+

+7.2.2. Service Requirements +

+

A no-shared-state retry service MUST be present on all paths from potential +clients to the server. These paths MUST fail to pass QUIC traffic should the +service fail for any reason. That is, if the service is not operational, the +server MUST NOT be exposed to client traffic. Otherwise, servers that have +already disabled their Retry capability would be vulnerable to attack.¶

+

The path between service and server MUST be free of any potential attackers. +Note that this and other requirements above severely restrict the operational +conditions in which a no-shared-state retry service can safely operate.¶

+

Retry tokens generated by the service MUST have the format below.¶

+
+
+
+
+Non-Shared-State Retry Service Token {
+  Token Type (1) = 0,
+  ODCIL (7) = 8..20,
+  RSCIL (8) = 0..20,
+  Original Destination Connection ID (64..160),
+  Retry Source Connection ID (0..160),
+  Opaque Data (..),
+}
+
+
+
Figure 6: +Format of non-shared-state retry service tokens +
+
+

The first bit of retry tokens generated by the service MUST be zero. The token +has the following additional fields:¶

+

ODCIL: The length of the original destination connection ID from the triggering +Initial packet. This is in cleartext to be readable for the server, but +authenticated later in the token. The Retry Service SHOULD reject any token +in which the value is less than 8.¶

+

RSCIL: The retry source connection ID length.¶

+

Original Destination Connection ID: This also in cleartext and authenticated +later.¶

+

Retry Source Connection ID: This also in cleartext and authenticated +later.¶

+

Opaque Data: This data MUST contain encrypted information that allows the retry +service to validate the client's IP address, in accordance with the QUIC +specification. It MUST also provide a cryptographically secure means to +validate the integrity of the entire token.¶

+

Upon receipt of an Initial packet with a token that begins with '0', the retry +service MUST validate the token in accordance with the QUIC specification.¶

+

In active mode, the service MUST issue Retry packets for all Client initial +packets that contain no token, or a token that has the first bit set to '1'. It +MUST NOT forward the packet to the server. The service MUST validate all tokens +with the first bit set to '0'. If successful, the service MUST forward the +packet with the token intact. If unsuccessful, it MUST drop the packet. The +Retry Service MAY send an Initial Packet containing a CONNECTION_CLOSE frame +with the INVALID_TOKEN error code when dropping the packet.¶

+

Note that this scheme has a performance drawback. When the retry service is in +active mode, clients with a token from a NEW_TOKEN frame will suffer a 1-RTT +penalty even though its token provides proof of address.¶

+

In inactive mode, the service MUST forward all packets that have no token or a +token with the first bit set to '1'. It MUST validate all tokens with the first +bit set to '0'. If successful, the service MUST forward the packet with the +token intact. If unsuccessful, it MUST either drop the packet or forward it +with the token removed. The latter requires decryption and re-encryption of the +entire Initial packet to avoid authentication failure. Forwarding the packet +causes the server to respond without the original_destination_connection_id +transport parameter, which preserves the normal QUIC signal to the client that +there is an on-path attacker.¶

+
+
+
+
+

+7.2.3. Server Requirements +

+

A server behind a non-shared-state retry service MUST NOT send Retry packets +for a QUIC version the retry service understands. It MAY send Retry for QUIC +versions the Retry Service does not understand.¶

+

Tokens sent in NEW_TOKEN frames MUST have the first bit set to '1'.¶

+

If a server receives an Initial Packet with the first bit set to '1', it could +be from a server-generated NEW_TOKEN frame and should be processed in accordance +with the QUIC specification. If a server receives an Initial Packet with the +first bit to '0', it is a Retry token and the server MUST NOT attempt to +validate it. Instead, it MUST assume the address is validated and MUST extract +the Original Destination Connection ID and Retry Source Connection ID, assuming +the format described in Section 7.2.2.¶

+
+
+
+
+
+
+

+7.3. Shared-State Retry Service +

+

A shared-state retry service uses a shared key, so that the server can decode +the service's retry tokens. It does not require that all traffic pass through +the Retry service, so servers MAY send Retry packets in response to Initial +packets that don't include a valid token.¶

+

Both server and service must have time synchronized with respect to one another to prevent tokens +being incorrectly marked as expired, though tight synchronization is +unnecessary.¶

+

The tokens are protected using AES128-GCM AEAD, as explained in +Section 7.3.1. All tokens, generated by either the server or +retry service, MUST use the following format, which includes:¶

+
    +
  • A 96 bit unique token number transmitted in clear text, but protected as part +of the AEAD associated data.¶ +
  • +
  • An 8 bit token key identifier.¶ +
  • +
  • A token body, encoding the Original Destination Connection ID, the Retry +Source Connection ID, and the Timestamp, optionally followed by server specific +Opaque Data.¶ +
  • +
+

The token protection uses an 128 bit representation of the source IP address +from the triggering Initial packet. The client IP address is 16 octets. If an +IPv4 address, the last 12 octets are zeroes.¶

+

If there is a Network Address Translator (NAT) in the server infrastructure that +changes the client IP, the Retry Service MUST either be positioned behind the +NAT, or the NAT must have the token key to rewrite the Retry token accordingly. +Note also that a host that obtains a token through a NAT and then attempts to +connect over a path that does not have an identically configured NAT will fail +address validation.¶

+

The 96 bit unique token number is set to a random value using a cryptography- +grade random number generator.¶

+

The token key identifier and the corresponding AEAD key and AEAD IV are +provisioned by the configuration agent.¶

+

The token body is encoded as follows:¶

+
+
+
+
+Shared-State Retry Service Token Body {
+   ODCIL (8) = 0..20,
+   RSCIL (8) = 0..20,
+   [Port (16)],
+   Original Destination Connection ID (0..160),
+   Retry Source Connection ID (0..160),
+   Timestamp (64),
+   Opaque Data (..),
+}
+
+
+
Figure 7: +Body of shared-state retry service tokens +
+
+

The token body has the following fields:¶

+

ODCIL: The original destination connection ID length. Tokens in NEW_TOKEN frames +MUST set this field to zero.¶

+

RSCIL: The retry source connection ID length. Tokens in NEW_TOKEN frames MUST +set this field to zero.¶

+

Port: The Source Port of the UDP datagram that triggered the Retry packet. +This field MUST be present if and only if the ODCIL is greater than zero. This +field is therefore always absent in tokens in NEW_TOKEN frames.¶

+

Original Destination Connection ID: The server or Retry Service copies this +from the field in the client Initial packet.¶

+

Retry Source Connection ID: The server or Retry service copies this from the +Source Connection ID of the Retry packet.¶

+

Timestamp: The Timestamp is a 64-bit integer, in network order, that expresses +the expiration time of the token as a number of seconds in POSIX time (see Sec. +4.16 of [TIME_T]).¶

+

Opaque Data: The server may use this field to encode additional information, +such as congestion window, RTT, or MTU. The Retry Service MUST have zero-length +opaque data.¶

+

Some implementations of QUIC encode in the token the Initial Packet Number used +by the client, in order to verify that the client sends the retried Initial +with a PN larger that the triggering Initial. Such implementations will encode +the Initial Packet Number as part of the opaque data. As tokens may be +generated by the Service, servers MUST NOT reject tokens because they lack +opaque data and therefore the packet number.¶

+
+
+

+7.3.1. Token Protection with AEAD +

+

On the wire, the token is presented as:¶

+
+
+
+
+Shared-State Retry Service Token {
+  Unique Token Number (96),
+  Key Sequence (8),
+  Encrypted Shared-State Retry Service Token Body (80..),
+  AEAD Checksum (length depends on encryption algorithm),
+}
+
+
+
Figure 8: +Wire image of shared-state retry service tokens +
+
+

The tokens are protected using AES128-GCM as follows:¶

+
    +
  • The token key and IV are retrieved using the Key Sequence.¶ +
  • +
  • The nonce, N, is formed by combining the IV with the 96 bit unique token +number. The 96 bits of the unique token number are left-padded with zeros to the +size of the IV. The exclusive OR of the padded unique token number and the IV +forms the AEAD nonce.¶ +
  • +
  • The associated data is a formatted as a pseudo header by combining the +cleartext part of the token with the IP address of the client.¶ +
  • +
+
+
+
+
+Shared-State Retry Service Token Pseudoheader {
+  IP Address (128),
+  Unique Token Number (96),
+  Key Sequence (8),
+}
+
+
+
Figure 9: +Psuedoheader for shared-state retry service tokens +
+
+
    +
  • The input plaintext for the AEAD is the token body. The output ciphertext of +the AEAD is transmitted in place of the token body.¶ +
  • +
  • The AEAD Checksum is computed as part of the AEAD encryption process, and is +verified during decryption.¶ +
  • +
+
+
+
+
+

+7.3.2. Configuration Agent Actions +

+

The configuration agent generates and distributes a "token key", a "token IV", +a key sequence, and the information described in Section 7.1.¶

+
+
+
+
+

+7.3.3. Service Requirements +

+

In inactive mode, the Retry service forwards all packets without further +inspection or processing.¶

+

Retry services MUST NOT issue Retry packets except where explicitly allowed +below, to avoid sending a Retry packet in response to a Retry token.¶

+

When in active mode, the service MUST generate Retry tokens with the format +described above when it receives a client Initial packet with no token.¶

+

The service SHOULD decrypt incoming tokens. The service SHOULD drop packets +with unknown key sequence, or an AEAD checksum that does not match the expected +value. (By construction, the AEAD checksum will only match if the client IP +Address also matches.)¶

+

If the token checksum passes, and the ODCIL and RSCIL fields are both zero, +then this is a NEW_TOKEN token generated by the server. Processing of NEW_TOKEN +tokens is subtly different from Retry tokens, as described below.¶

+

The service SHOULD drop a packet containing a token where the ODCIL is greater +than zero and less than the minimum number of octets for a client-generated CID +(8 in QUIC version 1). The service also SHOULD drop a packet containing a token +where the ODCIL is zero and RSCIL is nonzero.¶

+

If the Timestamp of a token points to time in the past, the token has expired; +however, in order to allow for clock skew, it SHOULD NOT consider tokens to be +expired if the Timestamp encodes a few seconds in the past. An active Retry +service SHOULD drop packets with expired tokens. If a NEW_TOKEN token, the +service MUST generate a Retry packet in response. It MUST NOT generate a Retry +packet in response to an expired Retry token.¶

+

If a Retry token, the service SHOULD drop packets where the port number +encoded in the token does not match the source port in the encapsulating UDP +header.¶

+

All other packets SHOULD be forwarded to the server.¶

+
+
+
+
+

+7.3.4. Server Requirements +

+

When issuing Retry or NEW_TOKEN tokens, the server MUST include the client IP +address in the authenticated data as specified in +Section 7.3.1. The ODCIL and RSCIL fields are zero for +NEW_TOKEN tokens, making them easily distinguishable from Retry tokens.¶

+

The server MUST validate all tokens that arrive in Initial packets, as they may +have bypassed the Retry service.¶

+

For Retry tokens that follow the format above, servers SHOULD use the timestamp +field to apply its expiration limits for tokens. This need not be precisely +synchronized with the retry service. However, servers MAY allow retry tokens +marked as being a few seconds in the past, due to possible clock +synchronization issues.¶

+

After decrypting the token, the server uses the corresponding fields to +populate the original_destination_connection_id transport parameter, with a +length equal to ODCIL, and the retry_source_connection_id transport parameter, +with length equal to RSCIL.¶

+

For QUIC versions the service does not support, the server MAY use any token +format.¶

+

As discussed in [QUIC-TRANSPORT], a server MUST NOT send a Retry packet in +response to an Initial packet that contains a retry token.¶

+
+
+
+
+
+
+
+
+

+8. Configuration Requirements +

+

QUIC-LB requires common configuration to synchronize understanding of encodings +and guarantee explicit consent of the server.¶

+

The load balancer and server MUST agree on a routing algorithm, server ID +allocation method, and the relevant parameters for that algorithm.¶

+

All algorithms require a server ID length. If server IDs are statically +allocated, the load balancer MUST receive the full table of mappings, and +each server must receive its assigned SID(s), from the configuration agent.¶

+

For Stream Cipher CID Routing, the servers and load balancer also MUST have a +common understanding of the key and nonce length.¶

+

For Block Cipher CID Routing, the servers and load balancer also MUST have a +common understanding of the key.¶

+

Note that server IDs are opaque bytes, not integers, so there is no notion of +network order or host order.¶

+

A server configuration MUST specify if the first octet encodes the CID length. +Note that a load balancer does not need the CID length, as the required bytes +are present in the QUIC packet.¶

+

A full QUIC-LB server configuration MUST also specify the supported QUIC +versions of any Retry Service. If a shared-state service, the server also must +have the token key.¶

+

A non-shared-state Retry Service need only be configured with the QUIC versions +it supports, and an Allow- or Deny-List. A shared-state Retry Service also needs +the token key, and to be aware if a NAT sits between it and the servers.¶

+

Appendix A provides a YANG Model of the a full QUIC-LB configuration.¶

+
+
+
+
+

+9. Additional Use Cases +

+

This section discusses considerations for some deployment scenarios not implied +by the specification above.¶

+
+
+

+9.1. Load balancer chains +

+

Some network architectures may have multiple tiers of low-state load balancers, +where a first tier of devices makes a routing decision to the next tier, and so +on, until packets reach the server. Although QUIC-LB is not explicitly designed +for this use case, it is possible to support it.¶

+

If each load balancer is assigned a range of server IDs that is a subset of the +range of IDs assigned to devices that are closer to the client, then the first +devices to process an incoming packet can extract the server ID and then map it +to the correct forwarding address. Note that this solution is extensible to +arbitrarily large numbers of load-balancing tiers, as the maximum server ID +space is quite large.¶

+
+
+
+
+

+9.2. Moving connections between servers +

+

Some deployments may transparently move a connection from one server to another. +The means of transferring connection state between servers is out of scope of +this document.¶

+

To support a handover, a server involved in the transition could issue CIDs that +map to the new server via a NEW_CONNECTION_ID frame, and retire CIDs associated +with the new server using the "Retire Prior To" field in that frame.¶

+

Alternately, if the old server is going offline, the load balancer could simply +map its server ID to the new server's address.¶

+
+
+
+
+
+
+

+10. Version Invariance of QUIC-LB +

+

Non-shared-state Retry Services are inherently dependent on the format (and +existence) of Retry Packets in each version of QUIC, and so Retry Service +configuration explicitly includes the supported QUIC versions.¶

+

The server ID encodings, and requirements for their handling, are designed to be +QUIC version independent (see [QUIC-INVARIANTS]). A QUIC-LB load balancer will +generally not require changes as servers deploy new versions of QUIC. However, +there are several unlikely future design decisions that could impact the +operation of QUIC-LB.¶

+

The maximum Connection ID length could be below the minimum necessary for one or +more encoding algorithms.¶

+

Section 4.1 provides guidance about how load balancers should handle +non-compliant DCIDs. This guidance, and the implementation of an algorithm to +handle these DCIDs, rests on some assumptions:¶

+
    +
  • Incoming short headers do not contain DCIDs that are client-generated.¶ +
  • +
  • The use of client-generated incoming DCIDs does not persist beyond a few round +trips in the connection.¶ +
  • +
  • While the client is using DCIDs it generated, some exposed fields (IP address, +UDP port, client-generated destination Connection ID) remain constant for all +packets sent on the same connection.¶ +
  • +
  • Dynamic server ID allocation is dependent on client-generated Destination CIDs +in Initial Packets being at least 8 octets in length. If they are not, the load +balancer may not be able to extract a valid server ID to add to its table. +Configuring a shorter server ID length can increase robustness to a change.¶ +
  • +
+

While this document does not update the commitments in [QUIC-INVARIANTS], the +additional assumptions are minimal and narrowly scoped, and provide a likely +set of constants that load balancers can use with minimal risk of version- +dependence.¶

+

If these assumptions are invalid, this specification is likely to lead to loss +of packets that contain non-compliant DCIDs, and in extreme cases connection +failure.¶

+

Some load balancers might inspect elements of the Server Name Indication (SNI) +extension in the TLS Client Hello to make a routing decision. Note that the +format and cryptographic protection of this information may change in future +versions or extensions of TLS or QUIC, and therefore this functionality is +inherently not version-invariant.¶

+
+
+
+
+

+11. Security Considerations +

+

QUIC-LB is intended to prevent linkability. Attacks would therefore attempt to +subvert this purpose.¶

+

Note that the Plaintext CID algorithm makes no attempt to obscure the server +mapping, and therefore does not address these concerns. It exists to allow +consistent CID encoding for compatibility across a network infrastructure, which +makes QUIC robust to NAT rebinding. Servers that are running the Plaintext CID +algorithm SHOULD only use it to generate new CIDs for the Server Initial Packet +and SHOULD NOT send CIDs in QUIC NEW_CONNECTION_ID frames, except that it sends +one new Connection ID in the event of config rotation Section 3.1. +Doing so might falsely suggest to the client that said CIDs were generated in a +secure fashion.¶

+

A linkability attack would find some means of determining that two connection +IDs route to the same server. As described above, there is no scheme that +strictly prevents linkability for all traffic patterns, and therefore efforts to +frustrate any analysis of server ID encoding have diminishing returns.¶

+
+
+

+11.1. Attackers not between the load balancer and server +

+

Any attacker might open a connection to the server infrastructure and +aggressively simulate migration 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.¶

+

The Stream and Block Cipher CID algorithms provide robust protection against +any sort of linkage. The Plaintext CID algorithm makes no attempt to protect +this encoding.¶

+

Were this analysis to obtain the server encoding, then on-path observers might +apply this analysis to correlating different client IP addresses.¶

+
+
+
+
+

+11.2. Attackers between the load balancer and server +

+

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 IDs for that connection.¶

+
+
+
+
+

+11.3. Multiple Configuration IDs +

+

During the period in which there are multiple deployed configuration IDs (see +Section 3.1), there is a slight increase in linkability. The server +space is effectively divided into segments with CIDs that have different config +rotation bits. Entities that manage servers SHOULD strive to minimize these +periods by quickly deploying new configurations across the server pool.¶

+
+
+
+
+

+11.4. Limited configuration scope +

+

A simple deployment of QUIC-LB in a cloud provider might use the same global +QUIC-LB configuration across all its load balancers that route to customer +servers. An attacker could then simply become a customer, obtain the +configuration, and then extract server IDs of other customers' connections at +will.¶

+

To avoid this, the configuration agent SHOULD issue QUIC-LB configurations to +mutually distrustful servers that have different keys for encryption +algorithms. The load balancers can distinguish these configurations by external +IP address, or by assigning different values to the config rotation bits +(Section 3.1). Note that either solution has a privacy impact; see +Section 11.3.¶

+

These techniques are not necessary for the plaintext algorithm, as it does not +attempt to conceal the server ID.¶

+
+
+
+
+

+11.5. Stateless Reset Oracle +

+

Section 21.9 of [QUIC-TRANSPORT] discusses the Stateless Reset Oracle attack. +For a server deployment to be vulnerable, an attacking client must be able to +cause two packets with the same Destination CID to arrive at two different +servers that share the same cryptographic context for Stateless Reset tokens. As +QUIC-LB requires deterministic routing of DCIDs over the life of a connection, +it is a sufficient means of avoiding an Oracle without additional measures.¶

+
+
+
+
+

+11.6. Connection ID Entropy +

+

The Stream Cipher and Block Cipher algorithms need to generate different cipher +text for each generated Connection ID instance to protect the Server ID. To +do so, at least four octets of the Block Cipher CID and at least eight octets +of the Stream Cipher CID are reserved for a nonce that, if used only once, will +result in unique cipher text for each Connection ID.¶

+

If servers simply increment the nonce by one with each generated connection ID, +then it is safe to use the existing keys until any server's nonce counter +exhausts the allocated space and rolls over to zero. Whether or not it +implements this method, the server MUST NOT reuse a nonce until it switches to a +configuration with new keys.¶

+

Configuration agents SHOULD implement an out-of-band method to discover when +servers are in danger of exhausting their nonce space, and SHOULD respond by +issuing a new configuration. A server that has exhausted its nonces MUST +either switch to a different configuration, or if none exists, use the 4-tuple +routing config rotation codepoint.¶

+
+
+
+
+

+11.7. Shared-State Retry Keys +

+

The Shared-State Retry Service defined in Section 7.3 describes the +format of retry tokens or new tokens protected and encrypted using AES128-GCM. +Each token includes a 96 bit randomly generated unique token number, and an 8 +bit identifier of the AES-GCM encryption key. There are three important security +considerations for these tokens:¶

+
    +
  • An attacker that obtains a copy of the encryption key will be able to decrypt +and forge tokens.¶ +
  • +
  • Attackers may be able to retrieve the key if they capture a sufficently large +number of retry tokens encrypted with a given key.¶ +
  • +
  • Confidentiality of the token data will fail if separate tokens reuse the +same 96 bit unique token number and the same key.¶ +
  • +
+

To protect against disclosure of keys to attackers, service and servers MUST +ensure that the keys are stored securely. To limit the consequences of potential +exposures, the time to live of any given key should be limited.¶

+

Section 6.6 of [QUIC-TLS] states that "Endpoints MUST count +the number of encrypted packets for each set of keys. If the total number of +encrypted packets with the same key exceeds the confidentiality limit for the +selected AEAD, the endpoint MUST stop using those keys." It goes on with the +specific limit: "For AEAD_AES_128_GCM and AEAD_AES_256_GCM, the confidentiality +limit is 2^23 encrypted packets; see Appendix B.1." It is prudent to adopt the +same limit here, and configure the service in such a way that no more than 2^23 +tokens are generated with the same key.¶

+

In order to protect against collisions, the 96 bit unique token numbers should +be generated using a cryptographically secure pseudorandom number generator +(CSPRNG), as specified in Appendix C.1 of the TLS 1.3 specification +[RFC8446]. With proper random numbers, if fewer than 2^40 tokens are +generated with a single key, the risk of collisions is lower than 0.001%.¶

+
+
+
+
+

+11.8. Resource Consumption of the SID table +

+

When using Dynamic SID allocation, the load balancer's SID table can be as +large as 2^56 entries, which is prohibitively large. To constrain the size of +this table, servers are encouraged to accept a small number of IDs, so that the +rest can be purged from the load balancer's provisional table.¶

+

One form of attack would send a large number of random CIDs in long headers to +increase the size of the load balancer's permanent or provisional table.¶

+

An attack on the provisional table would simply send each CID in long headers +with many different fourtuples. If no 1-RTT packet never arrives, the entry will +simply persist in the provisional table. Load balancers are encouraged to time +out entries that never receive a short header packet, but this timeout SHOULD be +well in excess of the maximum conceivable duration of a QUIC handshake.¶

+

An attack on the permanent table would follow each long header with a short +header that encoded the same SID. The encoding CIDs in the two packets must be +different to add the SID to the permanent table. This is non-trivial for +encrypted CIDs, but straighforward for the Plaintext CID. As a result, +Plaintext CID configurations are strongly encouraged to configure a small +enough server ID to limit the size of the load balancer's table to a manageable +memory footprint even if all possible codepoints are permanently assigned.¶

+
+
+
+
+
+
+

+12. IANA Considerations +

+

There are no IANA requirements.¶

+
+
+
+

+13. References +

+
+

+13.1. Normative References +

+
+
[QUIC-INVARIANTS]
+
+Thomson, M., "Version-Independent Properties of QUIC", Work in Progress, Internet-Draft, draft-ietf-quic-invariants-13, , <https://www.ietf.org/archive/id/draft-ietf-quic-invariants-13.txt>.
+
+
[QUIC-TRANSPORT]
+
+Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed and Secure Transport", Work in Progress, Internet-Draft, draft-ietf-quic-transport-34, , <https://www.ietf.org/archive/id/draft-ietf-quic-transport-34.txt>.
+
+
[RFC8446]
+
+Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, , <https://www.rfc-editor.org/info/rfc8446>.
+
+
[TIME_T]
+
+"Open Group Standard: Vol. 1: Base Definitions, Issue 7", IEEE Std 1003.1 , , <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16>.
+
+
+
+
+

+13.2. Informative References +

+
+
[QUIC-TLS]
+
+Thomson, M. and S. Turner, "Using TLS to Secure QUIC", Work in Progress, Internet-Draft, draft-ietf-quic-tls-34, , <https://www.ietf.org/archive/id/draft-ietf-quic-tls-34.txt>.
+
+
[RFC2119]
+
+Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
+
+
[RFC6020]
+
+Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, , <https://www.rfc-editor.org/info/rfc6020>.
+
+
[RFC7696]
+
+Housley, R., "Guidelines for Cryptographic Algorithm Agility and Selecting Mandatory-to-Implement Algorithms", BCP 201, RFC 7696, DOI 10.17487/RFC7696, , <https://www.rfc-editor.org/info/rfc7696>.
+
+
[RFC8340]
+
+Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, , <https://www.rfc-editor.org/info/rfc8340>.
+
+
+
+
+
+
+

+Appendix A. QUIC-LB YANG Model +

+

This YANG model conforms to [RFC6020] and expresses a complete QUIC-LB +configuration.¶

+
+
+module ietf-quic-lb {
+  yang-version "1.1";
+  namespace "urn:ietf:params:xml:ns:yang:ietf-quic-lb";
+  prefix "quic-lb";
+
+  import ietf-yang-types {
+    prefix yang;
+    reference
+      "RFC 6991: Common YANG Data Types.";
+  }
+
+  import ietf-inet-types {
+    prefix inet;
+    reference
+      "RFC 6991: Common YANG Data Types.";
+  }
+
+  organization
+    "IETF QUIC Working Group";
+
+  contact
+    "WG Web:   <http://datatracker.ietf.org/wg/quic>
+     WG List:  <quic@ietf.org>
+
+     Authors: Martin Duke (martin.h.duke at gmail dot com)
+              Nick Banks (nibanks at microsoft dot com)";
+
+  description
+    "This module enables the explicit cooperation of QUIC servers with
+     trusted intermediaries without breaking important protocol features.
+
+     Copyright (c) 2021 IETF Trust and the persons identified as
+     authors of the code.  All rights reserved.
+
+     Redistribution and use in source and binary forms, with or
+     without modification, is permitted pursuant to, and subject to
+     the license terms contained in, the Simplified BSD License set
+     forth in Section 4.c of the IETF Trust's Legal Provisions
+     Relating to IETF Documents
+     (https://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC XXXX
+     (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
+     for full legal notices.
+
+     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
+     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
+     'MAY', and 'OPTIONAL' in this document are to be interpreted as
+     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
+     they appear in all capitals, as shown here.";
+
+  revision "2021-01-29" {
+    description
+      "Initial Version";
+    reference
+      "RFC XXXX, QUIC-LB: Generating Routable QUIC Connection IDs";
+  }
+
+  container quic-lb {
+    presence "The container for QUIC-LB configuration.";
+
+    description
+      "QUIC-LB container.";
+
+    typedef quic-lb-key {
+      type yang:hex-string {
+        length 47;
+      }
+      description
+        "This is a 16-byte key, represented with 47 bytes";
+    }
+
+    list cid-configs {
+      key "config-rotation-bits";
+      description
+        "List up to three load balancer configurations";
+
+      leaf config-rotation-bits {
+        type uint8 {
+          range "0..2";
+        }
+        mandatory true;
+        description
+          "Identifier for this CID configuration.";
+      }
+
+      leaf first-octet-encodes-cid-length {
+        type boolean;
+        default false;
+        description
+          "If true, the six least significant bits of the first CID
+           octet encode the CID length minus one.";
+      }
+
+      leaf cid-key {
+        type quic-lb-key;
+        description
+          "Key for encrypting the connection ID. If absent, the
+           configuration uses the Plaintext algorithm.";
+      }
+
+      leaf nonce-length {
+        type uint8 {
+          range "8..16";
+        }
+        must '(../cid-key)' {
+          error-message "nonce-length only valid if cid-key is set";
+        }
+        description
+          "Length, in octets, of the nonce. If absent when cid-key is
+           present, the configuration uses the Block Cipher Algorithm.
+           If present along with cid-key, the configurationuses the
+           Stream Cipher Algorithm.";
+      }
+
+      leaf dynamic-sid {
+        type boolean;
+        description
+          "If true, server IDs are allocated dynamically.";
+      }
+
+      leaf server-id-length {
+        type uint8 {
+          range "1..18";
+        }
+        must '(dynamic-sid and . <= 7) or
+                (not(../dynamic-sid)) and
+                (not(../cid-key) and . <= 16) or
+                ((../nonce-length) and . <= (19 - ../nonce-length)) or
+                ((../cid-key) and not(../nonce-length) and . <= 12))' {
+          error-message
+            "Server ID length too long for routing algorithm and server ID
+             allocation method";
+        }
+        mandatory true;
+        description
+          "Length (in octets) of a server ID. Further range-limited
+           by sid-allocation, cid-key, and nonce-length.";
+      }
+
+      list server-id-mappings {
+        when "not(../dynamic-sid)";
+        key "server-id";
+        description "Statically allocated Server IDs";
+
+        leaf server-id {
+          type yang:hex-string;
+          must "string-length(.) = 3 * ../../server-id-length - 1";
+          mandatory true;
+          description
+            "An allocated server ID";
+        }
+
+        leaf server-address {
+          type inet:ip-address;
+          mandatory true;
+          description
+            "Destination address corresponding to the server ID";
+        }
+      }
+    }
+
+    container retry-service-config {
+      description
+        "Configuration of Retry Service. If supported-versions is empty, there
+         is no retry service. If token-keys is empty, it uses the non-shared-
+         state service. If present, it uses shared-state tokens.";
+
+      leaf-list supported-versions {
+        type uint32;
+        description
+          "QUIC versions that the retry service supports. If empty, there
+           is no retry service.";
+      }
+
+      leaf unsupported-version-default {
+        type enumeration {
+          enum allow {
+            description "Unsupported versions admitted by default";
+          }
+          enum deny {
+            description "Unsupported versions denied by default";
+          }
+        }
+        default allow;
+        description
+          "Are unsupported versions not in version-exceptions allowed
+           or denied?";
+      }
+
+      leaf-list version-exceptions {
+        type uint32;
+        description
+          "Exceptions to the default-deny or default-allow rule.";
+      }
+
+      list token-keys {
+        key "key-sequence-number";
+        description
+          "list of active keys, for key rotation purposes. Existence implies
+           shared-state format";
+
+        leaf key-sequence-number {
+          type uint8;
+          mandatory true;
+          description
+            "Identifies the key used to encrypt the token";
+        }
+
+        leaf token-key {
+          type quic-lb-key;
+          mandatory true;
+          description
+            "16-byte key to encrypt the token";
+        }
+
+        leaf token-iv {
+          type yang:hex-string {
+            length 23;
+          }
+          mandatory true;
+          description
+            "8-byte IV to encrypt the token, encoded in 23 bytes";
+        }
+      }
+    }
+  }
+}
+
¶ +
+
+
+

+A.1. Tree Diagram +

+

This summary of the YANG model uses the notation in [RFC8340].¶

+
+
+module: ietf-quic-lb
+  +--rw quic-lb
+     +--rw cid-configs*
+     |       [config-rotation-bits]
+     |  +--rw config-rotation-bits             uint8
+     |  +--rw first-octet-encodes-cid-length?  boolean
+     |  +--rw cid-key?                         yang:hex-string
+     |  +--rw nonce-length?                    uint8
+     |  +--rw dynamic-sid                      boolean
+     |  +--rw server-id-length                 uint8
+     |  +--rw server-id-mappings*?
+     |  |       [server-id]
+     |  |  +--rw server-id                     yang:hex-string
+     |  |  +--rw server-address                inet:ip-address
+     +--ro retry-service-config
+     |  +--rw supported-versions*
+     |  |  +--rw version                       uint32
+     |  +--rw unsupported-version-default      enumeration {allow deny}
+     |  +--rw version-exceptions*
+     |  |  +--rw version                       uint32
+     |  +--rw token-keys*?
+     |  |       [key-sequence-number]
+     |  |  +--rw key-sequence-number           uint8
+     |  |  +--rw token-key                     yang:hex-string
+     |  |  +--rw token-iv                      yang:hex-string
+
¶ +
+
+
+
+
+
+
+

+Appendix B. Load Balancer Test Vectors +

+

Each section of this draft includes multiple sets of load balancer +configuration, each of which has five examples of server ID and server use +bytes and how they are encoded in a CID.¶

+

In some cases, there are no server use bytes. Note that, for simplicity, the +first octet bits used for neither config rotation nor length self-encoding are +random, rather than listed in the server use field. Therefore, a server +implementation using these parameters may generate CIDs with a slightly different +first octet.¶

+

This section uses the following abbreviations:¶

+
+
+cid      Connection ID
+cr_bits  Config Rotation Bits
+LB       Load Balancer
+sid      Server ID
+sid_len  Server ID length
+su       Server Use Bytes
+
¶ +
+

All values except length_self_encoding and sid_len are expressed in hexidecimal +format.¶

+
+
+

+B.1. Plaintext Connection ID Algorithm +

+
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1
+
+cid 01be sid be su
+cid 0221b7 sid 21 su b7
+cid 03cadfd8 sid ca su dfd8
+cid 041e0c9328 sid 1e su 0c9328
+cid 050c8f6d9129 sid 0c su 8f6d9129
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2
+
+cid 02aab0 sid aab0 su
+cid 3ac4b106 sid c4b1 su 06
+cid 08bd3cf4a0 sid bd3c su f4a0
+cid 3771d59502d6 sid 71d5 su 9502d6
+cid 1d57dee8b888f3 sid 57de su e8b888f3
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3
+
+cid 0336c976 sid 36c976 su
+cid 04aa291806 sid aa2918 su 06
+cid 0586897bd8b6 sid 86897b su d8b6
+cid 063625bcae4de0 sid 3625bc su ae4de0
+cid 07966fb1f3cb535f sid 966fb1 su f3cb535f
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4
+
+cid 185172fab8 sid 5172fab8 su
+cid 2eb7ff2c9297 sid b7ff2c92 su 97
+cid 14f3eb3dd3edbe sid f3eb3dd3 su edbe
+cid 3feb31cece744b74 sid eb31cece su 744b74
+cid 06b9f34c353ce23bb5 sid b9f34c35 su 3ce23bb5
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5
+
+cid 05bdcd8d0b1d sid bdcd8d0b1d su
+cid 06aee673725a63 sid aee673725a su 63
+cid 07bbf338ddbf37f4 sid bbf338ddbf su 37f4
+cid 08fbbca64c26756840 sid fbbca64c26 su 756840
+cid 09e7737c495b93894e34 sid e7737c495b su 93894e34
+
¶ +
+
+
+
+
+

+B.2. Stream Cipher Connection ID Algorithm +

+

In each case below, the server is using a plain text nonce value of zero.¶

+
+
+LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 12 sid_len 1
+    key 4d9d0fd25a25e7f321ef464e13f9fa3d
+
+cid 0d69fe8ab8293680395ae256e89c sid c5 su
+cid 0e420d74ed99b985e10f5073f43027 sid d5 su 27
+cid 0f380f440c6eefd3142ee776f6c16027 sid 10 su 6027
+cid 1020607efbe82049ddbf3a7c3d9d32604d sid 3c su 32604d
+cid 11e132d12606a1bb0fa17e1caef00ec54c10 sid e3 su 0ec54c10
+
+LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 2
+    key 49e1cec7fd264b1f4af37413baf8ada9
+
+cid 3d3a5e1126414271cc8dc2ec7c8c15 sid f7fe su
+cid 007042539e7c5f139ac2adfbf54ba748 sid eaf4 su 48
+cid 2bc125dd2aed2aafacf59855d99e029217 sid e880 su 9217
+cid 3be6728dc082802d9862c6c8e4dda3d984d8 sid 62c6 su d984d8
+cid 1afe9c6259ad350fc7bad28e0aeb2e8d4d4742 sid 8502 su 8d4d4742
+
+LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 14 sid_len 3
+    key 2c70df0b399bd33a7335523dcdb884ad
+
+cid 11d62e8670565cd30b552edff6782ff5a740 sid d794bb su
+cid 12c70e481f49363cabd9370d1fd5012c12bca5 sid 2cbd5d su a5
+cid 133b95dfd8ad93566782f8424df82458069fc9e9 sid d126cd su c9e9
+cid 13ac6ffcd635532ab60370306c7ee572d6b6e795 sid 539e42 su e795
+cid 1383ed07a9700777ff450bb39bb9c1981266805c sid 9094dd su 805c
+
+LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 4
+    key 2297b8a95c776cf9c048b76d9dc27019
+
+cid 32873890c3059ca62628089439c44c1f84 sid 7398d8ca su
+cid 1ff7c7d7b9823954b178636c99a7dc93ac83 sid 9655f091 su 83
+cid 31044000a5ebb3bf2fa7629a17f2c78b077c17 sid 8b035fc6 su 7c17
+cid 1791bd28c66721e8fea0c6f34fd2d8e663a6ef70 sid 6672e0e2 su a6ef70
+cid 3df1d90ad5ccd5f8f475f040e90aeca09ec9839d sid b98b1fff su c9839d
+
+LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 8 sid_len 5
+    key 484b2ed942d9f4765e45035da3340423
+
+cid 0da995b7537db605bfd3a38881ae sid 391a7840dc su
+cid 0ed8d02d55b91d06443540d1bf6e98 sid 10f7f7b284 su 98
+cid 0f3f74be6d46a84ccb1fd1ee92cdeaf2 sid 0606918fc0 su eaf2
+cid 1045626dbf20e03050837633cc5650f97c sid e505eea637 su 50f97c
+cid 11bb9a17f691ab446a938427febbeb593eaa sid 99343a2a96 su eb593eaa
+
¶ +
+
+
+
+
+

+B.3. Block Cipher Connection ID Algorithm +

+
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1
+    key 411592e4160268398386af84ea7505d4
+
+cid 10564f7c0df399f6d93bdddb1a03886f25 sid 23 su 05231748a80884ed58007847eb9fd0
+cid 10d5c03f9dd765d73b3d8610b244f74d02 sid 15 su 76cd6b6f0d3f0b20fc8e633e3a05f3
+cid 108ca55228ab23b92845341344a2f956f2 sid 64 su 65c0ce170a9548717498b537cb8790
+cid 10e73f3d034aef2f6f501e3a7693d6270a sid 07 su f9ad10c84cc1e89a2492221d74e707
+cid 101a6ce13d48b14a77ecfd365595ad2582 sid 6c su 76ce4689b0745b956ef71c2608045d
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2
+    key 92ce44aecd636aeeff78da691ef48f77
+
+cid 20aa09bc65ed52b1ccd29feb7ef995d318 sid a52f su 99278b92a86694ff0ecd64bc2f73
+cid 30b8dbef657bd78a2f870e93f9485d5211 sid 6c49 su 7381c8657a388b4e9594297afe96
+cid 043a8137331eacd2e78383279b202b9a6d sid 4188 su 5ac4b0e0b95f4e7473b49ee2d0dd
+cid 3ba71ea2bcf0ab95719ab59d3d7fde770d sid 8ccc su 08728807605db25f2ca88be08e0f
+cid 37ef1956b4ec354f40dc68336a23d42b31 sid c89d su 5a3ccd1471caa0de221ad6c185c0
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3
+    key 5c49cb9265efe8ae7b1d3886948b0a34
+
+cid 10efcffc161d232d113998a49b1dbc4aa0 sid 0690b3 su 958fc9f38fe61b83881b2c5780
+cid 10fc13bdbcb414ba90e391833400c19505 sid 031ac3 su 9a55e1e1904e780346fcc32c3c
+cid 10d3cc1efaf5dc52c7a0f6da2746a8c714 sid 572d3a su ff2ec9712664e7174dc03ca3f8
+cid 107edf37f6788e33c0ec7758a485215f2b sid 562c25 su 02c5a5dcbea629c3840da5f567
+cid 10bc28da122582b7312e65aa096e9724fc sid 2fa4f0 su 8ae8c666bfc0fc364ebfd06b9a
+
+LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4
+    key e787a3a491551fb2b4901a3fa15974f3
+
+cid 26125351da12435615e3be6b16fad35560 sid 0cb227d3 su 65b40b1ab54e05bff55db046
+cid 14de05fc84e41b611dfbe99ed5b1c9d563 sid 6a0f23ad su d73bee2f3a7e72b3ffea52d9
+cid 1306052c3f973db87de6d7904914840ff1 sid ca21402d su 5829465f7418b56ee6ada431
+cid 1d202b5811af3e1dba9ea2950d27879a92 sid b14e1307 su 4902aba8b23a5f24616df3cf
+cid 26538b78efc2d418539ad1de13ab73e477 sid a75e0148 su 0040323f1854e75aeb449b9f
+
+LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5
+    key d5a6d7824336fbe0f25d28487cdda57c
+
+cid 10a2794871aadb20ddf274a95249e57fde sid 82d3b0b1a1 su 0935471478c2edb8120e60
+cid 108122fe80a6e546a285c475a3b8613ec9 sid fbcc902c9d su 59c47946882a9a93981c15
+cid 104d227ad9dd0fef4c8cb6eb75887b6ccc sid 2808e22642 su 2a7ef40e2c7e17ae40b3fb
+cid 10b3f367d8627b36990a28d67f50b97846 sid 5e018f0197 su 2289cae06a566e5cb6cfa4
+cid 1024412bfe25f4547510204bdda6143814 sid 8a8dd3d036 su 4b12933a135e5eaaebc6fd
+
¶ +
+
+
+
+
+
+
+

+Appendix C. Acknowledgments +

+

The authors would like to thank Christian Huitema and Ian Swett for their major +design contributions.¶

+

Manasi Deval, Erik Fuller, Toma Gavrichenkov, Jana Iyengar, Subodh Iyengar, +Ladislav Lhotka, Jan Lindblad, Ling Tao Nju, Kazuho Oku, Udip Pant, Martin +Thomson, Dmitri Tikhonov, Victor Vasiliev, and William Zeng Ke all provided +useful input to this document.¶

+
+
+
+
+

+Appendix D. Change Log +

+
    +
  • + RFC Editor's Note: Please remove this section prior to +publication of a final version of this document.¶ +
  • +
+
+
+

+D.1. since draft-ietf-quic-load-balancers-06 +

+
    +
  • Shrunk size of SID table¶ +
  • +
+
+
+
+
+

+D.2. since draft-ietf-quic-load-balancers-05 +

+
    +
  • Added low-config CID for further discussion¶ +
  • +
  • Complete revision of shared-state Retry Token¶ +
  • +
  • Added YANG model¶ +
  • +
  • Updated configuration limits to ensure CID entropy¶ +
  • +
  • Switched to notation from quic-transport¶ +
  • +
+
+
+
+
+

+D.3. since draft-ietf-quic-load-balancers-04 +

+
    +
  • Rearranged the shared-state retry token to simplify token processing¶ +
  • +
  • More compact timestamp in shared-state retry token¶ +
  • +
  • Revised server requirements for shared-state retries¶ +
  • +
  • Eliminated zero padding from the test vectors¶ +
  • +
  • Added server use bytes to the test vectors¶ +
  • +
  • Additional compliant DCID criteria¶ +
  • +
+
+
+
+
+

+D.4. since-draft-ietf-quic-load-balancers-03 +

+
    +
  • Improved Config Rotation text¶ +
  • +
  • Added stream cipher test vectors¶ +
  • +
  • Deleted the Obfuscated CID algorithm¶ +
  • +
+
+
+
+
+

+D.5. since-draft-ietf-quic-load-balancers-02 +

+
    +
  • Replaced stream cipher algorithm with three-pass version¶ +
  • +
  • Updated Retry format to encode info for required TPs¶ +
  • +
  • Added discussion of version invariance¶ +
  • +
  • Cleaned up text about config rotation¶ +
  • +
  • Added Reset Oracle and limited configuration considerations¶ +
  • +
  • Allow dropped long-header packets for known QUIC versions¶ +
  • +
+
+
+
+
+

+D.6. since-draft-ietf-quic-load-balancers-01 +

+
    +
  • Test vectors for load balancer decoding¶ +
  • +
  • Deleted remnants of in-band protocol¶ +
  • +
  • Light edit of Retry Services section¶ +
  • +
  • Discussed load balancer chains¶ +
  • +
+
+
+
+
+

+D.7. since-draft-ietf-quic-load-balancers-00 +

+
    +
  • Removed in-band protocol from the document¶ +
  • +
+
+
+
+
+

+D.8. Since draft-duke-quic-load-balancers-06 +

+
    +
  • Switch to IETF WG draft.¶ +
  • +
+
+
+
+
+

+D.9. Since draft-duke-quic-load-balancers-05 +

+
    +
  • Editorial changes¶ +
  • +
  • Made load balancer behavior independent of QUIC version¶ +
  • +
  • Got rid of token in stream cipher encoding, because server might not have it¶ +
  • +
  • Defined "non-compliant DCID" and specified rules for handling them.¶ +
  • +
  • Added psuedocode for config schema¶ +
  • +
+
+
+
+
+

+D.10. Since draft-duke-quic-load-balancers-04 +

+
    +
  • Added standard for retry services¶ +
  • +
+
+
+
+
+

+D.11. Since draft-duke-quic-load-balancers-03 +

+
    +
  • Renamed Plaintext CID algorithm as Obfuscated CID¶ +
  • +
  • Added new Plaintext CID algorithm¶ +
  • +
  • Updated to allow 20B CIDs¶ +
  • +
  • Added self-encoding of CID length¶ +
  • +
+
+
+
+
+

+D.12. Since draft-duke-quic-load-balancers-02 +

+
    +
  • Added Config Rotation¶ +
  • +
  • Added failover mode¶ +
  • +
  • Tweaks to existing CID algorithms¶ +
  • +
  • Added Block Cipher CID algorithm¶ +
  • +
  • Reformatted QUIC-LB packets¶ +
  • +
+
+
+
+
+

+D.13. Since draft-duke-quic-load-balancers-01 +

+
    +
  • Complete rewrite¶ +
  • +
  • Supports multiple security levels¶ +
  • +
  • Lightweight messages¶ +
  • +
+
+
+
+
+

+D.14. Since draft-duke-quic-load-balancers-00 +

+
    +
  • Converted to markdown¶ +
  • +
  • Added variable length connection IDs¶ +
  • +
+
+
+
+
+
+
+

+Authors' Addresses +

+
+
Martin Duke
+
F5 Networks, Inc.
+ +
+
+
Nick Banks
+
Microsoft
+ +
+
+
+ + + diff --git a/smaller-tables/draft-ietf-quic-load-balancers.txt b/smaller-tables/draft-ietf-quic-load-balancers.txt new file mode 100644 index 0000000..7bfac92 --- /dev/null +++ b/smaller-tables/draft-ietf-quic-load-balancers.txt @@ -0,0 +1,2744 @@ + + + + +QUIC M. Duke +Internet-Draft F5 Networks, Inc. +Intended status: Standards Track N. Banks +Expires: 19 September 2021 Microsoft + 18 March 2021 + + + QUIC-LB: Generating Routable QUIC Connection IDs + draft-ietf-quic-load-balancers-07 + +Abstract + + The QUIC protocol design is resistant to transparent packet + inspection, injection, and modification by intermediaries. However, + the server can explicitly cooperate with network services by agreeing + to certain conventions and/or sharing state with those services. + This specification provides a standardized means of solving three + problems: (1) maintaining routability to servers via a low-state load + balancer even when the connection IDs in use change; (2) explicit + encoding of the connection ID length in all packets to assist + hardware accelerators; and (3) injection of QUIC Retry packets by an + anti-Denial-of-Service agent on behalf of the server. + +Note to Readers + + Discussion of this document takes place on the QUIC Working Group + mailing list (quic@ietf.org), which is archived at + https://mailarchive.ietf.org/arch/browse/quic/ + (https://mailarchive.ietf.org/arch/browse/quic/). + + Source for this draft and an issue tracker can be found at + https://github.com/quicwg/load-balancers (https://github.com/quicwg/ + load-balancers). + +Status of This Memo + + This Internet-Draft is submitted in full conformance with the + provisions of BCP 78 and BCP 79. + + Internet-Drafts are working documents of the Internet Engineering + Task Force (IETF). Note that other groups may also distribute + working documents as Internet-Drafts. The list of current Internet- + Drafts is at https://datatracker.ietf.org/drafts/current/. + + Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as "work in progress." + + + +Duke & Banks Expires 19 September 2021 [Page 1] + +Internet-Draft QUIC-LB March 2021 + + + This Internet-Draft will expire on 19 September 2021. + +Copyright Notice + + Copyright (c) 2021 IETF Trust and the persons identified as the + document authors. All rights reserved. + + This document is subject to BCP 78 and the IETF Trust's Legal + Provisions Relating to IETF Documents (https://trustee.ietf.org/ + license-info) in effect on the date of publication of this document. + Please review these documents carefully, as they describe your rights + and restrictions with respect to this document. Code Components + extracted from this document must include Simplified BSD License text + as described in Section 4.e of the Trust Legal Provisions and are + provided without warranty as described in the Simplified BSD License. + +Table of Contents + + 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 + 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 + 1.2. Notation . . . . . . . . . . . . . . . . . . . . . . . . 5 + 2. Protocol Objectives . . . . . . . . . . . . . . . . . . . . . 6 + 2.1. Simplicity . . . . . . . . . . . . . . . . . . . . . . . 6 + 2.2. Security . . . . . . . . . . . . . . . . . . . . . . . . 6 + 3. First CID octet . . . . . . . . . . . . . . . . . . . . . . . 7 + 3.1. Config Rotation . . . . . . . . . . . . . . . . . . . . . 7 + 3.2. Configuration Failover . . . . . . . . . . . . . . . . . 8 + 3.3. Length Self-Description . . . . . . . . . . . . . . . . . 8 + 3.4. Format . . . . . . . . . . . . . . . . . . . . . . . . . 8 + 4. Load Balancing Preliminaries . . . . . . . . . . . . . . . . 9 + 4.1. Non-Compliant Connection IDs . . . . . . . . . . . . . . 9 + 4.2. Arbitrary Algorithms . . . . . . . . . . . . . . . . . . 10 + 4.3. Server ID Allocation . . . . . . . . . . . . . . . . . . 11 + 4.3.1. Static Allocation . . . . . . . . . . . . . . . . . . 11 + 4.3.2. Dynamic Allocation . . . . . . . . . . . . . . . . . 12 + 5. Routing Algorithms . . . . . . . . . . . . . . . . . . . . . 14 + 5.1. Plaintext CID Algorithm . . . . . . . . . . . . . . . . . 14 + 5.1.1. Configuration Agent Actions . . . . . . . . . . . . . 15 + 5.1.2. Load Balancer Actions . . . . . . . . . . . . . . . . 15 + 5.1.3. Server Actions . . . . . . . . . . . . . . . . . . . 15 + 5.2. Stream Cipher CID Algorithm . . . . . . . . . . . . . . . 15 + 5.2.1. Configuration Agent Actions . . . . . . . . . . . . . 15 + 5.2.2. Load Balancer Actions . . . . . . . . . . . . . . . . 16 + 5.2.3. Server Actions . . . . . . . . . . . . . . . . . . . 17 + 5.3. Block Cipher CID Algorithm . . . . . . . . . . . . . . . 17 + 5.3.1. Configuration Agent Actions . . . . . . . . . . . . . 18 + 5.3.2. Load Balancer Actions . . . . . . . . . . . . . . . . 18 + 5.3.3. Server Actions . . . . . . . . . . . . . . . . . . . 18 + + + +Duke & Banks Expires 19 September 2021 [Page 2] + +Internet-Draft QUIC-LB March 2021 + + + 6. ICMP Processing . . . . . . . . . . . . . . . . . . . . . . . 18 + 7. Retry Service . . . . . . . . . . . . . . . . . . . . . . . . 19 + 7.1. Common Requirements . . . . . . . . . . . . . . . . . . . 19 + 7.1.1. Considerations for Non-Initial Packets . . . . . . . 20 + 7.2. No-Shared-State Retry Service . . . . . . . . . . . . . . 21 + 7.2.1. Configuration Agent Actions . . . . . . . . . . . . . 21 + 7.2.2. Service Requirements . . . . . . . . . . . . . . . . 22 + 7.2.3. Server Requirements . . . . . . . . . . . . . . . . . 23 + 7.3. Shared-State Retry Service . . . . . . . . . . . . . . . 24 + 7.3.1. Token Protection with AEAD . . . . . . . . . . . . . 26 + 7.3.2. Configuration Agent Actions . . . . . . . . . . . . . 26 + 7.3.3. Service Requirements . . . . . . . . . . . . . . . . 27 + 7.3.4. Server Requirements . . . . . . . . . . . . . . . . . 28 + 8. Configuration Requirements . . . . . . . . . . . . . . . . . 28 + 9. Additional Use Cases . . . . . . . . . . . . . . . . . . . . 29 + 9.1. Load balancer chains . . . . . . . . . . . . . . . . . . 29 + 9.2. Moving connections between servers . . . . . . . . . . . 29 + 10. Version Invariance of QUIC-LB . . . . . . . . . . . . . . . . 30 + 11. Security Considerations . . . . . . . . . . . . . . . . . . . 31 + 11.1. Attackers not between the load balancer and server . . . 31 + 11.2. Attackers between the load balancer and server . . . . . 32 + 11.3. Multiple Configuration IDs . . . . . . . . . . . . . . . 32 + 11.4. Limited configuration scope . . . . . . . . . . . . . . 32 + 11.5. Stateless Reset Oracle . . . . . . . . . . . . . . . . . 32 + 11.6. Connection ID Entropy . . . . . . . . . . . . . . . . . 33 + 11.7. Shared-State Retry Keys . . . . . . . . . . . . . . . . 33 + 11.8. Resource Consumption of the SID table . . . . . . . . . 34 + 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 + 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 34 + 13.1. Normative References . . . . . . . . . . . . . . . . . . 34 + 13.2. Informative References . . . . . . . . . . . . . . . . . 35 + Appendix A. QUIC-LB YANG Model . . . . . . . . . . . . . . . . . 36 + A.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 40 + Appendix B. Load Balancer Test Vectors . . . . . . . . . . . . . 41 + B.1. Plaintext Connection ID Algorithm . . . . . . . . . . . . 42 + B.2. Stream Cipher Connection ID Algorithm . . . . . . . . . . 43 + B.3. Block Cipher Connection ID Algorithm . . . . . . . . . . 44 + Appendix C. Acknowledgments . . . . . . . . . . . . . . . . . . 46 + Appendix D. Change Log . . . . . . . . . . . . . . . . . . . . . 46 + D.1. since draft-ietf-quic-load-balancers-06 . . . . . . . . . 46 + D.2. since draft-ietf-quic-load-balancers-05 . . . . . . . . . 46 + D.3. since draft-ietf-quic-load-balancers-04 . . . . . . . . . 46 + D.4. since-draft-ietf-quic-load-balancers-03 . . . . . . . . . 46 + D.5. since-draft-ietf-quic-load-balancers-02 . . . . . . . . . 47 + D.6. since-draft-ietf-quic-load-balancers-01 . . . . . . . . . 47 + D.7. since-draft-ietf-quic-load-balancers-00 . . . . . . . . . 47 + D.8. Since draft-duke-quic-load-balancers-06 . . . . . . . . . 47 + D.9. Since draft-duke-quic-load-balancers-05 . . . . . . . . . 47 + + + +Duke & Banks Expires 19 September 2021 [Page 3] + +Internet-Draft QUIC-LB March 2021 + + + D.10. Since draft-duke-quic-load-balancers-04 . . . . . . . . . 48 + D.11. Since draft-duke-quic-load-balancers-03 . . . . . . . . . 48 + D.12. Since draft-duke-quic-load-balancers-02 . . . . . . . . . 48 + D.13. Since draft-duke-quic-load-balancers-01 . . . . . . . . . 48 + D.14. Since draft-duke-quic-load-balancers-00 . . . . . . . . . 48 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 48 + +1. Introduction + + QUIC packets [QUIC-TRANSPORT] usually contain a connection ID to + allow endpoints to associate packets with different address/ port + 4-tuples to the same connection context. This feature makes + connections robust in the event of NAT rebinding. QUIC endpoints + usually designate the connection ID which peers use to address + packets. Server-generated connection IDs create a potential need for + out-of-band communication to support QUIC. + + QUIC allows servers (or load balancers) to designate an initial + connection ID to encode useful routing information for load + balancers. It also encourages servers, in packets protected by + cryptography, to provide additional connection IDs to the client. + This allows clients that know they are going to change IP address or + port to use a separate connection ID on the new path, thus reducing + linkability as clients move through the world. + + There is a tension between the requirements to provide routing + information and mitigate linkability. Ultimately, because new + connection IDs are in protected packets, they must be generated at + the server if the load balancer does not have access to the + connection keys. However, it is the load balancer that has the + context necessary to generate a connection ID that encodes useful + routing information. In the absence of any shared state between load + balancer and server, the load balancer must maintain a relatively + expensive table of server-generated connection IDs, and will not + route packets correctly if they use a connection ID that was + originally communicated in a protected NEW_CONNECTION_ID frame. + + This specification provides common algorithms for encoding the server + mapping in a connection ID given some shared parameters. The mapping + is generally only discoverable by observers that have the parameters, + preserving unlinkability as much as possible. + + + + + + + + + + +Duke & Banks Expires 19 September 2021 [Page 4] + +Internet-Draft QUIC-LB March 2021 + + + Aside from load balancing, a QUIC server may also desire to offload + other protocol functions to trusted intermediaries. These + intermediaries might include hardware assist on the server host + itself, without access to fully decrypted QUIC packets. For example, + this document specifies a means of offloading stateless retry to + counter Denial of Service attacks. It also proposes a system for + self-encoding connection ID length in all packets, so that crypto + 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 + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + document are to be interpreted as described in RFC 2119 [RFC2119]. + + 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 + interpreted as carrying significance described in RFC 2119. + + In this document, "client" and "server" refer to the endpoints of a + QUIC connection unless otherwise indicated. A "load balancer" is an + intermediary for that connection that does not possess QUIC + connection keys, but it may rewrite IP addresses or conduct other IP + or UDP processing. A "configuration agent" is the entity that + determines the QUIC-LB configuration parameters for the network and + leverages some system to distribute that configuration. + + Note that stateful load balancers that act as proxies, by terminating + a QUIC connection with the client and then retrieving data from the + server using QUIC or another protocol, are treated as a server with + respect to this specification. + + For brevity, "Connection ID" will often be abbreviated as "CID". + +1.2. Notation + + All wire formats will be depicted using the notation defined in + Section 1.3 of [QUIC-TRANSPORT]. There is one addition: the function + len() refers to the length of a field which can serve as a limit on a + different field, so that the lengths of two fields can be concisely + defined as limited to a sum, for example: + + + + +Duke & Banks Expires 19 September 2021 [Page 5] + +Internet-Draft QUIC-LB March 2021 + + + x(A..B) y(C..B-len(x)) + + indicates that x can be of any length between A and B, and y can be + of any length between C and B provided that (len(x) + len(y)) does + not exceed B. + + The example below illustrates the basic framework: + +Example Structure { + One-bit Field (1), + 7-bit Field with Fixed Value (7) = 61, + Field with Variable-Length Integer (i), + Arbitrary-Length Field (..), + Variable-Length Field (8..24), + Variable-Length Field with Dynamic Limit (8..24-len(Variable-Length Field)), + Field With Minimum Length (16..), + Field With Maximum Length (..128), + [Optional Field (64)], + Repeated Field (8) ..., +} + + Figure 1: Example Format + +2. Protocol Objectives + +2.1. Simplicity + + QUIC is intended to provide unlinkability across connection + migration, but servers are not required to provide additional + connection IDs that effectively prevent linkability. If the + coordination scheme is too difficult to implement, servers behind + load balancers using connection IDs for routing will use trivially + linkable connection IDs. Clients will therefore be forced to choose + between terminating the connection during migration or remaining + linkable, subverting a design objective of QUIC. + + The solution should be both simple to implement and require little + additional infrastructure for cryptographic keys, etc. + +2.2. Security + + In the limit where there are very few connections to a pool of + servers, no scheme can prevent the linking of two connection IDs with + high probability. In the opposite limit, where all servers have many + connections that start and end frequently, it will be difficult to + associate two connection IDs even if they are known to map to the + same server. + + + + +Duke & Banks Expires 19 September 2021 [Page 6] + +Internet-Draft QUIC-LB March 2021 + + + QUIC-LB is relevant in the region between these extremes: when the + information that two connection IDs map to the same server is helpful + to linking two connection IDs. Obviously, any scheme that + transparently communicates this mapping to outside observers + compromises QUIC's defenses against linkability. + + Though not an explicit goal of the QUIC-LB design, concealing the + server mapping also complicates attempts to focus attacks on a + specific server in the pool. + +3. First CID octet + + The first octet of a Connection ID is reserved for two special + purposes, one mandatory (config rotation) and one optional (length + self-description). + + Subsequent sections of this document refer to the contents of this + octet as the "first octet." + +3.1. Config Rotation + + The first two bits of any connection ID MUST encode an identifier for + the configuration that the connection ID uses. This enables + incremental deployment of new QUIC-LB settings (e.g., keys). + + When new configuration is distributed to servers, there will be a + transition period when connection IDs reflecting old and new + configuration coexist in the network. The rotation bits allow load + balancers to apply the correct routing algorithm and parameters to + incoming packets. + + Configuration Agents SHOULD deliver new configurations to load + balancers before doing so to servers, so that load balancers are + ready to process CIDs using the new parameters when they arrive. + + A Configuration Agent SHOULD NOT use a codepoint to represent a new + configuration until it takes precautions to make sure that all + connections using CIDs with an old configuration at that codepoint + have closed or transitioned. + + Servers MUST NOT generate new connection IDs using an old + configuration after receiving a new one from the configuration agent. + Servers MUST send NEW_CONNECTION_ID frames that provide CIDs using + the new configuration, and retire CIDs using the old configuration + using the "Retire Prior To" field of that frame. + + + + + + +Duke & Banks Expires 19 September 2021 [Page 7] + +Internet-Draft QUIC-LB March 2021 + + + It also possible to use these bits for more long-lived distinction of + different configurations, but this has privacy implications (see + Section 11.3). + +3.2. Configuration Failover + + If a server has not received a valid QUIC-LB configuration, and + believes that low-state, Connection-ID aware load balancers are in + the path, it SHOULD generate connection IDs with the config rotation + bits set to '11' and SHOULD use the "disable_active_migration" + transport parameter in all new QUIC connections. It SHOULD NOT send + NEW_CONNECTION_ID frames with new values. + + A load balancer that sees a connection ID with config rotation bits + set to '11' MUST revert to 5-tuple routing. + +3.3. Length Self-Description + + Local hardware cryptographic offload devices may accelerate QUIC + servers by receiving keys from the QUIC implementation indexed to the + connection ID. However, on physical devices operating multiple QUIC + servers, it is impractical to efficiently lookup these keys if the + connection ID does not self-encode its own length. + + Note that this is a function of particular server devices and is + irrelevant to load balancers. As such, load balancers MAY omit this + from their configuration. However, the remaining 6 bits in the first + octet of the Connection ID are reserved to express the length of the + following connection ID, not including the first octet. + + A server not using this functionality SHOULD make the six bits appear + to be random. + +3.4. Format + + First Octet { + Config Rotation (2), + CID Len or Random Bits (6), + } + + Figure 2: First Octet Format + + The first octet has the following fields: + + Config Rotation: Indicates the configuration used to interpret the + CID. + + + + + +Duke & Banks Expires 19 September 2021 [Page 8] + +Internet-Draft QUIC-LB March 2021 + + + CID Len or Random Bits: Length Self-Description (if applicable), or + random bits otherwise. Encodes the length of the Connection ID + following the First Octet. + +4. Load Balancing Preliminaries + + In QUIC-LB, load balancers do not generate individual connection IDs + for servers. Instead, they communicate the parameters of an + algorithm to generate routable connection IDs. + + The algorithms differ in the complexity of configuration at both load + balancer and server. Increasing complexity improves obfuscation of + the server mapping. + + This section describes three participants: the configuration agent, + the load balancer, and the server. For any given QUIC-LB + configuration that enables connection-ID-aware load balancing, there + must be a choice of (1) routing algorithm, (2) server ID allocation + strategy, and (3) algorithm parameters. + + Fundamentally, servers generate connection IDs that encode their + server ID. Load balancers decode the server ID from the CID in + incoming packets to route to the correct server. + + There are situations where a server pool might be operating two or + more routing algorithms or parameter sets simultaneously. The load + balancer uses the first two bits of the connection ID to multiplex + incoming DCIDs over these schemes (see Section 3.1). + +4.1. Non-Compliant Connection IDs + + QUIC-LB servers will generate Connection IDs that are decodable to + extract a server ID in accordance with a specified algorithm and + parameters. However, QUIC often uses client-generated Connection IDs + prior to receiving a packet from the server. + + These client-generated CIDs might not conform to the expectations of + the routing algorithm and therefore not be routable by the load + balancer. Those that are not routable are "non-compliant DCIDs" and + receive similar treatment regardless of why they're non-compliant: + + * The config rotation bits (Section 3.1) may not correspond to an + active configuration. Note: a packet with a DCID that indicates + 5-tuple routing (see Section 3.2) is always compliant. + + * The DCID might not be long enough for the decoder to process. + + + + + +Duke & Banks Expires 19 September 2021 [Page 9] + +Internet-Draft QUIC-LB March 2021 + + + * The extracted server mapping might not correspond to an active + server. + + All other DCIDs are compliant. + + Load balancers MUST forward packets with compliant DCIDs to a server + in accordance with the chosen routing algorithm. + + Load balancers SHOULD drop short header packets with non-compliant + DCIDs. + + The routing of long headers with non-compliant DCIDs depends on the + server ID allocation strategy, described in Section 4.3. However, + the load balancer MUST NOT drop these packets, with one exception. + + Load balancers MAY drop packets with long headers and non-compliant + DCIDs if and only if it knows that the encoded QUIC version does not + allow a non- compliant DCID in a packet with that signature. For + example, a load balancer can safely drop a QUIC version 1 Handshake + packet with a non-compliant DCID, as a version 1 Handshake packet + sent to a QUIC-LB compliant server will always have a server- + generated compliant CID. The prohibition against dropping packets + with long headers remains for unknown QUIC versions. + + Furthermore, while the load balancer function MUST NOT drop packets, + the device might implement other security policies, outside the scope + of this specification, that might force a drop. + + Servers that receive packets with noncompliant CIDs MUST use the + available mechanisms to induce the client to use a compliant CID in + future packets. In QUIC version 1, this requires using a compliant + CID in the Source CID field of server-generated long headers. + +4.2. Arbitrary Algorithms + + There are conditions described below where a load balancer routes a + packet using an "arbitrary algorithm." It can choose any algorithm, + without coordination with the servers, but the algorithm SHOULD be + deterministic over short time scales so that related packets go to + the same server. The design of this algorithm SHOULD consider the + version-invariant properties of QUIC described in [QUIC-INVARIANTS] + to maximize its robustness to future versions of QUIC. + + An arbitrary algorithm MUST NOT make the routing behavior dependent + on any 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-dependent and intermediaries SHOULD NOT base their design on + version-specific templates. + + + +Duke & Banks Expires 19 September 2021 [Page 10] + +Internet-Draft QUIC-LB March 2021 + + + For example, one arbitrary algorithm might convert a non-compliant + DCID to an integer and divided by the number of servers, with the + modulus used to forward the packet. The number of servers is usually + consistent on the time scale of a QUIC connection handshake. Another + might simply hash the address/port 4-tuple. See also Section 10. + +4.3. Server ID Allocation + + For any given configuration, the configuration agent must specify if + server IDs will be statically or dynamically allocated. Load + Balancer configurations with statically allocated server IDs + explicitly include a mapping of server IDs to forwarding addresses. + The corresponding server configurations contain one or more unique + server IDs. + + A dynamically allocated configuration does not have a pre-defined + assignment, reducing configuration complexity. However, it places + limits on the maximum server ID length and requires more state at the + load balancer. In certain edge cases, it can force parts of the + system to fail over to 5-tuple routing for a short time. + + In either case, the configuration agent chooses a server ID length + for each configuration that MUST be at least one octet. For Static + Allocation, the maximum length depends on the algorithm. For dynamic + allocation, the maximum length is 7 octets. + + A QUIC-LB configuration MAY significantly over-provision the server + ID space (i.e., provide far more codepoints than there are servers) + to increase the probability that a randomly generated Destination + Connection ID is non- compliant. + + Conceptually, each configuration has its own set of server ID + allocations, though two static configurations with identical server + ID lengths MAY use a common allocation between them. + + A server encodes one of its assigned server IDs in any CID it + generates using the relevant configuration. + +4.3.1. Static Allocation + + In the static allocation method, the configuration agent assigns at + least one server ID to each server. + + When forwarding a packet with a long header and non-compliant DCID, + load balancers MUST forward packets with long headers and non- + compliant DCIDs using an arbitrary algorithm as specified in + Section 4.2. + + + + +Duke & Banks Expires 19 September 2021 [Page 11] + +Internet-Draft QUIC-LB March 2021 + + +4.3.2. Dynamic Allocation + + In the dynamic allocation method, the load balancer assigns server + IDs dynamically so that configuration does not require fixed server + ID assignment. This reduces linkability and simplifies + configuration. + + To summarize, the load balancer forwards incoming Initial packets + arbitrarily and both load balancer and server are sometimes able to + infer a potential server ID allocation from the CID in the packet. + The server can signal acceptance of that allocation by using it + immediately, in which case both entities add it to their permanent + table. Usually, however, the server will reject the allocation by + not using it, in which case it is not added to the permanent + assignment list. + +4.3.2.1. Configuration Agent Actions + + The configuration agent does not assign server IDs, but does + configure a server ID length. The server ID MUST be at least one and + no more than seven octets. See Section 11.8 for other considerations + if also using the Plaintext CID algorithm. + +4.3.2.2. Load Balancer Actions + + The load balancer maintains two tables of assigned server IDs: one + for permanent assignments and one for provisional ones. Both are + initialized empty. These tables are independent for each operating + configuration. + + The permanent table maps server IDs to the routing information for + that server. The provisional table has that information, but for + provisional allocations, and also a list of all 4-tuples for which + the provisional allocation has been made and the CIDs associated with + each 4-tuple. + + Note that when the load balancer's tables for a configuration are + empty, all incoming DCIDs corresponding to that configuration are + non-compliant by definition. + + The load balancer processes a long header packet as follows: + + * If the config rotation bits do not match a known configuration, + the load balancer routes the packet using an arbitrary algorithm + (see Section 4.2). It does not extract a server ID. + + + + + + +Duke & Banks Expires 19 September 2021 [Page 12] + +Internet-Draft QUIC-LB March 2021 + + + * If there is a matching configuration, but the CID is not long + enough to apply the algorithm, the load balancer skips the first + octet of the CID and then reads a server ID from the following + octets, up to the server ID length. + + * Otherwise, the load balancer extracts the server ID in accordance + with the configured algorithm and parameters. + + If the load balancer extracted a server ID already in the permanent + or provisional table, it routes the packet accordingly. If the + server ID is not in either table, it routes the packet according to + an arbitrary algorithm and adds the server ID, the routing decision, + 4-tuple, and CID to the provisional table. + + If a short header packet arrives on a 4-tuple in the provisional + table, it can take one of three actions depending on the CID: + + 1. If the CID does not encode the provisional server ID, the load + balancer MUST delete the 4-tuple from the provisional table. If + there are no remaining 4-tuples associated with the server ID, + the load balancer SHOULD delete the server ID from the + provisional table. + + 2. If the SID is in the provisional table, but the CID for that + 4-tuple is different, it MUST delete the provisional table entry + and add the SID to the permanent table. + + 3. If both the SID and CID match the 4-tuple's entry, the load + balancer makes no changes to the table. + + If no short header packet ever arrives on the 4-tuple, the load- + balancer SHOULD eliminate the provisional table entry after a timeout + longer than the maximum conceivable length of a QUIC handshake. + +4.3.2.3. Server actions + + Each server maintains a list of server IDs assigned to it, + initialized empty. + + Upon receipt of a packet with a client-generated DCID, the server + MUST follow these steps in order: + + * If the config rotation bits do not correspond to a known + configuration, do not attempt to extract a server ID. + + * If the DCID is not long enough to decode using the configured + algorithm, extract a number of octets equal to the server ID + length, beginning with the second octet. + + + +Duke & Banks Expires 19 September 2021 [Page 13] + +Internet-Draft QUIC-LB March 2021 + + + * If the DCID is long enough to decode, extract the server ID. + + If the server ID is not already in its list, the server MUST decide + whether or not to immediately use it to encode a CID on the new + connection. If it chooses to use it, it adds the server ID to its + list. If it does not, it MUST NOT use the server ID in future CIDs. + + The server then processes the packet normally. + + When a server needs a new connection ID, it uses one of the server + IDs in its list to populate the server ID field of that CID. It MAY + vary this selection to reduce linkability within a connection. + + To reduce state at the load balancer, the server SHOULD limit the + number of SIDs it adds to its list. + + After loading a new configuration, a server may not have any + available SIDs. This is because an incoming packet may not contain + the config rotation bits necessary to extract a server ID in + accordance with the algorithm above. When required to generate a CID + under these conditions, the server MUST generate CIDs using the + 5-tuple routing codepoint (see Section 3.2. Note that these + connections will not be robust to client address changes while they + use this connection ID. For this reason, a server SHOULD retire + these connection IDs and replace them with routable ones once it + receives a client-generated CID that allows it to acquire a server + ID. As, statistically, one in every four such CIDs can provide a + server ID, this is typically a short interval. + +5. Routing Algorithms + + Encryption in the algorithms below uses the AES-128-ECB cipher. + Future standards could add new algorithms that use other ciphers to + provide cryptographic agility in accordance with [RFC7696]. QUIC-LB + implementations SHOULD be extensible to support new algorithms. + +5.1. Plaintext CID Algorithm + + The Plaintext CID Algorithm makes no attempt to obscure the mapping + of connections to servers, significantly increasing linkability. The + format is depicted in the figure below. + + Plaintext CID { + First Octet (8), + Server ID (8..128), + For Server Use (8..152-len(Server ID)), + } + + + + +Duke & Banks Expires 19 September 2021 [Page 14] + +Internet-Draft QUIC-LB March 2021 + + + Figure 3: Plaintext CID Format + +5.1.1. Configuration Agent Actions + + For static SID allocation, the server ID length is limited to 16 + octets. There are no parameters specific to this algorithm. + +5.1.2. Load Balancer Actions + + On each incoming packet, the load balancer extracts consecutive + octets, beginning with the second octet. These bytes represent the + server ID. + +5.1.3. Server Actions + + The server chooses how many octets to reserve for its own use, which + MUST be at least one octet. + + When a server needs a new connection ID, it encodes one of its + assigned server IDs in consecutive octets beginning with the second. + All other 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. + +5.2. Stream Cipher CID Algorithm + + The Stream Cipher CID algorithm provides cryptographic protection at + the cost of additional per-packet processing at the load balancer to + decrypt every incoming connection ID. The CID format is depicted + below. + + Stream Cipher CID { + First Octet (8), + Nonce (64..120), + Encrypted Server ID (8..128-len(Nonce)), + For Server Use (0..152-len(Nonce)-len(Encrypted Server ID)), + } + + Figure 4: Stream Cipher CID Format + +5.2.1. Configuration Agent Actions + + The configuration agent assigns a server ID to every server in its + pool, and determines a server ID length (in octets) sufficiently + large to encode all server IDs, including potential future servers. + + + + + + +Duke & Banks Expires 19 September 2021 [Page 15] + +Internet-Draft QUIC-LB March 2021 + + + The configuration agent also selects a nonce length and an 16-octet + AES-ECB key to use for connection ID decryption. The nonce length + MUST be at least 8 octets and no more than 16 octets. The nonce + length and server ID length MUST sum to 19 or fewer octets, but + SHOULD sum to 15 or fewer to allow space for server use. + +5.2.2. Load Balancer Actions + + Upon receipt of a QUIC packet, the load balancer extracts as many of + the earliest octets from the destination connection ID as necessary + to match the nonce length. The server ID immediately follows. + + The load balancer decrypts the nonce and the server ID using the + following three pass algorithm: + + * Pass 1: The load balancer decrypts the server ID using 128-bit AES + Electronic Codebook (ECB) mode, much like QUIC header protection. + The encrypted nonce octets are zero-padded to 16 octets. AES-ECB + encrypts this encrypted nonce using its key to generate a mask + which it applies to the encrypted server id. This provides an + intermediate value of the server ID, referred to as server-id + intermediate. + + server_id_intermediate = encrypted_server_id ^ AES-ECB(key, padded- + encrypted-nonce) + + * Pass 2: The load balancer decrypts the nonce octets using 128-bit + AES ECB mode, using the server-id intermediate as "nonce" for this + pass. The server-id intermediate octets are zero-padded to 16 + octets. AES-ECB encrypts this padded server-id intermediate using + its key to generate a mask which it applies to the encrypted + nonce. This provides the decrypted nonce value. + + nonce = encrypted_nonce ^ AES-ECB(key, padded-server_id_intermediate) + + * Pass 3: The load balancer decrypts the server ID using 128-bit AES + ECB mode. The 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 intermediate server id. This provides the + decrypted server ID. + + server_id = server_id_intermediate ^ AES-ECB(key, padded-nonce) + + 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. + The load balancer uses the the second through eleventh octets of the + connection ID for the nonce, zero-pads it to 16 octets, uses xors the + result with the twelfth and thirteenth octet. The result is padded + + + +Duke & Banks Expires 19 September 2021 [Page 16] + +Internet-Draft QUIC-LB March 2021 + + + with 14 octets of zeros and encrypted to obtain a mask that is xored + with the nonce octets. Finally, the nonce octets are padded with six + octets of zeros, encrypted, and the first two octets xored with the + server ID octets to obtain the actual server ID. + + This three-pass algorithm is a simplified version of the FFX + algorithm, with the property that each encrypted nonce value depends + on all server ID bits, and each encrypted server ID bit depends on + all nonce bits and all server ID bits. This mitigates attacks + against stream ciphers in which attackers simply flip encrypted + server-ID bits. + + The output of the decryption is the server ID that the load balancer + uses for routing. + +5.2.3. Server Actions + + When generating a routable connection ID, the server writes arbitrary + bits into its nonce octets, and its provided server ID into the + server ID octets. Servers MAY opt to have a longer connection ID + beyond the nonce and server ID. The additional bits MAY encode + additional information, but SHOULD appear essentially random to + observers. + + If the decrypted nonce bits increase monotonically, that guarantees + that nonces are not reused between connection IDs from the same + server. + + The server encrypts the server ID using exactly the algorithm as + described in Section 5.2.2, performing the three passes in reverse + order. + +5.3. Block Cipher CID Algorithm + + The Block Cipher CID Algorithm, by using a full 16 octets of + plaintext and a 128-bit cipher, provides higher cryptographic + protection and detection of non-compliant connection IDs. However, + it also requires connection IDs of at least 17 octets, increasing + overhead of client-to-server packets. + + Block Cipher CID { + First Octet (8), + Encrypted Server ID (8..128), + Encrypted Bits for Server Use (128-len(Encrypted Server ID)), + Unencrypted Bits for Server Use (0..24), + } + + Figure 5: Block Cipher CID Format + + + +Duke & Banks Expires 19 September 2021 [Page 17] + +Internet-Draft QUIC-LB March 2021 + + +5.3.1. Configuration Agent Actions + + If server IDs are statically allocated, the server ID length MUST be + no more than 12 octets, to provide servers adequate entropy to + generate unique CIDs. + + The configuration agent also selects an 16-octet AES-ECB key to use + for connection ID decryption. + +5.3.2. Load Balancer Actions + + Upon receipt of a QUIC packet, the load balancer reads the first + octet to obtain the config rotation bits. It then decrypts the + subsequent 16 octets using AES-ECB decryption and the chosen key. + + The decrypted plaintext contains the server id and opaque server data + in that order. The load balancer uses the server ID octets for + routing. + +5.3.3. Server Actions + + When generating a routable connection ID, the server MUST choose a + connection ID length between 17 and 20 octets. The server writes its + server ID into the server ID octets and arbitrary bits into the + remaining bits. These arbitrary bits MAY encode additional + information, and MUST differ between connection IDs. Bits in the + eighteenth, nineteenth, and twentieth octets SHOULD appear + essentially random to observers. The first octet is reserved as + described in Section 3. + + The server then encrypts the second through seventeenth octets using + the 128-bit AES-ECB cipher. + +6. ICMP Processing + + For protocols where 4-tuple load balancing is sufficient, it is + straightforward to deliver ICMP packets from the network to the + correct server, by reading the echoed IP and transport-layer headers + to obtain the 4-tuple. When routing is based on connection ID, + further measures are required, as most QUIC packets that trigger ICMP + responses will only contain a client-generated connection ID that + contains no routing information. + + To solve this problem, load balancers MAY maintain a mapping of + Client IP and port to server ID based on recently observed packets. + + + + + + +Duke & Banks Expires 19 September 2021 [Page 18] + +Internet-Draft QUIC-LB March 2021 + + + Alternatively, servers MAY implement the technique described in + Section 14.4.1 of [QUIC-TRANSPORT] to increase the likelihood a + Source Connection ID is included in ICMP responses to Path Maximum + Transmission Unit (PMTU) probes. Load balancers MAY parse the echoed + packet to extract the Source Connection ID, if it contains a QUIC + long header, and extract the Server ID as if it were in a Destination + CID. + +7. Retry Service + + When a server is under load, QUICv1 allows it to defer storage of + connection state until the client proves it can receive packets at + its advertised IP address. Through the use of a Retry packet, a + token in subsequent client Initial packets, and transport parameters, + servers verify address ownership and clients verify that there is no + on-path attacker generating Retry packets. + + A "Retry Service" detects potential Denial of Service attacks and + handles sending of Retry packets on behalf of the server. As it is, + by definition, literally an on-path entity, the service must + communicate some of the original connection IDs back to the server so + that it can pass client verification. It also must either verify the + address itself (with the server trusting this verification) or make + sure there is common context for the server to verify the address + using a service-generated token. + + There are two different mechanisms to allow offload of DoS mitigation + to a trusted network service. One requires no shared state; the + server need only be configured to trust a retry service, though this + imposes other operational constraints. The other requires a shared + key, but has no such constraints. + +7.1. Common Requirements + + Regardless of mechanism, a retry service has an active mode, where it + is generating Retry packets, and an inactive mode, where it is not, + based on its assessment of server load and the likelihood an attack + is underway. The choice of mode MAY be made on a per-packet or per- + connection basis, through a stochastic process or based on client + address. + + A configuration agent MUST distribute a list of QUIC versions the + Retry Service supports. It MAY also distribute either an "Allow- + List" or a "Deny-List" of other QUIC versions. It MUST NOT + distribute both an Allow-List and a Deny-List. + + The Allow-List or Deny-List MUST NOT include any versions included + for Retry Service Support. + + + +Duke & Banks Expires 19 September 2021 [Page 19] + +Internet-Draft QUIC-LB March 2021 + + + The Configuration Agent MUST provide a means for the entity that + controls the Retry Service to report its supported version(s) to the + configuration Agent. If the entity has not reported this + information, it MUST NOT activate the Retry Service and the + configuration agent MUST NOT distribute configuration that activates + it. + + The configuration agent MAY delete versions from the final supported + version list if policy does not require the Retry Service to operate + on those versions. + + The configuration Agent MUST provide a means for the entities that + control servers behind the Retry Service to report either an Allow- + List or a Deny-List. + + If all entities supply Allow-Lists, the consolidated list MUST be the + union of these sets. If all entities supply Deny-Lists, the + consolidated list MUST be the intersection of these sets. + + If entities provide a mixture of Allow-Lists and Deny-Lists, the + consolidated list MUST be a Deny-List that is the intersection of all + provided Deny-Lists and the inverses of all Allow-Lists. + + If no entities that control servers have reported Allow-Lists or + Deny-Lists, the default is a Deny-List with the null set (i.e., all + unsupported versions will be admitted). This preserves the future + extensibilty of QUIC. + + A retry service MUST forward all packets for a QUIC version it does + not support that are not on a Deny-List or absent from an Allow-List. + Note that if servers support versions the retry service does not, + this may increase load on the servers. + + Note that future versions of QUIC might not have Retry packets, + require different information in Retry, or use different packet type + indicators. + +7.1.1. Considerations for Non-Initial Packets + + Initial Packets are especially effective at consuming server + resources because they cause the server to create connection state. + Even when mitigating this load with Retry Packets, the act of + validating an Initial Token and sending a Retry Packet is more + expensive than the response to a non-Initial packet with an unknown + Connection ID: simply dropping it and/or sending a Stateless Reset. + + + + + + +Duke & Banks Expires 19 September 2021 [Page 20] + +Internet-Draft QUIC-LB March 2021 + + + Nevertheless, a Retry Service in Active Mode might desire to shield + servers from non-Initial packets that do not correspond to a + previously admitted Initial Packet. This has a number of + considerations. + + * If a Retry Service maintains no per-flow state whatsoever, it + cannot distinguish between valid and invalid non_Initial packets + and MUST forward all non-Initial Packets to the server. + + * For QUIC versions the Retry Service does not support and are + present on the Allow-List (or absent from the Deny-List), the + Retry Service cannot distinguish Initial Packets from other long + headers and therefore MUST admit all long headers. + + * If a Retry Service keeps per-flow state, it can identify 4-tuples + that have been previously approved, admit non-Initial packets from + those flows, and drop all others. However, dropping short headers + will effectively break Address Migration and NAT Rebinding when in + Active Mode, as post-migration packets will arrive with a + previously unknown 4-tuple. This policy will also break + connection attempts using any new QUIC versions that begin + connections with a short header. + + * If a Retry Service is integrated with a QUIC-LB compliant load + balancer, it can verify that the Destination Connection ID is + compliant, and only admit non-Initial packets with compliant + DCIDs. As the Connection ID encoding is invariant across QUIC + versions, the Retry Service can do this for all short headers. + + Nothing in this section prevents Retry Services from making basic + syntax correctness checks on packets with QUIC versions that it + understands (e.g., enforcing the Initial Packet datagram size minimum + in version 1) and dropping packets that are not compliant with the + QUIC specification. + +7.2. No-Shared-State Retry Service + + The no-shared-state retry service requires no coordination, except + that the server must be configured to accept this service and know + which QUIC versions the retry service supports. The scheme uses the + first bit of the token to distinguish between tokens from Retry + packets (codepoint '0') and tokens from NEW_TOKEN frames (codepoint + '1'). + +7.2.1. Configuration Agent Actions + + See Section 7.1. + + + + +Duke & Banks Expires 19 September 2021 [Page 21] + +Internet-Draft QUIC-LB March 2021 + + +7.2.2. Service Requirements + + A no-shared-state retry service MUST be present on all paths from + potential clients to the server. These paths MUST fail to pass QUIC + traffic should the service fail for any reason. That is, if the + service is not operational, the server MUST NOT be exposed to client + traffic. Otherwise, servers that have already disabled their Retry + capability would be vulnerable to attack. + + The path between service and server MUST be free of any potential + attackers. Note that this and other requirements above severely + restrict the operational conditions in which a no-shared-state retry + service can safely operate. + + Retry tokens generated by the service MUST have the format below. + + Non-Shared-State Retry Service Token { + Token Type (1) = 0, + ODCIL (7) = 8..20, + RSCIL (8) = 0..20, + Original Destination Connection ID (64..160), + Retry Source Connection ID (0..160), + Opaque Data (..), + } + + Figure 6: Format of non-shared-state retry service tokens + + The first bit of retry tokens generated by the service MUST be zero. + The token has the following additional fields: + + ODCIL: The length of the original destination connection ID from the + triggering Initial packet. This is in cleartext to be readable for + the server, but authenticated later in the token. The Retry Service + SHOULD reject any token in which the value is less than 8. + + RSCIL: The retry source connection ID length. + + Original Destination Connection ID: This also in cleartext and + authenticated later. + + Retry Source Connection ID: This also in cleartext and authenticated + later. + + Opaque Data: This data MUST contain encrypted information that allows + the retry service to validate the client's IP address, in accordance + with the QUIC specification. It MUST also provide a + cryptographically secure means to validate the integrity of the + entire token. + + + +Duke & Banks Expires 19 September 2021 [Page 22] + +Internet-Draft QUIC-LB March 2021 + + + Upon receipt of an Initial packet with a token that begins with '0', + the retry service MUST validate the token in accordance with the QUIC + specification. + + In active mode, the service MUST issue Retry packets for all Client + initial packets that contain no token, or a token that has the first + bit set to '1'. It MUST NOT forward the packet to the server. The + service MUST validate all tokens with the first bit set to '0'. If + successful, the service MUST forward the packet with the token + intact. If unsuccessful, it MUST drop the packet. The Retry Service + MAY send an Initial Packet containing a CONNECTION_CLOSE frame with + the INVALID_TOKEN error code when dropping the packet. + + Note that this scheme has a performance drawback. When the retry + service is in active mode, clients with a token from a NEW_TOKEN + frame will suffer a 1-RTT penalty even though its token provides + proof of address. + + In inactive mode, the service MUST forward all packets that have no + token or a token with the first bit set to '1'. It MUST validate all + tokens with the first bit set to '0'. If successful, the service + MUST forward the packet with the token intact. If unsuccessful, it + MUST either drop the packet or forward it with the token removed. + The latter requires decryption and re-encryption of the entire + Initial packet to avoid authentication failure. Forwarding the + packet causes the server to respond without the + original_destination_connection_id transport parameter, which + preserves the normal QUIC signal to the client that there is an on- + path attacker. + +7.2.3. Server Requirements + + A server behind a non-shared-state retry service MUST NOT send Retry + packets for a QUIC version the retry service understands. It MAY + send Retry for QUIC versions the Retry Service does not understand. + + Tokens sent in NEW_TOKEN frames MUST have the first bit set to '1'. + + If a server receives an Initial Packet with the first bit set to '1', + it could be from a server-generated NEW_TOKEN frame and should be + processed in accordance with the QUIC specification. If a server + receives an Initial Packet with the first bit to '0', it is a Retry + token and the server MUST NOT attempt to validate it. Instead, it + MUST assume the address is validated and MUST extract the Original + Destination Connection ID and Retry Source Connection ID, assuming + the format described in Section 7.2.2. + + + + + +Duke & Banks Expires 19 September 2021 [Page 23] + +Internet-Draft QUIC-LB March 2021 + + +7.3. Shared-State Retry Service + + A shared-state retry service uses a shared key, so that the server + can decode the service's retry tokens. It does not require that all + traffic pass through the Retry service, so servers MAY send Retry + packets in response to Initial packets that don't include a valid + token. + + Both server and service must have time synchronized with respect to + one another to prevent tokens being incorrectly marked as expired, + though tight synchronization is unnecessary. + + The tokens are protected using AES128-GCM AEAD, as explained in + Section 7.3.1. All tokens, generated by either the server or retry + service, MUST use the following format, which includes: + + * A 96 bit unique token number transmitted in clear text, but + protected as part of the AEAD associated data. + + * An 8 bit token key identifier. + + * A token body, encoding the Original Destination Connection ID, the + Retry Source Connection ID, and the Timestamp, optionally followed + by server specific Opaque Data. + + The token protection uses an 128 bit representation of the source IP + address from the triggering Initial packet. The client IP address is + 16 octets. If an IPv4 address, the last 12 octets are zeroes. + + If there is a Network Address Translator (NAT) in the server + infrastructure that changes the client IP, the Retry Service MUST + either be positioned behind the NAT, or the NAT must have the token + key to rewrite the Retry token accordingly. Note also that a host + that obtains a token through a NAT and then attempts to connect over + a path that does not have an identically configured NAT will fail + address validation. + + The 96 bit unique token number is set to a random value using a + cryptography- grade random number generator. + + The token key identifier and the corresponding AEAD key and AEAD IV + are provisioned by the configuration agent. + + The token body is encoded as follows: + + + + + + + +Duke & Banks Expires 19 September 2021 [Page 24] + +Internet-Draft QUIC-LB March 2021 + + + Shared-State Retry Service Token Body { + ODCIL (8) = 0..20, + RSCIL (8) = 0..20, + [Port (16)], + Original Destination Connection ID (0..160), + Retry Source Connection ID (0..160), + Timestamp (64), + Opaque Data (..), + } + + Figure 7: Body of shared-state retry service tokens + + The token body has the following fields: + + ODCIL: The original destination connection ID length. Tokens in + NEW_TOKEN frames MUST set this field to zero. + + RSCIL: The retry source connection ID length. Tokens in NEW_TOKEN + frames MUST set this field to zero. + + Port: The Source Port of the UDP datagram that triggered the Retry + packet. This field MUST be present if and only if the ODCIL is + greater than zero. This field is therefore always absent in tokens + in NEW_TOKEN frames. + + Original Destination Connection ID: The server or Retry Service + copies this from the field in the client Initial packet. + + Retry Source Connection ID: The server or Retry service copies this + from the Source Connection ID of the Retry packet. + + Timestamp: The Timestamp is a 64-bit integer, in network order, that + expresses the expiration time of the token as a number of seconds in + POSIX time (see Sec. 4.16 of [TIME_T]). + + Opaque Data: The server may use this field to encode additional + information, such as congestion window, RTT, or MTU. The Retry + Service MUST have zero-length opaque data. + + Some implementations of QUIC encode in the token the Initial Packet + Number used by the client, in order to verify that the client sends + the retried Initial with a PN larger that the triggering Initial. + Such implementations will encode the Initial Packet Number as part of + the opaque data. As tokens may be generated by the Service, servers + MUST NOT reject tokens because they lack opaque data and therefore + the packet number. + + + + + +Duke & Banks Expires 19 September 2021 [Page 25] + +Internet-Draft QUIC-LB March 2021 + + +7.3.1. Token Protection with AEAD + + On the wire, the token is presented as: + + Shared-State Retry Service Token { + Unique Token Number (96), + Key Sequence (8), + Encrypted Shared-State Retry Service Token Body (80..), + AEAD Checksum (length depends on encryption algorithm), + } + + Figure 8: Wire image of shared-state retry service tokens + + The tokens are protected using AES128-GCM as follows: + + * The token key and IV are retrieved using the Key Sequence. + + * The nonce, N, is formed by combining the IV with the 96 bit unique + token number. The 96 bits of the unique token number are left- + padded with zeros to the size of the IV. The exclusive OR of the + padded unique token number and the IV forms the AEAD nonce. + + * The associated data is a formatted as a pseudo header by combining + the cleartext part of the token with the IP address of the client. + + Shared-State Retry Service Token Pseudoheader { + IP Address (128), + Unique Token Number (96), + Key Sequence (8), + } + + Figure 9: Psuedoheader for shared-state retry service tokens + + * The input plaintext for the AEAD is the token body. The output + ciphertext of the AEAD is transmitted in place of the token body. + + * The AEAD Checksum is computed as part of the AEAD encryption + process, and is verified during decryption. + +7.3.2. Configuration Agent Actions + + The configuration agent generates and distributes a "token key", a + "token IV", a key sequence, and the information described in + Section 7.1. + + + + + + + +Duke & Banks Expires 19 September 2021 [Page 26] + +Internet-Draft QUIC-LB March 2021 + + +7.3.3. Service Requirements + + In inactive mode, the Retry service forwards all packets without + further inspection or processing. + + Retry services MUST NOT issue Retry packets except where explicitly + allowed below, to avoid sending a Retry packet in response to a Retry + token. + + When in active mode, the service MUST generate Retry tokens with the + format described above when it receives a client Initial packet with + no token. + + The service SHOULD decrypt incoming tokens. The service SHOULD drop + packets with unknown key sequence, or an AEAD checksum that does not + match the expected value. (By construction, the AEAD checksum will + only match if the client IP Address also matches.) + + If the token checksum passes, and the ODCIL and RSCIL fields are both + zero, then this is a NEW_TOKEN token generated by the server. + Processing of NEW_TOKEN tokens is subtly different from Retry tokens, + as described below. + + The service SHOULD drop a packet containing a token where the ODCIL + is greater than zero and less than the minimum number of octets for a + client-generated CID (8 in QUIC version 1). The service also SHOULD + drop a packet containing a token where the ODCIL is zero and RSCIL is + nonzero. + + If the Timestamp of a token points to time in the past, the token has + expired; however, in order to allow for clock skew, it SHOULD NOT + consider tokens to be expired if the Timestamp encodes a few seconds + in the past. An active Retry service SHOULD drop packets with + expired tokens. If a NEW_TOKEN token, the service MUST generate a + Retry packet in response. It MUST NOT generate a Retry packet in + response to an expired Retry token. + + If a Retry token, the service SHOULD drop packets where the port + number encoded in the token does not match the source port in the + encapsulating UDP header. + + All other packets SHOULD be forwarded to the server. + + + + + + + + + +Duke & Banks Expires 19 September 2021 [Page 27] + +Internet-Draft QUIC-LB March 2021 + + +7.3.4. Server Requirements + + When issuing Retry or NEW_TOKEN tokens, the server MUST include the + client IP address in the authenticated data as specified in + Section 7.3.1. The ODCIL and RSCIL fields are zero for NEW_TOKEN + tokens, making them easily distinguishable from Retry tokens. + + The server MUST validate all tokens that arrive in Initial packets, + as they may have bypassed the Retry service. + + For Retry tokens that follow the format above, servers SHOULD use the + timestamp field to apply its expiration limits for tokens. This need + not be precisely synchronized with the retry service. However, + servers MAY allow retry tokens marked as being a few seconds in the + past, due to possible clock synchronization issues. + + After decrypting the token, the server uses the corresponding fields + to populate the original_destination_connection_id transport + parameter, with a length equal to ODCIL, and the + retry_source_connection_id transport parameter, with length equal to + RSCIL. + + For QUIC versions the service does not support, the server MAY use + any token format. + + As discussed in [QUIC-TRANSPORT], a server MUST NOT send a Retry + packet in response to an Initial packet that contains a retry token. + +8. Configuration Requirements + + QUIC-LB requires common configuration to synchronize understanding of + encodings and guarantee explicit consent of the server. + + The load balancer and server MUST agree on a routing algorithm, + server ID allocation method, and the relevant parameters for that + algorithm. + + All algorithms require a server ID length. If server IDs are + statically allocated, the load balancer MUST receive the full table + of mappings, and each server must receive its assigned SID(s), from + the configuration agent. + + For Stream Cipher CID Routing, the servers and load balancer also + MUST have a common understanding of the key and nonce length. + + For Block Cipher CID Routing, the servers and load balancer also MUST + have a common understanding of the key. + + + + +Duke & Banks Expires 19 September 2021 [Page 28] + +Internet-Draft QUIC-LB March 2021 + + + Note that server IDs are opaque bytes, not integers, so there is no + notion of network order or host order. + + A server configuration MUST specify if the first octet encodes the + CID length. Note that a load balancer does not need the CID length, + as the required bytes are present in the QUIC packet. + + A full QUIC-LB server configuration MUST also specify the supported + QUIC versions of any Retry Service. If a shared-state service, the + server also must have the token key. + + A non-shared-state Retry Service need only be configured with the + QUIC versions it supports, and an Allow- or Deny-List. A shared- + state Retry Service also needs the token key, and to be aware if a + NAT sits between it and the servers. + + Appendix A provides a YANG Model of the a full QUIC-LB configuration. + +9. Additional Use Cases + + This section discusses considerations for some deployment scenarios + not implied by the specification above. + +9.1. Load balancer chains + + Some network architectures may have multiple tiers of low-state load + balancers, where a first tier of devices makes a routing decision to + the next tier, and so on, until packets reach the server. Although + QUIC-LB is not explicitly designed for this use case, it is possible + to support it. + + If each load balancer is assigned a range of server IDs that is a + subset of the range of IDs assigned to devices that are closer to the + client, then the first devices to process an incoming packet can + extract the server ID and then map it to the correct forwarding + address. Note that this solution is extensible to arbitrarily large + numbers of load-balancing tiers, as the maximum server ID space is + quite large. + +9.2. Moving connections between servers + + Some deployments may transparently move a connection from one server + to another. The means of transferring connection state between + servers is out of scope of this document. + + + + + + + +Duke & Banks Expires 19 September 2021 [Page 29] + +Internet-Draft QUIC-LB March 2021 + + + To support a handover, a server involved in the transition could + issue CIDs that map to the new server via a NEW_CONNECTION_ID frame, + and retire CIDs associated with the new server using the "Retire + Prior To" field in that frame. + + Alternately, if the old server is going offline, the load balancer + could simply map its server ID to the new server's address. + +10. Version Invariance of QUIC-LB + + Non-shared-state Retry Services are inherently dependent on the + format (and existence) of Retry Packets in each version of QUIC, and + so Retry Service configuration explicitly includes the supported QUIC + versions. + + The server ID encodings, and requirements for their handling, are + designed to be QUIC version independent (see [QUIC-INVARIANTS]). A + QUIC-LB load balancer will generally not require changes as servers + deploy new versions of QUIC. However, there are several unlikely + future design decisions that could impact the operation of QUIC-LB. + + The maximum Connection ID length could be below the minimum necessary + for one or more encoding algorithms. + + Section 4.1 provides guidance about how load balancers should handle + non-compliant DCIDs. This guidance, and the implementation of an + algorithm to handle these DCIDs, rests on some assumptions: + + * Incoming short headers do not contain DCIDs that are client- + generated. + + * The use of client-generated incoming DCIDs does not persist beyond + a few round trips in the connection. + + * While the client is using DCIDs it generated, some exposed fields + (IP address, UDP port, client-generated destination Connection ID) + remain constant for all packets sent on the same connection. + + * Dynamic server ID allocation is dependent on client-generated + Destination CIDs in Initial Packets being at least 8 octets in + length. If they are not, the load balancer may not be able to + extract a valid server ID to add to its table. Configuring a + shorter server ID length can increase robustness to a change. + + While this document does not update the commitments in + [QUIC-INVARIANTS], the additional assumptions are minimal and + narrowly scoped, and provide a likely set of constants that load + balancers can use with minimal risk of version- dependence. + + + +Duke & Banks Expires 19 September 2021 [Page 30] + +Internet-Draft QUIC-LB March 2021 + + + If these assumptions are invalid, this specification is likely to + lead to loss of packets that contain non-compliant DCIDs, and in + extreme cases connection failure. + + Some load balancers might inspect elements of the Server Name + Indication (SNI) extension in the TLS Client Hello to make a routing + decision. Note that the format and cryptographic protection of this + information may change in future versions or extensions of TLS or + QUIC, and therefore this functionality is inherently not version- + invariant. + +11. Security Considerations + + QUIC-LB is intended to prevent linkability. Attacks would therefore + attempt to subvert this purpose. + + Note that the Plaintext CID algorithm makes no attempt to obscure the + server mapping, and therefore does not address these concerns. It + exists to allow consistent CID encoding for compatibility across a + network infrastructure, which makes QUIC robust to NAT rebinding. + Servers that are running the Plaintext CID algorithm SHOULD only use + it to generate new CIDs for the Server Initial Packet and SHOULD NOT + send CIDs in QUIC NEW_CONNECTION_ID frames, except that it sends one + new Connection ID in the event of config rotation Section 3.1. Doing + so might falsely suggest to the client that said CIDs were generated + in a secure fashion. + + A linkability attack would find some means of determining that two + connection IDs route to the same server. As described above, there + is no scheme that strictly prevents linkability for all traffic + patterns, and therefore efforts to frustrate any analysis of server + ID encoding have diminishing returns. + +11.1. Attackers not between the load balancer and server + + Any attacker might open a connection to the server infrastructure and + aggressively simulate migration 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. + + The Stream and Block Cipher CID algorithms provide robust protection + against any sort of linkage. The Plaintext CID algorithm makes no + attempt to protect this encoding. + + Were this analysis to obtain the server encoding, then on-path + observers might apply this analysis to correlating different client + IP addresses. + + + + +Duke & Banks Expires 19 September 2021 [Page 31] + +Internet-Draft QUIC-LB March 2021 + + +11.2. Attackers between the load balancer and server + + 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 + IDs for that connection. + +11.3. Multiple Configuration IDs + + During the period in which there are multiple deployed configuration + IDs (see Section 3.1), there is a slight increase in linkability. + The server space is effectively divided into segments with CIDs that + have different config rotation bits. Entities that manage servers + SHOULD strive to minimize these periods by quickly deploying new + configurations across the server pool. + +11.4. Limited configuration scope + + A simple deployment of QUIC-LB in a cloud provider might use the same + global QUIC-LB configuration across all its load balancers that route + to customer servers. An attacker could then simply become a + customer, obtain the configuration, and then extract server IDs of + other customers' connections at will. + + To avoid this, the configuration agent SHOULD issue QUIC-LB + configurations to mutually distrustful servers that have different + keys for encryption algorithms. The load balancers can distinguish + these configurations by external IP address, or by assigning + different values to the config rotation bits (Section 3.1). Note + that either solution has a privacy impact; see Section 11.3. + + These techniques are not necessary for the plaintext algorithm, as it + does not attempt to conceal the server ID. + +11.5. Stateless Reset Oracle + + Section 21.9 of [QUIC-TRANSPORT] discusses the Stateless Reset Oracle + attack. For a server deployment to be vulnerable, an attacking + client must be able to cause two packets with the same Destination + CID to arrive at two different servers that share the same + cryptographic context for Stateless Reset tokens. As QUIC-LB + requires deterministic routing of DCIDs over the life of a + connection, it is a sufficient means of avoiding an Oracle without + additional measures. + + + + + + +Duke & Banks Expires 19 September 2021 [Page 32] + +Internet-Draft QUIC-LB March 2021 + + +11.6. Connection ID Entropy + + The Stream Cipher and Block Cipher algorithms need to generate + different cipher text for each generated Connection ID instance to + protect the Server ID. To do so, at least four octets of the Block + Cipher CID and at least eight octets of the Stream Cipher CID are + reserved for a nonce that, if used only once, will result in unique + cipher text for each Connection ID. + + If servers simply increment the nonce by one with each generated + connection ID, then it is safe to use the existing keys until any + server's nonce counter exhausts the allocated space and rolls over to + zero. Whether or not it implements this method, the server MUST NOT + reuse a nonce until it switches to a configuration with new keys. + + Configuration agents SHOULD implement an out-of-band method to + discover when servers are in danger of exhausting their nonce space, + and SHOULD respond by issuing a new configuration. A server that has + exhausted its nonces MUST either switch to a different configuration, + or if none exists, use the 4-tuple routing config rotation codepoint. + +11.7. Shared-State Retry Keys + + The Shared-State Retry Service defined in Section 7.3 describes the + format of retry tokens or new tokens protected and encrypted using + AES128-GCM. Each token includes a 96 bit randomly generated unique + token number, and an 8 bit identifier of the AES-GCM encryption key. + There are three important security considerations for these tokens: + + * An attacker that obtains a copy of the encryption key will be able + to decrypt and forge tokens. + + * Attackers may be able to retrieve the key if they capture a + sufficently large number of retry tokens encrypted with a given + key. + + * Confidentiality of the token data will fail if separate tokens + reuse the same 96 bit unique token number and the same key. + + To protect against disclosure of keys to attackers, service and + servers MUST ensure that the keys are stored securely. To limit the + consequences of potential exposures, the time to live of any given + key should be limited. + + Section 6.6 of [QUIC-TLS] states that "Endpoints MUST count the + number of encrypted packets for each set of keys. If the total + number of encrypted packets with the same key exceeds the + confidentiality limit for the selected AEAD, the endpoint MUST stop + + + +Duke & Banks Expires 19 September 2021 [Page 33] + +Internet-Draft QUIC-LB March 2021 + + + using those keys." It goes on with the specific limit: "For + AEAD_AES_128_GCM and AEAD_AES_256_GCM, the confidentiality limit is + 2^23 encrypted packets; see Appendix B.1." It is prudent to adopt + the same limit here, and configure the service in such a way that no + more than 2^23 tokens are generated with the same key. + + In order to protect against collisions, the 96 bit unique token + numbers should be generated using a cryptographically secure + pseudorandom number generator (CSPRNG), as specified in Appendix C.1 + of the TLS 1.3 specification [RFC8446]. With proper random numbers, + if fewer than 2^40 tokens are generated with a single key, the risk + of collisions is lower than 0.001%. + +11.8. Resource Consumption of the SID table + + When using Dynamic SID allocation, the load balancer's SID table can + be as large as 2^56 entries, which is prohibitively large. To + constrain the size of this table, servers are encouraged to accept a + small number of IDs, so that the rest can be purged from the load + balancer's provisional table. + + One form of attack would send a large number of random CIDs in long + headers to increase the size of the load balancer's permanent or + provisional table. + + An attack on the provisional table would simply send each CID in long + headers with many different fourtuples. If no 1-RTT packet never + arrives, the entry will simply persist in the provisional table. + Load balancers are encouraged to time out entries that never receive + a short header packet, but this timeout SHOULD be well in excess of + the maximum conceivable duration of a QUIC handshake. + + An attack on the permanent table would follow each long header with a + short header that encoded the same SID. The encoding CIDs in the two + packets must be different to add the SID to the permanent table. + This is non-trivial for encrypted CIDs, but straighforward for the + Plaintext CID. As a result, Plaintext CID configurations are + strongly encouraged to configure a small enough server ID to limit + the size of the load balancer's table to a manageable memory + footprint even if all possible codepoints are permanently assigned. + +12. IANA Considerations + + There are no IANA requirements. + +13. References + +13.1. Normative References + + + +Duke & Banks Expires 19 September 2021 [Page 34] + +Internet-Draft QUIC-LB March 2021 + + + [QUIC-INVARIANTS] + Thomson, M., "Version-Independent Properties of QUIC", + Work in Progress, Internet-Draft, draft-ietf-quic- + invariants-13, 14 January 2021, + . + + [QUIC-TRANSPORT] + Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed + and Secure Transport", Work in Progress, Internet-Draft, + draft-ietf-quic-transport-34, 14 January 2021, + . + + [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol + Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, + . + + [TIME_T] "Open Group Standard: Vol. 1: Base Definitions, Issue 7", + IEEE Std 1003.1 , 2018, + . + +13.2. Informative References + + [QUIC-TLS] Thomson, M. and S. Turner, "Using TLS to Secure QUIC", + Work in Progress, Internet-Draft, draft-ietf-quic-tls-34, + 14 January 2021, . + + [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate + Requirement Levels", BCP 14, RFC 2119, + DOI 10.17487/RFC2119, March 1997, + . + + [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for + the Network Configuration Protocol (NETCONF)", RFC 6020, + DOI 10.17487/RFC6020, October 2010, + . + + [RFC7696] Housley, R., "Guidelines for Cryptographic Algorithm + Agility and Selecting Mandatory-to-Implement Algorithms", + BCP 201, RFC 7696, DOI 10.17487/RFC7696, November 2015, + . + + [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", + BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, + . + + + +Duke & Banks Expires 19 September 2021 [Page 35] + +Internet-Draft QUIC-LB March 2021 + + +Appendix A. QUIC-LB YANG Model + + This YANG model conforms to [RFC6020] and expresses a complete QUIC- + LB configuration. + +module ietf-quic-lb { + yang-version "1.1"; + namespace "urn:ietf:params:xml:ns:yang:ietf-quic-lb"; + prefix "quic-lb"; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types."; + } + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types."; + } + + organization + "IETF QUIC Working Group"; + + contact + "WG Web: + WG List: + + Authors: Martin Duke (martin.h.duke at gmail dot com) + Nick Banks (nibanks at microsoft dot com)"; + + description + "This module enables the explicit cooperation of QUIC servers with + trusted intermediaries without breaking important protocol features. + + Copyright (c) 2021 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX + (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself + + + +Duke & Banks Expires 19 September 2021 [Page 36] + +Internet-Draft QUIC-LB March 2021 + + + for full legal notices. + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + 'MAY', and 'OPTIONAL' in this document are to be interpreted as + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, + they appear in all capitals, as shown here."; + + revision "2021-01-29" { + description + "Initial Version"; + reference + "RFC XXXX, QUIC-LB: Generating Routable QUIC Connection IDs"; + } + + container quic-lb { + presence "The container for QUIC-LB configuration."; + + description + "QUIC-LB container."; + + typedef quic-lb-key { + type yang:hex-string { + length 47; + } + description + "This is a 16-byte key, represented with 47 bytes"; + } + + list cid-configs { + key "config-rotation-bits"; + description + "List up to three load balancer configurations"; + + leaf config-rotation-bits { + type uint8 { + range "0..2"; + } + mandatory true; + description + "Identifier for this CID configuration."; + } + + leaf first-octet-encodes-cid-length { + type boolean; + default false; + description + "If true, the six least significant bits of the first CID + + + +Duke & Banks Expires 19 September 2021 [Page 37] + +Internet-Draft QUIC-LB March 2021 + + + octet encode the CID length minus one."; + } + + leaf cid-key { + type quic-lb-key; + description + "Key for encrypting the connection ID. If absent, the + configuration uses the Plaintext algorithm."; + } + + leaf nonce-length { + type uint8 { + range "8..16"; + } + must '(../cid-key)' { + error-message "nonce-length only valid if cid-key is set"; + } + description + "Length, in octets, of the nonce. If absent when cid-key is + present, the configuration uses the Block Cipher Algorithm. + If present along with cid-key, the configurationuses the + Stream Cipher Algorithm."; + } + + leaf dynamic-sid { + type boolean; + description + "If true, server IDs are allocated dynamically."; + } + + leaf server-id-length { + type uint8 { + range "1..18"; + } + must '(dynamic-sid and . <= 7) or + (not(../dynamic-sid)) and + (not(../cid-key) and . <= 16) or + ((../nonce-length) and . <= (19 - ../nonce-length)) or + ((../cid-key) and not(../nonce-length) and . <= 12))' { + error-message + "Server ID length too long for routing algorithm and server ID + allocation method"; + } + mandatory true; + description + "Length (in octets) of a server ID. Further range-limited + by sid-allocation, cid-key, and nonce-length."; + } + + + +Duke & Banks Expires 19 September 2021 [Page 38] + +Internet-Draft QUIC-LB March 2021 + + + list server-id-mappings { + when "not(../dynamic-sid)"; + key "server-id"; + description "Statically allocated Server IDs"; + + leaf server-id { + type yang:hex-string; + must "string-length(.) = 3 * ../../server-id-length - 1"; + mandatory true; + description + "An allocated server ID"; + } + + leaf server-address { + type inet:ip-address; + mandatory true; + description + "Destination address corresponding to the server ID"; + } + } + } + + container retry-service-config { + description + "Configuration of Retry Service. If supported-versions is empty, there + is no retry service. If token-keys is empty, it uses the non-shared- + state service. If present, it uses shared-state tokens."; + + leaf-list supported-versions { + type uint32; + description + "QUIC versions that the retry service supports. If empty, there + is no retry service."; + } + + leaf unsupported-version-default { + type enumeration { + enum allow { + description "Unsupported versions admitted by default"; + } + enum deny { + description "Unsupported versions denied by default"; + } + } + default allow; + description + "Are unsupported versions not in version-exceptions allowed + or denied?"; + + + +Duke & Banks Expires 19 September 2021 [Page 39] + +Internet-Draft QUIC-LB March 2021 + + + } + + leaf-list version-exceptions { + type uint32; + description + "Exceptions to the default-deny or default-allow rule."; + } + + list token-keys { + key "key-sequence-number"; + description + "list of active keys, for key rotation purposes. Existence implies + shared-state format"; + + leaf key-sequence-number { + type uint8; + mandatory true; + description + "Identifies the key used to encrypt the token"; + } + + leaf token-key { + type quic-lb-key; + mandatory true; + description + "16-byte key to encrypt the token"; + } + + leaf token-iv { + type yang:hex-string { + length 23; + } + mandatory true; + description + "8-byte IV to encrypt the token, encoded in 23 bytes"; + } + } + } + } +} + +A.1. Tree Diagram + + This summary of the YANG model uses the notation in [RFC8340]. + + + + + + + +Duke & Banks Expires 19 September 2021 [Page 40] + +Internet-Draft QUIC-LB March 2021 + + + module: ietf-quic-lb + +--rw quic-lb + +--rw cid-configs* + | [config-rotation-bits] + | +--rw config-rotation-bits uint8 + | +--rw first-octet-encodes-cid-length? boolean + | +--rw cid-key? yang:hex-string + | +--rw nonce-length? uint8 + | +--rw dynamic-sid boolean + | +--rw server-id-length uint8 + | +--rw server-id-mappings*? + | | [server-id] + | | +--rw server-id yang:hex-string + | | +--rw server-address inet:ip-address + +--ro retry-service-config + | +--rw supported-versions* + | | +--rw version uint32 + | +--rw unsupported-version-default enumeration {allow deny} + | +--rw version-exceptions* + | | +--rw version uint32 + | +--rw token-keys*? + | | [key-sequence-number] + | | +--rw key-sequence-number uint8 + | | +--rw token-key yang:hex-string + | | +--rw token-iv yang:hex-string + +Appendix B. Load Balancer Test Vectors + + Each section of this draft includes multiple sets of load balancer + configuration, each of which has five examples of server ID and + server use bytes and how they are encoded in a CID. + + In some cases, there are no server use bytes. Note that, for + simplicity, the first octet bits used for neither config rotation nor + length self-encoding are random, rather than listed in the server use + field. Therefore, a server implementation using these parameters may + generate CIDs with a slightly different first octet. + + This section uses the following abbreviations: + + cid Connection ID + cr_bits Config Rotation Bits + LB Load Balancer + sid Server ID + sid_len Server ID length + su Server Use Bytes + + + + + +Duke & Banks Expires 19 September 2021 [Page 41] + +Internet-Draft QUIC-LB March 2021 + + + All values except length_self_encoding and sid_len are expressed in + hexidecimal format. + +B.1. Plaintext Connection ID Algorithm + + LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1 + + cid 01be sid be su + cid 0221b7 sid 21 su b7 + cid 03cadfd8 sid ca su dfd8 + cid 041e0c9328 sid 1e su 0c9328 + cid 050c8f6d9129 sid 0c su 8f6d9129 + + LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2 + + cid 02aab0 sid aab0 su + cid 3ac4b106 sid c4b1 su 06 + cid 08bd3cf4a0 sid bd3c su f4a0 + cid 3771d59502d6 sid 71d5 su 9502d6 + cid 1d57dee8b888f3 sid 57de su e8b888f3 + + LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3 + + cid 0336c976 sid 36c976 su + cid 04aa291806 sid aa2918 su 06 + cid 0586897bd8b6 sid 86897b su d8b6 + cid 063625bcae4de0 sid 3625bc su ae4de0 + cid 07966fb1f3cb535f sid 966fb1 su f3cb535f + + LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4 + + cid 185172fab8 sid 5172fab8 su + cid 2eb7ff2c9297 sid b7ff2c92 su 97 + cid 14f3eb3dd3edbe sid f3eb3dd3 su edbe + cid 3feb31cece744b74 sid eb31cece su 744b74 + cid 06b9f34c353ce23bb5 sid b9f34c35 su 3ce23bb5 + + LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5 + + cid 05bdcd8d0b1d sid bdcd8d0b1d su + cid 06aee673725a63 sid aee673725a su 63 + cid 07bbf338ddbf37f4 sid bbf338ddbf su 37f4 + cid 08fbbca64c26756840 sid fbbca64c26 su 756840 + cid 09e7737c495b93894e34 sid e7737c495b su 93894e34 + + + + + + + +Duke & Banks Expires 19 September 2021 [Page 42] + +Internet-Draft QUIC-LB March 2021 + + +B.2. Stream Cipher Connection ID Algorithm + + In each case below, the server is using a plain text nonce value of + zero. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Duke & Banks Expires 19 September 2021 [Page 43] + +Internet-Draft QUIC-LB March 2021 + + +LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 12 sid_len 1 + key 4d9d0fd25a25e7f321ef464e13f9fa3d + +cid 0d69fe8ab8293680395ae256e89c sid c5 su +cid 0e420d74ed99b985e10f5073f43027 sid d5 su 27 +cid 0f380f440c6eefd3142ee776f6c16027 sid 10 su 6027 +cid 1020607efbe82049ddbf3a7c3d9d32604d sid 3c su 32604d +cid 11e132d12606a1bb0fa17e1caef00ec54c10 sid e3 su 0ec54c10 + +LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 2 + key 49e1cec7fd264b1f4af37413baf8ada9 + +cid 3d3a5e1126414271cc8dc2ec7c8c15 sid f7fe su +cid 007042539e7c5f139ac2adfbf54ba748 sid eaf4 su 48 +cid 2bc125dd2aed2aafacf59855d99e029217 sid e880 su 9217 +cid 3be6728dc082802d9862c6c8e4dda3d984d8 sid 62c6 su d984d8 +cid 1afe9c6259ad350fc7bad28e0aeb2e8d4d4742 sid 8502 su 8d4d4742 + +LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 14 sid_len 3 + key 2c70df0b399bd33a7335523dcdb884ad + +cid 11d62e8670565cd30b552edff6782ff5a740 sid d794bb su +cid 12c70e481f49363cabd9370d1fd5012c12bca5 sid 2cbd5d su a5 +cid 133b95dfd8ad93566782f8424df82458069fc9e9 sid d126cd su c9e9 +cid 13ac6ffcd635532ab60370306c7ee572d6b6e795 sid 539e42 su e795 +cid 1383ed07a9700777ff450bb39bb9c1981266805c sid 9094dd su 805c + +LB configuration: cr_bits 0x0 length_self_encoding: n nonce_len 12 sid_len 4 + key 2297b8a95c776cf9c048b76d9dc27019 + +cid 32873890c3059ca62628089439c44c1f84 sid 7398d8ca su +cid 1ff7c7d7b9823954b178636c99a7dc93ac83 sid 9655f091 su 83 +cid 31044000a5ebb3bf2fa7629a17f2c78b077c17 sid 8b035fc6 su 7c17 +cid 1791bd28c66721e8fea0c6f34fd2d8e663a6ef70 sid 6672e0e2 su a6ef70 +cid 3df1d90ad5ccd5f8f475f040e90aeca09ec9839d sid b98b1fff su c9839d + +LB configuration: cr_bits 0x0 length_self_encoding: y nonce_len 8 sid_len 5 + key 484b2ed942d9f4765e45035da3340423 + +cid 0da995b7537db605bfd3a38881ae sid 391a7840dc su +cid 0ed8d02d55b91d06443540d1bf6e98 sid 10f7f7b284 su 98 +cid 0f3f74be6d46a84ccb1fd1ee92cdeaf2 sid 0606918fc0 su eaf2 +cid 1045626dbf20e03050837633cc5650f97c sid e505eea637 su 50f97c +cid 11bb9a17f691ab446a938427febbeb593eaa sid 99343a2a96 su eb593eaa + +B.3. Block Cipher Connection ID Algorithm + + + + + +Duke & Banks Expires 19 September 2021 [Page 44] + +Internet-Draft QUIC-LB March 2021 + + +LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 1 + key 411592e4160268398386af84ea7505d4 + +cid 10564f7c0df399f6d93bdddb1a03886f25 sid 23 su 05231748a80884ed58007847eb9fd0 +cid 10d5c03f9dd765d73b3d8610b244f74d02 sid 15 su 76cd6b6f0d3f0b20fc8e633e3a05f3 +cid 108ca55228ab23b92845341344a2f956f2 sid 64 su 65c0ce170a9548717498b537cb8790 +cid 10e73f3d034aef2f6f501e3a7693d6270a sid 07 su f9ad10c84cc1e89a2492221d74e707 +cid 101a6ce13d48b14a77ecfd365595ad2582 sid 6c su 76ce4689b0745b956ef71c2608045d + +LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 2 + key 92ce44aecd636aeeff78da691ef48f77 + +cid 20aa09bc65ed52b1ccd29feb7ef995d318 sid a52f su 99278b92a86694ff0ecd64bc2f73 +cid 30b8dbef657bd78a2f870e93f9485d5211 sid 6c49 su 7381c8657a388b4e9594297afe96 +cid 043a8137331eacd2e78383279b202b9a6d sid 4188 su 5ac4b0e0b95f4e7473b49ee2d0dd +cid 3ba71ea2bcf0ab95719ab59d3d7fde770d sid 8ccc su 08728807605db25f2ca88be08e0f +cid 37ef1956b4ec354f40dc68336a23d42b31 sid c89d su 5a3ccd1471caa0de221ad6c185c0 + +LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 3 + key 5c49cb9265efe8ae7b1d3886948b0a34 + +cid 10efcffc161d232d113998a49b1dbc4aa0 sid 0690b3 su 958fc9f38fe61b83881b2c5780 +cid 10fc13bdbcb414ba90e391833400c19505 sid 031ac3 su 9a55e1e1904e780346fcc32c3c +cid 10d3cc1efaf5dc52c7a0f6da2746a8c714 sid 572d3a su ff2ec9712664e7174dc03ca3f8 +cid 107edf37f6788e33c0ec7758a485215f2b sid 562c25 su 02c5a5dcbea629c3840da5f567 +cid 10bc28da122582b7312e65aa096e9724fc sid 2fa4f0 su 8ae8c666bfc0fc364ebfd06b9a + +LB configuration: cr_bits 0x0 length_self_encoding: n sid_len 4 + key e787a3a491551fb2b4901a3fa15974f3 + +cid 26125351da12435615e3be6b16fad35560 sid 0cb227d3 su 65b40b1ab54e05bff55db046 +cid 14de05fc84e41b611dfbe99ed5b1c9d563 sid 6a0f23ad su d73bee2f3a7e72b3ffea52d9 +cid 1306052c3f973db87de6d7904914840ff1 sid ca21402d su 5829465f7418b56ee6ada431 +cid 1d202b5811af3e1dba9ea2950d27879a92 sid b14e1307 su 4902aba8b23a5f24616df3cf +cid 26538b78efc2d418539ad1de13ab73e477 sid a75e0148 su 0040323f1854e75aeb449b9f + +LB configuration: cr_bits 0x0 length_self_encoding: y sid_len 5 + key d5a6d7824336fbe0f25d28487cdda57c + +cid 10a2794871aadb20ddf274a95249e57fde sid 82d3b0b1a1 su 0935471478c2edb8120e60 +cid 108122fe80a6e546a285c475a3b8613ec9 sid fbcc902c9d su 59c47946882a9a93981c15 +cid 104d227ad9dd0fef4c8cb6eb75887b6ccc sid 2808e22642 su 2a7ef40e2c7e17ae40b3fb +cid 10b3f367d8627b36990a28d67f50b97846 sid 5e018f0197 su 2289cae06a566e5cb6cfa4 +cid 1024412bfe25f4547510204bdda6143814 sid 8a8dd3d036 su 4b12933a135e5eaaebc6fd + + + + + + + +Duke & Banks Expires 19 September 2021 [Page 45] + +Internet-Draft QUIC-LB March 2021 + + +Appendix C. Acknowledgments + + The authors would like to thank Christian Huitema and Ian Swett for + their major design contributions. + + Manasi Deval, Erik Fuller, Toma Gavrichenkov, Jana Iyengar, Subodh + Iyengar, Ladislav Lhotka, Jan Lindblad, Ling Tao Nju, Kazuho Oku, + Udip Pant, Martin Thomson, Dmitri Tikhonov, Victor Vasiliev, and + William Zeng Ke all provided useful input to this document. + +Appendix D. Change Log + + *RFC Editor's Note:* Please remove this section prior to + publication of a final version of this document. + +D.1. since draft-ietf-quic-load-balancers-06 + + * Shrunk size of SID table + +D.2. since draft-ietf-quic-load-balancers-05 + + * Added low-config CID for further discussion + + * Complete revision of shared-state Retry Token + + * Added YANG model + + * Updated configuration limits to ensure CID entropy + + * Switched to notation from quic-transport + +D.3. since draft-ietf-quic-load-balancers-04 + + * Rearranged the shared-state retry token to simplify token + processing + + * More compact timestamp in shared-state retry token + + * Revised server requirements for shared-state retries + + * Eliminated zero padding from the test vectors + + * Added server use bytes to the test vectors + + * Additional compliant DCID criteria + +D.4. since-draft-ietf-quic-load-balancers-03 + + + + +Duke & Banks Expires 19 September 2021 [Page 46] + +Internet-Draft QUIC-LB March 2021 + + + * Improved Config Rotation text + + * Added stream cipher test vectors + + * Deleted the Obfuscated CID algorithm + +D.5. since-draft-ietf-quic-load-balancers-02 + + * Replaced stream cipher algorithm with three-pass version + + * Updated Retry format to encode info for required TPs + + * Added discussion of version invariance + + * Cleaned up text about config rotation + + * Added Reset Oracle and limited configuration considerations + + * Allow dropped long-header packets for known QUIC versions + +D.6. since-draft-ietf-quic-load-balancers-01 + + * Test vectors for load balancer decoding + + * Deleted remnants of in-band protocol + + * Light edit of Retry Services section + + * Discussed load balancer chains + +D.7. since-draft-ietf-quic-load-balancers-00 + + * Removed in-band protocol from the document + +D.8. Since draft-duke-quic-load-balancers-06 + + * Switch to IETF WG draft. + +D.9. Since draft-duke-quic-load-balancers-05 + + * Editorial changes + + * Made load balancer behavior independent of QUIC version + + * Got rid of token in stream cipher encoding, because server might + not have it + + + + + +Duke & Banks Expires 19 September 2021 [Page 47] + +Internet-Draft QUIC-LB March 2021 + + + * Defined "non-compliant DCID" and specified rules for handling + them. + + * Added psuedocode for config schema + +D.10. Since draft-duke-quic-load-balancers-04 + + * Added standard for retry services + +D.11. Since draft-duke-quic-load-balancers-03 + + * Renamed Plaintext CID algorithm as Obfuscated CID + + * Added new Plaintext CID algorithm + + * Updated to allow 20B CIDs + + * Added self-encoding of CID length + +D.12. Since draft-duke-quic-load-balancers-02 + + * Added Config Rotation + + * Added failover mode + + * Tweaks to existing CID algorithms + + * Added Block Cipher CID algorithm + + * Reformatted QUIC-LB packets + +D.13. Since draft-duke-quic-load-balancers-01 + + * Complete rewrite + + * Supports multiple security levels + + * Lightweight messages + +D.14. Since draft-duke-quic-load-balancers-00 + + * Converted to markdown + + * Added variable length connection IDs + +Authors' Addresses + + + + + +Duke & Banks Expires 19 September 2021 [Page 48] + +Internet-Draft QUIC-LB March 2021 + + + Martin Duke + F5 Networks, Inc. + + Email: martin.h.duke@gmail.com + + + Nick Banks + Microsoft + + Email: nibanks@microsoft.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Duke & Banks Expires 19 September 2021 [Page 49] diff --git a/smaller-tables/index.html b/smaller-tables/index.html new file mode 100644 index 0000000..c40a5d1 --- /dev/null +++ b/smaller-tables/index.html @@ -0,0 +1,57 @@ + + + + quicwg/load-balancers smaller-tables preview + + + + +

Editor's drafts for smaller-tables branch of quicwg/load-balancers

+

View saved issues, + or the latest GitHub issues + and pull requests.

+ + + + + + + + +
draft-ietf-quic-load-balancershtmlplain textdiff with master + diff with last submission
+ + +