HomePhabricator
Diffusion Comm 2dc4fbfd5898

[identity] implement addReservedUsername and removeReservedUsername RPCs

Description

[identity] implement addReservedUsername and removeReservedUsername RPCs

Summary:

  1. Check that the caller is Ashoat's keyserver by verifying the signature and validating the message components
  2. Add or delete the username in the request from the reserved usernames DDB table

Test Plan:
seeded DDB table with some usernames.
called the remove RPC from Bloom with a username from the table; confirmed that username was deleted from table.
called the add RPC with a new username; confirmed that username was added to table.
called the remove RPC with a new username; got back an error as expected, since username doesn't exist in table
called the add and remove RPCs with an invalid signature; got back an error as expected

Reviewers: jon, bartek

Reviewed By: bartek

Subscribers: ashoat, tomek

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