Page MenuHomePhabricator

[identity] Implement RPC for secondary device registration
ClosedPublic

Authored by bartek on Jan 29 2024, 4:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 1:04 PM
Unknown Object (File)
Tue, Nov 12, 12:15 PM
Unknown Object (File)
Thu, Nov 7, 12:44 AM
Unknown Object (File)
Mon, Nov 4, 5:51 AM
Unknown Object (File)
Fri, Nov 1, 11:51 PM
Unknown Object (File)
Fri, Nov 1, 11:51 PM
Unknown Object (File)
Fri, Nov 1, 11:51 PM
Unknown Object (File)
Fri, Nov 1, 11:51 PM
Subscribers

Details

Summary

Implementation of RPC from D10861.

  • Created function to put device data into device list (device key upload)
  • Called this function along with access token creation from the RPC handler
  • Performed basic device list checks - the RPC fails if the device is not on the device list.

Depends on D10861, D11072, D11073

Test Plan

Tested both scenarios: device on device list and device not on device list.

  • If the device is not on the list, fails with permission denied status
  • When the device is on the list, the RPC succeeds and returns the access token. Used awslocal dynamodb scan to make sure device keys are put in the devices table under userID|device-{deviceID} primary key.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Jan 29 2024, 5:28 AM
bartek added inline comments.
services/identity/src/client_service.rs
599–602

This is related to "device list rotation" and we'll be able to simplify this check when "final version of device list" is implemented.
In fact, even at this point, this scenario should never happen because device list is generated during login.
If the client somehow gets this error, it should log out and log in again

bartek retitled this revision from [identity] Implement RPC for secondary device login to [identity] Implement RPC for secondary device registration.Feb 14 2024, 4:44 AM
bartek edited the summary of this revision. (Show Details)

Update on parent feedback, introduce nonce challenge

varun added inline comments.
services/identity/src/client_service.rs
603 ↗(On Diff #37068)

i don't think this comment is very useful

623 ↗(On Diff #37068)

same here

This revision is now accepted and ready to land.Feb 15 2024, 9:15 PM

Rebase. Remove unnecessary comments