Open marten-seemann opened 2 years ago
Meeting:
It might be helpful to have an example of what this would be useful for.
I already listed the HTTP Transport Authentication draft before. I'm happy to expand on my use case: In libp2p, a general-purpose p2p networking library, we're planning to use WebTransport to allow browsers to connect to the rest of the network. Specifically, we'll use the serverCertificateHashes
API to be able to use self-signed certificates. We run a secondary handshake on one stream after to make sure the connection wasn't MITMed (as the address exchange, which includes the server's certificate hash, is not necessarily authenticated).
Is there any API precedent for this in the web platform we could follow?
Not that I'm aware of. However, in WebRTC the same can be achieved using the tuple of the certificate hashes from both SDPs.
What JS API surface do you have in mind?
I don't have a lot of experience designing browser APIs, but these two options would work:
@martinthomson any concerns with exposing keying material like this?
That's what exporters are for, so, not in that respect.
This seems like a reasonable API request to me, and would be fairly simple:
.exportKeyMaterial(label, context, len)
However, I worry about a label being reused. So, you go get key material and use it, but another tab (when using WebTransport pooling) uses the same label and learns your key material. Or some built-in browser thing in the future uses a label and then you learn key material by using the same label.
Perhaps we could fix this with a rule like "you can't reuse the same label more than once for the same WebTransport".
With pooling, we might need to add something extra (based on the session ID probably) to the exporter label or context so that different sessions get different keys.
I would also look to webcrypto for the API. It might be that we only need to export a single, fixed value, which can then be used as input to webcrypto functions.
Meeting:
Note: I've filed ietf-wg-webtrans/draft-ietf-webtrans-http3#116 to possibly describe the actual operation in the IETF spec.
To follow.
Any progress on it?
I think that you have seen the jabber.ru MITM and Channel Binding is the solution:
Little details, to know easily:
Thanks in advance.
@vasilvv it appears https://github.com/ietf-wg-webtrans/draft-ietf-webtrans-http3/issues/116#issuecomment-1767275566 was closed "due to lack of interest". What are next steps here?
It's either (1) we find developers who can provide an explanation of how they're going to use this feature, or (2) we close this issue for the same reason.
Hi, apologies for the delay. I'm taking over the work @marten-seemann mentioned for libp2p. We'd like to have this feature. The requirement is the same as Marten has shared before.
In libp2p, we identify nodes by their peer ID which is hash(public key). Currently, we use WebTransport with the serverCertificateHashes
API. The client obtains the peer's peer ID and its WebTransport address (including the certificate hash). After establishing the WebTransport session, we run a Noise handshake on a WebTransport stream, which verifies that the peer does actually have the private key corresponding to its peer ID. In order to make sure the connection wasn't MITM-ed, the WebTransport certificate hash is hashed into the Noise handshake, which cryptographically ties the Noise handshake to the underlying WebTransport session.
We would like to extend our use of WebTransport to use the web PKI. Here, being able to derive a unique value would allow us to bind the TLS session to the Noise handshake, similar to how we use cert hashes above.
I would also definitely like to see this. There's some use cases I've wanted to be able to do on the web platform for some time, but the lack of this functionality still holds things back.
Meeting:
See this PR https://github.com/ietf-wg-webtrans/draft-ietf-webtrans-http3/pull/148 from Victor
https://github.com/ietf-wg-webtrans/draft-ietf-webtrans-http3/pull/148 was merged. How should W3C API surface change?
Meeting:
Meeting:
wt.exportedKey
or a exportKey() method?I don't think we can make this an attribute given that generating an exporter needs three arguments.
I'd also prefer making this async, since it makes it much easier to implement (it's possible to implement this synchronously, but it requires some cooperation from the TLS library, and has some unfortunate security implications).
Meeting:
Note comments in https://github.com/ietf-wg-webtrans/draft-ietf-webtrans-http3/issues/170#issue-2465995393
I would strongly suggest not to expose TLS exporters in client API as it will lead to inconsistent user experience depending on presence of a TLS proxy. These issues will be quite hard to troubleshoot for application developers as TLS proxies are typically deployed on client side.
Three things to note here before I forget:
serverCertificateHashes
)const km = await wt.exportKeyMaterial(label, context)
Meeting:
Covered by SESSION ID in https://github.com/ietf-wg-webtrans/draft-ietf-webtrans-http3/issues/116
It would be useful to expose a TLS Key Exporter (RFC 5707), or at least a value that's derived from the TLS master secret, and therefore unique to the TLS session.
This is a useful building block for protocols running on top of TLS: