-
Notifications
You must be signed in to change notification settings - Fork 160
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
feat: add age plugin and fido2 hmac support #680
base: master
Are you sure you want to change the base?
Conversation
Nice. Should we also point to your sops changes? |
description = '' | ||
List of plugins to use for sops decryption. | ||
''; | ||
}; |
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.
Doesn't that also require age plugin support in sops?
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.
I don't follow.
We should probably add the fido2-hmac
plugin as a default in this option though.
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.
Do we not need sops-nix to recognise these age plugin style age keys to not fail to run, even if they are not used?
This points to my patched version of |
To be quite honest I just looked at your PR and adapted it to use my sops. Maybe there's some extra steps missing here. |
Line 8 in 53c853f
|
I'll have a proper look rather than just copy pasta. |
@brianmcgee what is the current status? |
@OliverGeneser hoping to finish this during the holidays. |
Replying to this quote from the previous PR
That sounds to me like it's one or the other? Or at least a plugin needs to be explicitly supported? Is it possible to support both? For those of us already using the yubikey plugin (there are many I think because that plugin predates the FIDO2 one) that would be really great! Edit: and thanks @Mic92 and @brianmcgee for all your efforts getting this feature supported in sops, I saw it hasn't been straightforward and also required changes to age. ❤️ |
faef2bd
to
93bdb70
Compare
93bdb70
to
268afb1
Compare
go 1.18 | ||
go 1.22 | ||
|
||
toolchain go1.23.3 |
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.
Please drop that otherwise go while whine about toolchaik incompatibles and create useless friction.
mkdir -p $out/bin | ||
makeWrapper ${age}/bin/age $out/bin/age \ | ||
--prefix PATH : ${lib.makeBinPath [ age-plugin-fido2-hmac ]} | ||
'' |
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.
We want a final newline here
mkdir -p $out/bin | ||
makeWrapper ${sops}/bin/sops $out/bin/sops \ | ||
--prefix PATH : ${lib.makeBinPath [ age-plugin-fido2-hmac ]} | ||
'' |
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.
Same here and the next file
version = "age-sops"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "age-sops"; |
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.
That should be just two spaces
I'm encountering:
should probably be just:
I'm working around it by:
|
I played around with this a bit over the Xmas holidays and paired with @Mic92 for a while too. Creating secrets is easy enough with https://github.com/age-sops/sops. I can't find a good story for installing secrets though, both at a system level and a user level, with graphical sessions to add some extra spice to the mix. The arbitrary nature of the terminal based UI's that plugins can bring into the mix complicates things even further. Some form of unlock on system start / user login is needed. But I've reached the limits of my knowledge on this one. Happy for others to chime in. |
Looks like the TPM plugin actually supports environment variables: https://github.com/Foxboron/age-plugin-tpm?tab=readme-ov-file#with-pin Maybe the better option for machines rather than yubikeys. |
So one approach could be in your NixOS config to set a user secret which contains the PIN, and then the home-manager sops module can go from there with the TPM? I guess on a per user basis you would want to generate a separate identity with the TPM on a machine. |
No description provided.