RFC 9149: TLS Ticket Requests
- T. Pauly,
- D. Schinazi,
- C.A. Wood
Abstract
TLS session tickets enable stateless connection resumption for clients without server-side, per-client state. Servers vend an arbitrary number of session tickets to clients, at their discretion, upon connection establishment. Clients store and use tickets when resuming future connections. This document describes a mechanism by which clients can specify the desired number of tickets needed for future connections. This extension aims to provide a means for servers to determine the number of tickets to generate in order to reduce ticket waste while simultaneously priming clients for future connection attempts.¶
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2022 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://
1. Introduction
As described in [RFC8446], TLS servers
vend clients an arbitrary number of session tickets at their own discretion
in New
First, servers vend some (often hard-coded) number of tickets per connection. Some server implementations return a different default number of tickets for session resumption than for the initial connection that created the session. No static choice, whether fixed or dependent upon resumption, is ideal for all situations.¶
Second, clients do not have a way of expressing their desired number of tickets, which can impact future connection establishment. For example, clients can open parallel TLS connections to the same server for HTTP, or they can race TLS connections across different network interfaces. The latter is especially useful in transport systems that implement Happy Eyeballs [RFC8305]. Since clients control connection concurrency and resumption, a standard mechanism for requesting more than one ticket is desirable for avoiding ticket reuse. See Appendix C.4 of [RFC8446] for discussion of ticket reuse risks.¶
Third, all tickets in the client's possession ultimately derive from some initial connection. Especially when the client was initially authenticated with a client certificate, that session may need to be refreshed from time to time. Consequently, a server may periodically force a new connection even when the client presents a valid ticket. When that happens, it is possible that any other tickets derived from the same original session are equally invalid. A client avoids a full handshake on subsequent connections if it replaces all stored tickets with new ones obtained from the just-performed full handshake. The number of tickets the server should vend for a new connection may therefore need to be larger than the number for routine resumption.¶
This document specifies a new TLS extension, "ticket
1.1. Requirements Language
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.¶
2. Use Cases
The ability to request one or more tickets is useful for a variety of purposes:¶
- Parallel HTTP connections:
- To improve performance, a client may open parallel connections. To avoid ticket reuse, the client may use distinct tickets on each connection. Clients must therefore bound the number of parallel connections they initiate by the number of tickets in their possession or risk ticket reuse.¶
- Connection racing:
- Happy Eyeballs V2 [RFC8305] describes techniques for performing connection racing. The Transport Services Implementation document [TAPS] also describes how connections can race across interfaces and address families. In such cases, clients may use more than one ticket while racing connection attempts in order to establish one successful connection. Having multiple tickets equips clients with enough tickets to initiate connection racing while avoiding ticket reuse and ensuring that their cache of tickets does not empty during such races. Moreover, as some servers may implement single-use tickets, distinct tickets prevent premature ticket invalidation by racing.¶
- Less ticket waste:
- Currently, TLS servers use application
-specific, and often implementation -specific, logic to determine how many tickets to issue. By moving the burden of ticket count to clients, servers do not generate wasteful tickets. As an example, clients might only request one ticket during resumption. Moreover, as ticket generation might involve expensive computation, e.g., public key cryptographic operations, avoiding waste is desirable.¶ - Decline resumption:
- Clients can indicate they do not intend to resume a connection by sending a ticket request with count of zero.¶
3. Ticket Requests
As discussed in Section 1, clients may want different numbers of
tickets for new or resumed connections. Clients may indicate to
servers their desired number of tickets to receive on a single
connection, in the case of a new or resumed connection, via the
following "ticket
Clients MAY send this extension in ClientHello. It contains the following structure:¶
- new
_session _count : - The number of tickets desired by the client if the server chooses to negotiate a new connection.¶
- resumption
_count : - The number of tickets desired by the client if the server is willing to resume using a ticket presented in this ClientHello.¶
A client starting a new connection SHOULD set new
When a client presenting a previously obtained ticket finds that the server nevertheless negotiates a new connection, the client SHOULD assume that any other tickets associated with the same session as the presented ticket are also no longer valid for resumption. This includes tickets obtained during the initial (new) connection and all tickets subsequently obtained as part of subsequent resumptions. Requesting more than one ticket when servers complete a new connection helps keep the session cache primed.¶
Servers SHOULD NOT send more tickets than requested for the
connection type selected by the server (new or resumed connection).
Moreover, servers SHOULD place a limit on the number of tickets they
are willing to send, whether for new or resumed connections, to save
resources. Therefore, the number of New
A server that supports and uses a client "ticket
- expected_count:
- The number of tickets the server expects to send in this connection.¶
Servers MUST NOT send the "ticket
If a client receives a Hello
4. IANA Considerations
IANA has added the following entry to the "TLS ExtensionType Values" registry [RFC8446] [RFC8447]:¶
5. Performance Considerations
Servers can send tickets in New
6. Security Considerations
Ticket reuse is a security and privacy concern. Moreover, clients must take care when pooling tickets as a means of avoiding or amortizing handshake costs. If servers do not rotate session ticket encryption keys frequently, clients may be encouraged to obtain and use tickets beyond common lifetime windows of, e.g., 24 hours. Despite ticket lifetime hints provided by servers, clients SHOULD dispose of cached tickets after some reasonable amount of time that mimics the session ticket encryption key rotation period. Specifically, as specified in Section 4.6.1 of [RFC8446], clients MUST NOT cache tickets for longer than 7 days.¶
In some cases, a server may send New
Servers that do not enforce a limit on the number of New
7. References
7.1. Normative References
- [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC8446]
-
Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10
.17487 , , <https:///RFC8446 www >..rfc -editor .org /info /rfc8446 - [RFC8447]
-
Salowey, J. and S. Turner, "IANA Registry Updates for TLS and DTLS", RFC 8447, DOI 10
.17487 , , <https:///RFC8447 www >..rfc -editor .org /info /rfc8447 - [RFC9147]
-
Rescorla, E., Tschofenig, H., and N. Modadugu, "The Datagram Transport Layer Security (DTLS) Protocol Version 1.3", RFC 9147, DOI 10
.17487 , , <https:///RFC9147 www >..rfc -editor .org /info /rfc9147
7.2. Informative References
- [RFC8305]
-
Schinazi, D. and T. Pauly, "Happy Eyeballs Version 2: Better Connectivity Using Concurrency", RFC 8305, DOI 10
.17487 , , <https:///RFC8305 www >..rfc -editor .org /info /rfc8305 - [TAPS]
-
Brunstrom, A., Ed., Pauly, T., Ed., Enghardt, T., Tiesel, P., and M. Welzl, "Implementing Interfaces to Transport Services", Work in Progress, Internet-Draft, draft
-ietf , , <https://-taps -impl -12 datatracker >..ietf .org /doc /html /draft -ietf -taps -impl -12
Acknowledgements
The authors would like to thank David Benjamin, Eric Rescorla, Nick Sullivan, Martin Thomson, Hubert Kario, and other members of the TLS Working Group for discussions on earlier draft versions of this document. Viktor Dukhovni contributed text allowing clients to send multiple counts in a ticket request.¶