Internet-Draft Advertising WebSocket support in the HTT October 2021
Damjanovic Expires 22 April 2022 [Page]
Workgroup:
HTTP
Internet-Draft:
draft-damjanovic-websockets-https-rr-00
Published:
Intended Status:
Informational
Expires:
Author:
D. Damjanovic
Mozilla

Advertising WebSocket support in the HTTPS resource record

Abstract

This specification introduces a way to advertise the support for the extended CONNECT feature that is used for running the WebSocket protocol over a single stream of an HTTP/2 and HTTP/3 connection using HTTPS resource records [HTTPSRR].

Note to Readers

RFC EDITOR: please remove this section before publication

Discussion of this draft takes place on the HTTP working group mailing list (ietf-http-wg@w3.org), which is archived at https://lists.w3.org/Archives/Public/ietf-http-wg/.

The source code and issues list for this draft can be found at https://github.com/ddragana/drafts.

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 22 April 2022.

Table of Contents

1. Introduction

The mechanisms for running the WebSocket protocol over a single stream of an HTTP/2 and HTTP/3 connection are defined in [RFC8441] and [WSHTTP3]. For bootstrapping WebSockets from HTTP/2 and HTTP/3 extended CONNECT is used. Support for the extended CONNECT is advertised using HTTP/2 and HTTP/3 settings (see [RFC7540] and [HTTP3]). Therefore, clients need to establish a HTTP/2 or HTTP/3 connection and wait for the setting frames to be exchanged to discover whether the connection can be used for the WebSocket requests. This specification adds a way to advertise the support for the extended CONNECT using HTTPS resource record [HTTPSRR] which will eliminate the need for a HTTP/2 or HTTP/3 connection and introduce delays. The clients can skip trying a HTTP/2 or HTTP/3 connection if the support for the extended CONNECT is not advertised.

2. Conventions and Definitions

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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

3. Extending HTTPS DNS resource record

This specification introduces the "extended-connect" SvcParamKey (see [HTTPSRR]) that indicates that a particular service endpoint supports the extended CONNECT feature defined in [RFC8441] and [WSHTTP3]. The presentation and wire format values for the "extended-connect" SvcParamKey MUST be empty. If the "extended-connect" key is present, "alpn" MUST also be specified with at least the h2 or h3 value.

4. The Client Behavior

Upon receiving a HTTPS RR, a client should use the "extended-connect" SvcParamKey as an indication whether a particular service endpoint supports the extended CONNECT feature. If the key is not present the client should not try using QUIC or TCP with the alpn set to h2 for requests that need the feature, e.g. WebSocket, and should directly use HTTP/1.1.

If the key is present, that is a strong indication that the service endpoint supports the feature and the client should attempt using HTTP/2 or HTTP/3 protocol. Due to difficulties of deployments the client may discover that the feature, although advertised, is not supported and in this case the client should fallback to using HTTP/1.1.

5. Security Considerations

This specification only adds a hint of whether a feature is supported or not and therefore, it does not introduce additional security considerations beyond one described in [RFC8441] and [WSHTTP3].

6. IANA Considerations

This specification adds the following entry to the Service Parameter Keys (SvcParamKeys) registry:

Table 1
Number Name Meaning Format Reference
7 extended-connect Support of the extended CONNECT feature (This document) Section 3

7. Normative References

[HTTP3]
Bishop, M., "Hypertext Transfer Protocol Version 3 (HTTP/3)", Work in Progress, Internet-Draft, draft-ietf-quic-http-34, , <https://www.ietf.org/archive/id/draft-ietf-quic-http-34.txt>.
[HTTPSRR]
Schwartz, B., Bishop, M., and E. Nygren, "Service binding and parameter specification via the DNS (DNS SVCB and HTTPS RRs)", Work in Progress, Internet-Draft, draft-ietf-dnsop-svcb-https-08, , <https://www.ietf.org/archive/id/draft-ietf-dnsop-svcb-https-08.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>.
[RFC7540]
Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext Transfer Protocol Version 2 (HTTP/2)", RFC 7540, DOI 10.17487/RFC7540, , <https://www.rfc-editor.org/info/rfc7540>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[RFC8441]
McManus, P., "Bootstrapping WebSockets with HTTP/2", RFC 8441, DOI 10.17487/RFC8441, , <https://www.rfc-editor.org/info/rfc8441>.
[WSHTTP3]
Hamilton, R., "Bootstrapping WebSockets with HTTP/3", Work in Progress, Internet-Draft, draft-ietf-httpbis-h3-websockets-00, , <https://www.ietf.org/archive/id/draft-ietf-httpbis-h3-websockets-00.txt>.

Acknowledgments

Author's Address

Dragana Damjanovic
Mozilla