RE: Clarification of transport and HTTP version compatibility

Mike Bishop <mbishop@evequefou.be> Thu, 10 May 2018 18:55 UTC

Return-Path: <mbishop@evequefou.be>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5C03C12EB87 for <quic@ietfa.amsl.com>; Thu, 10 May 2018 11:55:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=evequefou.onmicrosoft.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Dxt4NCjGopWY for <quic@ietfa.amsl.com>; Thu, 10 May 2018 11:55:52 -0700 (PDT)
Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0091.outbound.protection.outlook.com [104.47.34.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 89BB112EB82 for <quic@ietf.org>; Thu, 10 May 2018 11:55:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=evequefou.onmicrosoft.com; s=selector1-evequefou-be; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=olK2HdVAfOlrxtkhypwezJUhnQBP4WixAo4e/2JkWAc=; b=YoQ2pKLFVQJVL/GoJ4jSHrxolrNtpbcQi6896TsNZ9fWagvA1jK84ENhm2PCM99HcW6tB7IFB1MMWw0qwRaboKBkzwdqBM3eXRvalH8tgYYRxSQjMw34M4DwuVjx+eGbze31Eyc8Z1rtzGpYhhoeMKBQCXTOz0ajRwjCKXpU7us=
Received: from SN1PR08MB1854.namprd08.prod.outlook.com (10.169.39.8) by SN1PR08MB1791.namprd08.prod.outlook.com (10.162.134.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Thu, 10 May 2018 18:55:49 +0000
Received: from SN1PR08MB1854.namprd08.prod.outlook.com ([fe80::3c18:f60d:11c1:143d]) by SN1PR08MB1854.namprd08.prod.outlook.com ([fe80::3c18:f60d:11c1:143d%13]) with mapi id 15.20.0735.021; Thu, 10 May 2018 18:55:49 +0000
From: Mike Bishop <mbishop@evequefou.be>
To: Andrei Popov <Andrei.Popov@microsoft.com>, Lucas Pardue <Lucas.Pardue@bbc.co.uk>, Sam Hurst-RD <samuelh@rd.bbc.co.uk>, IETF QUIC WG <quic@ietf.org>
Subject: RE: Clarification of transport and HTTP version compatibility
Thread-Topic: Clarification of transport and HTTP version compatibility
Thread-Index: AQHT56+xI3vQwOQ++kOo1AZLBRUIXaQno4FAgAANUQCAADE84IAAC+8AgAALO3CAABEmAIABPx9AgAAEFICAAAOa4A==
Date: Thu, 10 May 2018 18:55:48 +0000
Message-ID: <SN1PR08MB1854CBF3794EA23E4B42398FDA980@SN1PR08MB1854.namprd08.prod.outlook.com>
References: <906fdff3-8009-238b-998b-4ea515a2684d@rd.bbc.co.uk>, <SN1PR08MB1854826DACF0454471CB162DDA990@SN1PR08MB1854.namprd08.prod.outlook.com> <7CF7F94CB496BF4FAB1676F375F9666A3BB2B67C@bgb01xud1012>, <SN1PR08MB1854FC73444239C609552459DA990@SN1PR08MB1854.namprd08.prod.outlook.com> <7CF7F94CB496BF4FAB1676F375F9666A3BB2B6A9@bgb01xud1012>, <SN1PR08MB1854232CFA318E21E062BBE3DA990@SN1PR08MB1854.namprd08.prod.outlook.com> <7CF7F94CB496BF4FAB1676F375F9666A3BB2B6BE@bgb01xud1012> <SN1PR08MB18540A5DF3C55D60BB357F46DA980@SN1PR08MB1854.namprd08.prod.outlook.com> <DM5PR21MB05078DE242AB207AFA7BBEC98C980@DM5PR21MB0507.namprd21.prod.outlook.com>
In-Reply-To: <DM5PR21MB05078DE242AB207AFA7BBEC98C980@DM5PR21MB0507.namprd21.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=mbishop@evequefou.be;
x-originating-ip: [2001:4878:8103:102:100::308]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; SN1PR08MB1791; 7:yZDXXHZWF7YHmxKLiM1z5tnnLTMTqPN2SzmkbusU7Y5KfgKIDxWLG0vwHJUq8fPYFD3dElqPgOozXHHL9ys39XQSICm0CQUDr0xOPWJyEHs3OcQZXkcP1GQcuerMyfHNCvaPH/4qs3CNtd/hV0A0Rqqw0QpFLzIfk3higRr9pHcnrGl1yeenEayjEV68Vsokc0FLZ2sU2EKvHrkJrUT0GSLfpXWfCXrpux9uf+63sjIrmV7Hp1Q7/p6oysDwZuKL
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(5600026)(2017052603328)(7153060)(7193020); SRVR:SN1PR08MB1791;
x-ms-traffictypediagnostic: SN1PR08MB1791:
x-microsoft-antispam-prvs: <SN1PR08MB179192049D4067AC0D34228CDA980@SN1PR08MB1791.namprd08.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(28532068793085)(158342451672863)(189930954265078)(219752817060721)(127952516941037);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(20161123558120)(2016111802025)(20161123564045)(20161123562045)(20161123560045)(6072148)(6043046)(201708071742011); SRVR:SN1PR08MB1791; BCL:0; PCL:0; RULEID:; SRVR:SN1PR08MB1791;
x-forefront-prvs: 066898046A
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(366004)(39830400003)(346002)(376002)(39380400002)(13464003)(53754006)(199004)(189003)(316002)(9686003)(46003)(8936002)(6116002)(6306002)(53546011)(59450400001)(53936002)(55016002)(74316002)(305945005)(6246003)(1511001)(68736007)(93886005)(575784001)(81166006)(6506007)(76176011)(486006)(86362001)(102836004)(446003)(7696005)(476003)(5890100001)(11346002)(99286004)(2900100001)(74482002)(5250100002)(186003)(14454004)(45080400002)(33656002)(478600001)(5660300001)(966005)(25786009)(97736004)(229853002)(3660700001)(3280700002)(7736002)(6436002)(8666007)(106356001)(2906002)(110136005)(81156014)(105586002)(8676002); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR08MB1791; H:SN1PR08MB1854.namprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:0; MX:1;
received-spf: None (protection.outlook.com: evequefou.be does not designate permitted sender hosts)
x-microsoft-antispam-message-info: /9JZV9MVGUwR2gh6bPFxECnsU9oDge7gQSQruSUf7zMGiCr9kGBFF3P1uycDXzutXOlmF4wdswRSla6l/VY0qwLsnifU3JRJ7spwfKUyqrvpP/Fj+lcMuayfq5DbVFbMlUDJyIPoc7QK63C7qS6UaGqWZxZimrPudqN53RM/182TBebNDXld/oispiDEWTNe
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: adb47e8b-66f6-4be5-8896-08d5b6a7a531
X-OriginatorOrg: evequefou.be
X-MS-Exchange-CrossTenant-Network-Message-Id: adb47e8b-66f6-4be5-8896-08d5b6a7a531
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2018 18:55:48.7729 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 41eaf50b-882d-47eb-8c4c-0b5b76a9da8f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR08MB1791
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/LwWCtZ7fcO07aEWM2r2sPkNF5HA>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 10 May 2018 18:55:55 -0000

Ah, I see SEC_E_APPLICATION_PROTOCOL_MISMATCH for that.  Good to know.

In that case, we should be able to assume that the requirement to use ALPN is sufficient; if no ALPN token can be agreed on, the TLS handshake will fail and the connection will close.

-----Original Message-----
From: Andrei Popov [mailto:Andrei.Popov@microsoft.com] 
Sent: Thursday, May 10, 2018 11:41 AM
To: Mike Bishop <mbishop@evequefou.be>; Lucas Pardue <Lucas.Pardue@bbc.co.uk>; Sam Hurst-RD <samuelh@rd.bbc.co.uk>; IETF QUIC WG <quic@ietf.org>
Subject: RE: Clarification of transport and HTTP version compatibility

Mike, you have not only seen, but shipped such an implementation in several Windows releases.
😊

The logic behind the RFC is that there is no need to waste cycles and complete the handshake if the client and server disagree on the application protocol.

-----Original Message-----
From: QUIC <quic-bounces@ietf.org> On Behalf Of Mike Bishop
Sent: Thursday, May 10, 2018 11:28 AM
To: Lucas Pardue <Lucas.Pardue@bbc.co.uk>; Sam Hurst-RD <samuelh@rd.bbc.co.uk>; IETF QUIC WG <quic@ietf.org>
Subject: RE: Clarification of transport and HTTP version compatibility

Interesting.  I don't believe I've ever seen an implementation actually do that.  If none of the client's proffered protocols are supported, they pretend not to support ALPN and don't include the extension in the ServerHello.  (Though obviously I haven't attempted to test this much.)

-----Original Message-----
From: Lucas Pardue [mailto:Lucas.Pardue@bbc.co.uk] 
Sent: Wednesday, May 9, 2018 4:24 PM
To: Mike Bishop <mbishop@evequefou.be>; Sam Hurst-RD <samuelh@rd.bbc.co.uk>; IETF QUIC WG <quic@ietf.org>
Subject: RE: Clarification of transport and HTTP version compatibility

Thanks for that explanation Mike, it makes more sense now. 

> It should be implied, but might be worth explicitly stating, that failure to agree on an ALPN is incompatible with all QUIC versions, always fatal.

I don't know if it needs explicit statement. RFC 7301 section 3.2 states that "In the event that the server supports no  protocols that the client advertises, then the server SHALL respond with a fatal "no_application_protocol" alert."

Cheers
Lucas

-----Original Message-----
From: Lucas Pardue [mailto:Lucas.Pardue@bbc.co.uk]
Sent: Wednesday, May 9, 2018 2:43 PM
To: Mike Bishop <mbishop@evequefou.be>; Sam Hurst-RD <samuelh@rd.bbc.co.uk>; IETF QUIC WG <quic@ietf.org>
Subject: RE: Clarification of transport and HTTP version compatibility

I've not terribly familiar with the transport negotiation aspects, so I'm probably missing something sorry.

I guess what is not clear to me is the question, who is responsible for ensuring a sane answer is negotiated? (I suspect no one). It gets more annoying if the client is acting on information provided to it via Alt-Svc, which is quite liberal to from the sender perspective (there are some rules for the client defined in HTTP/QUIC 2.1.1.).

How I read things in the simple case was:

1) Transport version negotiation takes place and client chooses a version. Cryptographic handshake is next.
2) Client intitiates TLS 1.3 handshake with version info for revalidation, plus ALPN list of what it believes are application protocols that are compatible with the chosen version of QUIC.
   a) POSSIBILITY 1 in a pathological case it always sends the same list regardless of version.
3) Server selects an application protocol it believes is compatible with the chosen version of QUIC.
  b) POSSIBILITY 2 naive implementations just assume "hq" works for everything.
4) Client sends something the server is unhappy with and the connection bombs with a protocol error.

Cheers
Lucas
________________________________________
From: Mike Bishop [mbishop@evequefou.be]
Sent: 09 May 2018 22:01
To: Lucas Pardue; Sam Hurst-RD; IETF QUIC WG
Subject: RE: Clarification of transport and HTTP version compatibility

They *shouldn't* be unanticipated protocol errors, because both are negotiated.  I would expect (or at least hope) that these will manifest as negotiation failures at worst.

-----Original Message-----
From: Lucas Pardue [mailto:Lucas.Pardue@bbc.co.uk]
Sent: Wednesday, May 9, 2018 11:04 AM
To: Mike Bishop <mbishop@evequefou.be>; Sam Hurst-RD <samuelh@rd.bbc.co.uk>; IETF QUIC WG <quic@ietf.org>
Subject: RE: Clarification of transport and HTTP version compatibility

I think this all works fine in the current stage of specification.

Longer term, what is the failure case for interoperability where different implementations have  different rules for how to combine QUIC version and HTTP/QUIC version. Protocol error due to reception of unanticipated packets and or HTTP/QUIC frames?

Lucas
________________________________________
From: QUIC [quic-bounces@ietf.org] on behalf of Mike Bishop [mbishop@evequefou.be]
Sent: 09 May 2018 18:18
To: Sam Hurst-RD; IETF QUIC WG
Subject: RE: Clarification of transport and HTTP version compatibility

There's no firm restriction, no.  While I find it likely that draft deployments will choose to keep matching versions, the only restriction that the HTTP draft currently imposes is that it be a version of QUIC which uses TLS as the handshake protocol.

-----Original Message-----
From: QUIC <quic-bounces@ietf.org> On Behalf Of Samuel Hurst
Sent: Wednesday, May 9, 2018 9:05 AM
To: IETF QUIC WG <quic@ietf.org>
Subject: Clarification of transport and HTTP version compatibility

Hi all,

Does the quic-transport version and the HTTP mapping version have to match? For example, could you negotiate QUIC draft-11, but the HTTP side is still using an older version (such as draft-09 to avoid the requirement of QPACK)?

As far as I understand it, the QUIC transport version is negotiated as part of the TransportParams in the appropriate TLS extension, and the HTTP mapping version is negotiated by ALPN. So in the example above, would it be acceptable to negotiate 0xff00000a as the transport protocol version, and then have an ALPN string of "hq-09"?

I'm then assuming that a valid Alt-Svc header for my example could be as
follows:

Alt-Svc: hq-09=":4443";quic="ff00000a"

The quic-tls draft mentions in Section 9.1 "The application-layer protocol MAY restrict the QUIC version that it can operate over", but none of the quic-http drafts that I've read list any such restriction.
Therefore, I'm then further assuming that it's safe to run whatever version of the HTTP mapping I like, unless there's a compatibility matrix between the various specs that I'm missing?

Best Regards,
Sam



-----------------------------
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk&data=02%7C01%7CAndrei.Popov%40microsoft.com%7C4ae9736e39614601660308d5b6a3d4e7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636615737135415287&sdata=%2Fcrt5YmXDN4bvV9yfGkjvnWvYr0LbttsFP3NmhFMtuI%3D&reserved=0
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in
error, please delete it from your system.
Do not use, copy or disclose the
information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
-----------------------------