HomePhabricator
Diffusion Comm 734df39d7857

[keyserver] Handle `SIGNED_IDENTITY_KEYS_BLOB` response

Tags
None
Referenced Files
F428694: 08719d.png
Mar 15 2023, 4:35 PM
File Not Attached
F428693: 5692a0.png
Mar 15 2023, 4:35 PM
File Not Attached
F428692: a1b039.png
Mar 15 2023, 4:35 PM
File Not Attached
F428689: 0ebd50.png
Mar 15 2023, 4:35 PM
File Not Attached
F428688: c83d33.png
Mar 15 2023, 4:35 PM
File Not Attached
Subscribers
None

Description

[keyserver] Handle SIGNED_IDENTITY_KEYS_BLOB response

Summary:
When we receive a SIGNED_IDENTITY_KEYS_BLOB response from the client, we want to verify the signature of the payload and then update the signed_identity_keys column of the cookies row in the DB.

(I didn't know what the right approach for error-handling here was, so I'm just continueing through the loop if the signedIdentityKeysBlob object is malformed?)


Depends on D7070

Test Plan:

  1. Nuke signed_identity_keys column for all rows of cookies table:

c83d33.png (1×856 px, 92 KB)

  1. Refresh the page on web so handleInitialClientSocketMessage gets hit on the keyserver
  2. Observe that the web client constructs and sends a valid signedIdentityKeysBlob by setting breakpoints in keyserver:

0ebd50.png (1×3 px, 722 KB)

  1. Step through processClientResponses on the keyserver and make sure cookies table is updated as expected:

a1b039.png (118×3 px, 68 KB)

  1. "Refresh" the native app running in iOS Simulator so handleInitialClientSocketMessage gets hit on the keyserver.
  2. Observe that the native client constructs and sends a valid signedIdentityKeysBlob by setting breakpoints in keyserver:

5692a0.png (2×3 px, 1 MB)

  1. Step through processClientResponses on the keyserver and make sure cookies table is updated as expected:

08719d.png (162×2 px, 91 KB)

Reviewers: ashoat, marcin

Reviewed By: ashoat

Subscribers: tomek

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

Details

Provenance
atulAuthored on Mar 15 2023, 4:28 PM
Reviewer
ashoat
Differential Revision
D7082: [keyserver] Handle `SIGNED_IDENTITY_KEYS_BLOB` response
Parents
rCOMM6bfaf0746b8f: [web] Add `CryptoStore` to `persistConfig.whitelist`
Branches
Unknown
Tags
Unknown