3 ms·
The way I'd build this, if I had to, is to a) terminate TLS at the proxy, b) use some an interior protocol (possibly TLS) between the client and the sensor, wit
by cryptonector 7y ago
The way I'd build this, if I had to, is to a) terminate TLS at the proxy, b) use some an interior protocol (possibly TLS) between the client and the sensor, with the client telling the sensor a digest of (or perhaps the whole) EE certificate presented by the proxy.
This might look like a CONNECT if the proxy will permit it, though using HTTPS to talk to the proxy, not HTTP, naturally. Or it might look like a full-duplex POST to the sensor through the proxy, with TLS being spoken over that POST. If neither CONNECT nor full-duplex POST are options, I might try Websockets, and as a last resort, I'd split up the protocol into multiple POSTs, one for each round trip.
EDIT: At any rate, this sounds exactly like what CONNECT is for, and this covers your needs:
- The client trusts the proxy if it can authenticate it.
The proxy is an explicit client-side proxy, though
it's actually on the server-side, which might seem strange.
- The client trusts the device if it can authenticate it.
The proxy cares only to decide whether to route the
request.
- The proxy may need the client to authenticate to the
proxy -- there exist headers for this, and the client
could also use a user certificate in the TLS
connection to the proxy.
- The client may need to authenticate to the device,
which it can do in the TLS connection to the device
that runs over the outer CONNECT, with all existing
choices for authentication available.
The only strange thing is that historically client-side proxies are accessed w/o TLS, but you really need to use TLS here because the "client-side proxy" is actually far away, across the big bad Internet. That client-side proxies are usually talked to w/o TLS is really a bug.
EDIT: If you find that getting your client to use TLS to talk to the proxy is difficult, just think how much more difficult it is to implement a new protocol from scratch.
- bdamm 7y agoYou missed the requirement for the payloads to be secret from the proxy. If the proxy is terminating TLS, then the payload isn't secret from the proxy (and the sensor can't authenticate the source except as from the proxy, either.) It's worth adding that in my case there is no TCP or HTTP, so the home stretch over the LPWAN is UDP and CoAP.
- cryptonector 7y agoI did not miss that. The client runs the TLS connection end-to-end (to the device) over the CONNECT. That connection will be secure relative to the proxy. That there's no TCP/HTTP doesn't alter any of this. You can use UDP and DTLS this way, except you'll have to create the proxy protocol, and you'll need the proxy to maintain some "connection" state, and you'll need to expose inner connection close to the proxy so it can cleanup that "connection state".
- bdamm 7y agoThis is kind of a lot of work when there could be a protocol that I can use instead. Like OSCORE with EDHOC. Sure I can go gluing things together but that's more work for me and my people. We have other things to do like build kick ass network management tools etc.
- cryptonector 7y agoHaving had to maintain proxies, yes, it's a lot of work. But! Building a new protocol, and implementations for it, and applications for it, has got to be strictly more work than building a nested TLS protocol and implementation. More work for you, and for the rest of us who would have been happy not to have to deal with it but are forced to by new realities on the ground created by people who thought a new protocol would be less work. More chances to get the crypto wrong. I'm not keen on this. I'm all-in on TLS 1.3, not because it's great but because it's the only way to reduce the pressure to create new legacy. Legacy is fantastically expensive, so I'd rather not create more of it if we don't have to. To be fair, I'm told that even TLS 1.3 might not fit the power profile of IoTs, however, that's ameliorated by time, and it would also be ameliorated by cTLS, so I'm not sure that's enough to justify a new protocol.
- bdamm 7y agoWell, we have legacy anyway, because I can't economically use TLS or DTLS this way, so I already have a proprietary protocol. Presumably other designers are in the same position I am. And I'm not the only one looking hard at EDHOC and OSCORE, there are some pretty significant hitters in the IoT scene right now that are also looking at this and for the same reasons we are - standardized approaches in an industry sorely needing both standards and functional solutions that work on real networks. But yeah, building protocols is hard. I should know, since I've been building a dead-end protocol for over 10 years, including HSM support, massive scale, proxy scenarios, HA support, and blistering pen tests, that I am very ready to give up for OSCORE/EDHOC. TLS is not going to be "ameliorated by time"; RF isn't getting cleaner, radios are already very efficient, power management has gotten decent and there's not a lot left to squeeze. Putting bits in the air will continue to cost money. Embedded IoT will continue to chase the tiniest scrappiest cheapest hardware. Where do you think this "amelioration" is going to come from? TLS is going to get worse for IoT over time, not better. There will be ever more code points in TLS. The WG is going to continue to focus on big-box issues, privacy issues, server deployment issues, ever finer controls on timing attacks, extensions for SNI and other CDN issues. IoT problems will be solved elsewhere, with a different protocol, and that's fine.