Page MenuHomePhabricator

[tunnelbroker] Add support for unauthenticated websocket sessions
ClosedPublic

Authored by bartek on Jan 22 2024, 5:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 29, 7:33 PM
Unknown Object (File)
Sat, Jun 29, 7:40 AM
Unknown Object (File)
Sat, Jun 29, 7:40 AM
Unknown Object (File)
Sat, Jun 29, 7:40 AM
Unknown Object (File)
Sat, Jun 29, 7:40 AM
Unknown Object (File)
Sat, Jun 29, 7:37 AM
Unknown Object (File)
Wed, Jun 26, 1:42 AM
Unknown Object (File)
Fri, Jun 7, 7:42 PM
Subscribers

Details

Summary

Resolves ENG-4381.
Added tunnelbroker support for starting anonymous sessions, which omit the VerifyUserAccessToken RPC cal RPC call.
As for now, the anonymous sessions can only listen for messages, and cannot send any.

Depends on D10779.

Test Plan
  • Modified client code to send AnonymousInitializationMessage instead of ConnectionInitializationMessage
  • Verified that websocket session is started
  • Verified that the device can receive messages
  • Verified that sending a message from anonymous session results in receiving MessageSentStatus::Unauthenticated error.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Jan 26 2024, 1:50 AM

I think we can remove notify_token, but we can discuss it in D10779. LGTM

services/tunnelbroker/src/websockets/session.rs
37 ↗(On Diff #35958)

Given the Message type defined I think is_anonymous seems more natural but up to you - both are okay

This revision is now accepted and ready to land.Jan 26 2024, 9:01 AM
services/tunnelbroker/src/websockets/session.rs
37 ↗(On Diff #35958)

In this context, is_authenticated seems to make more sense to me, We can rename it any time later if we change our minds

Remove notify_token from anonymous message