-
-
Notifications
You must be signed in to change notification settings - Fork 362
Fix leaking secret keys: Allow defining keyFiles as strings #1237
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
Conversation
Only allowing type 'path' forces keyFiles to be copied to the nix store when deploying, which is a serious security flaw.
I was checking in to this, and I think there is a bit of a misunderstanding making this unclear. This is totally safe: {
mymachine = {
deployment.keys."wireguard.nix".keyFile = ./wireguard.nix;
};
} when NixOps instantiates this, it uses Nix's
If you use
but that file is never copied in:
IN GENERAL, your note about using secrets as paths in a Nix expression IS dangerous, and NixOps in this case takes specific steps to make it safeR. I confirmed this is the case with
that said, being able to pass a string here makes sense, too. |
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.
This requires patching the option as well: https://github.com/NixOS/nixops/blob/master/nix/keys.nix#L25
Feel free to open again once you update the other bit! |
Only allowing type 'path' forces keyFiles to be copied to the nix store
when deploying, which is a serious security flaw.