[keyserver] cron job to refresh account prekeys
Summary:
Issue: ENG-3944.
This is part of D8476 (breaking this for smaller diffs because it's complex).
Diff which publishes keys to Identity service.
Depends on D9420
Test Plan:
- Call revalidateAccountPrekeys() to make sure checks work properly
- Call publishNewPrekeys() to make sure upload works properly.
- Check Identity logs for Refreshing prekeys for user: ...
- Check if time (last_prekey_publish_time) is updated after successful upload.
Test error:
- Delete user credentials (identity will fail to auth while refreshing keys)
- Trigger cron job
- check logs for encountered error while trying to validate prekeys
Reviewers: varun, marcin, ashoat
Reviewed By: varun, marcin, ashoat
Subscribers: tomek, wyilio
Differential Revision: https://phab.comm.dev/D9421