-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support for websockets with auth-command #538
Comments
Another option would be you implement a |
I'm not very confident on the WebSocket protocol, so what I say may not be accurate, but considering our current architecture, instanciating a WebSocket client the same way we instantiate a fetch function seems like it would fit our current security model better: the WebSocket client can hold the tokens in its closure the same way the fetch does (see https://github.com/inrupt/solid-client-authn-js/blob/master/packages/browser/src/login/oidc/redirectHandler/AuthCodeRedirectHandler.ts), which prevents the token being potentially exfiltrated by a malicious script. |
Great, yes please! |
Just my 2c, but I really like the direction of Streaming requests with Fetch, as pointed out a couple of months ago. I know of course that that approach is very early days, but if/once it becomes widely available that might be a great alternative to WebSockets, with all it's attendant issues. |
Thanks for managing expectations! :) |
I very much agree with @pmcb55's comment. Putting auth commands into the WebSocket protocol as described in https://github.com/solid/specification/issues/52#issuecomment-682491952 is arguably better than having no auth at all, but it's also not an ideal fit. First of all, DPoP doesn't make sense in the context of WebSockets (what Streaming fetch is one such option -- it would leverage the existing auth mechanism for ordinary HTTP requests, which is very appealing There may be other options, too. But the main point is I am not convinced that the proposed approach to add an |
Thanks for providing context, Aaron. Sure, I'm aware of all these spec discussions, and I understand if you don't want to spend time building it. This was just a feature request and it's OK if you don't want to support this in your product! We have it working in solid-auth-fetcher, so that's what we'll keep using in the Solid OS stack and in the Solid test suite, then. |
cc @nicolasmondada let's discuss this situation in our meeting today! |
Support for authenticated websockets is now available in PodSpaces as part of Inrupt's 1.1 release. Here's the docs page to learn more about how to use them in your web app. |
In order to support https://github.com/solid/specification/issues/52#issuecomment-682491952, which will become mandatory in NSS version 6.0, we need to be able to send the tokens from the auth headers to the WebSocket server.
The solid-crud-tests are already doing this whenever they open a connection to a WebSocket-pubsub server.
It is my understanding that the current version of ISCAJ stores these tokens inside a closure, and so it would be impossible to send them (unless you add a simple WebSockets-pubsub client inside that closure).
The text was updated successfully, but these errors were encountered: