-
Notifications
You must be signed in to change notification settings - Fork 122
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
String context lost in identity path #165
Comments
Thanks for the bug report! I'm responsible for that commit, sorry for the trouble -- should be able to look at this today. |
No worries! |
Trying to make sure I understand.
Is that right? |
Yes. And I also found the path of identity at Line 102 in 37c7297
|
Hmmm. So this seems like an unusual use case, since the whole point of this module is to keep secrets out of the store, but you're intentionally putting them into the store. Do I have that right?
Can you provide a little more context for your code? A link is fine if hosted somewhere, if it's private, can you at minimum include:
Please obscure / redact anything that seems too private of course. I could probably guess some of this, but having you provide it will help me get to the point faster and possibly build a test case. |
Hi, the entire config is fully available at https://github.com/LEXUGE/flake. You can build the image using The use case is a little unusual. And it's not indeed containing any secret. The runtime path of |
You can also test out the known-defect image at https://github.com/LEXUGE/flake/releases/download/build-20230224_0953/imgs.x1c7.iso |
Hmmm, including a path in I'll continue to tinker with it. One good thing is that the PR in question also allows keys to be missing, so you can add additional keys (one that exists at build time, another that exists at run time) and it should work, though they would need to be strings.
Gah, my kingdom to have |
If I understand correctly, I feel like the way it is now fixed a security vulnerability. I do not want the age module to be causing private keys to end up in the nix store. |
I agree private keys should not be in the nix store. However, this doesn't fix the vulnerability either as we can always make it into the store. It's better to make a predicate to see if the path starts with The reason I want to have agenix in LiveCD is to minimize the amount of modules/config that I need to write seperately for LiveCD and my config. Being able to "bootstrap agenix" makes it possible. |
For my bizarre case, I think the following will do the trick:
I will close once I confirm the workaround. |
That's what I was thinking as well -- perhaps not exactly a vulnerability, but something that encouraged misconfiguration. Perhaps relevant wording in the README could change -- from referring to |
FWIW, I think (?) I've recreated the issue with a failing test at https://github.com/n8henrie/agenix/tree/issue_165 |
Good idea. I think I saw this pattern somewhere before, but don't remember where. If we close this issue, we should at open one to add this predicate. |
Hi, I embed a non-confidential key file when I build a ISO
This decrypts "secrets" in LiveCD correctly before commit 37c7297. However, after the commit was introduced, it no longer works.
It seems like
../../secrets/raw/img_key_ed25519
is added to store as/nix/store/<hash>-img_key_ed25519
. However, the code atagenix/modules/age.nix
Line 75 in 37c7297
is coerced as
which is non-existent.
The text was updated successfully, but these errors were encountered: