[FEATURE] Adding support for age.Plugin
identities
#2960
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sorry for this being a big, messy PR; I had to touch quite a few things and the
age
plugin support itself is still experimental, so this is currently based on the age/plugin feature branch from age.On the bright side: yubikey
age
identities do work really nicely as far as I can tell!Closes #2900, closes #2260, and fixes partially #2619.
A few points worth mentioning that might warrant some discussion:
|
to separate the actual identity encoding from the recipient encoding. This has some trickling effects on how we parse age identitieswrapped
identities and recipients, because plugin.Identity
andRecipient
don't have any easy way to go back to their "encoded" string format with the current proposedage
plugin interfaces.age
by default tries to decrypt in the order of the stanzas, and if we do have a native identity on our machine, we probably want to use that first before using a hardware token.On a side node, overall, the
age
backend code is fairly messy and it might warrant some big refactoring at some point.Disclaimer: I have only tested that on my own machine, not with a team using
age
as a backend, and yeah tests are somewhat lacking, I'll try to add a few tests with example identities and recipients in the coming days.