Doing it at the HTTP layer (as an authentication mechanism) is challenging, 
since applications aren’t expecting to receive it that way, and moves the 
authenticated exchange onto a different stream than triggered it.  I know that 
there’s the possibility for a layer to fake the client going away while 
actually sending a 401, but then you have to be able to tie the client’s second 
attempt back to the challenge, don’t you?

When I say “application,” I mean the code being hosted by the web server that’s 
actually responding to the interpreted requests.  While I’d like to minimize 
code changes in the HTTP server, my primary constraint is that I don’t change 
the application they’re hosting at all.  The change to HTTP/2 and/or TLS 1.3 
should be as transparent as possible.  Keeping auth that’s currently done via 
TLS still in TLS helps to reduce those changes at higher layers.

In the HttpBis working group meeting, there was fairly strong consensus that we 
needed a backward-compatibility mechanism for existing apps moving to HTTP/2 
over TLS 1.[23]; there was also interest in defining something cleaner in the 
future for new apps that could adopt something brand new, but not at the 
expense of quickly enabling current apps to keep working.  The draft below is 
the current candidate for least-ugly compat solution.  Doing it at the framing 
layer is definitely a good option for the something cleaner.

From: David Benjamin [mailto:david...@chromium.org]
Sent: Thursday, November 12, 2015 12:43 PM
To: Yoav Nir <ynir.i...@gmail.com>; Adam Langley <a...@imperialviolet.org>
Cc: Mike Bishop <michael.bis...@microsoft.com>; tls@ietf.org
Subject: Re: [TLS] Application data during renegotiation handshake

On Wed, Nov 11, 2015 at 10:43 PM Yoav Nir 
<ynir.i...@gmail.com<mailto:ynir.i...@gmail.com>> wrote:

> On 12 Nov 2015, at 3:32 AM, Adam Langley 
> <a...@imperialviolet.org<mailto:a...@imperialviolet.org>> wrote:
>
> The TLS 1.3 post-handshake client-auth was intended, as I recall, to
> support HTTP/1.1 over TLS 1.3.

No, it was (and is) presented as a way to do client certificate authentication 
with HTTP/2 not at the initial handshake.

> With HTTP/2 isn't it cleaner to do client-auth at the HTTP layer (i.e.
> by signing exporter values)?

It is. I thought that an HTTP authentication method based on certificates could 
be a drop-in replacement for TLS layer authentication, but someone (I think it 
was Mike) pointed out that with TLS-layer certificate authentication the stream 
continues after the authentication, while with HTTP-layer authentication, the 
stream ends with a 401 status code, and the client has to start a new stream 
with the Authorization header. So applications would need to be changed for 
this to work.

Using existing HTTP semantics would certainly be cleaner in a vacuum, but one 
could still do it in HTTP/2 layer without creating a new stream. Perhaps adapt 
SPDY's CREDENTIAL frame and add a new SWITCH_CREDENTIAL frame to swap a 
stream's credential slot mid-stream?

Alternatively, HTTP/2 frontend could make the application think there were two 
independent requests. Am I misunderstanding the objection? What about this:
1. Client hits HTTP/2 frontend. Frontend talks to application which decides it 
needs client auth, expecting it on the same stream.
2. Frontend immediately aborts that request and returns a 401 to the client. 
Application thinks the client just gave up.
3. Client makes a new stream, now authenticated. The frontend hits the 
application fresh. Application requests client auth as before and frontend 
responds immediately with the certificate the client asserted.
This is, by the way, how Chrome implements client auth today, even with renego. 
We never reconfigure client auth mid-stream.

I think it would be helpful to have examples of exactly what the applications 
look like, to know what constraints the various interested parties are working 
with.

For example, Apache httpd has some high-level configuration file.
https://httpd.apache.org/docs/2.2/ssl/ssl_howto.html#arbitraryclients
Existing Apache installs can easily compatibility regardless of how the 
HTTP/TLS interaction looks.

On the other extreme, if the goal is to keep Apache httpd unchanged while only 
changing OpenSSL, then we have a very different picture because the OpenSSL API 
is SSL_renegotiate/SSL_do_handshake (send a HelloRequest) + 
SSL_set_state/SSL_do_handshake (don't continue until renego completes). That 
one is quite overfit to the old flow and will be difficult to reconcile with 
almost anything.

draft-thomson-http2-client-certs-00's HTTP/2 mode seems to be targeting 
something in between. It's okay with adding a new application_context_id, but 
the client certificate still needs to be asserted at the transport. I'm having 
a hard time divining the constraints from this.

David
_______________________________________________
TLS mailing list
TLS@ietf.org
https://www.ietf.org/mailman/listinfo/tls

Reply via email to