Subject: Re: [TLS] WGLC for draft-ietf-tls-cross-sni-resumption

From: "Martin Thomson" <[email-masked]>
Date: Tue, 10 Aug 2021 12:38:21 +1000

This document is mostly fine.

The text on use of client certificates isn't particularly clear.  The key piece of information that a reader is going to need is that a resumed connection will include any (and potentially all) client authentication.

I found the meat of the flag definition hard to follow.  There is a lot of 2119 language, but very little of it relates to the operation of this extension.  Some is just restatement of RFC 8446, which comes with real risks and should be avoided.  I think that what this needs to say is:

1. What the protocol mechanism is: (a flag in NST)
2. What sending that signal means.  For example, "The flag is an assertion from the server that all servers that answer to the names in the certificate are able to use this ticket."
3. What the client might do with that.  For example, "If a client would accept the certificate for a new connection, it can/MAY attempt resumption even if the server name differs from the server name of the original connection." <- that might be the only 2119 language you need in the entire document, though I'm not sure you even need that.

Then talk about consequences (this is currently in Security Considerations and is mostly good, though not all of this belongs in a section with that title):

1. What if the server is wrong in its assertion.   For example, "A server that wrongly advertises this flag could cause clients to waste tickets on connection attempts where resumption will not be successful."
2. Why the server might choose not to do this: need to coordinate across a deployment, it could be wrong, certificate bloat, key compromise scope, etc... (the existing text on this is fine)
3. What the client needs to consider before exercising this option (tracking -> partitioning, client authn)

On Sat, Jul 17, 2021, at 09:55, Christopher Wood wrote:
> This is the working group last call for the "Transport Layer Security 
> (TLS) Resumption across Server Names" draft, available here:
> 
>     https://datatracker.ietf.org/doc/draft-ietf-tls-cross-sni-resumption/
> 
> Please review this document and send your comments to the list by July 
> 30, 2021. The GitHub repository for this draft is available here:
> 
>     https://github.com/vasilvv/tls-cross-sni-resumption
> 
> Thanks,
> Chris, on behalf of the chairs
> 
> _______________________________________________
> TLS mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/tls
>

---

From: Carrick Bartle <[email-masked]>
Date: Wed, 11 Aug 2021 13:58:54 -0700

>  Notably, it still relies on the server certificate being re-validated against the new SNI at the
>  session resumption time.

Where is this specified? I can't find it in RFC 8446. (Sorry if I missed it.)

>  However, in the absence of additional signals, it discourages using a session ticket when the SNI value > does not match ([RFC8446], Section 4.6.1), as there is normally no reason to assume that all servers
> sharing the same certificate would also share the same session keys.

It'd be helpful to describe under what circumstances there is reason to assume that servers that share the same certificate also share the same session keys (and are able to take advantage of cross-SNI resumption).

> On Jul 30, 2021, at 6:57 PM, Christopher Wood <[email-masked]> wrote:
> 
> Given the few responses received thus far, we're going to extend this WGLC for another two weeks. It will now conclude on August 13.
> 
> Best,
> Chris, for the chairs
> 
> On Fri, Jul 16, 2021, at 4:55 PM, Christopher Wood wrote:

---

From: David Benjamin <[email-masked]>
Date: Wed, 11 Aug 2021 17:13:54 -0400

> Where is this specified? I can't find it in RFC 8446. (Sorry if I missed

Does RFC 8446 actually say this? I haven't looked carefully, but I suspect,
if it says anything useful, it's implicit in how resumption works:

- If the client offers a PSK, it must be okay with the server
authenticating as that PSK for this connection
- Ticket-based PSKs carry over the server certificate from the previous
connection
- Therefore, in order to offer a ticket in a connection, the client must be
okay with that previous server certificate in the context of that
connection. Server name, trust anchors, and all.

This is another one of those cases where cross-SNI resumption is just a
more obvious example of a general principle that needs to be written down
somewhere in TLS proper. (Even with the same SNI, suppose two different
parts of my application use different trust stores. My session resumption
decisions must be consistent with that.)

> >  However, in the absence of additional signals, it discourages using a
> session ticket when the SNI value > does not match ([RFC8446], Section
> 4.6.1), as there is normally no reason to assume that all servers
> It'd be helpful to describe under what circumstances there is reason to
> assume that servers that share the same certificate also share the same
> session keys (and are able to take advantage of cross-SNI resumption).
>
>
> > Given the few responses received thus far, we're going to extend this
> WGLC for another two weeks. It will now conclude on August 13.
> >
> > Best,
> > Chris, for the chairs
> >

---

From: Carrick Bartle <[email-masked]>
Date: Wed, 11 Aug 2021 14:49:21 -0700

> - Ticket-based PSKs carry over the server certificate from the previous connection

What does "carry over" mean here? That the client literally holds on to the certificate and re-evaluates it before resumption? Or just that the trust from evaluating the certificate during the initial handshake also applies to the PSK? Because, AFAICT, the literal ticket isn't required to contain the server certificate.

> On Aug 11, 2021, at 2:13 PM, David Benjamin <[email-masked]> wrote:
> 
> On Wed, Aug 11, 2021 at 5:00 PM Carrick Bartle <cbartle891=[email-masked] <mailto:[email-masked]>> wrote:
> Does RFC 8446 actually say this? I haven't looked carefully, but I suspect, if it says anything useful, it's implicit in how resumption works:
> 
> - If the client offers a PSK, it must be okay with the server authenticating as that PSK for this connection
> - Ticket-based PSKs carry over the server certificate from the previous connection
> - Therefore, in order to offer a ticket in a connection, the client must be okay with that previous server certificate in the context of that connection. Server name, trust anchors, and all.
> 
> This is another one of those cases where cross-SNI resumption is just a more obvious example of a general principle that needs to be written down somewhere in TLS proper. (Even with the same SNI, suppose two different parts of my application use different trust stores. My session resumption decisions must be consistent with that.)
>  
> > On Jul 30, 2021, at 6:57 PM, Christopher Wood <[email-masked] <mailto:[email-masked]>> wrote:
> > 
> >>    https://datatracker.ietf.org/doc/draft-ietf-tls-cross-sni-resumption/ <https://datatracker.ietf.org/doc/draft-ietf-tls-cross-sni-resumption/>
> >> 
> >>    https://github.com/vasilvv/tls-cross-sni-resumption <https://github.com/vasilvv/tls-cross-sni-resumption>
> >> 
> >> Thanks,
> >> [email-masked] <mailto:[email-masked]>
> >> https://www.ietf.org/mailman/listinfo/tls <https://www.ietf.org/mailman/listinfo/tls>
> >> 
> > 
> > [email-masked] <mailto:[email-masked]>
> > https://www.ietf.org/mailman/listinfo/tls <https://www.ietf.org/mailman/listinfo/tls>
> 
> [email-masked] <mailto:[email-masked]>
> https://www.ietf.org/mailman/listinfo/tls <https://www.ietf.org/mailman/listinfo/tls>

---

From: David Benjamin <[email-masked]>
Date: Wed, 11 Aug 2021 18:25:24 -0400

On Wed, Aug 11, 2021 at 5:49 PM Carrick Bartle <[email-masked]>
wrote:

> What does "carry over" mean here? That the client literally holds on to
> the certificate and re-evaluates it before resumption? Or just that the
> trust from evaluating the certificate during the initial handshake also
> applies to the PSK? Because, AFAICT, the literal ticket isn't required to
> contain the server certificate.
>

I meant the latter. Though every TLS stack I've seen does actually retain
the peer certificate. It's not in the literal ticket (that wouldn't work
since it's issued by the server), but in the session state the client
stores alongside the ticket, just like the PSK and other state. This is
because TLS APIs typically have some kind of function to get the peer
certificate, and applications typically expect that function to work
consistently for all connections. That stuff is mostly not in the RFCs
because it's local state and TLS doesn't define an API.

Anyway, as with any other use of resumption, in order to offer a ticket,
you need to have retained enough information locally to know that the trust
from the initial handshake is also good for this connection. This could be
remembering application context (perhaps by way of separate session
caches). This could be remembering the whole certificate. This could be
remembering smaller amounts of information from the certificate. The exact
details here I don't think TLS should specify, only the conditions on when
using a session is okay.

