Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More federation-aware API endpoints in brig #1446

Merged
merged 49 commits into from
Apr 21, 2021
Merged

Conversation

pcapriotti
Copy link
Contributor

@pcapriotti pcapriotti commented Apr 14, 2021

Add federation API endpoints:

  • users by ids
  • prekey
  • prekey bundle
  • multi-user prekey bundle

Hook qualified public API to federator

  • users by ids
  • prekey
  • prekey bundle
  • multi-user prekey bundle

Tests

  • federation endpoints integration
  • multi-backend integration

TODOs

  • make /list-users return an object (TBD in another PR)

pcapriotti and others added 30 commits April 12, 2021 09:22
federation-not-enabled now gives 400
`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`).
@pcapriotti pcapriotti changed the title more federation-aware API endpoints in brig [wip] More federation-aware API endpoints in brig [wip] Apr 16, 2021
@pcapriotti pcapriotti force-pushed the pcapriotti/federation branch from 05c1bbf to 373a942 Compare April 16, 2021 14:25
@pcapriotti pcapriotti force-pushed the pcapriotti/federation branch from 0007ed6 to 05400d6 Compare April 20, 2021 06:49
@pcapriotti pcapriotti marked this pull request as ready for review April 20, 2021 13:51
@pcapriotti pcapriotti changed the title More federation-aware API endpoints in brig [wip] More federation-aware API endpoints in brig Apr 20, 2021
Copy link
Member

@jschaul jschaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! See minor inline nitpicks.

I suppose that some of the changes we touched upon in discussions (such as moving federation API in brig to make use of more post requests and extensible types rather than lists) is a refactoring planned for a future PR?

services/brig/src/Brig/API/Client.hs Outdated Show resolved Hide resolved
services/brig/src/Brig/API/Client.hs Show resolved Hide resolved
services/brig/src/Brig/API/User.hs Outdated Show resolved Hide resolved
@pcapriotti
Copy link
Contributor Author

I suppose that some of the changes we touched upon in discussions (such as moving federation API in brig to make use of more post requests and extensible types rather than lists) is a refactoring planned for a future PR?

Yes, I think it's better to do that on top of #1445.

@pcapriotti pcapriotti merged commit c0a4dda into develop Apr 21, 2021
@pcapriotti pcapriotti deleted the pcapriotti/federation branch April 21, 2021 06:04
This was referenced May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants