-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
trusted-public-keys in a (trusted) user's nix.conf is silently ignored #1921
Comments
TIL you can have a per-user nix.conf! Neat. |
This does appear to work on a single-user install, FWIW. |
Yes, from looking at the code seems to indicate trusted keys are only loaded when the daemon starts, so any changes afterwards sent by the client don't get applied. Not allowing this is fine by me, but then the user should get an error when sending trusted keys to the daemon. |
I don't quite understand what's the security model here though. If user wants to user a binary cache for himself/herself, how is that different than building the package from source? OK, the binary cache might be malicious, but user can also build malicious Nix files. I do understand that user A shouldn't be able to whitelist binary caches for user B. |
Because the user can use a malicious binary cache to substitute a trojaned binary for a legitimate Nix expression, which could then be used by other users. E.g.
But Alice cannot use that to hack Bob, she would have to get him to use her malicious Nix expression first. However, this issue is about trusted users, who should have the ability to set trusted keys. |
@edolstra ah, good one. Thank you. |
Yeah this is specifically for trusted users. I'm not sure but I think regular users get a warning that they are not allowed to set options like this. |
(cherry picked from commit d34fa2b) Signed-off-by: Domen Kožar <[email protected]>
Configuring trusted-public-keys in
~/.config/nix/nix.conf
gets silently ignored, resulting in a confusing error like this.The text was updated successfully, but these errors were encountered: