Page MenuHomePhabricator

[identity] Forbid registering multiple devices with the same ID
ClosedPublic

Authored by bartek on Fri, Jun 7, 3:59 AM.
Tags
None
Referenced Files
F2080526: D12350.diff
Sat, Jun 22, 7:44 PM
Unknown Object (File)
Fri, Jun 21, 6:23 AM
Unknown Object (File)
Fri, Jun 21, 6:23 AM
Unknown Object (File)
Fri, Jun 21, 6:23 AM
Unknown Object (File)
Sun, Jun 16, 10:40 PM
Unknown Object (File)
Fri, Jun 14, 11:19 AM
Unknown Object (File)
Fri, Jun 14, 8:01 AM
Unknown Object (File)
Fri, Jun 14, 7:29 AM
Subscribers

Details

Summary

Addresses ENG-8383.
We don't want to allow registering multiple users with the same device ID.
However, if given device ID belongs to the same user, we can allow that (details in Linear task).

Depends on D12349

Test Plan

Commtest: called register_user_device() twice with the same device keys. Second call failed due to Status::AlreadyExists

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.Sun, Jun 9, 11:52 PM
bartek added 1 blocking reviewer(s): varun.
This revision is now accepted and ready to land.Wed, Jun 12, 8:56 AM

in the login RPCs, don't we need to check that the device ID doesn't belong to a different user if it already exists?

varun requested changes to this revision.Wed, Jun 12, 9:05 AM
This revision now requires changes to proceed.Wed, Jun 12, 9:05 AM

Verify if device ID belongs to the same user

services/identity/src/client_service.rs
1107 ↗(On Diff #41366)

I'm going to rebase on @varun's stack (when it's landed) before landing this and add a constant for this message

services/identity/src/client_service.rs
1107 ↗(On Diff #41366)

thanks, will land my stack ASAP

This revision is now accepted and ready to land.Mon, Jun 17, 10:26 AM

Add constant for Tonic status code