Page MenuHomePhabricator

[identity] db client method to get session initialization info
ClosedPublic

Authored by varun on Feb 27 2023, 10:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 6:48 AM
Unknown Object (File)
Sun, Apr 28, 6:48 AM
Unknown Object (File)
Sun, Apr 28, 6:48 AM
Unknown Object (File)
Sun, Apr 28, 6:47 AM
Unknown Object (File)
Sun, Apr 28, 6:25 AM
Unknown Object (File)
Sat, Apr 6, 9:12 PM
Unknown Object (File)
Mar 28 2024, 5:01 PM
Unknown Object (File)
Mar 28 2024, 5:01 PM
Subscribers

Details

Summary

the session initialization info will be stored in a map in dynamoDB. the map's key is the device signingPublicKey, and the value is a map of initialization info component names (e.g. social proof, one-time prekeys, etc.) to their respective values.

example json (omitting irrelevant fields):

{
"userID": "12345",
"devices": {

"signingkey1": {
 "otherkey1": "lorem",
 "socialproof": "ipsum"
}

}
}

Test Plan

created 3 items in a test DDB table:

  • well-formed item with a devices map that contained a couple signing keys and their corresponding initialization info components
    • got back the expected HashMap<String, HashMap<String, String>>
  • well-formed item with an empty devices map
    • got back the expected HashMap, but with nothing inside
  • malformed item with no devices attribute
    • got back an error, as expected

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable