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 reset for EX #2415

Open
pmaier1 opened this issue May 3, 2024 · 4 comments
Open

Key reset for EX #2415

pmaier1 opened this issue May 3, 2024 · 4 comments

Comments

@pmaier1
Copy link
Contributor

pmaier1 commented May 3, 2024

Story

As a user I have to be able to reset my encryption ("crypto identity") for that I am able to use the app when I sign-in a new session and have no other device or recovery key to verify the device with.

Concept

As we have two authentication modes today (legacy password auth / OIDC), we have to support two different flows for key reset that are outlined in the technical concept below.

Priority should be on 1 as MAS has not been rolled-out widely yet and most users fall into this category.

Designs

Remarks

As per document and designs above the entry point for crypto identity reset is the session verification screen from where the user can chose to use the "Can't confirm" option to proceed with the reset.

The session verification screen:

  • Should not show the Use another device option if this is the last session
  • It should not show the Use recovery key option if recovery hasn't been previously setup
  • It should directly proceed to reset if neither of the 2 options are available

Resetting itself can be done in 2 different ways based on the session type:

  • for MAS-based sessions
    • the user will be presented with the account management webpage on which they would need to confirm the reset
    • while that's happening the client will try uploading keys in the background until it eventually succeeds
  • for username/password based sessions
    • try uploading the keys, if it works then there's nothing else to do
    • it it fails then request permissions to upload new keys
    • upload the keys and complete the reset

For both flows the following stand:

  • if the keys never get uploaded and app gets restarted, or for any other unforseen state, the user should be forcefully signed out
  • once keys get uploaded the onboarding/FTUE flow continues with the next normal step (analytics permission, push notifications etc.)
  • during the reset previously setup recovery will be reset and the user will be prompted to set it up again once gaining access to the app (as if it was never setup to being with)
  • a new key backup will be created as well (if backups weren't previously manually disabled)
  • any other existing session will become unverified and will prompt the user to verify again, either interactive or using the newly setup recovery key (if any)

Scope

Android

No tasks being tracked yet.

iOS

No tasks being tracked yet.

Web

No tasks being tracked yet.
@BillCarsonFr
Copy link
Member

Note to make the reset less destructive as possible we should ensure that all clients have a local copy of what is in the backup (import all in background at least once) https://github.com/element-hq/crypto-internal/issues/273

@manuroe
Copy link
Member

manuroe commented May 15, 2024

The proposal looks sane to me. We need to estimate the work. What is the expected time for this?

Should we wait for https://github.com/element-hq/crypto-internal/issues/273 to be landed to be as less destructive as possible?

Should we add this reset flow to the app backup settings?

@pmaier1
Copy link
Contributor Author

pmaier1 commented May 16, 2024

Note to make the reset less destructive as possible we should ensure that all clients have a local copy of what is in the backup (import all in background at least once) https://github.com/element-hq/crypto-internal/issues/273

Generally speaking, yes, all clients should have a copy of all the secrets. But the scenario we are mainly looking at right now is that you're trying to sign-in an EX device but you don't have other devices to verify with and have lost your recovery key. In this case this doesn't help, does it?

We should therefore not wait for it landing. Priority should be on the non-MAS flow as this is what most users are confronted with today.

What is the expected time for this?

As we've already made device verification mandatory on EX, we'd like to see this land as soon as possible. The designs are expected to be finished this week.

@pmaier1
Copy link
Contributor Author

pmaier1 commented May 24, 2024

I have updated the OP. The designs are now final and this is ready for engineering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants