-
Notifications
You must be signed in to change notification settings - Fork 42
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
fix gpg key import / replies / encrypt to source on qubes #377
Conversation
this also simplifies parts of our gpg wrapper, which we should keep as feature limited as possible and expand only when we need to - we don't need to support importing private keys, nor can we easily get the fingerprint that is imported without brittle parsing of stdout (stdout is significantly different between qubes and other platforms so we'd need to maintain it on both - much simpler to use the fingerprint that the server provides for us).
the -o- option cannot be passed through the qubes gpg wrapper, and ciphertext will go to stdout regardless
closed #375 and removed blocked label, this should be ready for review |
👍 Both local and (hours later 😉) Qubes scenarios worked as described. I was able to reply with no errors logged, and the reply persisted across multiple syncs. |
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.
In my Qubes setup, I can see error messages like:
2019-05-21 18:13:16,319 - securedrop_client.logic:621(send_reply) ERROR: Failed to encrypt to source f482a492-2e35-4229-9d95-bfbc2d09f49f:
@redshiftzero Can you please tell me how to debug more?
Steps to debug:
|
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.
The source code change looks good and @rmol already tested the functionality. Approved.
I will debug my instance later on.
Fixes #363
The reviewer of this PR should test this on both Qubes and non-Qubes. If you need/want additional clarity on how to test please let me know and I will happily elaborate on any unclear parts of the test plans below.
Testing on non Qubes
develop
POST /api/v1/sources/<source uuid>/replies
endpoint)Testing on Qubes
Make sure you have applied the RPC policy change merged in rpc policies: allow sd-svs to get sd-gpg to import gpg keys securedrop-workstation#254. If you like you can test this part works by trying to import a key from
sd-svs
intosd-gpg
. Note that if you see some error output containing a note aboutno-tty
when you try to import a test gpg key, you will need to apply the (unreleased) fix merged today over in Qubes land: GpgImportKey: pass --no-tty through to gpg invocation QubesOS/qubes-app-linux-split-gpg#23.Next, make sure your staging server is running on anything after this server-side API change was merged: api: expose gpg fingerprint of source securedrop#4436.
In your dev env in
sd-svs
AppVM on Qubes, check out the branch in this PR (I attach a NetVM to mysd-svs
AppVM for dev purposes), run the client application (without passing—no-proxy
to the client invokation), monitor the logs, and verify that:qubes-gpg-client: unrecognized option '--import-options’
error described in gpg key import not working in Qubes #363