David

> Does RFC 8446 actually say this? I haven't looked carefully, but I
> suspect, if it says anything useful, it's implicit in how resumption works:
>
> - Therefore, in order to offer a ticket in a connection, the client must
> be okay with that previous server certificate in the context of that

---

From: Carrick Bartle <[email-masked]>
Date: Wed, 11 Aug 2021 15:50:54 -0700

Okay, in that case, I wouldn't use the word "re-validated," since to me that sounds like the certificate is to be completely validated again (e.g. checking expiration). Instead I would say something like "attempt resumption only if the certificate is valid for the new SNI," ideally with a reference to the current best practice of how to do that.

> On Aug 11, 2021, at 3:25 PM, David Benjamin <[email-masked]> wrote:
> 
> On Wed, Aug 11, 2021 at 5:49 PM Carrick Bartle <[email-masked] <mailto:[email-masked]>> wrote:
> I meant the latter. Though every TLS stack I've seen does actually retain the peer certificate. It's not in the literal ticket (that wouldn't work since it's issued by the server), but in the session state the client stores alongside the ticket, just like the PSK and other state. This is because TLS APIs typically have some kind of function to get the peer certificate, and applications typically expect that function to work consistently for all connections. That stuff is mostly not in the RFCs because it's local state and TLS doesn't define an API.
> 
> Anyway, as with any other use of resumption, in order to offer a ticket, you need to have retained enough information locally to know that the trust from the initial handshake is also good for this connection. This could be remembering application context (perhaps by way of separate session caches). This could be remembering the whole certificate. This could be remembering smaller amounts of information from the certificate. The exact details here I don't think TLS should specify, only the conditions on when using a session is okay.
> 
> David
>  
>> On Aug 11, 2021, at 2:13 PM, David Benjamin <[email-masked] <mailto:[email-masked]>> wrote:
>>

---

From: Eric Rescorla <[email-masked]>
Date: Fri, 13 Aug 2021 12:30:45 -0700

This document seems generally fine. I agree with MT that the security
considerations could be beefed up.

On Wed, Aug 11, 2021 at 3:53 PM Carrick Bartle <cbartle891=
[email-masked]> wrote:

> Okay, in that case, I wouldn't use the word "re-validated," since to me
> that sounds like the certificate is to be completely validated again (e.g.
> checking expiration). Instead I would say something like "attempt
> resumption only if the certificate is valid for the new SNI," ideally with
> a reference to the current best practice of how to do that.
>
>
>

---

From: Carrick Bartle <[email-masked]>
Date: Fri, 13 Aug 2021 16:48:32 -0700

I've submitted a PR that addresses this issue: https://github.com/vasilvv/tls-cross-sni-resumption/pull/3 <https://github.com/vasilvv/tls-cross-sni-resumption/pull/3>

In general though, I support publication of this draft.

> On Aug 11, 2021, at 3:50 PM, Carrick Bartle <cbartle891=[email-masked]> wrote:
> 
>> On Aug 11, 2021, at 3:25 PM, David Benjamin <[email-masked] <mailto:[email-masked]>> wrote:
>>

---

From: "Christopher Wood" <[email-masked]>
Date: Fri, 20 Aug 2021 13:24:10 -0700

This WGLC is now complete. Thanks to everyone who chimed in. Based on past discussions and this WGLC, the chairs believe there is consensus to move this document forward after some clarifying changes, especially around security considerations. We will work with the author to make these changes and then request publication alongside draft-ietf-tls-flags.

Best,
Chris, for the chairs

On Fri, Aug 13, 2021, at 4:48 PM, Carrick Bartle wrote:
> I've submitted a PR that addresses this issue: 
> https://github.com/vasilvv/tls-cross-sni-resumption/pull/3
> 
> >> On Wed, Aug 11, 2021 at 5:49 PM Carrick Bartle <[email-masked]> wrote:
> >>>> On Wed, Aug 11, 2021 at 5:00 PM Carrick Bartle <cbartle891=[email-masked]> wrote: