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

[securedrop-export] Add option to keep a device unlocked on sd-devices #1729

Open
sssoleileraaa opened this issue Mar 8, 2022 · 3 comments

Comments

@sssoleileraaa
Copy link
Contributor

sssoleileraaa commented Mar 8, 2022

Follow-up for freedomofpress/securedrop-export#39

We will need to create a followup issue with a new status code to inform the client that the device is already unlocked and no user passphrase is necessary.

The issue for this was created here: #1734

**Important: ** If the device is unlocked by an external program we will still lock it after a file transfer. This is to err on the side of caution.

No issue was created for this at the time because it was something I thought we wouldn't want to support. But once #1734 is done, we can revisit this topic and potentially add a new option to keep the device unlocked while continuing to default to locking the device after a transfer completes. If we did this, I think it would make sense to say something more like "Keep device unlocked" rather than "Remember password."

User story

As a journalist who wants to export multiple documents, I'd like to keep the luks-encrypted thumb drive unlocked until I finish all my exports.

@sssoleileraaa
Copy link
Contributor Author

As a journalist who wants to export multiple documents, I'd like to keep the luks-encrypted thumb drive unlocked until I finish all my exports.

This user story will at least partially be addressed by adding support for exporting multiple files from a source.

@gonzalo-bulnes
Copy link
Contributor

Some of the new status codes (e.g. Status.DEVICE_WRITABLE) introduced in freedomofpress/securedrop-export#105 will enable detecting unlocked devices early in the export process if that's something we want to do. That could allow to offer different paths depending on the initial state of the device: like not re-locking a device that wasn't unlocked as part of the export.

No action yet, just flagging that current work will make this easier is we ever want to proceed.

@zenmonkeykstop zenmonkeykstop changed the title Add option to keep a device unlocked on sd-devices [securedrop-export] Add option to keep a device unlocked on sd-devices Dec 13, 2023
@zenmonkeykstop zenmonkeykstop transferred this issue from freedomofpress/securedrop-export Dec 13, 2023
@rocodes
Copy link
Contributor

rocodes commented Feb 22, 2024

Now that #1777 has been merged, this change will be straightforward to implement, but still needing some UX consideration:

  • In one (or more) ExportWizardPage, add a QCheckbox that defaults to checked (true) that says "lock this device after export" or similar. use registerField the same way the passphrase is a registered field, so that the wizard has access to the boolean value of this checkbox
  • Pass the result to sd-devices, either via a json metadata field, if we are still using json metadata, or via a qrexec service argument, if we have transitioned to that already.
  • There is already logic in export/disk/cli.py that unmounts and closes the volume only if should_close_volume is True (True by default, so currently it always closes and locks the volume).

The UX question to consider is where this option should be presented. The only page that users are guaranteed to see is the Preflight page. Everything else is conditional on what state their device is in. The easiest option is probably to add a "Review before Exporting" page that offers this checkbox, along with a summary of what is about to be exported, and then updating the "nextID" method so that everywhere we currently jump straight to the Export Done page, we would go to the Review page instead The only reason I didn't implement it already is it means an extra click.

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