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

Secure backup #1648

Merged
merged 7 commits into from
Oct 30, 2023
Merged

Secure backup #1648

merged 7 commits into from
Oct 30, 2023

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Oct 26, 2023

The original big PR has been split to smaller one. This PR now include bug fixes and improvement.

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

First implementation of secure backup:

  • add a way to create the recovery key
  • add a way to change the recovery key
  • add a way to disable the keybackup
  • add a way to enable the keybackup
  • update the logout flow

Figma: https://www.figma.com/file/0MMNu7cTOzLOlWb7ctTkv3/Element-X?node-id=12998%3A32971&mode=dev

Motivation and context

Fixes #1574
Fixes #1575
Fixes #1577
Fixes #1578

Screenshots / GIFs

See screenshot in the PR

Demo (including bugs)

SecureBackupDemo

Tests

  • Login to a session and verify it then go to the new Chat backup setting entry and test all the new screens.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/7GfhU5

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Attention: 37 lines in your changes are missing coverage. Please review.

Comparison is base (356a321) 63.68% compared to head (6258f34) 63.64%.
Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1648      +/-   ##
===========================================
- Coverage    63.68%   63.64%   -0.04%     
===========================================
  Files         1267     1267              
  Lines        32835    32881      +46     
  Branches      6796     6809      +13     
===========================================
+ Hits         20910    20928      +18     
- Misses        8789     8805      +16     
- Partials      3136     3148      +12     
Files Coverage Δ
...io/element/android/appconfig/SecureBackupConfig.kt 0.00% <ø> (ø)
...nt/android/features/logout/impl/LogoutPresenter.kt 90.62% <100.00%> (+0.62%) ⬆️
...es/matrix/test/encryption/FakeEncryptionService.kt 96.15% <100.00%> (ø)
...android/libraries/theme/compound/CompoundColors.kt 100.00% <100.00%> (ø)
...p/impl/setup/SecureBackupSetupViewChangePreview.kt 33.33% <0.00%> (-4.17%) ⬇️
...curebackup/impl/disable/SecureBackupDisableView.kt 55.29% <33.33%> (-2.21%) ⬇️
...securebackup/impl/enable/SecureBackupEnableView.kt 36.36% <33.33%> (-2.10%) ⬇️
...element/android/features/logout/impl/LogoutView.kt 65.81% <28.57%> (-2.05%) ⬇️
...kup/impl/enter/SecureBackupEnterRecoveryKeyView.kt 44.11% <44.44%> (-0.89%) ⬇️
...s/securebackup/impl/setup/views/RecoveryKeyView.kt 77.95% <44.44%> (-1.39%) ⬇️
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmarty bmarty force-pushed the feature/bma/secureBackup branch 2 times, most recently from 396215a to bc159b7 Compare October 30, 2023 10:28
@bmarty bmarty marked this pull request as ready for review October 30, 2023 15:17
@bmarty bmarty requested a review from a team as a code owner October 30, 2023 15:18
@bmarty bmarty requested review from jmartinesp and removed request for a team October 30, 2023 15:18
Copy link
Contributor

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

LGTM!

Also, not directly related to this PR, but is it normal that I still see the encrypted history banner in the timeline after verifying my account and even confirming the recovery key?

@bmarty
Copy link
Member Author

bmarty commented Oct 30, 2023

(rebased and screenshooting again)

@bmarty
Copy link
Member Author

bmarty commented Oct 30, 2023

Also, not directly related to this PR, but is it normal that I still see the encrypted history banner in the timeline after verifying my account and even confirming the recovery key?

Not really, I will investigate this.

@ElementBot
Copy link
Collaborator

ElementBot commented Oct 30, 2023

Fails
🚫

Danger failed to run ./tools/danger/dangerfile-lint.js.

Error Error

Cannot find module 'danger-plugin-lint-report'
Require stack:
- ./tools/danger/dangerfile-lint.js
- /usr/src/danger/dist/runner/runners/inline.js
- /usr/src/danger/dist/commands/danger-runner.js
Error: Cannot find module 'danger-plugin-lint-report'
Require stack:
- ./tools/danger/dangerfile-lint.js
- /usr/src/danger/dist/runner/runners/inline.js
- /usr/src/danger/dist/commands/danger-runner.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:931:15)
    at Function.Module._load (internal/modules/cjs/loader.js:774:27)
    at Function._module2.default._load (/usr/src/danger/node_modules/override-require/dist/overrideRequire.js:43:25)
    at Module.require (internal/modules/cjs/loader.js:1003:19)
    at require (internal/modules/cjs/helpers.js:107:18)
    at Object.<anonymous> (./tools/danger/dangerfile-lint.js:9:18)
    at Module._compile (internal/modules/cjs/loader.js:1114:14)
    at requireFromString (/usr/src/danger/node_modules/require-from-string/index.js:28:4)
    at /usr/src/danger/dist/runner/runners/inline.js:161:68
    at step (/usr/src/danger/dist/runner/runners/inline.js:52:23)

Dangerfile

------------------^

Generated by 🚫 dangerJS against 6258f34

@sonarcloud
Copy link

sonarcloud bot commented Oct 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bmarty bmarty merged commit 5728d62 into develop Oct 30, 2023
11 of 15 checks passed
@bmarty bmarty deleted the feature/bma/secureBackup branch October 30, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants