draft-ietf-tls-ticketrequests-05.txt   draft-ietf-tls-ticketrequests-06.txt 
Network Working Group T. Pauly Network Working Group T. Pauly
Internet-Draft Apple Inc. Internet-Draft Apple Inc.
Intended status: Standards Track D. Schinazi Intended status: Standards Track D. Schinazi
Expires: 26 October 2020 Google LLC Expires: 23 May 2021 Google LLC
C.A. Wood C.A. Wood
Cloudflare Cloudflare
24 April 2020 19 November 2020
TLS Ticket Requests TLS Ticket Requests
draft-ietf-tls-ticketrequests-05 draft-ietf-tls-ticketrequests-06
Abstract Abstract
TLS session tickets enable stateless connection resumption for TLS session tickets enable stateless connection resumption for
clients without server-side, per-client state. Servers vend an clients without server-side, per-client, state. Servers vend an
arbitrary number of session tickets to clients, at their discretion, arbitrary number of session tickets to clients, at their discretion,
upon connection establishment. Clients store and use tickets when upon connection establishment. Clients store and use tickets when
resuming future connections. This document describes a mechanism by resuming future connections. This document describes a mechanism by
which clients can specify the desired number of tickets needed for which clients can specify the desired number of tickets needed for
future connections. This extension aims to provide a means for future connections. This extension aims to provide a means for
servers to determine the number of tickets to generate in order to servers to determine the number of tickets to generate in order to
reduce ticket waste, while simultaneously priming clients for future reduce ticket waste, while simultaneously priming clients for future
connection attempts. connection attempts.
Discussion Venues
This note is to be removed before publishing as an RFC.
Source for this draft and an issue tracker can be found at
https://github.com/tlswg/draft-ietf-tls-ticketrequest.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on 26 October 2020. This Internet-Draft will expire on 23 May 2021.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/ Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
skipping to change at page 2, line 37 skipping to change at page 2, line 42
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8
1. Introduction 1. Introduction
As as described in [RFC8446], TLS servers vend clients an arbitrary As as described in [RFC8446], TLS servers vend clients an arbitrary
number of session tickets at their own discretion in NewSessionTicket number of session tickets at their own discretion in NewSessionTicket
messages. There are at least three limitations with this design. messages. There are at least three limitations with this design.
First, servers vend some (often hard-coded) number of tickets per First, servers vend some (often hard-coded) number of tickets per
connection. Some server implementations return a different default connection. Some server implementations return a different default
number of tickets for session resumption than for the initial full number of tickets for session resumption than for the initial
handshake that created the session. No static choice, whether fixed, connection that created the session. No static choice, whether
or resumption-dependent is ideal for all situations. fixed, or resumption-dependent is ideal for all situations.
Second, clients do not have a way of expressing their desired number Second, clients do not have a way of expressing their desired number
of tickets, which can impact future connection establishment. For of tickets, which can impact future connection establishment. For
example, clients can open multiple TLS connections to the same server example, clients can open parallel TLS connections to the same server
for HTTP, or race TLS connections across different network for HTTP, or race TLS connections across different network
interfaces. The latter is especially useful in transport systems interfaces. The latter is especially useful in transport systems
that implement Happy Eyeballs [RFC8305]. Since clients control that implement Happy Eyeballs [RFC8305]. Since clients control
connection concurrency and resumption, a standard mechanism for connection concurrency and resumption, a standard mechanism for
requesting more than one ticket is desirable. requesting more than one ticket is desirable for avoiding ticket
reuse. See [RFC8446], Appendix C.4 for discussion of ticket reuse
risks.
Third, all tickets in the client's possession ultimately derive from Third, all tickets in the client's possession ultimately derive from
some initial full handshake. Especially when the client was some initial connection. Especially when the client was initially
initially authenticated with a client certificate, that session may authenticated with a client certificate, that session may need to be
need to be refreshed from time to time. Consequently, a server may refreshed from time to time. Consequently, a server may periodically
periodically force a full handshake even when the client presents a force a new connection even when the client presents a valid ticket.
valid ticket. When that happens, it is possible that any other When that happens, it is possible that any other tickets derived from
tickets derived from the same original session are equally invalid. the same original session are equally invalid. A client avoids a
A client avoids a full handshake on subsequent connections if it full handshake on subsequent connections if it replaces all stored
replaces all stored tickets with fresh ones obtained from the just tickets with new ones obtained from the just performed full
performed full handshake. The number of tickets the server should handshake. The number of tickets the server should vend for a new
vend for a full handshake may therefore need to be larger than the connection may therefore need to be larger than the number for
number for routine resumption. routine resumption.
This document specifies a new TLS extension - "ticket_request" - that This document specifies a new TLS extension - "ticket_request" - that
can be used by clients to express their desired number of session clients can use to express their desired number of session tickets.
tickets. Servers can use this extension as a hint of the number of Servers can use this extension as a hint for the number of
NewSessionTicket messages to vend. This extension is only applicable NewSessionTicket messages to vend. This extension is only applicable
to TLS 1.3 [RFC8446], DTLS 1.3 [I-D.ietf-tls-dtls13], and future to TLS 1.3 [RFC8446], DTLS 1.3 [I-D.ietf-tls-dtls13], and future
versions thereof. versions of (D)TLS.
1.1. Requirements Language 1.1. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in "OPTIONAL" in this document are to be interpreted as described in
[RFC2119] [RFC8174] when, and only when, they appear in all capitals, [RFC2119] [RFC8174] when, and only when, they appear in all capitals,
as shown here. as shown here.
2. Use Cases 2. Use Cases
skipping to change at page 4, line 5 skipping to change at page 4, line 12
how connections can race across interfaces and address families. how connections can race across interfaces and address families.
In such cases, clients may use more than one ticket while racing In such cases, clients may use more than one ticket while racing
connection attempts in order to establish one successful connection attempts in order to establish one successful
connection. Having multiple tickets equips clients with enough connection. Having multiple tickets equips clients with enough
tickets to initiate connection racing while avoiding ticket re-use tickets to initiate connection racing while avoiding ticket re-use
and ensuring that their cache of tickets does not empty during and ensuring that their cache of tickets does not empty during
such races. Moreover, as some servers may implement single-use such races. Moreover, as some servers may implement single-use
tickets, distinct tickets prevent premature ticket invalidation by tickets, distinct tickets prevent premature ticket invalidation by
racing. racing.
* Connection priming: In some systems, connections can be primed or
bootstrapped by a centralized service or daemon for faster
connection establishment. Requesting tickets on demand allows
such services to vend tickets to clients to use for accelerated
handshakes with early data. (Note that if early data is not
needed by these connections, this method SHOULD NOT be used.
Fresh handshakes SHOULD be performed instead.)
* Less ticket waste: Currently, TLS servers use application- * Less ticket waste: Currently, TLS servers use application-
specific, and often implementation-specific, logic to determine specific, and often implementation-specific, logic to determine
how many tickets to issue. By moving the burden of ticket count how many tickets to issue. By moving the burden of ticket count
to clients, servers do not generate wasteful tickets. As an to clients, servers do not generate wasteful tickets. As an
example, clients might only request one ticket during resumption. example, clients might only request one ticket during resumption.
Moreover, as ticket generation might involve expensive Moreover, as ticket generation might involve expensive
computation, e.g., public key cryptographic operations, avoiding computation, e.g., public key cryptographic operations, avoiding
waste is desirable. waste is desirable.
* Decline resumption: Clients can indicate they have no intention of * Decline resumption: Clients can indicate they have no intention of
resuming connections by sending a ticket request with count of resuming connections by sending a ticket request with count of
zero. zero.
3. Ticket Requests 3. Ticket Requests
As discussed in Section 1, clients may want different numbers of As discussed in Section 1, clients may want different numbers of
tickets for fresh or resumed handshakes. Clients may indicate to tickets for new or resumed connections. Clients may indicate to
servers their desired number of tickets for a single connection, in servers their desired number of tickets to receive on a single
the case of a full handshake or resumption, via the following connection, in the case of a new or resumed connection, via the
"ticket_request" extension: following "ticket_request" extension:
enum { enum {
ticket_request(TBD), (65535) ticket_request(TBD), (65535)
} ExtensionType; } ExtensionType;
Clients MAY send this extension in ClientHello. It contains the Clients MAY send this extension in ClientHello. It contains the
following structure: following structure:
struct { struct {
uint8 new_session_count; uint8 new_session_count;
uint8 resumption_count; uint8 resumption_count;
} ClientTicketRequest; } ClientTicketRequest;
new_session_count The number of tickets desired by the client when new_session_count The number of tickets desired by the client when
the server chooses to negotiate a fresh session (full handshake). the server chooses to negotiate a new connection.
resumption_count The number of tickets desired by the client when resumption_count The number of tickets desired by the client when
the server is willing to resume using the presented ticket. the server is willing to resume using a ticket presented in this
ClientHello.
A client starting a fresh connection SHOULD set new_session_count to A client starting a new connection SHOULD set new_session_count to
the desired number of session tickets and resumption_count to 0. the desired number of session tickets and resumption_count to 0.
Once a client's ticket cache is primed, a resumption_count of 1 is a Once a client's ticket cache is primed, a resumption_count of 1 is a
good choice that allows the server to replace each ticket with a good choice that allows the server to replace each ticket with a new
fresh ticket, without over-provisioning the client with excess ticket, without over-provisioning the client with excess tickets.
tickets. However, clients which race multiple connections and place However, clients which race multiple connections and place a separate
a separate ticket in each will ultimately end up with just the ticket in each will ultimately end up with just the tickets from a
tickets from a single resumed session. In that case, clients can single resumed session. In that case, clients can send a
send a resumption_count equal to the number of sessions they are resumption_count equal to the number of sessions they are attempting
attempting in parallel. (Clients which send a resumption_count less in parallel. (Clients which send a resumption_count less than the
than the number of parallel connection attempts might end up with number of parallel connection attempts might end up with zero
zero tickets.) tickets.)
When a client presenting a previously obtained ticket finds that the When a client presenting a previously obtained ticket finds that the
server nevertheless negotiates a fresh session, the client SHOULD server nevertheless negotiates a new connection, the client SHOULD
assume that any other tickets associated with the same session as the assume that any other tickets associated with the same session as the
presented ticket are also no longer valid for resumption. This presented ticket are also no longer valid for resumption. This
includes tickets obtained during the initial full handshake and all includes tickets obtained during the initial (new) connection and all
tickets subsequently obtained as part of subsequent resumptions. tickets subsequently obtained as part of subsequent resumptions.
Requesting more than one ticket in cases when servers select a full Requesting more than one ticket in cases when servers complete a new
handshake helps keep the session cache primed. connection helps keep the session cache primed.
Servers SHOULD NOT send more tickets than requested for the handshake Servers SHOULD NOT send more tickets than requested for the
type selected by the server (resumption or full handshake). connection type selected by the server (new or resumed connection).
Moreover, servers SHOULD place a limit on the number of tickets they Moreover, servers SHOULD place a limit on the number of tickets they
are willing to send, whether for full handshakes or resumptions, to are willing to send, whether for new or resumed connections, to save
save resources. Therefore, the number of NewSessionTicket messages resources. Therefore, the number of NewSessionTicket messages sent
sent will typically be the minimum of the server's self-imposed limit will typically be the minimum of the server's self-imposed limit and
and the number requested. Servers MAY send additional tickets, up to the number requested. Servers MAY send additional tickets, typically
the same limit, if the tickets that are originally sent are somehow using the same limit, if the tickets that are originally sent are
invalidated. somehow invalidated.
A server which supports and uses a client "ticket_request" extension A server which supports and uses a client "ticket_request" extension
MUST also send the "ticket_request" extension in the MUST also send the "ticket_request" extension in the
EncryptedExtensions message. It contains the following structure: EncryptedExtensions message. It contains the following structure:
struct { struct {
uint8 expected_count; uint8 expected_count;
} ServerTicketRequestHint; } ServerTicketRequestHint;
expected_count The number of tickets the server expects to send in expected_count The number of tickets the server expects to send in
this connection. this connection.
Servers MUST NOT send the "ticket_request" extension in ServerHello Servers MUST NOT send the "ticket_request" extension in any handshake
or HelloRetryRequest messages. A client MUST abort the connection message, including ServerHello or HelloRetryRequest messages. A
with an "illegal_parameter" alert if the "ticket_request" extension client MUST abort the connection with an "illegal_parameter" alert if
is present in either of these messages. the "ticket_request" extension is present in any server handshake
message.
If a client receives a HelloRetryRequest, the presence (or absence) If a client receives a HelloRetryRequest, the presence (or absence)
of the "ticket_request" extension MUST be maintained in the second of the "ticket_request" extension MUST be maintained in the second
ClientHello message. Moreover, if this extension is present, a ClientHello message. Moreover, if this extension is present, a
client MUST NOT change the value of ClientTicketRequest in the second client MUST NOT change the value of ClientTicketRequest in the second
ClientHello message. ClientHello message.
4. IANA Considerations 4. IANA Considerations
IANA is requested to Create an entry, ticket_request(TBD), in the IANA is requested to create an entry, ticket_request(TBD), in the
existing registry for ExtensionType (defined in [RFC8446]), with "TLS existing registry for ExtensionType (defined in [RFC8446]), with "TLS
1.3" column values being set to "CH, EE", and "Recommended" column 1.3" column values being set to "CH, EE", and "Recommended" column
being set to "Yes". being set to "Y".
5. Performance Considerations 5. Performance Considerations
Servers can send tickets in NewSessionTicket messages any time after Servers can send tickets in NewSessionTicket messages any time after
the server Finished message (see [RFC8446]; Section 4.6.1). A server the server Finished message (see [RFC8446]; Section 4.6.1). A server
which chooses to send a large number of tickets to a client can which chooses to send a large number of tickets to a client can
potentially harm application performance if the tickets are sent potentially harm application performance if the tickets are sent
before application data. For example, if the transport connection before application data. For example, if the transport connection
has a constrained congestion window, ticket messages could delay has a constrained congestion window, ticket messages could delay
sending application data. To avoid this, servers should prioritize sending application data. To avoid this, servers should prioritize
sending application data over tickets when possible. sending application data over tickets when possible.
6. Security Considerations 6. Security Considerations
Ticket re-use is a security and privacy concern. Moreover, clients Ticket re-use is a security and privacy concern. Moreover, clients
must take care when pooling tickets as a means of avoiding or must take care when pooling tickets as a means of avoiding or
amortizing handshake costs. If servers do not rotate session ticket amortizing handshake costs. If servers do not rotate session ticket
encryption keys frequently, clients may be encouraged to obtain and encryption keys frequently, clients may be encouraged to obtain and
use tickets beyond common lifetime windows of, e.g., 24 hours. use tickets beyond common lifetime windows of, e.g., 24 hours.
Despite ticket lifetime hints provided by servers, clients SHOULD Despite ticket lifetime hints provided by servers, clients SHOULD
dispose of pooled tickets after some reasonable amount of time that dispose of cached tickets after some reasonable amount of time that
mimics the ticket rotation period. 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 NewSessionTicket messages In some cases, a server may send NewSessionTicket messages
immediately upon sending the server Finished message rather than immediately upon sending the server Finished message rather than
waiting for the client Finished. If the server has not verified the waiting for the client Finished. If the server has not verified the
client's ownership of its IP address, e.g., with the TLS Cookie client's ownership of its IP address, e.g., with the TLS Cookie
extension (see [RFC8446]; Section 4.2.2), an attacker may take extension (see [RFC8446]; Section 4.2.2), an attacker may take
advantage of this behavior to create an amplification attack advantage of this behavior to create an amplification attack
proportional to the count value toward a target by performing a key proportional to the count value toward a target by performing a
exchange over UDP with spoofed packets. Servers SHOULD limit the (DTLS) key exchange over UDP with spoofed packets. Servers SHOULD
number of NewSessionTicket messages they send until they have limit the number of NewSessionTicket messages they send until they
verified the client's ownership of its IP address. have verified the client's ownership of its IP address.
Servers that do not enforce a limit on the number of NewSessionTicket Servers that do not enforce a limit on the number of NewSessionTicket
messages sent in response to a "ticket_request" extension could leave messages sent in response to a "ticket_request" extension could leave
themselves open to DoS attacks, especially if ticket creation is themselves open to DoS attacks, especially if ticket creation is
expensive. expensive.
7. Acknowledgments 7. Acknowledgments
The authors would like to thank David Benjamin, Eric Rescorla, Nick The authors would like to thank David Benjamin, Eric Rescorla, Nick
Sullivan, Martin Thomson, Hubert Kario, and other members of the TLS Sullivan, Martin Thomson, Hubert Kario, and other members of the TLS
skipping to change at page 7, line 23 skipping to change at page 7, line 26
counts in a ticket request. counts in a ticket request.
8. References 8. References
8.1. Normative References 8.1. Normative References
[I-D.ietf-tls-dtls13] [I-D.ietf-tls-dtls13]
Rescorla, E., Tschofenig, H., and N. Modadugu, "The Rescorla, E., Tschofenig, H., and N. Modadugu, "The
Datagram Transport Layer Security (DTLS) Protocol Version Datagram Transport Layer Security (DTLS) Protocol Version
1.3", Work in Progress, Internet-Draft, draft-ietf-tls- 1.3", Work in Progress, Internet-Draft, draft-ietf-tls-
dtls13-37, 9 March 2020, <http://www.ietf.org/internet- dtls13-39, 2 November 2020, <http://www.ietf.org/internet-
drafts/draft-ietf-tls-dtls13-37.txt>. drafts/draft-ietf-tls-dtls13-39.txt>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
skipping to change at page 7, line 49 skipping to change at page 8, line 8
8.2. Informative References 8.2. Informative References
[RFC8305] Schinazi, D. and T. Pauly, "Happy Eyeballs Version 2: [RFC8305] Schinazi, D. and T. Pauly, "Happy Eyeballs Version 2:
Better Connectivity Using Concurrency", RFC 8305, Better Connectivity Using Concurrency", RFC 8305,
DOI 10.17487/RFC8305, December 2017, DOI 10.17487/RFC8305, December 2017,
<https://www.rfc-editor.org/info/rfc8305>. <https://www.rfc-editor.org/info/rfc8305>.
[TAPS] Brunstrom, A., Pauly, T., Enghardt, T., Grinnemo, K., [TAPS] Brunstrom, A., Pauly, T., Enghardt, T., Grinnemo, K.,
Jones, T., Tiesel, P., Perkins, C., and M. Welzl, Jones, T., Tiesel, P., Perkins, C., and M. Welzl,
"Implementing Interfaces to Transport Services", Work in "Implementing Interfaces to Transport Services", Work in
Progress, Internet-Draft, draft-ietf-taps-impl-06, 9 March Progress, Internet-Draft, draft-ietf-taps-impl-08, 2
2020, <http://www.ietf.org/internet-drafts/draft-ietf- November 2020, <http://www.ietf.org/internet-drafts/draft-
taps-impl-06.txt>. ietf-taps-impl-08.txt>.
Authors' Addresses Authors' Addresses
Tommy Pauly Tommy Pauly
Apple Inc. Apple Inc.
One Apple Park Way One Apple Park Way
Cupertino, California 95014, Cupertino, California 95014,
United States of America United States of America
Email: tpauly@apple.com Email: tpauly@apple.com
 End of changes. 30 change blocks. 
77 lines changed or deleted 82 lines changed or added

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