Skip to content
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

Secure WebSockets #105

Open
michielbdejong opened this issue Oct 6, 2022 · 3 comments · May be fixed by #106
Open

Secure WebSockets #105

michielbdejong opened this issue Oct 6, 2022 · 3 comments · May be fixed by #106

Comments

@michielbdejong
Copy link
Member

The new Notifications protocol that is expected to become required in addition to the current pubsub protocol requires:

  • a new discovery mechanism, same as for webhooks
  • auth checks, same as for webhooks
  • a new pub format, same as for webhooks

So far I created the rudimentary https://github.com/pdsinterop/solid-nextcloud/blob/main/solid/lib/Controller/SolidWebsocketController.php which points to the old pubsub server.

I thought of a way to improve this:

  • add a second port to the pubsub server
  • when a client subscribes, create a corresponding webhook subscription, but as the target, put the new port of the pubsub server + an auth token
  • give the URL with auth token to the client
  • the pubsub server second port forwards webhook messages into the open websocket (if any) that matches its token
@michielbdejong
Copy link
Member Author

Ah wait, the webhook sends a POST body, not a GET query, of course.

@michielbdejong
Copy link
Member Author

OCA\\Solid\\Controller\\SolidWebhookController::registerWs(): Argument #1 ($topic) must be of type string, null given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 225

@michielbdejong
Copy link
Member Author

Got the tests passing on my laptop, now let's see if they also pass in GitHub Actions.

@michielbdejong michielbdejong linked a pull request Oct 7, 2022 that will close this issue
@Potherca Potherca added this to the v0.8.0 milestone Oct 19, 2022
@Potherca Potherca removed this from the v0.8.0 milestone Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants