HomePhabricator
Diffusion Comm dc0769825150

[services] Tunnelbroker - Skipping session checks in a stream when…

Description

[services] Tunnelbroker - Skipping session checks in a stream when skip_authentication flag is set

Summary:
This diff introduces changes to the bidirectional stream gRPC handler to skip session authentication checks by adding the sessions.skip_authentication config flag.
In case of the flag was provided we are skipping getting the session parameters from the database and expecting the device will be provided as metadata instead. Also, we are creating an empty SessionItem instance to provide compatibility with the following code in the handler. We are adding skipping of the changing of "Online" status for the session in case the flag is provided.

Linear task: ENG-2642

Test Plan:

  1. Add the skip_authentication flag to the [sessions] section of the config file.
  2. Connect to the bidirectional messages stream by providing the deviceID parameter instead of sessionID.

The expected result is messages are delivered to the certain deviceID without prior session creation and authentication.

Reviewers: jon, bartek

Reviewed By: jon, bartek

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D6253