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

Key backup: clean up SecureKeyBackup.prepareKeyBackupVersion #3559

Closed
wants to merge 14 commits into from

Conversation

BillCarsonFr
Copy link
Member

@BillCarsonFr BillCarsonFr commented Jul 7, 2023

Depends on #3555

Fixes #https://github.com/vector-im/crypto-internal/issues/107

Moved prepareKeyBackupVersion() in the new SecureBackup API.
Moved also the part that was doing the signing to do it once inside this API
The SecureBackup API exposes a prepareUnsignedKeyBackupVersion() it doesn't sign here because it would require a back reference to crypto. Instead the CryptoAPi exposes now a prepareKeyBackupVersion() that calls the backup API to get an unsigned version and then does the signing. In order to avoid breaking change the existing prepareKeyBackupVersion on backup.ts is deprecated and now calls the unsigned version.

Clients are using MatrixClient.prepareKeyBackupVersion that transparantly follow the call.

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

This PR currently has none of the required changelog labels.

Add one of: T-Deprecation, T-Enhancement, T-Defect, T-Task to indicate what type of change this is plus X-Breaking-Change if it's a breaking change.

I need a way to mark devices as trusted for the backup tests.
The user and device IDs are in the test data, so no need to pass them in
Make it use the CryptoApi rather than legacy `MatrixClient.crypto`, and use a
pre-signed backup instead of requiring a "blindlySignAnything" method.
@richvdh richvdh force-pushed the valere/rust_backup_status_api branch from 9f1c9f1 to 352c29e Compare July 26, 2023 16:53
@richvdh richvdh force-pushed the valere/rust_backup_status_api branch from 352c29e to 2c2fd4e Compare July 26, 2023 20:16
@richvdh richvdh force-pushed the valere/backup_prepareKeyBackupVersion_api branch from 9610aac to a3234c3 Compare July 26, 2023 22:14
@richvdh richvdh force-pushed the valere/rust_backup_status_api branch 2 times, most recently from 94582a5 to 938e9af Compare July 27, 2023 16:24
Base automatically changed from valere/rust_backup_status_api to develop July 28, 2023 08:16
@richvdh
Copy link
Member

richvdh commented Jul 28, 2023

Per my recent updates on https://github.com/vector-im/crypto-internal/issues/107: I don't think we want to do this as initially envisaged.

Leaving this open for now for @BillCarsonFr to decide if there is anything salvageable, but I suspect not.

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