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

Repair secret storage reset, cache keys when missing #1472

Merged
merged 3 commits into from
Sep 21, 2020

Conversation

jryans
Copy link
Collaborator

@jryans jryans commented Sep 18, 2020

This includes changes to avoid an error when resetting if secret storage if you only have some but not all cross-signing keys. It also changes the path for caching from secret storage so it will try to cache private keys whenever they are missing as well as on private key change.

Fixes element-hq/element-web#15230

This change ensures we omit any uncached keys, rather than adding nulls. This is
helpful for future steps that might try to store all of the values in one call.

Fixes element-hq/element-web#15230
We were only caching private keys locally on public key change, but we should
also do so if they are missing from the current session: e.g. for most users
that will be true for the master key, since previously we were not caching it.

Part of element-hq/element-web#15230
@jryans jryans requested a review from a team September 18, 2020 13:50
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

seems plausible

@jryans jryans merged commit a01368b into develop Sep 21, 2020
jryans added a commit that referenced this pull request Mar 23, 2021
This is a revised version of
#1472 which was previously
reverted for caused security prompts to appear on device list sync. In this
version, we only allow private key requests (which are likely to trigger user
dialogs) if we are coming from the bootstrap path.

This allows sessions that have already synced cross-signing public keys but
never got the private keys for some reason to make forward progress when e.g.
the user triggers bootstrap from security settings.
jryans added a commit that referenced this pull request Mar 24, 2021
This is a revised version of
#1472 which was previously
reverted for causing security prompts to appear on device list sync. In this
version, we only allow private key requests (which are likely to trigger user
dialogs) if we are coming from the bootstrap path.

This allows sessions that have already synced cross-signing public keys but
never got the private keys for some reason to make forward progress when e.g.
the user triggers bootstrap from security settings.
jryans added a commit that referenced this pull request Mar 26, 2021
This removes some catch blocks originally added by
#1472 so that higher level
operations can handle them as needed.

Part of element-hq/element-web#15584
@t3chguy t3chguy deleted the jryans/cross-signing-half-cached branch May 10, 2022 14:33
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.

Resetting secure storage results in "Unable to set up secret storage"
2 participants