-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Cannot add new secrets after adding additional recipients in case of age+gitfs configuration #2544
Comments
Thanks a lot for reporting this issue. This check is new and I have to admit that I did only test it with GPG so far. Going back to my Feel free to send a PR if you want, but I'll need to also touch the code. It shouldn't remain as-is (too complicated for no reason). |
The new recipients check for unusable GPG keys did not work for age. In fact most age keys can be used as-is. At the same time this is cleaning up the recipients handling for age a bit. Fixes gopasspw#2544 RELEASE_NOTES=[BUGFIX] Fix recipients check for age. Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
@ckolumbus I have opened #2545, but I can't add you as a reviewer. |
The new recipients check for unusable GPG keys did not work for age. In fact most age keys can be used as-is. At the same time this is cleaning up the recipients handling for age a bit. Fixes gopasspw#2544 RELEASE_NOTES=[BUGFIX] Fix recipients check for age. Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Hi @dominikschulz THANKS for the very quick fix and PR. I guess I'm not part of the project and therefor cannot be a reviewer. I'll have a look |
The new recipients check for unusable GPG keys did not work for age. In fact most age keys can be used as-is. At the same time this is cleaning up the recipients handling for age a bit. Fixes #2544 RELEASE_NOTES=[BUGFIX] Fix recipients check for age. Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
@dominikschulz just verified the merged PR at home... works 👍 |
Summary
After initializing a age+gitfs gopass storage new encrypted entries can be added and read, so far, so good.
After adding a second recipient with
gopass recipient add
a re-encryption happens BUTadding new secrets with
gopass edit -c test
fails with ".. no valid keys (expired?)"Steps To Reproduce
Expected behavior
new secrets can be added an further more read by both recipients
Environment
Additional context
Preliminary analysis result:
in FindRecipients there is a loop that checks the recipient list against the entries found in the identities file.
gopass add recipients
only add the.age-recipients
in the store and not to the identities (which it shouldn't and can't as identities contains secrets only). But so the check in Line 39 never succeeds as the additionally added recipients are never found in the list of loaded identities.My assumption: the content of the
identities
file is different for theage
backend and the code inFindRecipients
should stay closer to the statement in the comment// For native age keys this is a no-op since they are self-contained (i.e. the ID is the full key already).
in Line 13. A test with removing the two loops overrecps
andlocal
and just callingids = append(ids, r)
without any check instead fixes the problem above. But I'm not sure whether there are any side effects of this "fix" that I don't see.If you agree with the general approach of fixing this issue then I'd happily provide a pull request.
THANKS for gopass + age (+fossil ;-) )
The text was updated successfully, but these errors were encountered: