Page MenuHomePhabricator

[keyserver][lib] Introduce `version` endpoint
ClosedPublic

Authored by ashoat on Jun 13 2023, 9:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 28, 3:19 AM
Unknown Object (File)
Fri, Sep 27, 6:41 AM
Unknown Object (File)
Thu, Sep 19, 11:15 PM
Unknown Object (File)
Thu, Sep 19, 5:29 PM
Unknown Object (File)
Sat, Sep 7, 7:03 AM
Unknown Object (File)
Sat, Sep 7, 7:03 AM
Unknown Object (File)
Sat, Sep 7, 7:02 AM
Unknown Object (File)
Sat, Sep 7, 7:02 AM
Subscribers

Details

Summary

This endpoint returns the current version of the keyserver. Its initial use case will be simply to check if a keyserver exists at this URL.

More context in ENG-3952.

Depends on D8189

Test Plan

Tested in combination with the rest of the stack as follows:

  1. Override defaultURLPrefix in native/utils/url-utils.js to return some random string. This makes sure that the "default" of Ashoat's keyserver does not work, and makes it so the registration flow only works if the user selects a custom keyserver and all of the server calls in the registration flow use that custom keyserver
  2. Test the registration flow end-to-end for an Ethereum account
  3. Test the registration flow end-to-end for a username/password account
  4. Test the registration flow end-to-end for a username/password account with a custom avatar that requires an image upload
  5. Make sure that for all registrations, the correct avatar appears in the ChatThreadList when the RegistrationNavigator dismisses

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Avoid redeclaring the response object on every invocation

Looks good

Its initial use case will be simply to check if a keyserver exists at this URL.

I don't have context on future uses for this endpoint, but will we have to worry about scenarios where user-deployed "malicious" keyservers could potentially "lie" about their version?

This revision is now accepted and ready to land.Jun 13 2023, 6:22 PM

I don't have context on future uses for this endpoint, but will we have to worry about scenarios where user-deployed "malicious" keyservers could potentially "lie" about their version?

Yeah, but not much we can do about that...