HomePhabricator
Diffusion Comm 2a6ad8ddbc0d

[services] Tunnelbroker - Expose string to be signed to the Rust

Description

[services] Tunnelbroker - Expose string to be signed to the Rust

Summary:
This diff introduces adding of the getStringToSign C++ function which is exposed to the Rust using the CXX bridge to get the string to verify from the DynamoDB database by the deviceID.
To create a new session client first gets the verification string from the server and then sign it with the private key. The randomly generated string is saved into the DynamoDB table for the corresponding deviceID during the request. To verify the string in the following D5947 and Rust verify function in D5945 we should get this string.

Linear task: ENG-2492

Test Plan:
As this diff is a part of the stack this diff can be tested on the end of the stack at D5947.
To test it:

  • Patch to the D5947
  • Run the integration tests in D5931 using the cargo t --test tunnelbroker_integration_test command.

The expected result is passing the integration test (signing and verifying the string are successful and the new session creation test will pass).

Reviewers: jon, bartek, tomek

Reviewed By: jon, bartek, tomek

Subscribers: ashoat, tomek, atul

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

Details