Skip to content

MLS key packages #2102

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

Merged
merged 34 commits into from
Feb 28, 2022
Merged

MLS key packages #2102

merged 34 commits into from
Feb 28, 2022

Conversation

pcapriotti
Copy link
Contributor

@pcapriotti pcapriotti commented Feb 4, 2022

Implementation of MLS key package API. This PR introduces 3 new endpoints for managing key packages, and corresponding schema changes:

  • POST /mls/key-packages/self/:client
  • GET /mls/key-packages/self/:client/count
  • POST /mls/key-packages/claim/:domain/:user

Key packages are claimed with a locking strategy similar to that for prekeys (in the absence of DynamoDB).

This PR also introduces some basic MLS types and corresponding deserialisation primitives (for its default TLS encoding).

Only local behaviour is implemented in this PR. Federation behaviour, as well as key package mapping (needed in order to be able to resolve key package refs to qualified client IDs), is left for future PRs.

Note: integration tests rely on the crypto-cli tool being in the path. The tool can be found here (note that it is a branch).

Tracked by https://wearezeta.atlassian.net/browse/FS-431.

TODO

  • Install crypto-cli in the dev environment
  • Install crypto-cli in CI

Checklist

  • The PR Title explains the impact of the change.
  • The PR description provides context as to why the change should occur and what the code contributes to that effect. This could also be a link to a JIRA ticket or a Github issue, if there is one.
  • If HTTP endpoint paths have been added or renamed, the endpoint / config-flag checklist (see Wire-employee only backend wiki page) has been followed (cailleach PR: https://github.com/zinfra/cailleach/pull/897).
  • If a cassandra schema migration has been added, I ran make git-add-cassandra-schema to update the cassandra schema documentation.
  • changelog.d contains the following bits of information (details):
    • A file with the changelog entry in one or more suitable sub-sections. The sub-sections are marked by directories inside changelog.d.
    • If new config options introduced: added usage description under docs/reference/config-options.md
    • If a data migration (not schema migration) introduced: measures to be taken by on-premise instance operators.
    • If public end-points have been changed or added: does nginz need un upgrade?

@pcapriotti pcapriotti force-pushed the pcapriotti/mls-key-packages branch 3 times, most recently from 76020d3 to 1d103c4 Compare February 8, 2022 08:56
@pcapriotti pcapriotti force-pushed the pcapriotti/mls-key-packages branch 2 times, most recently from 60f7f7a to f006449 Compare February 18, 2022 08:55
@pcapriotti pcapriotti force-pushed the pcapriotti/mls-key-packages branch 3 times, most recently from 47af6d5 to e4e9e91 Compare February 22, 2022 15:24
@pcapriotti pcapriotti force-pushed the pcapriotti/mls-key-packages branch from d9562cf to 4ae72e5 Compare February 24, 2022 16:15
@pcapriotti pcapriotti marked this pull request as ready for review February 25, 2022 08:06
@pcapriotti pcapriotti force-pushed the pcapriotti/mls-key-packages branch from 6ae2d14 to 631e529 Compare February 25, 2022 09:20
@mdimjasevic mdimjasevic self-requested a review February 25, 2022 12:43
Copy link
Contributor

@mdimjasevic mdimjasevic left a comment

Choose a reason for hiding this comment

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

This is great! I have some minor questions; they're inlined.

@pcapriotti pcapriotti force-pushed the pcapriotti/mls-key-packages branch from 8d240f8 to 39c8741 Compare February 28, 2022 10:41
@pcapriotti pcapriotti merged commit 00590d7 into develop Feb 28, 2022
@pcapriotti pcapriotti deleted the pcapriotti/mls-key-packages branch February 28, 2022 14:13
@zebot zebot mentioned this pull request Mar 1, 2022
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.

2 participants