Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.2k
Encryption tab: hideAdvanced
section when the key storage is out of sync#29129
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Encryption tab: hideAdvanced
section when the key storage is out of sync#29129
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…ot cached locallyThe secret verification is now made at the level of `EncryptionUserSettingsTab` instead at the `RecoveryPanel` level. In the `EncryptionUserSettingsTab`, we decide to only display `RecoveryPanelOutOfSync` in case of uncached secrets.`RecoveryPanelOutOfSync` is simplified version of `RecoveryPanel` handling only the `secrets_not_cached` case.
… to handle the missing secrets
…erSettingsTab-test.tsx`
…ion tab in `encryption-tab.spec.ts
85141ee
to22988e7
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
looks sensible in general. A few comments.
src/components/views/settings/tabs/user/EncryptionUserSettingsTab.tsx OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
playwright/e2e/settings/encryption-user-tab/encryption-tab.spec.ts OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
playwright/e2e/settings/encryption-user-tab/encryption-tab.spec.ts OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
await expect(content).toMatchScreenshot("verify-device-encryption-tab.png"); | ||
await verifyButton.click(); | ||
await util.verifyDevice(recoveryKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
[aside: the fact that some utilities are standalone functions, and others have to be enabled via a fixture, is confusing to me. IMHO we should use fixtures less.]
Uh oh!
There was an error while loading.Please reload this page.
- fix typos- call onFinish after accessSecretStorage- onFinish doesn't need to be asynchronous
79c2c4b
tobbb2b01
Comparesrc/components/views/settings/encryption/RecoveryPanelOutOfSync.tsx OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
// Check if the secrets are cached | ||
const cachedSecrets = (await crypto.getCrossSigningStatus()).privateKeysCachedLocally; | ||
const secretsOk = cachedSecrets.masterKey && cachedSecrets.selfSigningKey && cachedSecrets.userSigningKey; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Don't we also need to check the key backup decryption key here? What happens if that is in 4S but not in the local client?
floriandurosJan 30, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hmm, good point. I'm doing another PR with this change#29150 (wip)
// Check if the secrets are cached | ||
const cachedSecrets = (await crypto.getCrossSigningStatus()).privateKeysCachedLocally; | ||
const secretsOk = cachedSecrets.masterKey && cachedSecrets.selfSigningKey && cachedSecrets.userSigningKey; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
At some point (maybe not right now), we need to move this out of here and into a utility function somewhere (possibly in the js-sdk), otherwise, we have 150 different places to remember to update every time we introduce a new secret. Particularly, this is conflicting with the device dehydration work.
floriandurosJan 31, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
See wip#29150
b7f8623
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Checklist
public
/exported
symbols have accurateTSDoc documentation.Figma design
TheAdvanced section in theEncryption tab of the user settings should not be displayed when the key storage is out of sync.
The secrets verification is moved to the encryption tab level instead to be at the recovery section level in order to only display the "key storage out of sync" section.
The PR can be reviewed by commit.