Skip to content

chart=2.104.34,image=2.104.34

@pcapriotti pcapriotti tagged this 21 Apr 06:04
This makes the following brig API endpoints federation aware:

- `post /list-users`
- `get /users/:domain/:uid/prekeys/:cid`
- `get /users/:domain/:uid/prekeys`
- `post /users/list-prekeys`

and adds corresponding integration and multi-backend tests.

Summary of commits:

* Make claimPrekey federation-aware

* Brig: Implement federated endpoint to get users by ids

* Federator/Client: Implement function to get users by ids

* Fix uses of federation errors

* Add federated prekey claim test

* Add federated prekey bundle test

* Add claimPrekeyBundle endpoint for federation

* Add test for multi-prekey-bundle federation API

* Implement multi-prekey-bundle federation API

* Make multi-user prekey bundle API federation-aware

* Make lookupProfiles support multiple domains

  `lookupProfile` is now making one federated request for every non-local domain
  in the input list of qualified user ids.

  The logic that partitions the list by domain has been moved away from the
  Federation module into the corresponding API module (`Brig.API.User`).

* Add some multi-backend tests

* Fix FromJSON instance of ListUsersQuery

  Also add a test for the `/list-user` endpoint.

* Add more qualified endpoint integration tests

* Add tests for invalid qualified API calls

* Multi-backend claim prekey bundle test

* Set JSON content type in inward federator calls

* Improve test names, add missing test

* Only compare qualified ids in multi-backend test

* Add multi-backend multi-prekey claim test

* Sort user ids in multi-backend test

* Address review comments

Co-authored-by: jschaul <jschaul@users.noreply.github.com>
Co-authored-by: Akshay Mankar <itsakshaymankar@gmail.com>
Assets 2
Loading