-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Secure Local Transport #13
Comments
Currently the recommended way to access WebThings Gateway is via your own custom subdomain over HTTPS. The WebThings remote tunnelling service makes this very easy for users to configure during first time setup, they just choose a subdomain and it's all set up by magic. When I say magic, I mean that it automatically registers a _.webthings.io subdomain, configures DNS, issues a TLS certificate signed by LetsEncrypt and provides a dynamic, tunneled reverse proxy to safely provide remote access to your gateway behind your firewall without needing to forward ports on your router using NAT. The limitation of this approach is that if your internet connection goes down you can no longer access the gateway on your local network using the remote domain. This is why as a fallback the gateway also broadcasts a .local domain on the local network using mDNS, which can be accessed via plain HTTP (since serving the _.webthings.io TLS certificate via gateway.local would cause a security warning). We have found this approach works quite well, but it does mean:
We have tried many different approaches to providing TLS over the local network but unfortunately none of them have worked. See my comment at w3c/wot-security#185 (comment). We are therefore waiting to see what comes out of the HTTPS in Local Network Community Group.
We have long talked about creating a native mobile app for WebThings which acts as a general purpose WoT client in order to make discovery, first time setup and local security easier to solve. But generally speaking I'd say creating a "specialized browser" is almost certainly a bad idea. Keeping a web browser secure is not a trivial task. |
The tunnel approach of course works but does not solve the actual problem of secure local access, unfortunately. We discussed PR#21 on July 19 in the security call and agreed that it covers what you SHOULD do if what you want is secure local access. The problem is it still requires the user to install keys, and furthermore not all browsers (including notably, iOS Safari) currently support it (see https://docs.w3cub.com/browser_support_tables/tls1-3 for a list of status by browser). Consensus/Analysis:
So we'll merge the above PR, but it's only a start. |
Updated title to focus this issue on local transport. We may, however, want to add something for tunnelling, etc. later. |
See also w3c/wot-security#161 - DIDs and VCs. |
Discussion:
|
Action: add a reference to this issue to this section in the document. That should pull in this issue's description and link to this discussion. I'll do this. |
Will also update the opening description so it makes sense in the context of the document. |
SOME browsers may support import of raw public keys and/or integration with PKS systems. If one exists, then (probably without naming names) we can give this as an option in environments where putting public URLs for accessing private devices is not desirable (not just the home, but critical infrastructure, factories, etc. too). |
OK, I added an ednote. I wanted to add an "issue" class div but there is a bug in respec so it generates the wrong URL, so I linked this issue manually. |
So, in OPC-UA use-case/liaison call today we discussed the OPC-UA security key distribution system, and apparently it can be used also to distribute and manage keys for web servers. So that might be an option for factory automation use cases. |
Another idea: DID supports key distribution, and also multiple methods. What if there were DID methods that could use LDAP, OPC-UA, etc. under the covers for key distribution? |
That is a very interesting thought. So we would recommend to use only DID, and the DID spec has to define a method for all those different methods. That would keep it very flexible for us and focuses the actual security specification, implementations etc. to them. I find this an extremely good idea. Even though we would need to get in contact with the DID WG in order to figure out, if they would be interested in something like this. |
See also issue #14 on object security; in this case also, a crucial factor is key management. However, let's focus this specific issue on key management for transport and the other issue can focus on object security. |
Followup:
|
See discussion (and potential resolution) under #14 |
General issue with using HTTP on local networks, given fact that TLS doesn't work with browsers don't gracefully accept new certs. You can use TLS with preshared keys on a local network, or install a cert to use a browser, but can't just ad-hoc access dashboard.
To do: talk with Ben Francis (@benfrancis) about what best practice makes sense here. Right now they are using a password with plain HTTP and relying on network security (i.e. WEP). This is a MINIMAL solution, but obviously not ideal. Perhaps we should discuss this as an option but is not ideal. A question is whether dashboards are relevant to our specs; it should (probably) be discussed in architecture, when we talk about (smart home) hubs, where (a) users are not professionals and may not be comfortable installing a certificate (b) users/developers want to use a browser as a UI, hosted by the hub. You could also install an app that could basically just be a specialized browser with a built-in certificate.
The text was updated successfully, but these errors were encountered: