tweag / nix-hour

Questions for the weekly Nix Hour
MIT License
78 stars 3 forks source link

Secret management and deployment (current good enough :grin: practices)? #22

Closed con-f-use closed 1 year ago

con-f-use commented 1 year ago

I know this is a broad topic and there is no one way to skin this cat. It would be nice though to hear from veteran nix user what the current widely-used ways are to get secrets to deployed machines. Basically, I'd like an entry point for people who feel lost or overwhelmed with secret management, so they understand the issues and options better and can navigate their way to what is a good option for them.

Loose points:

con-f-use commented 1 year ago

To anyone reading this, we got exactly to the systemd.LoadCredential(s) part in nix hour 24 and were able to resolve the issues seen there off-camera, resulting in this gem: https://github.com/tweag/nix-hour/tree/master/24 . We learned a bit about how systemd services signal their readiness and how their permissions to do so are managed.

The rest of the topic might show up in future nix hours, though Silvan said he's not an expert and is thus a bit reluctant.

infinisil commented 1 year ago

This is a nice page! https://nixos.wiki/wiki/Comparison_of_secret_managing_schemes

0x4A6F commented 1 year ago

Some information is also collected here open for improvement.

infinisil commented 1 year ago

I think this is reasonably covered in a recent blog post: https://discourse.nixos.org/t/handling-secrets-in-nixos-an-overview-git-crypt-agenix-sops-nix-and-when-to-use-them/35462

Since I don't know too much about this myself, I'll consider this satisfactory for now