-
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
"No key for source" error when replying to brand new source #1091
Comments
For the source this happened with, even a client restart does not resolve. For another new source that's not hitting the "Awaiting the encryption key" issue, I'm able to reply immediately. Same with older sources. The most urgent question here is likely whether there's anything in 1.3.0 (e.g., key cache changes) that could contribute to this behavior. So here's how I plan to drill further into this:
|
Just checked in a Qubes-staging environment, and was not able to reproduce. Reply was sent successfully, and confirmed receipt on the source side. Package version details:
|
On a subsequent attempt, was indeed able to reproduce the error! Replies from the client failed to send. Even after restarting the client, was not able to send replies to that particular source. Relevant logs from the client failure
|
I was not able to reproduce using the production version of the |
I think I found it, and it's definitely a client-side problem, nothing to do with SecureDrop 1.3.0. If a source is downloaded before it has its keypair, its key fingerprint will never be updated, because that attribute is missing from those updated in storage.update_sources. |
Did you see the source surge message when generating the new sources during the repos? |
No, when I encountered this issue, the reply area was initially disabled, but enabled on the next sync (which is when it did not work). Note that the "source surge message" will only be displayed to the Source after the source is flagged for reply in the JUI, in any event. I don't believe these intermittent issues were related to entropy pool exhaustion -- the first time I encountered this issue was on the first source submitted to the server, and it's generally quite hard to hit the entropy pool exhaustion scenario. |
So it sounds like there could be another reason the server doesn't generate a reply key for a new source. Note that during the client sync, we create new sources with the fingerprint and public_key provided by the server, so my thinking is that when you and Conor saw this issue, the server had returned a new source without a public key and fingerprint. I'm trying to understand all the cases where this could happen. |
Understood. So the bug is fixed if we update the fingerprint and public key each time we sync. I'm just digging in because we should know all the reasons we could return a source without a key. It sounds like you and Conor might have hit this issue because for some reason other than the source surge scenario, you hit a condition where the server did not generate a source key for a new source. |
Yes, speculating, I would guess that the asynchronous key generation simply had not finished by the time of the sync. See #803 when we first discovered that this could be an issue in the client. |
That would make sense if it's asynchronous! I think maybe we should consider making it synchronous on the server, but I know there are a lot of other things happening right now so I'll just |
Steps to reproduce
Expected behavior
The reply sends.
Actual behavior
Reply fails to send. Client log shows "Could not encrypt reply: no key four source
<id>
" SendReplyJobError. Meanwhile, replying to other sources still works.The text was updated successfully, but these errors were encountered: