agenix | 381 Members | |
| age-encrypted secrets for NixOS https://github.com/ryantm/agenix/ | 100 Servers |
| Sender | Message | Time |
|---|---|---|
| 15 May 2023 | ||
| appreciate the help! | 18:44:32 | |
| 21 May 2023 | ||
is there some way to splat the contents of a file into a new secret without actual copy&paste? maybe by setting EDITOR appropriately? ive tried a dozen things but cant get it | 02:16:58 | |
In reply to @ctx:kungfu-g.rip agenix -d input.age | EDITOR=cat agenix -e output.age using pipes seems to work for me (given that both input.age and output.age are defined in secrets.age) | 13:20:43 | |
| 27 May 2023 | ||
| 16:40:19 | ||
| 30 May 2023 | ||
| 22:34:05 | ||
| What is the purpose of agenix? Can I use it to add ssh keys and password store to my dotfiles git repo? | 22:36:06 | |
| * What is the purpose of agenix? Can I use it to add ssh keys and password store to my dotfiles git repo? Can I add the file secrets.nix and for instance my-server.pub.age and my-server.age files to a folder inside my git repo? | 22:41:55 | |
| 31 May 2023 | ||
| The purpose is to deliver secrets to NixOS machines in a secure and ergonomic manner. | 00:02:50 | |
| 1 Jun 2023 | ||
| 13:03:19 | ||
| 2 Jun 2023 | ||
| 22:54:26 | ||
| 3 Jun 2023 | ||
| 11:06:42 | ||
| 20:17:20 | ||
| 4 Jun 2023 | ||
| 17:40:30 | ||
| 21:25:19 | ||
| 7 Jun 2023 | ||
| 21:47:00 | ||
| 8 Jun 2023 | ||
| 19:12:59 | ||
| 9 Jun 2023 | ||
| I want agenix to store my server secrets in a git repo. The host ssh key is normally used for encryption of the secrets. If I want to reinstall my system in a few months and I want to re-use this git repo with secrets for easier install, how do I handle that with this host ssh key. Do I need to backup the private/public host key? Or is the approach I try to use wrong, maybe I just need to regenerate all secrets and encrypt them with a new host key? Anybody any suggestions for an approach? | 11:42:23 | |
| * I want agenix to store my server secrets in a git repo. The host ssh key is normally used for encryption of the secrets. If I want to reinstall my system in a few months and I want to re-use this git repo with secrets for easier install, how do I handle that with this host ssh key. Do I need to backup the private/public host key? Or is this approach wrong. For example: Do I need to regenerate all secrets and encrypt them with a new host key? Anybody any suggestions for an approach? | 11:43:31 | |
| Either way works. I recommend having at least the host key and your personal SSH key on secrets. That way you can use the rekey feature to add the new host key to the secrets if you go that way. | 12:17:30 | |
| I think i will go for the following steps:
If I would mess up by not backing up my private/public keypair, I could still regenerate all secrets, but that would be annoying depending on where it is all used. | 13:19:43 | |
| Sounds fine. Keep in mind you could have two secrets on the key for a short time if that eases the transition. | 13:22:23 | |
| * Sounds fine. Keep in mind you could have two keys on the secrets for a short time if that eases the transition. | 13:22:45 | |
In reply to @ryantm:matrix.orgI'm not sure I understand. The private keys with which I encrypt the secrets are not part of the secrets right? I'm actually talking about the situations where my old server is gone (which happens when I reinstall/repartition etc). And I install a NixOS from scratch, and the only thing I have left is the secrets, which are encrypted. In that situation I need to have the key for decrypting. That key is somewhere, and as it is the host key, this one needs to be restored in some way right? | 13:31:19 | |
| My approach to that is that I have two of my ssh user key from two different computers included as a recipient for all the secrets. | 21:58:01 | |
| Host keys themselves don't really matter for my ability to edit or rekey the secrets. | 21:58:17 | |
| Which is roughly what I suspect is what Ryan was suggesting | 21:58:36 | |
| I should probably add a third and put it on a usb key to give to a friend to keep offsite, for that matter. | 21:59:10 | |
| 10 Jun 2023 | ||
| 00:11:12 | ||
| 11 Jun 2023 | ||
| 15:20:46 | ||
| 13 Jun 2023 | ||
| Right. You encrypt to multiple recipients, the host(s) that use the secret, as well as editors that might change the source. | 06:22:55 | |