Skip to content
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

Remove NARInfo.pm autonomous signature #1331

Open
RaitoBezarius opened this issue Jan 2, 2024 · 1 comment
Open

Remove NARInfo.pm autonomous signature #1331

RaitoBezarius opened this issue Jan 2, 2024 · 1 comment

Comments

@RaitoBezarius
Copy link
Member

Is your feature request related to a problem? Please describe.

Currently, when rendering a NAR via NARInfo.pm, Hydra will sign autonomously the path by using Nix Perl bindings. This feature is undesirable because it creates a tightly coupling to the secret key inside of Hydra and prevent from using more advanced way of signing like remote signing in NixOS/nix#9076.

Describe the solution you'd like

It seems better to me to move this to Nix and remove this feature whatsover.

Describe alternatives you've considered

Implementing remote signing in the Nix perl bindings and creating a general but fallible signer function attached on abstract stores.

@Ma27
Copy link
Member

Ma27 commented Feb 4, 2024

@RaitoBezarius is binary_cache_secret_key_file actually used in nixos-org-configurations? I thought the signing is done via store_uri with a path to a secret-key? At least that's what I'm doing and I just serve the binary cache directory with nginx.

Nonetheless, I agree with this: I was kinda surprised when I learned about that behavior while updating Perl bindings and to me it seems like a feature that's not relevant anymore with store_uri=scheme://foo?secret-key=/etc/secret being a thing. This has its own shortcomings that warrant its replacement, but I think it's way better than the approach implemented in NARInfo.pm.

That being said, hydra-queue-runner claims that binary_cache_secret_key_file gets ignored (the code in NARInfo.pm doesn't look like it though), so I'm not sure if there are many users left.

cc @Ericson2314 @dasJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants