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

If user has manually unlocked USB drive, don't re-prompt for pasphrase #1462

Closed

Conversation

rocodes
Copy link
Contributor

@rocodes rocodes commented Apr 5, 2022

Description

If a user has unlocked their Export device (i.e. via the commandline or by opening Nautilus in sd-devices and inputting the passphrase), recognize that the drive is unlocked and don't ask again for passphrase before exporting documents.

Returns a status code from the disk checks run in sd-export (This will also enable us to incorporate other response/status codes, for example to distinguish between LUKS and Veracrypt devices, in future).

Note Changes must be tested with corresponding changes in sd-export and released together.

Fixes #1734 (Together with corresponding sd-export PR)
Towards freedomofpress/securedrop-workstation#265

Test Plan

TK

Checklist

If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:

  • I have tested these changes in the appropriate Qubes environment (and I would also like a reviewer to test on Qubes)
  • I do not have an appropriate Qubes OS workstation set up (the reviewer will need to test these changes)
  • These changes should not need testing in Qubes

If these changes add or remove files other than client code, the AppArmor profile may need to be updated. Please check as applicable:

  • I have updated the AppArmor profile
  • No update to the AppArmor profile is required for these changes
  • I don't know and would appreciate guidance

If these changes modify the database schema, you should include a database migration. Please check as applicable:

  • I have written a migration and upgraded a test database based on main and confirmed that the migration applies cleanly
  • I have written a migration but have not upgraded a test database based on main and would like the reviewer to do so
  • I need help writing a database migration
  • No database schema changes are needed

Support multiple valid ExportStatus values in _disk_test.

Return an ExportStatus from preflight disk check and skip password prompt if export disk is already unlocked.
# On the way to success
USB_CONNECTED = "USB_CONNECTED"
DISK_ENCRYPTED = "USB_ENCRYPTED"

# (Success) Drive is compatible and unlocked; do not prompt for passphrase
USB_ENCRYPTED_UNLOCKED = "USB_ENCRYPTED_UNLOCKED"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as mentioned in the PR, in the future we'll refine this to return multiple status codes (LUKS_UNLOCKED, VERACRYPT_UNLOCKED)

@rocodes
Copy link
Contributor Author

rocodes commented Apr 5, 2022

A couple tests are failing because the export checker is looking for QubesOS, and on CI we're returning WARNING_QUBESOS_NOT_DETECTED. Will update!

@rocodes
Copy link
Contributor Author

rocodes commented Sep 13, 2022

I'm going to close this since it will be superseded by the refactor/wizard changes coming to sd-export.

@rocodes rocodes closed this Sep 13, 2022
@rocodes rocodes deleted the 40-remember-unlocked-volume branch October 5, 2023 12:22
@rocodes rocodes mentioned this pull request Jan 23, 2024
34 tasks
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.

[securedrop-export] if device already unlocked, don't ask for passphrase
1 participant